@blogmcp/sdk 0.1.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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/_virtual/constants.js +4 -0
- package/dist/_virtual/index.js +2 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.js +2 -0
- package/dist/_virtual/re.js +4 -0
- package/dist/core/article-seo.d.ts +27 -0
- package/dist/core/article-seo.js +25 -0
- package/dist/core/auth.d.ts +34 -0
- package/dist/core/auth.js +89 -0
- package/dist/core/blog-config.d.ts +5 -0
- package/dist/core/blog-config.js +14 -0
- package/dist/core/client-types.d.ts +51 -0
- package/dist/core/client.d.ts +159 -0
- package/dist/core/client.js +82 -0
- package/dist/core/i18n.d.ts +29 -0
- package/dist/core/i18n.js +34 -0
- package/dist/core/index.d.ts +26 -0
- package/dist/core/index.js +67 -0
- package/dist/core/markdown.d.ts +69 -0
- package/dist/core/markdown.js +47 -0
- package/dist/core/navigation.d.ts +70 -0
- package/dist/core/navigation.js +71 -0
- package/dist/core/queries.d.ts +34 -0
- package/dist/core/queries.js +363 -0
- package/dist/core/retry.d.ts +9 -0
- package/dist/core/retry.js +14 -0
- package/dist/core/seo.d.ts +142 -0
- package/dist/core/seo.js +166 -0
- package/dist/core/theme.d.ts +41 -0
- package/dist/core/theme.js +60 -0
- package/dist/core/translations/cs.json.js +27 -0
- package/dist/core/translations/en.json.js +27 -0
- package/dist/core/types.d.ts +184 -0
- package/dist/core/types.js +9 -0
- package/dist/core/view-model.d.ts +53 -0
- package/dist/core/view-model.js +47 -0
- package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +8 -0
- package/dist/node_modules/@braintree/sanitize-url/dist/index.js +60 -0
- package/dist/node_modules/dompurify/dist/purify.es.js +662 -0
- package/dist/node_modules/semver/classes/comparator.js +56 -0
- package/dist/node_modules/semver/classes/range.js +148 -0
- package/dist/node_modules/semver/classes/semver.js +169 -0
- package/dist/node_modules/semver/functions/clean.js +14 -0
- package/dist/node_modules/semver/functions/cmp.js +39 -0
- package/dist/node_modules/semver/functions/coerce.js +33 -0
- package/dist/node_modules/semver/functions/compare-build.js +14 -0
- package/dist/node_modules/semver/functions/compare-loose.js +11 -0
- package/dist/node_modules/semver/functions/compare.js +11 -0
- package/dist/node_modules/semver/functions/diff.js +24 -0
- package/dist/node_modules/semver/functions/eq.js +11 -0
- package/dist/node_modules/semver/functions/gt.js +11 -0
- package/dist/node_modules/semver/functions/gte.js +11 -0
- package/dist/node_modules/semver/functions/inc.js +21 -0
- package/dist/node_modules/semver/functions/lt.js +11 -0
- package/dist/node_modules/semver/functions/lte.js +11 -0
- package/dist/node_modules/semver/functions/major.js +11 -0
- package/dist/node_modules/semver/functions/minor.js +11 -0
- package/dist/node_modules/semver/functions/neq.js +11 -0
- package/dist/node_modules/semver/functions/parse.js +21 -0
- package/dist/node_modules/semver/functions/patch.js +11 -0
- package/dist/node_modules/semver/functions/prerelease.js +14 -0
- package/dist/node_modules/semver/functions/rcompare.js +11 -0
- package/dist/node_modules/semver/functions/rsort.js +11 -0
- package/dist/node_modules/semver/functions/satisfies.js +18 -0
- package/dist/node_modules/semver/functions/sort.js +11 -0
- package/dist/node_modules/semver/functions/valid.js +14 -0
- package/dist/node_modules/semver/index.js +97 -0
- package/dist/node_modules/semver/internal/constants.js +28 -0
- package/dist/node_modules/semver/internal/debug.js +8 -0
- package/dist/node_modules/semver/internal/identifiers.js +18 -0
- package/dist/node_modules/semver/internal/lrucache.js +32 -0
- package/dist/node_modules/semver/internal/parse-options.js +10 -0
- package/dist/node_modules/semver/internal/re.js +32 -0
- package/dist/node_modules/semver/ranges/gtr.js +11 -0
- package/dist/node_modules/semver/ranges/intersects.js +11 -0
- package/dist/node_modules/semver/ranges/ltr.js +11 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js +22 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js +22 -0
- package/dist/node_modules/semver/ranges/min-version.js +42 -0
- package/dist/node_modules/semver/ranges/outside.js +44 -0
- package/dist/node_modules/semver/ranges/simplify.js +24 -0
- package/dist/node_modules/semver/ranges/subset.js +94 -0
- package/dist/node_modules/semver/ranges/to-comparators.js +11 -0
- package/dist/node_modules/semver/ranges/valid.js +17 -0
- package/dist/nuxt/composables/useAsyncKb.d.ts +32 -0
- package/dist/nuxt/composables/useAsyncKb.js +34 -0
- package/dist/nuxt/index.d.ts +1 -0
- package/dist/nuxt/index.js +6 -0
- package/dist/packages/mdx-render-vue/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/packages/mdx-render-vue/dist/_virtual/constants.js +4 -0
- package/dist/packages/mdx-render-vue/dist/_virtual/index.js +5 -0
- package/dist/packages/mdx-render-vue/dist/_virtual/index2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/composables/useAudioPlayer.js +40 -0
- package/dist/packages/mdx-render-vue/dist/composables/useCallout.js +66 -0
- package/dist/packages/mdx-render-vue/dist/composables/useCodeBlock.js +62 -0
- package/dist/packages/mdx-render-vue/dist/composables/useGallery.js +68 -0
- package/dist/packages/mdx-render-vue/dist/composables/useMedia.js +9 -0
- package/dist/packages/mdx-render-vue/dist/composables/useYouTube.js +24 -0
- package/dist/packages/mdx-render-vue/dist/edit/AlertEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/AlertEdit.vue2.js +16 -0
- package/dist/packages/mdx-render-vue/dist/edit/AudioPlayerEdit.vue.js +102 -0
- package/dist/packages/mdx-render-vue/dist/edit/AudioPlayerEdit.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/BadgeEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/BadgeEdit.vue2.js +11 -0
- package/dist/packages/mdx-render-vue/dist/edit/ButtonEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/ButtonEdit.vue2.js +11 -0
- package/dist/packages/mdx-render-vue/dist/edit/CalloutEdit.vue.js +78 -0
- package/dist/packages/mdx-render-vue/dist/edit/CalloutEdit.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/CardEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/CardEdit.vue2.js +16 -0
- package/dist/packages/mdx-render-vue/dist/edit/CodeBlockEdit.vue.js +6 -0
- package/dist/packages/mdx-render-vue/dist/edit/CodeBlockEdit.vue2.js +74 -0
- package/dist/packages/mdx-render-vue/dist/edit/GalleryEdit.vue.js +56 -0
- package/dist/packages/mdx-render-vue/dist/edit/GalleryEdit.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/IconEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/IconEdit.vue2.js +11 -0
- package/dist/packages/mdx-render-vue/dist/edit/TooltipEdit.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/edit/TooltipEdit.vue2.js +20 -0
- package/dist/packages/mdx-render-vue/dist/edit/YouTubeEdit.vue.js +34 -0
- package/dist/packages/mdx-render-vue/dist/edit/YouTubeEdit.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/factory.js +29 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence-context.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence.js +32 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.vue_vue_type_script_setup_true_lang.js +12 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip.js +22 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip-context.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip.js +29 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/providers/environment/use-environment-context.js +12 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/providers/locale/use-locale-context.js +11 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/clean-props.js +8 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/create-context.js +12 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/dynamic.js +25 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/unref-element.js +8 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/use-forward-expose.js +36 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/use-render-strategy.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@braintree/sanitize-url/dist/constants.js +8 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@braintree/sanitize-url/dist/index.js +60 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +532 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +403 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@iconify/vue/dist/iconify.js +1192 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/anatomy/dist/create-anatomy.js +26 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/create-machine.js +21 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/merge-props.js +45 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/scope.js +16 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/state.js +136 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/types.js +5 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.js +4 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/computed-style.js +8 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/event.js +31 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/node.js +49 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/overflow.js +19 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/platform.js +16 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/query.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/raf.js +41 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/set.js +14 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/shared.js +7 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/focus-visible/dist/index.js +90 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-anchor.js +34 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-placement.js +187 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-styles.js +47 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/middleware.js +56 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/placement.js +7 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/presence/dist/presence.connect.js +16 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/presence/dist/presence.machine.js +147 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.anatomy.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +119 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +15 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.machine.js +375 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.store.js +9 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/types/dist/prop-types.js +10 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/array.js +6 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/equal.js +27 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/functions.js +10 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/guard.js +15 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/object.js +13 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/store.js +25 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/warning.js +25 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/bindable.js +37 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/machine.js +205 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/normalize-props.js +30 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/refs.js +14 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/track.js +19 -0
- package/dist/packages/mdx-render-vue/dist/node_modules/dompurify/dist/purify.es.js +659 -0
- package/dist/packages/mdx-render-vue/dist/registry.js +154 -0
- package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue2.js +37 -0
- package/dist/packages/mdx-render-vue/dist/render/audioplayer/AudioPlayerDefault.vue.js +102 -0
- package/dist/packages/mdx-render-vue/dist/render/audioplayer/AudioPlayerDefault.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue2.js +25 -0
- package/dist/packages/mdx-render-vue/dist/render/button/Button.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/button/Button.vue2.js +37 -0
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue.js +79 -0
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue.js +22 -0
- package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/card/Card.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/card/Card.vue2.js +24 -0
- package/dist/packages/mdx-render-vue/dist/render/codeblock/CodeBlockDefault.vue.js +6 -0
- package/dist/packages/mdx-render-vue/dist/render/codeblock/CodeBlockDefault.vue2.js +77 -0
- package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryGrid.vue.js +103 -0
- package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryGrid.vue2.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryLightbox.vue.js +6 -0
- package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryLightbox.vue2.js +142 -0
- package/dist/packages/mdx-render-vue/dist/render/icon/Icon.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/icon/Icon.vue2.js +23 -0
- package/dist/packages/mdx-render-vue/dist/render/tooltip/Tooltip.vue.js +4 -0
- package/dist/packages/mdx-render-vue/dist/render/tooltip/Tooltip.vue2.js +54 -0
- package/dist/packages/mdx-render-vue/dist/render/youtube/YouTubeDefault.vue.js +69 -0
- package/dist/packages/mdx-render-vue/dist/render/youtube/YouTubeDefault.vue2.js +4 -0
- package/dist/packages/mdx-schema/dist/composables/useMdxParsing.js +139 -0
- package/dist/packages/mdx-schema/dist/metadata/index.js +415 -0
- package/dist/packages/mdx-schema/dist/prepareProps.js +46 -0
- package/dist/packages/mdx-schema/dist/styles/index.js +119 -0
- package/dist/packages/mdx-schema/dist/types/index.js +26 -0
- package/dist/packages/sanitize/dist/html.js +41 -0
- package/dist/react/KbMdxContent.d.ts +35 -0
- package/dist/react/KbMdxContent.js +102 -0
- package/dist/react/context.d.ts +11 -0
- package/dist/react/context.js +5 -0
- package/dist/react/hooks/useImageRenderer.d.ts +6 -0
- package/dist/react/hooks/useImageRenderer.js +9 -0
- package/dist/react/hooks/useKbClient.d.ts +3 -0
- package/dist/react/hooks/useKbClient.js +7 -0
- package/dist/react/hooks/useKbContext.d.ts +3 -0
- package/dist/react/hooks/useKbContext.js +11 -0
- package/dist/react/hooks/useKbI18n.d.ts +7 -0
- package/dist/react/hooks/useKbI18n.js +8 -0
- package/dist/react/hooks/useKbLanguage.d.ts +21 -0
- package/dist/react/hooks/useKbLanguage.js +63 -0
- package/dist/react/hooks/useKbSearch.d.ts +20 -0
- package/dist/react/hooks/useKbSearch.js +22 -0
- package/dist/react/hooks/useMdxContent.d.ts +18 -0
- package/dist/react/hooks/useMdxContent.js +11 -0
- package/dist/react/index.d.ts +21 -0
- package/dist/react/index.js +20 -0
- package/dist/react/provider.d.ts +25 -0
- package/dist/react/provider.js +29 -0
- package/dist/react/server/index.d.ts +38 -0
- package/dist/react/server/index.js +26 -0
- package/dist/sdk.css +1 -0
- package/dist/vue/components/KbAccessGate.vue.d.ts +36 -0
- package/dist/vue/components/KbAccessGate.vue.js +74 -0
- package/dist/vue/components/KbAccessGate.vue2.js +4 -0
- package/dist/vue/components/KbArticleCard.vue.d.ts +34 -0
- package/dist/vue/components/KbArticleCard.vue.js +87 -0
- package/dist/vue/components/KbArticleCard.vue2.js +4 -0
- package/dist/vue/components/KbMdxContent.vue.d.ts +5 -0
- package/dist/vue/components/KbMdxContent.vue.js +7 -0
- package/dist/vue/components/KbMdxContent.vue2.js +82 -0
- package/dist/vue/composables/useArticles.d.ts +30 -0
- package/dist/vue/composables/useArticles.js +36 -0
- package/dist/vue/composables/useImageRenderer.d.ts +6 -0
- package/dist/vue/composables/useImageRenderer.js +9 -0
- package/dist/vue/composables/useKbAuth.d.ts +27 -0
- package/dist/vue/composables/useKbAuth.js +83 -0
- package/dist/vue/composables/useKbClient.d.ts +6 -0
- package/dist/vue/composables/useKbClient.js +13 -0
- package/dist/vue/composables/useKbComments.d.ts +37 -0
- package/dist/vue/composables/useKbComments.js +160 -0
- package/dist/vue/composables/useKbI18n.d.ts +6 -0
- package/dist/vue/composables/useKbI18n.js +8 -0
- package/dist/vue/composables/useKbLanguage.d.ts +22 -0
- package/dist/vue/composables/useKbLanguage.js +63 -0
- package/dist/vue/composables/useNavigation.d.ts +18 -0
- package/dist/vue/composables/useNavigation.js +20 -0
- package/dist/vue/composables/useSearch.d.ts +21 -0
- package/dist/vue/composables/useSearch.js +20 -0
- package/dist/vue/composables/useTags.d.ts +17 -0
- package/dist/vue/composables/useTags.js +36 -0
- package/dist/vue/index.d.ts +22 -0
- package/dist/vue/index.js +36 -0
- package/dist/vue/plugin.d.ts +30 -0
- package/dist/vue/plugin.js +17 -0
- package/package.json +97 -0
- package/src/core/article-seo.ts +101 -0
- package/src/core/auth.ts +138 -0
- package/src/core/blog-config.ts +30 -0
- package/src/core/client-types.ts +58 -0
- package/src/core/client.ts +287 -0
- package/src/core/i18n.ts +84 -0
- package/src/core/index.ts +147 -0
- package/src/core/markdown.ts +178 -0
- package/src/core/navigation.ts +152 -0
- package/src/core/queries.ts +414 -0
- package/src/core/retry.ts +19 -0
- package/src/core/seo.ts +374 -0
- package/src/core/theme.ts +128 -0
- package/src/core/translations/cs.json +225 -0
- package/src/core/translations/en.json +225 -0
- package/src/core/types.ts +231 -0
- package/src/core/view-model.ts +98 -0
- package/src/nuxt/composables/useAsyncKb.ts +119 -0
- package/src/nuxt/index.ts +6 -0
- package/src/react/KbMdxContent.tsx +215 -0
- package/src/react/context.ts +25 -0
- package/src/react/hooks/useImageRenderer.ts +15 -0
- package/src/react/hooks/useKbClient.ts +9 -0
- package/src/react/hooks/useKbContext.ts +13 -0
- package/src/react/hooks/useKbI18n.ts +15 -0
- package/src/react/hooks/useKbLanguage.ts +105 -0
- package/src/react/hooks/useKbSearch.ts +50 -0
- package/src/react/hooks/useMdxContent.tsx +33 -0
- package/src/react/index.ts +31 -0
- package/src/react/provider.tsx +70 -0
- package/src/react/server/index.ts +70 -0
- package/src/vue/components/KbAccessGate.vue +86 -0
- package/src/vue/components/KbArticleCard.vue +102 -0
- package/src/vue/components/KbMdxContent.vue +211 -0
- package/src/vue/composables/useArticles.ts +78 -0
- package/src/vue/composables/useImageRenderer.ts +12 -0
- package/src/vue/composables/useKbAuth.ts +131 -0
- package/src/vue/composables/useKbClient.ts +17 -0
- package/src/vue/composables/useKbComments.ts +281 -0
- package/src/vue/composables/useKbI18n.ts +11 -0
- package/src/vue/composables/useKbLanguage.ts +103 -0
- package/src/vue/composables/useNavigation.ts +38 -0
- package/src/vue/composables/useSearch.ts +52 -0
- package/src/vue/composables/useTags.ts +64 -0
- package/src/vue/index.ts +27 -0
- package/src/vue/plugin.ts +73 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-tenant theme color math + CSS-variable builder.
|
|
3
|
+
*
|
|
4
|
+
* SINGLE SOURCE OF TRUTH for the blog accent palette, shared by both the Nuxt
|
|
5
|
+
* blog (`app/plugins/theme-colors.ts`) and the Next.js blog (`app/layout.tsx`).
|
|
6
|
+
* Colors use RGB triplet format so Tailwind's `rgb(var(--color-accent) /
|
|
7
|
+
* <alpha-value>)` colors resolve with alpha support. Dark-mode variants are
|
|
8
|
+
* auto-computed from the base accent via HSL manipulation.
|
|
9
|
+
*
|
|
10
|
+
* The pure color helpers are ported VERBATIM from the original Nuxt plugin so
|
|
11
|
+
* the emitted CSS stays byte-identical across the refactor.
|
|
12
|
+
*/
|
|
13
|
+
/** Parse a `#rrggbb` (or `rrggbb`) hex string into an `[r, g, b]` 0-255 tuple. */
|
|
14
|
+
export declare function hexToRgb(hex: string): [number, number, number];
|
|
15
|
+
/** Convert a hex color to HSL — `h` in degrees (0-360), `s`/`l` in 0-1. */
|
|
16
|
+
export declare function hexToHsl(hex: string): [number, number, number];
|
|
17
|
+
/** Convert HSL (`h` in degrees, `s`/`l` in 0-1) to an `[r, g, b]` 0-255 tuple. */
|
|
18
|
+
export declare function hslToRgb(h: number, s: number, l: number): [number, number, number];
|
|
19
|
+
/** Lighten a hex color by `amount` (0-1 added to L), returns an `"r g b"` triplet. */
|
|
20
|
+
export declare function lightenColor(hex: string, amount: number): string;
|
|
21
|
+
/** Darken a hex color by `amount` (0-1 subtracted from L), returns an `"r g b"` triplet. */
|
|
22
|
+
export declare function darkenColor(hex: string, amount: number): string;
|
|
23
|
+
/** Render a hex color as a plain `"r g b"` RGB triplet (no transform). */
|
|
24
|
+
export declare function rgbTriplet(hex: string): string;
|
|
25
|
+
/** Per-tenant accent theme. All optional — defaults to the blue palette. */
|
|
26
|
+
export interface ThemeColors {
|
|
27
|
+
accent?: string;
|
|
28
|
+
accentHover?: string;
|
|
29
|
+
accentLight?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Build the per-tenant theme CSS custom-property block.
|
|
33
|
+
*
|
|
34
|
+
* Returns the EXACT string both blogs inject into a `<style>` tag:
|
|
35
|
+
* - `:root { … }` — light-mode RGB triplets straight from the config.
|
|
36
|
+
* - `.dark { … }` — dark-mode variants auto-computed from the base accent
|
|
37
|
+
* (lighten accent for text visibility, darken light for backgrounds).
|
|
38
|
+
*
|
|
39
|
+
* Defaults: accent `#2563eb`, accentHover `#1d4ed8`, accentLight `#dbeafe`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildThemeCssVars(theme?: ThemeColors): string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function f(c) {
|
|
2
|
+
const n = c.replace("#", "");
|
|
3
|
+
return [
|
|
4
|
+
parseInt(n.slice(0, 2), 16),
|
|
5
|
+
parseInt(n.slice(2, 4), 16),
|
|
6
|
+
parseInt(n.slice(4, 6), 16)
|
|
7
|
+
];
|
|
8
|
+
}
|
|
9
|
+
function d(c) {
|
|
10
|
+
const n = f(c), r = n[0] / 255, e = n[1] / 255, a = n[2] / 255, s = Math.max(r, e, a), t = Math.min(r, e, a), i = (s + t) / 2;
|
|
11
|
+
if (s === t) return [0, 0, i];
|
|
12
|
+
const o = s - t, h = i > 0.5 ? o / (2 - s - t) : o / (s + t);
|
|
13
|
+
let u = 0;
|
|
14
|
+
return s === r ? u = ((e - a) / o + (e < a ? 6 : 0)) / 6 : s === e ? u = ((a - r) / o + 2) / 6 : u = ((r - e) / o + 4) / 6, [u * 360, h, i];
|
|
15
|
+
}
|
|
16
|
+
function $(c, n, r) {
|
|
17
|
+
if (c = c / 360, n === 0) {
|
|
18
|
+
const t = Math.round(r * 255);
|
|
19
|
+
return [t, t, t];
|
|
20
|
+
}
|
|
21
|
+
const e = (t, i, o) => (o < 0 && (o += 1), o > 1 && (o -= 1), o < 1 / 6 ? t + (i - t) * 6 * o : o < 1 / 2 ? i : o < 2 / 3 ? t + (i - t) * (2 / 3 - o) * 6 : t), a = r < 0.5 ? r * (1 + n) : r + n - r * n, s = 2 * r - a;
|
|
22
|
+
return [
|
|
23
|
+
Math.round(e(s, a, c + 1 / 3) * 255),
|
|
24
|
+
Math.round(e(s, a, c) * 255),
|
|
25
|
+
Math.round(e(s, a, c - 1 / 3) * 255)
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
function g(c, n) {
|
|
29
|
+
const [r, e, a] = d(c), s = Math.min(1, Math.max(0, a + n)), [t, i, o] = $(r, e, s);
|
|
30
|
+
return `${t} ${i} ${o}`;
|
|
31
|
+
}
|
|
32
|
+
function b(c, n) {
|
|
33
|
+
return g(c, -n);
|
|
34
|
+
}
|
|
35
|
+
function l(c) {
|
|
36
|
+
const [n, r, e] = f(c);
|
|
37
|
+
return `${n} ${r} ${e}`;
|
|
38
|
+
}
|
|
39
|
+
function M(c) {
|
|
40
|
+
const n = c?.accent ?? "#2563eb", r = c?.accentHover ?? "#1d4ed8", e = c?.accentLight ?? "#dbeafe", a = l(n), s = l(r), t = l(e), i = g(n, 0.2), o = g(n, 0.35), h = b(n, 0.25);
|
|
41
|
+
return `:root {
|
|
42
|
+
--color-accent: ${a};
|
|
43
|
+
--color-accent-hover: ${s};
|
|
44
|
+
--color-accent-light: ${t};
|
|
45
|
+
}
|
|
46
|
+
.dark {
|
|
47
|
+
--color-accent: ${i};
|
|
48
|
+
--color-accent-hover: ${o};
|
|
49
|
+
--color-accent-light: ${h};
|
|
50
|
+
}`;
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
M as buildThemeCssVars,
|
|
54
|
+
b as darkenColor,
|
|
55
|
+
d as hexToHsl,
|
|
56
|
+
f as hexToRgb,
|
|
57
|
+
$ as hslToRgb,
|
|
58
|
+
g as lightenColor,
|
|
59
|
+
l as rgbTriplet
|
|
60
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const e = { articles: "Články", topics: "Témata", search: "Hledání", knowledgeBase: "Znalostní báze", account: "Účet" }, o = { title: "Znalostní báze", subtitle: "Objevte odborné články, výzkumné poznámky a průvodce", searchPlaceholder: "Hledat články...", featured: "Doporučené", recentArticles: "Nejnovější články", viewAll: "Zobrazit vše", noArticles: "Zatím žádné články", checkBackSoon: "Brzy přidáme nový obsah.", loadError: "Nepodařilo se načíst články. Zkuste to prosím znovu." }, t = { title: "Články", browseCollection: "Procházejte naši sbírku {count} článků", filterByTopic: "Filtrovat podle tématu", allArticles: "Všechny články", noArticlesFound: "Žádné články nenalezeny", tryDifferentTopic: "Zkuste vybrat jiné téma nebo se vraťte později.", loadError: "Nepodařilo se načíst články. Zkuste to prosím znovu.", previous: "Předchozí", next: "Další", pageOf: "Stránka {page} z {total}", backToArticles: "Zpět na články", backToAllArticles: "Zpět na všechny články", allArticlesLink: "Všechny články", notFound: "Článek nenalezen", notFoundDescription: "Článek, který hledáte, neexistuje nebo byl odstraněn.", browseAllArticles: "Procházet všechny články", loadErrorTitle: "Nepodařilo se načíst článek", loadErrorDescription: "Článek nebyl nalezen nebo došlo k chybě při načítání.", translationNotAvailable: "Překlad není k dispozici – zobrazuje se původní obsah", share: "Sdílet:", copyLink: "Zkopírovat odkaz" }, n = { title: "Hledání", pageTitle: "Hledání | Znalostní báze", placeholder: "Hledat články...", matchBroad: "Volné", matchBroadDesc: "Více výsledků", matchBalanced: "Vyvážené", matchBalancedDesc: "Doporučeno", matchStrict: "Přesné", matchStrictDesc: "Přesné shody", foundResults: "Nalezen {count} výsledek | Nalezeny {count} výsledky | Nalezeno {count} výsledků", match: "shoda", noResults: "Žádné výsledky", tryDifferentKeywords: "Zkuste jiná klíčová slova nebo procházejte naše", articlesLink: "články", startSearching: "Začněte hledat", enterQuery: "Zadejte dotaz pro vyhledávání ve znalostní bázi", searchError: "Vyhledávání se nezdařilo. Zkuste to prosím znovu." }, a = { title: "Témata", subtitle: "Prozkoumejte obsah podle tématu", tags: "Štítky", browseByTopic: "Procházet články podle tématu", noTags: "Zatím žádné štítky.", allTopics: "Všechna témata", topicNotFound: "Téma nenalezeno", topicNotFoundDescription: 'Téma "{slug}" neexistuje.', articleCount: "{count} článek | {count} články | {count} článků", noArticlesYet: "Zatím žádné články", checkBackSoon: "Brzy přidáme články o {name}.", browseAllArticles: "Procházet všechny články", backToAllTopics: "Zpět na všechna témata" }, l = { signIn: "Přihlásit se", signInTitle: "Přihlášení", signInSubtitle: "Přistupte ke svému účtu a prémiovému obsahu", email: "E-mail", emailPlaceholder: "vas{'@'}email.cz", password: "Heslo", passwordPlaceholder: "Zadejte heslo", forgotPassword: "Zapomenuté heslo?", noAccount: "Nemáte účet?", createAccount: "Vytvořit účet", orContinueWith: "Nebo pokračujte přes", signOut: "Odhlásit se", register: "Registrace", registerTitle: "Vytvořit účet", registerSubtitle: "Zaregistrujte se pro přístup k prémiovému obsahu", displayName: "Jméno", displayNamePlaceholder: "Vaše jméno", confirmPassword: "Potvrzení hesla", confirmPasswordPlaceholder: "Zadejte heslo znovu", haveAccount: "Již máte účet?", goToSignIn: "Přihlásit se", checkEmail: "Zkontrolujte svůj e-mail", verificationSent: "Odeslali jsme ověřovací odkaz na {email}. Klikněte na odkaz v e-mailu pro dokončení registrace.", forgotPasswordTitle: "Zapomenuté heslo?", forgotPasswordSubtitle: "Zadejte svůj e-mail a my vám pošleme odkaz pro obnovení hesla.", sendResetLink: "Odeslat odkaz pro obnovení", resetEmailSent: "Zkontrolujte svůj e-mail", resetEmailSentDescription: "Pokud účet s adresou {email} existuje, odeslali jsme odkaz pro obnovení hesla.", backToSignIn: "Zpět na přihlášení", resetPasswordTitle: "Obnovení hesla", resetPasswordSubtitle: "Zadejte nové heslo pro svůj účet.", newPassword: "Nové heslo", newPasswordPlaceholder: "Zadejte nové heslo", confirmNewPassword: "Potvrzení nového hesla", confirmNewPasswordPlaceholder: "Zadejte nové heslo znovu", resetPassword: "Obnovit heslo", passwordResetSuccess: "Heslo obnoveno!", passwordResetSuccessDescription: "Vaše heslo bylo úspěšně obnoveno. Nyní se můžete přihlásit.", invalidResetLink: "Neplatný odkaz", invalidResetLinkDescription: "Tento odkaz pro obnovení hesla je neplatný nebo vypršel.", requestNewLink: "Požádat o nový odkaz", verifyEmailTitle: "Ověření e-mailu", verifying: "Ověřujeme váš e-mail...", emailVerified: "E-mail ověřen!", emailVerifiedDescription: "Váš e-mail byl úspěšně ověřen. Nyní se můžete přihlásit.", verificationFailed: "Ověření se nezdařilo", verificationFailedDescription: "Tento ověřovací odkaz je neplatný nebo vypršel.", validationRequired: "Toto pole je povinné", validationEmail: "Zadejte platnou e-mailovou adresu", validationPasswordMin: "Heslo musí mít alespoň 8 znaků", validationPasswordMatch: "Hesla se neshodují" }, s = { title: "Komentáře", open: "Otevřít komentáře", noComments: "Zatím žádné komentáře", beFirst: "Buďte první, kdo sdílí své myšlenky k tomuto článku.", loginPrompt: "pro přidání komentáře", loginLink: "Přihlásit se", placeholder: "Napište komentář...", cancel: "Zrušit", comment: "Komentovat", reply: "Odpovědět", edit: "Upravit", delete: "Smazat", save: "Uložit", replyingTo: "Odpovídáte na komentář...", replyPlaceholder: "Napište odpověď...", editPlaceholder: "Upravte komentář...", editing: "Úprava komentáře", confirmDelete: "Opravdu chcete smazat tento komentář?", anonymous: "Anonymní", edited: "(upraveno)", original: "Originál ({code}):", justNow: "právě teď", minutesAgo: "před {count} min", hoursAgo: "před {count} h", daysAgo: "před {count} d", charCount: "{count}/{max}", submitHint: "Stiskněte {key}+Enter pro odeslání", loadError: "Nepodařilo se načíst komentáře", submitError: "Nepodařilo se odeslat komentář" }, i = { signInToAccess: "Pro přístup k tomuto obsahu ({level}) se přihlaste.", requiresAccess: "Tento obsah vyžaduje přístup úrovně {level}.", signIn: "Přihlásit se", upgradeToPremium: "Upgradovat na Premium", browseFreeArticles: "Procházet volné články", levelPublic: "Veřejné", levelPremium: "Premium", levelPartners: "Partneři", levelInternal: "Interní" }, r = { copyright: "© {year} Znalostní báze. Všechna práva vyhrazena." }, c = { loading: "Načítání...", error: "Chyba", retry: "Zkusit znovu", close: "Zavřít", switchToLight: "Přepnout na světlý režim", switchToDark: "Přepnout na tmavý režim", languageSelector: "Aktuální jazyk: {name}. Klikněte pro změnu.", skipToContent: "Přeskočit na hlavní obsah" }, d = { pageTitle: "Účet", pageSubtitle: "Spravujte své jméno, heslo a oznámení.", profileTitle: "Profil", profileSubtitle: "Vaše jméno a e-mail.", name: "Jméno", namePlaceholder: "Vaše jméno", email: "E-mail", emailPlaceholder: "vy{'@'}priklad.cz", emailUnverified: "E-mail zatím není ověřený.", resendVerification: "Znovu odeslat ověřovací e-mail", verificationSent: "Ověřovací e-mail byl odeslán — zkontrolujte si schránku.", saveProfile: "Uložit profil", profileSaved: "Profil byl aktualizován.", emailChangeNotice: "Poslali jsme ověřovací odkaz na novou adresu. Než se příště přihlásíte, musíte si e-mail ověřit.", passwordTitle: "Heslo", passwordSubtitle: "Změňte si heslo k účtu.", currentPassword: "Současné heslo", newPassword: "Nové heslo", confirmNewPassword: "Potvrzení nového hesla", passwordsDoNotMatch: "Nová hesla se neshodují.", changePassword: "Změnit heslo", passwordChanged: "Heslo bylo aktualizováno.", passwordOauthOnly: "Váš účet používá přihlášení přes sociální síť. Heslo spravuje váš poskytovatel.", notificationsTitle: "Oznámení", notificationsSubtitle: "Rozhodněte, kdy vám máme posílat reporty a e-maily.", autoReportErrors: "Automaticky hlásit chyby, které narazím", autoReportContent: "Automaticky hlásit chybějící nebo nesprávný obsah", policyAlways: "Vždy", policyAsk: "Nejprve se zeptej", policyNever: "Nikdy", emailNotifications: "E-mailová oznámení", emailFrequencyInstant: "Posílat hned", emailFrequencyDailyDigest: "Denní souhrn", emailFrequencyNever: "Žádné e-maily", saveSettings: "Uložit předvolby", settingsSaved: "Předvolby byly uloženy.", advancedFooter: "Hledáte API klíče, MCP přístup nebo agentní klienty? Spravujte je v", advancedFooterLinkLabel: "developer portálu" }, m = {
|
|
2
|
+
nav: e,
|
|
3
|
+
home: o,
|
|
4
|
+
articles: t,
|
|
5
|
+
search: n,
|
|
6
|
+
topics: a,
|
|
7
|
+
auth: l,
|
|
8
|
+
comments: s,
|
|
9
|
+
accessGate: i,
|
|
10
|
+
footer: r,
|
|
11
|
+
common: c,
|
|
12
|
+
account: d
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
i as accessGate,
|
|
16
|
+
d as account,
|
|
17
|
+
t as articles,
|
|
18
|
+
l as auth,
|
|
19
|
+
s as comments,
|
|
20
|
+
c as common,
|
|
21
|
+
m as default,
|
|
22
|
+
r as footer,
|
|
23
|
+
o as home,
|
|
24
|
+
e as nav,
|
|
25
|
+
n as search,
|
|
26
|
+
a as topics
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const e = { articles: "Articles", topics: "Topics", search: "Search", knowledgeBase: "Knowledge Base", account: "Account" }, o = { title: "Knowledge Base", subtitle: "Discover in-depth articles, research notes, and expert guides", searchPlaceholder: "Search articles...", featured: "Featured", recentArticles: "Recent Articles", viewAll: "View all", noArticles: "No articles yet", checkBackSoon: "Check back soon for new content.", loadError: "Failed to load articles. Please try again." }, t = { title: "Articles", browseCollection: "Browse our collection of {count} articles", filterByTopic: "Filter by topic", allArticles: "All articles", noArticlesFound: "No articles found", tryDifferentTopic: "Try selecting a different topic or check back later.", loadError: "Failed to load articles. Please try again.", previous: "Previous", next: "Next", pageOf: "Page {page} of {total}", backToArticles: "Back to articles", backToAllArticles: "Back to all articles", allArticlesLink: "All articles", notFound: "Article not found", notFoundDescription: "The article you're looking for doesn't exist or has been removed.", browseAllArticles: "Browse all articles", loadErrorTitle: "Failed to load article", loadErrorDescription: "The article could not be found or there was an error loading it.", translationNotAvailable: "Translation not available - showing original content", share: "Share:", copyLink: "Copy link" }, i = { title: "Search", pageTitle: "Search | Knowledge Base", placeholder: "Search articles...", matchBroad: "Broad", matchBroadDesc: "More results", matchBalanced: "Balanced", matchBalancedDesc: "Recommended", matchStrict: "Strict", matchStrictDesc: "Precise matches", foundResults: "Found {count} result | Found {count} results", match: "match", noResults: "No results found", tryDifferentKeywords: "Try different keywords or browse our", articlesLink: "articles", startSearching: "Start searching", enterQuery: "Enter a query to search our knowledge base", searchError: "Search failed. Please try again." }, a = { title: "Topics", subtitle: "Explore content by topic", tags: "Tags", browseByTopic: "Browse articles by topic", noTags: "No tags available yet.", allTopics: "All topics", topicNotFound: "Topic not found", topicNotFoundDescription: `The topic "{slug}" doesn't exist.`, articleCount: "{count} article | {count} articles", noArticlesYet: "No articles yet", checkBackSoon: "Check back soon for articles about {name}.", browseAllArticles: "Browse all articles", backToAllTopics: "Back to all topics" }, r = { signIn: "Sign in", signInTitle: "Sign in", signInSubtitle: "Access your account and premium content", email: "Email", emailPlaceholder: "you{'@'}example.com", password: "Password", passwordPlaceholder: "Enter your password", forgotPassword: "Forgot password?", noAccount: "Don't have an account?", createAccount: "Create an account", orContinueWith: "Or continue with", signOut: "Sign out", register: "Sign up", registerTitle: "Create an account", registerSubtitle: "Sign up to access premium content", displayName: "Display name", displayNamePlaceholder: "Your name", confirmPassword: "Confirm password", confirmPasswordPlaceholder: "Enter your password again", haveAccount: "Already have an account?", goToSignIn: "Sign in", checkEmail: "Check your email", verificationSent: "We've sent a verification link to {email}. Click the link in the email to complete your registration.", forgotPasswordTitle: "Forgot password?", forgotPasswordSubtitle: "Enter your email and we'll send you a reset link.", sendResetLink: "Send reset link", resetEmailSent: "Check your email", resetEmailSentDescription: "If an account with {email} exists, we've sent a password reset link.", backToSignIn: "Back to sign in", resetPasswordTitle: "Reset password", resetPasswordSubtitle: "Enter a new password for your account.", newPassword: "New password", newPasswordPlaceholder: "Enter new password", confirmNewPassword: "Confirm new password", confirmNewPasswordPlaceholder: "Enter new password again", resetPassword: "Reset password", passwordResetSuccess: "Password reset!", passwordResetSuccessDescription: "Your password has been successfully reset. You can now sign in.", invalidResetLink: "Invalid link", invalidResetLinkDescription: "This password reset link is invalid or has expired.", requestNewLink: "Request a new link", verifyEmailTitle: "Verify Email", verifying: "Verifying your email...", emailVerified: "Email verified!", emailVerifiedDescription: "Your email has been successfully verified. You can now sign in.", verificationFailed: "Verification failed", verificationFailedDescription: "This verification link is invalid or has expired.", validationRequired: "This field is required", validationEmail: "Please enter a valid email address", validationPasswordMin: "Password must be at least 8 characters", validationPasswordMatch: "Passwords do not match" }, s = { title: "Comments", open: "Open comments", noComments: "No comments yet", beFirst: "Be the first to share your thoughts on this article.", loginPrompt: "to leave a comment", loginLink: "Log in", placeholder: "Write a comment...", cancel: "Cancel", comment: "Comment", reply: "Reply", edit: "Edit", delete: "Delete", save: "Save", replyingTo: "Replying to comment...", replyPlaceholder: "Write a reply...", editPlaceholder: "Edit your comment...", editing: "Editing comment", confirmDelete: "Are you sure you want to delete this comment?", anonymous: "Anonymous", edited: "(edited)", original: "Original ({code}):", justNow: "just now", minutesAgo: "{count}m ago", hoursAgo: "{count}h ago", daysAgo: "{count}d ago", charCount: "{count}/{max}", submitHint: "Press {key}+Enter to submit", loadError: "Failed to load comments", submitError: "Failed to submit comment" }, n = { signInToAccess: "Sign in to access this {level} content.", requiresAccess: "This content requires {level} access.", signIn: "Sign in", upgradeToPremium: "Upgrade to Premium", browseFreeArticles: "Browse free articles", levelPublic: "Public", levelPremium: "Premium", levelPartners: "Partners", levelInternal: "Internal" }, l = { copyright: "© {year} Knowledge Base. All rights reserved." }, c = { loading: "Loading...", error: "Error", retry: "Try again", close: "Close", switchToLight: "Switch to light mode", switchToDark: "Switch to dark mode", languageSelector: "Current language: {name}. Click to change.", skipToContent: "Skip to main content" }, d = { pageTitle: "Account", pageSubtitle: "Manage your profile, password and notification preferences.", profileTitle: "Profile", profileSubtitle: "Your name and email.", name: "Name", namePlaceholder: "Your name", email: "Email", emailPlaceholder: "you{'@'}example.com", emailUnverified: "Email is not verified yet.", resendVerification: "Resend verification email", verificationSent: "Verification email sent — please check your inbox.", saveProfile: "Save profile", profileSaved: "Profile updated.", emailChangeNotice: "We've sent a verification link to your new email. You'll need to verify it before signing in next time.", passwordTitle: "Password", passwordSubtitle: "Change your account password.", currentPassword: "Current password", newPassword: "New password", confirmNewPassword: "Confirm new password", passwordsDoNotMatch: "New passwords don't match.", changePassword: "Change password", passwordChanged: "Password updated.", passwordOauthOnly: "Your account uses social sign-in. Password change is managed by your provider.", notificationsTitle: "Notifications", notificationsSubtitle: "Decide when we should send you reports and emails.", autoReportErrors: "Auto-report errors I encounter", autoReportContent: "Auto-report missing or wrong content", policyAlways: "Always", policyAsk: "Ask first", policyNever: "Never", emailNotifications: "Email notifications", emailFrequencyInstant: "Send immediately", emailFrequencyDailyDigest: "Daily digest", emailFrequencyNever: "Don't email me", saveSettings: "Save preferences", settingsSaved: "Preferences updated.", advancedFooter: "Looking for API keys, MCP credentials or agent clients? Manage them in the", advancedFooterLinkLabel: "developer portal" }, u = {
|
|
2
|
+
nav: e,
|
|
3
|
+
home: o,
|
|
4
|
+
articles: t,
|
|
5
|
+
search: i,
|
|
6
|
+
topics: a,
|
|
7
|
+
auth: r,
|
|
8
|
+
comments: s,
|
|
9
|
+
accessGate: n,
|
|
10
|
+
footer: l,
|
|
11
|
+
common: c,
|
|
12
|
+
account: d
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
n as accessGate,
|
|
16
|
+
d as account,
|
|
17
|
+
t as articles,
|
|
18
|
+
r as auth,
|
|
19
|
+
s as comments,
|
|
20
|
+
c as common,
|
|
21
|
+
u as default,
|
|
22
|
+
l as footer,
|
|
23
|
+
o as home,
|
|
24
|
+
e as nav,
|
|
25
|
+
i as search,
|
|
26
|
+
a as topics
|
|
27
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geo of an image, surfaced to the public blog ONLY when the image opted in
|
|
3
|
+
* (the API gates this; absent/null otherwise). Used to emit schema.org
|
|
4
|
+
* structured data. Coords are full-fidelity — the renderer decides precision.
|
|
5
|
+
*/
|
|
6
|
+
export interface MediaGeo {
|
|
7
|
+
latitude: number;
|
|
8
|
+
longitude: number;
|
|
9
|
+
altitude?: number | null;
|
|
10
|
+
placeName?: string | null;
|
|
11
|
+
}
|
|
12
|
+
/** A geotagged image referenced in an article body (gated to opted-in only). */
|
|
13
|
+
export interface ContentImageGeo extends MediaGeo {
|
|
14
|
+
/** Public URL/path of the image (the SDK absolutizes it for JSON-LD). */
|
|
15
|
+
url: string;
|
|
16
|
+
}
|
|
17
|
+
export interface Article {
|
|
18
|
+
id: string;
|
|
19
|
+
filename: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
slug?: string;
|
|
22
|
+
description?: string | null;
|
|
23
|
+
content?: string;
|
|
24
|
+
contentType: 'blog_post' | 'info_source';
|
|
25
|
+
status: 'draft' | 'review' | 'published' | 'archived' | 'changed';
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
publishedAt?: string;
|
|
29
|
+
sourceLanguageCode?: string;
|
|
30
|
+
featuredImageUrl?: string | null;
|
|
31
|
+
tags?: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface ArticleWithTranslation {
|
|
34
|
+
id: string;
|
|
35
|
+
filename: string;
|
|
36
|
+
contentType: string;
|
|
37
|
+
status: string;
|
|
38
|
+
description: string | null;
|
|
39
|
+
sourceLanguageCode: string;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
publishedAt: string | null;
|
|
43
|
+
title: string;
|
|
44
|
+
content: string;
|
|
45
|
+
languageCode: string;
|
|
46
|
+
isSource: boolean;
|
|
47
|
+
isFallback: boolean;
|
|
48
|
+
featuredImageUrl: string | null;
|
|
49
|
+
featuredImageGeo?: MediaGeo | null;
|
|
50
|
+
/** Geo for opted-in images referenced in the article body (for JSON-LD). */
|
|
51
|
+
contentImagesGeo?: ContentImageGeo[] | null;
|
|
52
|
+
accessRights: string[];
|
|
53
|
+
}
|
|
54
|
+
export interface Tag {
|
|
55
|
+
id: string;
|
|
56
|
+
slug: string;
|
|
57
|
+
name: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
color?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface LocalizedTag {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
slug: string;
|
|
65
|
+
description: string | null;
|
|
66
|
+
color: string | null;
|
|
67
|
+
accessLevel: string;
|
|
68
|
+
languageCode: string;
|
|
69
|
+
isFallback: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface SearchResult {
|
|
72
|
+
articleId: string;
|
|
73
|
+
filename: string;
|
|
74
|
+
title: string;
|
|
75
|
+
chunkText: string;
|
|
76
|
+
similarity: number;
|
|
77
|
+
sectionHeading?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface KBContextChunk {
|
|
80
|
+
filename: string;
|
|
81
|
+
title: string;
|
|
82
|
+
text: string;
|
|
83
|
+
similarity: number;
|
|
84
|
+
}
|
|
85
|
+
export interface Translation {
|
|
86
|
+
id: string;
|
|
87
|
+
articleId: string;
|
|
88
|
+
languageCode: string;
|
|
89
|
+
title: string;
|
|
90
|
+
content?: string;
|
|
91
|
+
syncStatus: 'synced' | 'stale' | 'needs_review';
|
|
92
|
+
reviewed: boolean;
|
|
93
|
+
translatedBy?: string;
|
|
94
|
+
updatedAt: string;
|
|
95
|
+
}
|
|
96
|
+
export interface Language {
|
|
97
|
+
id: string;
|
|
98
|
+
code: string;
|
|
99
|
+
name: string;
|
|
100
|
+
nativeName: string | null;
|
|
101
|
+
isSource: boolean;
|
|
102
|
+
isEnabled: boolean;
|
|
103
|
+
sortOrder: number;
|
|
104
|
+
}
|
|
105
|
+
export type AccessLevel = 'public' | 'premium' | 'partners' | 'internal';
|
|
106
|
+
export declare const ACCESS_LEVEL_ORDER: readonly AccessLevel[];
|
|
107
|
+
export interface Comment {
|
|
108
|
+
id: string;
|
|
109
|
+
articleId: string;
|
|
110
|
+
userId: string;
|
|
111
|
+
userName: string | null;
|
|
112
|
+
parentCommentId: string | null;
|
|
113
|
+
displayContent: string;
|
|
114
|
+
displayLanguageCode: string;
|
|
115
|
+
sourceLanguageCode: string;
|
|
116
|
+
sourceContent?: string;
|
|
117
|
+
isPendingTranslation: boolean;
|
|
118
|
+
isTranslated: boolean;
|
|
119
|
+
isEdited: boolean;
|
|
120
|
+
createdAt: string;
|
|
121
|
+
replies: Comment[];
|
|
122
|
+
}
|
|
123
|
+
export interface CommentSubscriptionEvent {
|
|
124
|
+
type: 'created' | 'updated' | 'deleted' | 'translated';
|
|
125
|
+
commentId: string;
|
|
126
|
+
}
|
|
127
|
+
export interface CommentsConnection {
|
|
128
|
+
comments: Comment[];
|
|
129
|
+
totalCount: number;
|
|
130
|
+
}
|
|
131
|
+
export interface CommentResult {
|
|
132
|
+
success: boolean;
|
|
133
|
+
comment: Comment | null;
|
|
134
|
+
error: string | null;
|
|
135
|
+
}
|
|
136
|
+
export interface AuthUser {
|
|
137
|
+
id: string;
|
|
138
|
+
email: string;
|
|
139
|
+
name?: string;
|
|
140
|
+
accessLevel: AccessLevel;
|
|
141
|
+
}
|
|
142
|
+
export interface AuthResult {
|
|
143
|
+
success: boolean;
|
|
144
|
+
token?: string;
|
|
145
|
+
user?: AuthUser;
|
|
146
|
+
error?: string;
|
|
147
|
+
}
|
|
148
|
+
export interface RegisterResult {
|
|
149
|
+
success: boolean;
|
|
150
|
+
message?: string;
|
|
151
|
+
error?: string;
|
|
152
|
+
}
|
|
153
|
+
export interface UpdateProfileResult {
|
|
154
|
+
success: boolean;
|
|
155
|
+
user?: AuthUser;
|
|
156
|
+
emailChanged: boolean;
|
|
157
|
+
error?: string;
|
|
158
|
+
}
|
|
159
|
+
export type ReportPolicyValue = 'always' | 'ask' | 'never';
|
|
160
|
+
export type EmailNotificationFrequency = 'instant' | 'daily_digest' | 'never';
|
|
161
|
+
/** Phase 4c: opt-in/out for the editor-replied-to-your-suggestion email. */
|
|
162
|
+
export type FeedbackNotificationFrequency = 'instant' | 'never';
|
|
163
|
+
export interface ReportSettings {
|
|
164
|
+
autoReportErrors: ReportPolicyValue;
|
|
165
|
+
autoReportContent: ReportPolicyValue;
|
|
166
|
+
autoReportPerformance: ReportPolicyValue;
|
|
167
|
+
includeContextData: boolean;
|
|
168
|
+
rateLimitPerHour: number;
|
|
169
|
+
emailNotifications: EmailNotificationFrequency;
|
|
170
|
+
feedbackNotifications: FeedbackNotificationFrequency;
|
|
171
|
+
}
|
|
172
|
+
export interface UpdateReportSettingsInput {
|
|
173
|
+
autoReportErrors?: ReportPolicyValue;
|
|
174
|
+
autoReportContent?: ReportPolicyValue;
|
|
175
|
+
autoReportPerformance?: ReportPolicyValue;
|
|
176
|
+
includeContextData?: boolean;
|
|
177
|
+
rateLimitPerHour?: number;
|
|
178
|
+
emailNotifications?: EmailNotificationFrequency;
|
|
179
|
+
feedbackNotifications?: FeedbackNotificationFrequency;
|
|
180
|
+
}
|
|
181
|
+
export interface PaginatedResponse<T> {
|
|
182
|
+
items: T[];
|
|
183
|
+
totalCount: number;
|
|
184
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-agnostic view-model builders.
|
|
3
|
+
*
|
|
4
|
+
* Per-item presentation logic (URLs, date formatting, tag links, access-level
|
|
5
|
+
* resolution) computed once in pure code so the Nuxt and Next.js blogs render
|
|
6
|
+
* identical data and only differ in template markup.
|
|
7
|
+
*/
|
|
8
|
+
import type { Article, AccessLevel } from './types';
|
|
9
|
+
import { type SeoConfig } from './seo';
|
|
10
|
+
/**
|
|
11
|
+
* Normalize a date value to an ISO 8601 string for `<time datetime>` and
|
|
12
|
+
* machine-readable SEO fields. The KB list API (`accessibleKbArticles`) can
|
|
13
|
+
* return dates in a non-ISO `Date.toString()` form; this guarantees valid
|
|
14
|
+
* ISO 8601 regardless. Invalid dates fall back to the raw value.
|
|
15
|
+
*/
|
|
16
|
+
export declare function toIsoDate(value: string | null | undefined): string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Format an ISO date string for display using the article locale.
|
|
19
|
+
* `cs` → `cs-CZ`, anything else → `en-US` (the blog's two-locale convention).
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatArticleDate(iso: string, locale: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the most restrictive (highest-rank) access level from an article's
|
|
24
|
+
* access rights. Empty/missing rights → `public`. Security-relevant: both blogs
|
|
25
|
+
* must gate identically, so this is single-sourced.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveArticleAccessLevel(accessRights: string[] | null | undefined): AccessLevel;
|
|
28
|
+
/** Render-ready view model for an article card / list item. */
|
|
29
|
+
export interface ArticleListItemVM {
|
|
30
|
+
slug: string;
|
|
31
|
+
/** Locale-aware article URL. */
|
|
32
|
+
href: string;
|
|
33
|
+
title: string;
|
|
34
|
+
description: string | null;
|
|
35
|
+
/** Raw featured image URL (not absolutized — the card relies on the image proxy). */
|
|
36
|
+
image: string | null;
|
|
37
|
+
/** ISO date used for `<time datetime>` (publishedAt, falling back to updatedAt). */
|
|
38
|
+
isoDate: string | null;
|
|
39
|
+
/** Localized human date, or null when no date is available. */
|
|
40
|
+
formattedDate: string | null;
|
|
41
|
+
tags: {
|
|
42
|
+
label: string;
|
|
43
|
+
slug: string;
|
|
44
|
+
href: string;
|
|
45
|
+
}[];
|
|
46
|
+
}
|
|
47
|
+
export interface BuildArticleListItemOptions {
|
|
48
|
+
article: Article;
|
|
49
|
+
config: SeoConfig;
|
|
50
|
+
/** Locale currently being rendered. */
|
|
51
|
+
locale: string;
|
|
52
|
+
}
|
|
53
|
+
export declare function buildArticleListItem(opts: BuildArticleListItemOptions): ArticleListItemVM;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ACCESS_LEVEL_ORDER as c } from "./types.js";
|
|
2
|
+
import { localizedHref as a } from "./seo.js";
|
|
3
|
+
function s(e) {
|
|
4
|
+
if (!e) return null;
|
|
5
|
+
const t = new Date(e);
|
|
6
|
+
return Number.isNaN(t.getTime()) ? e : t.toISOString();
|
|
7
|
+
}
|
|
8
|
+
function f(e, t) {
|
|
9
|
+
const n = t === "cs" ? "cs-CZ" : "en-US";
|
|
10
|
+
return new Date(e).toLocaleDateString(n, {
|
|
11
|
+
year: "numeric",
|
|
12
|
+
month: "long",
|
|
13
|
+
day: "numeric"
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function p(e) {
|
|
17
|
+
if (!e || e.length === 0) return "public";
|
|
18
|
+
let t = 0;
|
|
19
|
+
for (const n of e) {
|
|
20
|
+
const r = c.indexOf(n);
|
|
21
|
+
r > t && (t = r);
|
|
22
|
+
}
|
|
23
|
+
return c[t] ?? "public";
|
|
24
|
+
}
|
|
25
|
+
function g(e) {
|
|
26
|
+
const { article: t, config: n, locale: r } = e, o = t.slug || t.filename.replace(/\.(md|mdx)$/, ""), i = t.publishedAt || t.updatedAt || null, u = s(i);
|
|
27
|
+
return {
|
|
28
|
+
slug: o,
|
|
29
|
+
href: a(`/articles/${o}`, r, n),
|
|
30
|
+
title: t.title || "",
|
|
31
|
+
description: t.description ?? null,
|
|
32
|
+
image: t.featuredImageUrl ?? null,
|
|
33
|
+
isoDate: u,
|
|
34
|
+
formattedDate: i ? f(i, r) : null,
|
|
35
|
+
tags: (t.tags || []).map((l) => ({
|
|
36
|
+
label: l,
|
|
37
|
+
slug: l,
|
|
38
|
+
href: a(`/topics/${l}`, r, n)
|
|
39
|
+
}))
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
g as buildArticleListItem,
|
|
44
|
+
f as formatArticleDate,
|
|
45
|
+
p as resolveArticleAccessLevel,
|
|
46
|
+
s as toIsoDate
|
|
47
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __exports as e } from "../../../../_virtual/constants.js";
|
|
2
|
+
var t;
|
|
3
|
+
function a() {
|
|
4
|
+
return t ? e : (t = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.BLANK_URL = e.relativeFirstCharacters = e.whitespaceEscapeCharsRegex = e.urlSchemeRegex = e.ctrlCharactersRegex = e.htmlCtrlEntityRegex = e.htmlEntitiesRegex = e.invalidProtocolRegex = void 0, e.invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im, e.htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g, e.htmlCtrlEntityRegex = /&(newline|tab);/gi, e.ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, e.urlSchemeRegex = /^.+(:|:)/gim, e.whitespaceEscapeCharsRegex = /(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g, e.relativeFirstCharacters = [".", "/"], e.BLANK_URL = "about:blank", e);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
a as __require
|
|
8
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __exports as s } from "../../../../_virtual/index2.js";
|
|
2
|
+
import { __require as v } from "./constants.js";
|
|
3
|
+
var m;
|
|
4
|
+
function U() {
|
|
5
|
+
if (m) return s;
|
|
6
|
+
m = 1, Object.defineProperty(s, "__esModule", { value: !0 }), s.sanitizeUrl = p;
|
|
7
|
+
var e = v();
|
|
8
|
+
function d(r) {
|
|
9
|
+
return e.relativeFirstCharacters.indexOf(r[0]) > -1;
|
|
10
|
+
}
|
|
11
|
+
function R(r) {
|
|
12
|
+
var i = r.replace(e.ctrlCharactersRegex, "");
|
|
13
|
+
return i.replace(e.htmlEntitiesRegex, function(t, a) {
|
|
14
|
+
return String.fromCharCode(a);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function f(r) {
|
|
18
|
+
return URL.canParse(r);
|
|
19
|
+
}
|
|
20
|
+
function l(r) {
|
|
21
|
+
try {
|
|
22
|
+
return decodeURIComponent(r);
|
|
23
|
+
} catch {
|
|
24
|
+
return r;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function p(r) {
|
|
28
|
+
if (!r)
|
|
29
|
+
return e.BLANK_URL;
|
|
30
|
+
var i, t = l(r.trim());
|
|
31
|
+
do
|
|
32
|
+
t = R(t).replace(e.htmlCtrlEntityRegex, "").replace(e.ctrlCharactersRegex, "").replace(e.whitespaceEscapeCharsRegex, "").trim(), t = l(t), i = t.match(e.ctrlCharactersRegex) || t.match(e.htmlEntitiesRegex) || t.match(e.htmlCtrlEntityRegex) || t.match(e.whitespaceEscapeCharsRegex);
|
|
33
|
+
while (i && i.length > 0);
|
|
34
|
+
var a = t;
|
|
35
|
+
if (!a)
|
|
36
|
+
return e.BLANK_URL;
|
|
37
|
+
if (d(a))
|
|
38
|
+
return a;
|
|
39
|
+
var h = a.trimStart(), u = h.match(e.urlSchemeRegex);
|
|
40
|
+
if (!u)
|
|
41
|
+
return a;
|
|
42
|
+
var n = u[0].toLowerCase().trim();
|
|
43
|
+
if (e.invalidProtocolRegex.test(n))
|
|
44
|
+
return e.BLANK_URL;
|
|
45
|
+
var c = h.replace(/\\/g, "/");
|
|
46
|
+
if (n === "mailto:" || n.includes("://"))
|
|
47
|
+
return c;
|
|
48
|
+
if (n === "http:" || n === "https:") {
|
|
49
|
+
if (!f(c))
|
|
50
|
+
return e.BLANK_URL;
|
|
51
|
+
var o = new URL(c);
|
|
52
|
+
return o.protocol = o.protocol.toLowerCase(), o.hostname = o.hostname.toLowerCase(), o.toString();
|
|
53
|
+
}
|
|
54
|
+
return c;
|
|
55
|
+
}
|
|
56
|
+
return s;
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
U as __require
|
|
60
|
+
};
|