koishi-plugin-kkk 1.0.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/CHANGELOG.md +57 -0
- package/LICENSE +674 -0
- package/README.md +98 -0
- package/assets/web/assets/CronEditor-CYgFpX-g.js +1 -0
- package/assets/web/assets/DesktopLayout-iI43ij11.js +1 -0
- package/assets/web/assets/MobileLayout-CziU8MCR.js +1 -0
- package/assets/web/assets/ThemeSwitch-DFohhwd9.js +1 -0
- package/assets/web/assets/index-BRROK0vh.js +47 -0
- package/assets/web/assets/index-Dj-StEiS.css +2 -0
- package/assets/web/assets/separator-CxcFlCzz.js +1 -0
- package/assets/web/favicon.svg +1 -0
- package/assets/web/icons.svg +24 -0
- package/assets/web/index.html +15 -0
- package/assets/webui.html +115 -0
- package/client/index.ts +63 -0
- package/config/default_config/app.yaml +64 -0
- package/config/default_config/bilibili.yaml +116 -0
- package/config/default_config/config.json +157 -0
- package/config/default_config/cookies.yaml +11 -0
- package/config/default_config/douyin.yaml +99 -0
- package/config/default_config/kuaishou.yaml +8 -0
- package/config/default_config/pushlist.yaml +37 -0
- package/config/default_config/request.yaml +22 -0
- package/config/default_config/upload.yaml +50 -0
- package/config/default_config/xiaohongshu.yaml +23 -0
- package/dist/index.js +1 -0
- package/lib/compat/axios.js +23 -0
- package/lib/compat/cron.js +77 -0
- package/lib/compat/esm.js +15 -0
- package/lib/compat/express.js +23 -0
- package/lib/compat/heroui.js +12 -0
- package/lib/compat/lodash.js +33 -0
- package/lib/compat/logger.js +118 -0
- package/lib/compat/node-karin.js +1053 -0
- package/lib/compat/phosphor-icons.js +27 -0
- package/lib/compat/qqcard.js +256 -0
- package/lib/compat/root.js +44 -0
- package/lib/compat/runtime.js +87 -0
- package/lib/compat/segment.js +167 -0
- package/lib/compat/sqlite3.js +117 -0
- package/lib/compat/start.js +7 -0
- package/lib/compat/syncConfig.js +65 -0
- package/lib/compat/template-react.js +30 -0
- package/lib/compat/text.js +65 -0
- package/lib/compat/yaml.js +13 -0
- package/lib/configBridge.js +91 -0
- package/lib/index.js +775 -0
- package/lib/karin/app.js +34 -0
- package/lib/karin/apps/__ready.js +9 -0
- package/lib/karin/apps/admin.js +136 -0
- package/lib/karin/apps/help.js +233 -0
- package/lib/karin/apps/push.js +291 -0
- package/lib/karin/apps/qrlogin.js +176 -0
- package/lib/karin/apps/statistics.js +209 -0
- package/lib/karin/apps/testPush.js +247 -0
- package/lib/karin/apps/tools.js +473 -0
- package/lib/karin/apps/update.js +252 -0
- package/lib/karin/index.js +37 -0
- package/lib/karin/module/db/bilibili.js +831 -0
- package/lib/karin/module/db/douyin.js +918 -0
- package/lib/karin/module/db/index.js +165 -0
- package/lib/karin/module/db/migration.js +199 -0
- package/lib/karin/module/db/statistics.js +559 -0
- package/lib/karin/module/index.js +94 -0
- package/lib/karin/module/server/constants/routes.js +48 -0
- package/lib/karin/module/server/controllers/bots.js +230 -0
- package/lib/karin/module/server/controllers/config.js +75 -0
- package/lib/karin/module/server/controllers/video.js +208 -0
- package/lib/karin/module/server/index.js +26 -0
- package/lib/karin/module/server/middlewares/auth.js +133 -0
- package/lib/karin/module/server/routes/amagi.js +57 -0
- package/lib/karin/module/server/routes/api.js +40 -0
- package/lib/karin/module/server/routes/index.js +97 -0
- package/lib/karin/module/server/routes/ssr.js +16 -0
- package/lib/karin/module/server/routes/static.js +43 -0
- package/lib/karin/module/utils/Base.js +403 -0
- package/lib/karin/module/utils/CardParser.js +487 -0
- package/lib/karin/module/utils/Common.js +418 -0
- package/lib/karin/module/utils/Config.js +434 -0
- package/lib/karin/module/utils/EmojiReaction.js +242 -0
- package/lib/karin/module/utils/ErrorHandler/handler.js +114 -0
- package/lib/karin/module/utils/ErrorHandler/index.js +55 -0
- package/lib/karin/module/utils/ErrorHandler/render.js +182 -0
- package/lib/karin/module/utils/ErrorHandler/sender.js +206 -0
- package/lib/karin/module/utils/ErrorHandler/strategy.js +41 -0
- package/lib/karin/module/utils/ErrorHandler/types.js +2 -0
- package/lib/karin/module/utils/ErrorHandler/utils.js +108 -0
- package/lib/karin/module/utils/FFmpeg.js +298 -0
- package/lib/karin/module/utils/ImageHelper.js +91 -0
- package/lib/karin/module/utils/ImageSlice.js +429 -0
- package/lib/karin/module/utils/MotionPhoto.js +250 -0
- package/lib/karin/module/utils/Network/Downloader.js +413 -0
- package/lib/karin/module/utils/Network/ImageDownloader.js +250 -0
- package/lib/karin/module/utils/Network/Network.js +332 -0
- package/lib/karin/module/utils/Network/ThrottleStream.js +71 -0
- package/lib/karin/module/utils/Network/constants.js +129 -0
- package/lib/karin/module/utils/Network/helpers.js +174 -0
- package/lib/karin/module/utils/Network/index.js +34 -0
- package/lib/karin/module/utils/Network/types.js +12 -0
- package/lib/karin/module/utils/Networks.js +17 -0
- package/lib/karin/module/utils/ParseLock.js +34 -0
- package/lib/karin/module/utils/ParseOverride.js +88 -0
- package/lib/karin/module/utils/QqCardResolve.js +114 -0
- package/lib/karin/module/utils/QqPanel.js +879 -0
- package/lib/karin/module/utils/Render/coverTheme.js +256 -0
- package/lib/karin/module/utils/Render/index.js +582 -0
- package/lib/karin/module/utils/amagiClient.js +338 -0
- package/lib/karin/module/utils/avatar.js +201 -0
- package/lib/karin/module/utils/bot.js +141 -0
- package/lib/karin/module/utils/build-metadata.js +50 -0
- package/lib/karin/module/utils/changelog.js +166 -0
- package/lib/karin/module/utils/index.js +26 -0
- package/lib/karin/module/utils/loginSession.js +259 -0
- package/lib/karin/module/utils/parseTip.js +93 -0
- package/lib/karin/module/utils/runtime-report.js +140 -0
- package/lib/karin/module/utils/semver.js +72 -0
- package/lib/karin/module/utils/statisticsAggregate.js +415 -0
- package/lib/karin/platform/bilibili/bilibili.js +1805 -0
- package/lib/karin/platform/bilibili/comments.js +294 -0
- package/lib/karin/platform/bilibili/danmaku.js +555 -0
- package/lib/karin/platform/bilibili/dynamic-text.js +827 -0
- package/lib/karin/platform/bilibili/genParams.js +37 -0
- package/lib/karin/platform/bilibili/getID.js +159 -0
- package/lib/karin/platform/bilibili/index.js +24 -0
- package/lib/karin/platform/bilibili/live-status.js +40 -0
- package/lib/karin/platform/bilibili/login.js +132 -0
- package/lib/karin/platform/bilibili/push.js +1397 -0
- package/lib/karin/platform/bilibili/riskControl.js +133 -0
- package/lib/karin/platform/bilibili/search.js +299 -0
- package/lib/karin/platform/common/danmaku-types.js +12 -0
- package/lib/karin/platform/douyin/comments.js +310 -0
- package/lib/karin/platform/douyin/danmaku.js +893 -0
- package/lib/karin/platform/douyin/douyin.js +1145 -0
- package/lib/karin/platform/douyin/getID.js +94 -0
- package/lib/karin/platform/douyin/index.js +24 -0
- package/lib/karin/platform/douyin/login.js +230 -0
- package/lib/karin/platform/douyin/push/favorite.js +75 -0
- package/lib/karin/platform/douyin/push/index.js +21 -0
- package/lib/karin/platform/douyin/push/live.js +69 -0
- package/lib/karin/platform/douyin/push/post.js +60 -0
- package/lib/karin/platform/douyin/push/recommend.js +74 -0
- package/lib/karin/platform/douyin/push/render.js +621 -0
- package/lib/karin/platform/douyin/push/types.js +2 -0
- package/lib/karin/platform/douyin/push.js +1128 -0
- package/lib/karin/platform/douyin/types.js +13 -0
- package/lib/karin/platform/douyin/videoQuality.js +222 -0
- package/lib/karin/platform/douyin/workType.js +182 -0
- package/lib/karin/platform/index.js +20 -0
- package/lib/karin/platform/kuaishou/comments.js +91 -0
- package/lib/karin/platform/kuaishou/getID.js +43 -0
- package/lib/karin/platform/kuaishou/getdata.js +41 -0
- package/lib/karin/platform/kuaishou/index.js +20 -0
- package/lib/karin/platform/kuaishou/kuaishou.js +122 -0
- package/lib/karin/platform/xiaohongshu/comments.js +162 -0
- package/lib/karin/platform/xiaohongshu/getID.js +129 -0
- package/lib/karin/platform/xiaohongshu/index.js +18 -0
- package/lib/karin/platform/xiaohongshu/xiaohongshu.js +643 -0
- package/lib/karin/root.js +73 -0
- package/lib/karin/setup.js +99 -0
- package/lib/karin/types/config/amagi.js +2 -0
- package/lib/karin/types/config/app.js +2 -0
- package/lib/karin/types/config/bilibili.js +2 -0
- package/lib/karin/types/config/cookies.js +2 -0
- package/lib/karin/types/config/douyin.js +2 -0
- package/lib/karin/types/config/index.js +2 -0
- package/lib/karin/types/config/kuaishou.js +2 -0
- package/lib/karin/types/config/pushlist.js +2 -0
- package/lib/karin/types/config/request.js +2 -0
- package/lib/karin/types/config/upload.js +2 -0
- package/lib/karin/types/config/xiaohongshu.js +2 -0
- package/lib/karin/types/datatypes.js +2 -0
- package/lib/karin/types/index.js +18 -0
- package/lib/karin/types/netrorks/NetworksConfigType.js +2 -0
- package/lib/karin/types/netrorks/index.js +17 -0
- package/lib/karin/web.config.js +49 -0
- package/lib/ktr/registry.js +82 -0
- package/lib/ktr/template/_preview/components/PreviewInfoCard.js +10 -0
- package/lib/ktr/template/_preview/components/PreviewLayout.js +10 -0
- package/lib/ktr/template/_preview/components/PreviewVideoCard.js +8 -0
- package/lib/ktr/template/_preview/render.js +142 -0
- package/lib/ktr/template/_preview/types.js +2 -0
- package/lib/ktr/template/_preview/utils/status.js +31 -0
- package/lib/ktr/template/_preview/utils/time.js +12 -0
- package/lib/ktr/template/bilibili/bangumi/components/bangumi.js +127 -0
- package/lib/ktr/template/bilibili/bangumi/components/types.js +2 -0
- package/lib/ktr/template/bilibili/bangumi/index.js +12 -0
- package/lib/ktr/template/bilibili/comment/components/Comment.js +193 -0
- package/lib/ktr/template/bilibili/comment/components/types.js +2 -0
- package/lib/ktr/template/bilibili/comment/index.js +10 -0
- package/lib/ktr/template/bilibili/components/Icons.js +66 -0
- package/lib/ktr/template/bilibili/components/shared.js +93 -0
- package/lib/ktr/template/bilibili/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/components/DYNAMIC_TYPE_ARTICLE.js +66 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/components/DYNAMIC_TYPE_AV.js +87 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/components/DYNAMIC_TYPE_DRAW.js +93 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/components/DYNAMIC_TYPE_FORWARD.js +132 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/components/DYNAMIC_TYPE_LIVE_RCMD.js +84 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/components/DYNAMIC_TYPE_WORD.js +38 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/components/AdditionalCard.js +59 -0
- package/lib/ktr/template/bilibili/dynamic/components/CommonComponents.js +30 -0
- package/lib/ktr/template/bilibili/dynamic/types.js +2 -0
- package/lib/ktr/template/bilibili/qrcodeImg/components/qrcodeImg.js +48 -0
- package/lib/ktr/template/bilibili/qrcodeImg/components/types.js +3 -0
- package/lib/ktr/template/bilibili/qrcodeImg/index.js +10 -0
- package/lib/ktr/template/bilibili/userlist/components/UserList.js +53 -0
- package/lib/ktr/template/bilibili/userlist/components/types.js +3 -0
- package/lib/ktr/template/bilibili/userlist/index.js +13 -0
- package/lib/ktr/template/bilibili/videoInfo/components/types.js +2 -0
- package/lib/ktr/template/bilibili/videoInfo/components/videoInfo.js +62 -0
- package/lib/ktr/template/bilibili/videoInfo/index.js +10 -0
- package/lib/ktr/template/components/AmbientCover.js +36 -0
- package/lib/ktr/template/components/DefaultLayout.js +33 -0
- package/lib/ktr/template/components/GlowImage.js +276 -0
- package/lib/ktr/template/components/QRCodeWithAvatar.js +34 -0
- package/lib/ktr/template/components/RolldownLogo.js +6 -0
- package/lib/ktr/template/components/ViteLogo.js +6 -0
- package/lib/ktr/template/components/iconRegistry.js +173 -0
- package/lib/ktr/template/douyin/article-work/components/ArticleWork.js +99 -0
- package/lib/ktr/template/douyin/article-work/components/types.js +3 -0
- package/lib/ktr/template/douyin/article-work/index.js +10 -0
- package/lib/ktr/template/douyin/comment/components/Comment.js +189 -0
- package/lib/ktr/template/douyin/comment/components/types.js +2 -0
- package/lib/ktr/template/douyin/comment/index.js +10 -0
- package/lib/ktr/template/douyin/components/Icons.js +29 -0
- package/lib/ktr/template/douyin/components/types.js +3 -0
- package/lib/ktr/template/douyin/dynamic/components/Dynamic.js +90 -0
- package/lib/ktr/template/douyin/dynamic/components/types.js +3 -0
- package/lib/ktr/template/douyin/dynamic/index.js +10 -0
- package/lib/ktr/template/douyin/favorite-list/components/FavoriteList.js +30 -0
- package/lib/ktr/template/douyin/favorite-list/components/types.js +3 -0
- package/lib/ktr/template/douyin/favorite-list/index.js +10 -0
- package/lib/ktr/template/douyin/image-work/components/ImageWork.js +136 -0
- package/lib/ktr/template/douyin/image-work/components/types.js +2 -0
- package/lib/ktr/template/douyin/image-work/index.js +10 -0
- package/lib/ktr/template/douyin/live/components/Live.js +51 -0
- package/lib/ktr/template/douyin/live/components/types.js +3 -0
- package/lib/ktr/template/douyin/live/index.js +10 -0
- package/lib/ktr/template/douyin/musicinfo/components/MusicInfo.js +60 -0
- package/lib/ktr/template/douyin/musicinfo/components/types.js +3 -0
- package/lib/ktr/template/douyin/musicinfo/index.js +10 -0
- package/lib/ktr/template/douyin/qrcodeImg/components/qrcodeImg.js +39 -0
- package/lib/ktr/template/douyin/qrcodeImg/components/types.js +3 -0
- package/lib/ktr/template/douyin/qrcodeImg/index.js +9 -0
- package/lib/ktr/template/douyin/recommend-list/components/RecommendList.js +30 -0
- package/lib/ktr/template/douyin/recommend-list/components/types.js +3 -0
- package/lib/ktr/template/douyin/recommend-list/index.js +10 -0
- package/lib/ktr/template/douyin/user_profile/components/UserVideoList.js +54 -0
- package/lib/ktr/template/douyin/user_profile/components/types.js +3 -0
- package/lib/ktr/template/douyin/user_profile/index.js +9 -0
- package/lib/ktr/template/douyin/userlist/components/UserList.js +50 -0
- package/lib/ktr/template/douyin/userlist/components/types.js +3 -0
- package/lib/ktr/template/douyin/userlist/index.js +13 -0
- package/lib/ktr/template/douyin/video-work/components/VideoWork.js +127 -0
- package/lib/ktr/template/douyin/video-work/components/types.js +2 -0
- package/lib/ktr/template/douyin/video-work/index.js +10 -0
- package/lib/ktr/template/kuaishou/comment/components/Comment.js +88 -0
- package/lib/ktr/template/kuaishou/comment/components/types.js +2 -0
- package/lib/ktr/template/kuaishou/comment/index.js +10 -0
- package/lib/ktr/template/other/changelog/components/changelog.js +117 -0
- package/lib/ktr/template/other/changelog/components/types.js +3 -0
- package/lib/ktr/template/other/changelog/index.js +9 -0
- package/lib/ktr/template/other/handlerError/components/errorTitles.js +227 -0
- package/lib/ktr/template/other/handlerError/components/handlerError.js +392 -0
- package/lib/ktr/template/other/handlerError/components/stackHighlight.js +109 -0
- package/lib/ktr/template/other/handlerError/components/types.js +2 -0
- package/lib/ktr/template/other/handlerError/index.js +9 -0
- package/lib/ktr/template/other/help/components/Help.js +79 -0
- package/lib/ktr/template/other/help/components/types.js +3 -0
- package/lib/ktr/template/other/help/index.js +12 -0
- package/lib/ktr/template/other/live-photo-tip/components/LivePhotoTip.js +80 -0
- package/lib/ktr/template/other/live-photo-tip/components/types.js +3 -0
- package/lib/ktr/template/other/live-photo-tip/index.js +9 -0
- package/lib/ktr/template/other/qrlogin/components/qrlogin.js +58 -0
- package/lib/ktr/template/other/qrlogin/components/types.js +3 -0
- package/lib/ktr/template/other/qrlogin/index.js +9 -0
- package/lib/ktr/template/other/runtime/components/runtime.js +101 -0
- package/lib/ktr/template/other/runtime/components/types.js +3 -0
- package/lib/ktr/template/other/runtime/index.js +9 -0
- package/lib/ktr/template/other/version_warning/components/VersionWarning.js +38 -0
- package/lib/ktr/template/other/version_warning/components/types.js +3 -0
- package/lib/ktr/template/other/version_warning/index.js +9 -0
- package/lib/ktr/template/statistics/components/BoxplotGuide.js +17 -0
- package/lib/ktr/template/statistics/components/ChartCard.js +15 -0
- package/lib/ktr/template/statistics/components/KpiCard.js +14 -0
- package/lib/ktr/template/statistics/components/PlatformTable.js +20 -0
- package/lib/ktr/template/statistics/components/RankList.js +61 -0
- package/lib/ktr/template/statistics/components/SSRChart.js +22 -0
- package/lib/ktr/template/statistics/components/chartPresets.js +630 -0
- package/lib/ktr/template/statistics/components/chartTheme.js +226 -0
- package/lib/ktr/template/statistics/components/format.js +38 -0
- package/lib/ktr/template/statistics/components/types.js +9 -0
- package/lib/ktr/template/statistics/global/components/GlobalStatistics.js +246 -0
- package/lib/ktr/template/statistics/global/components/types.js +3 -0
- package/lib/ktr/template/statistics/global/index.js +9 -0
- package/lib/ktr/template/statistics/group/components/GroupStatistics.js +181 -0
- package/lib/ktr/template/statistics/group/components/types.js +3 -0
- package/lib/ktr/template/statistics/group/index.js +9 -0
- package/lib/ktr/template/types/ctx.js +2 -0
- package/lib/ktr/template/xiaohongshu/comment/components/Comment.js +99 -0
- package/lib/ktr/template/xiaohongshu/comment/components/types.js +3 -0
- package/lib/ktr/template/xiaohongshu/comment/index.js +9 -0
- package/lib/ktr/template/xiaohongshu/noteInfo/components/noteInfo.js +93 -0
- package/lib/ktr/template/xiaohongshu/noteInfo/components/types.js +2 -0
- package/lib/ktr/template/xiaohongshu/noteInfo/index.js +9 -0
- package/lib/ktr/utils/QRCodeAvatar.js +99 -0
- package/lib/ktr/utils/QRcode.js +56 -0
- package/lib/ktr/utils/avatarProxy.js +45 -0
- package/lib/ktr/utils/cn.js +11 -0
- package/lib/ktr/utils/theme.js +12 -0
- package/lib/qqFields.json +75 -0
- package/lib/qqOptions.js +44 -0
- package/lib/richtext/index.js +25 -0
- package/lib/richtext/parse/index.js +232 -0
- package/lib/richtext/react/cn.js +11 -0
- package/lib/richtext/react/index.js +221 -0
- package/lib/richtext/types.js +2 -0
- package/lib/schema.js +352 -0
- package/lib/webui.js +341 -0
- package/package.json +88 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_BV.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_GOODS.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_LOTTERY.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_VIEW_PICTURE.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_VOTE.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_WEB.svg +1 -0
- package/resources/image/bilibili/bilibili-dark.png +0 -0
- package/resources/image/bilibili/bilibili-light.png +0 -0
- package/resources/image/bilibili/bilibili.png +0 -0
- package/resources/image/bilibili/id-dark.svg +1 -0
- package/resources/image/bilibili/id-light.svg +1 -0
- package/resources/image/bilibili/level/lv0.svg +1 -0
- package/resources/image/bilibili/level/lv1.svg +1 -0
- package/resources/image/bilibili/level/lv2.svg +1 -0
- package/resources/image/bilibili/level/lv3.svg +1 -0
- package/resources/image/bilibili/level/lv4.svg +1 -0
- package/resources/image/bilibili/level/lv5.svg +1 -0
- package/resources/image/bilibili/level/lv6.svg +1 -0
- package/resources/image/bilibili/level/lv7.svg +1 -0
- package/resources/image/bilibili/like-dark.svg +6 -0
- package/resources/image/bilibili/like-light.svg +6 -0
- package/resources/image/bilibili/play.svg +28 -0
- package/resources/image/bilibili/res-local1.png +0 -0
- package/resources/image/bilibili/up_pb.svg +1 -0
- package/resources/image/bilibili//347/233/264/346/222/255/344/270/255.png +0 -0
- package/resources/image/douyin/douyin.png +0 -0
- package/resources/image/douyin/dylogo-dark.svg +23 -0
- package/resources/image/douyin/dylogo-light.svg +38 -0
- package/resources/image/douyin/search-dark.svg +1 -0
- package/resources/image/douyin/search-light.svg +3 -0
- package/resources/image/douyin//346/212/226/351/237/263-/347/233/264/346/222/255/344/270/255.png +0 -0
- package/resources/image/frame-logo.png +0 -0
- package/resources/image/kuaishou/logo.png +0 -0
- package/resources/image/other/handlerError/Milky.png +0 -0
- package/resources/image/other/handlerError/chronocat.svg +43 -0
- package/resources/image/other/handlerError/conwechat.webp +0 -0
- package/resources/image/other/handlerError/gocq-http.webp +0 -0
- package/resources/image/other/handlerError/lagrange.webp +0 -0
- package/resources/image/other/handlerError/llonebot.webp +0 -0
- package/resources/image/other/handlerError/napcat.webp +0 -0
- package/resources/image/other/handlerError/onebot.png +0 -0
- package/resources/image/other/handlerError/satori.png +0 -0
- package/resources/image/xiaohongshu/logo.png +0 -0
- package/resources/template/style.css +23708 -0
- package/resources/vite.svg +130 -0
- package/scripts/build.mjs +129 -0
- package/scripts/check-schema.cjs +55 -0
- package/scripts/deploy.mjs +78 -0
- package/scripts/make-demo-placeholders.mjs +112 -0
- package/scripts/patch-deps.mjs +46 -0
- package/scripts/patch-webui.mjs +112 -0
- package/scripts/smoke-commands.cjs +39 -0
- package/scripts/smoke-config.cjs +122 -0
- package/scripts/smoke-douyin.cjs +170 -0
- package/scripts/smoke-koishi-commands.cjs +210 -0
- package/scripts/smoke-login.cjs +110 -0
- package/scripts/smoke-parse.cjs +54 -0
- package/scripts/smoke-push-mock.cjs +114 -0
- package/scripts/smoke-push.cjs +104 -0
- package/scripts/smoke-qq.cjs +147 -0
- package/scripts/smoke-qqcard.cjs +108 -0
- package/scripts/smoke-qqpanel.cjs +205 -0
- package/scripts/smoke-render.cjs +106 -0
- package/scripts/smoke-server.cjs +94 -0
- package/src/compat/axios.ts +5 -0
- package/src/compat/cron.ts +86 -0
- package/src/compat/esm.ts +13 -0
- package/src/compat/express.ts +5 -0
- package/src/compat/heroui.tsx +53 -0
- package/src/compat/lodash.ts +32 -0
- package/src/compat/logger.ts +121 -0
- package/src/compat/node-karin.ts +1064 -0
- package/src/compat/phosphor-icons.tsx +25 -0
- package/src/compat/qqcard.ts +251 -0
- package/src/compat/root.ts +44 -0
- package/src/compat/runtime.ts +120 -0
- package/src/compat/segment.ts +161 -0
- package/src/compat/sqlite3.ts +123 -0
- package/src/compat/start.ts +3 -0
- package/src/compat/syncConfig.ts +64 -0
- package/src/compat/template-react.ts +54 -0
- package/src/compat/text.ts +58 -0
- package/src/compat/yaml.ts +6 -0
- package/src/configBridge.ts +94 -0
- package/src/index.ts +769 -0
- package/src/karin/app.ts +1 -0
- package/src/karin/apps/__ready.ts +14 -0
- package/src/karin/apps/admin.ts +127 -0
- package/src/karin/apps/help.ts +228 -0
- package/src/karin/apps/push.ts +327 -0
- package/src/karin/apps/qrlogin.ts +160 -0
- package/src/karin/apps/statistics.ts +203 -0
- package/src/karin/apps/testPush.ts +226 -0
- package/src/karin/apps/tools.ts +510 -0
- package/src/karin/apps/update.ts +239 -0
- package/src/karin/index.ts +9 -0
- package/src/karin/module/db/bilibili.ts +1089 -0
- package/src/karin/module/db/douyin.ts +1218 -0
- package/src/karin/module/db/index.ts +159 -0
- package/src/karin/module/db/migration.ts +249 -0
- package/src/karin/module/db/statistics.ts +817 -0
- package/src/karin/module/index.ts +37 -0
- package/src/karin/module/server/constants/routes.ts +53 -0
- package/src/karin/module/server/controllers/bots.ts +289 -0
- package/src/karin/module/server/controllers/config.ts +85 -0
- package/src/karin/module/server/controllers/video.ts +212 -0
- package/src/karin/module/server/index.ts +11 -0
- package/src/karin/module/server/middlewares/auth.ts +147 -0
- package/src/karin/module/server/routes/amagi.ts +57 -0
- package/src/karin/module/server/routes/api.ts +42 -0
- package/src/karin/module/server/routes/index.ts +68 -0
- package/src/karin/module/server/routes/ssr.ts +14 -0
- package/src/karin/module/server/routes/static.ts +43 -0
- package/src/karin/module/utils/Base.ts +497 -0
- package/src/karin/module/utils/CardParser.ts +503 -0
- package/src/karin/module/utils/Common.ts +448 -0
- package/src/karin/module/utils/Config.ts +443 -0
- package/src/karin/module/utils/EmojiReaction.ts +268 -0
- package/src/karin/module/utils/ErrorHandler/handler.ts +124 -0
- package/src/karin/module/utils/ErrorHandler/index.ts +48 -0
- package/src/karin/module/utils/ErrorHandler/render.ts +180 -0
- package/src/karin/module/utils/ErrorHandler/sender.ts +192 -0
- package/src/karin/module/utils/ErrorHandler/strategy.ts +41 -0
- package/src/karin/module/utils/ErrorHandler/types.ts +122 -0
- package/src/karin/module/utils/ErrorHandler/utils.ts +108 -0
- package/src/karin/module/utils/FFmpeg.ts +357 -0
- package/src/karin/module/utils/ImageHelper.ts +90 -0
- package/src/karin/module/utils/ImageSlice.ts +383 -0
- package/src/karin/module/utils/MotionPhoto.ts +297 -0
- package/src/karin/module/utils/Network/Downloader.ts +481 -0
- package/src/karin/module/utils/Network/ImageDownloader.ts +291 -0
- package/src/karin/module/utils/Network/Network.ts +344 -0
- package/src/karin/module/utils/Network/ThrottleStream.ts +76 -0
- package/src/karin/module/utils/Network/constants.ts +135 -0
- package/src/karin/module/utils/Network/helpers.ts +183 -0
- package/src/karin/module/utils/Network/index.ts +28 -0
- package/src/karin/module/utils/Network/types.ts +46 -0
- package/src/karin/module/utils/Networks.ts +20 -0
- package/src/karin/module/utils/ParseLock.ts +33 -0
- package/src/karin/module/utils/ParseOverride.ts +128 -0
- package/src/karin/module/utils/QqCardResolve.ts +116 -0
- package/src/karin/module/utils/QqPanel.ts +880 -0
- package/src/karin/module/utils/Render/coverTheme.ts +294 -0
- package/src/karin/module/utils/Render/index.ts +574 -0
- package/src/karin/module/utils/amagiClient.ts +368 -0
- package/src/karin/module/utils/avatar.ts +220 -0
- package/src/karin/module/utils/bot.ts +115 -0
- package/src/karin/module/utils/build-metadata.ts +60 -0
- package/src/karin/module/utils/changelog.ts +175 -0
- package/src/karin/module/utils/index.ts +10 -0
- package/src/karin/module/utils/loginSession.ts +291 -0
- package/src/karin/module/utils/parseTip.ts +59 -0
- package/src/karin/module/utils/runtime-report.ts +142 -0
- package/src/karin/module/utils/semver.ts +60 -0
- package/src/karin/module/utils/statisticsAggregate.ts +507 -0
- package/src/karin/platform/bilibili/bilibili.ts +2004 -0
- package/src/karin/platform/bilibili/comments.ts +397 -0
- package/src/karin/platform/bilibili/danmaku.ts +653 -0
- package/src/karin/platform/bilibili/dynamic-text.ts +926 -0
- package/src/karin/platform/bilibili/genParams.ts +30 -0
- package/src/karin/platform/bilibili/getID.ts +163 -0
- package/src/karin/platform/bilibili/index.ts +8 -0
- package/src/karin/platform/bilibili/live-status.ts +36 -0
- package/src/karin/platform/bilibili/login.ts +130 -0
- package/src/karin/platform/bilibili/push.ts +1615 -0
- package/src/karin/platform/bilibili/riskControl.ts +114 -0
- package/src/karin/platform/bilibili/search.ts +305 -0
- package/src/karin/platform/common/danmaku-types.ts +18 -0
- package/src/karin/platform/douyin/comments.ts +404 -0
- package/src/karin/platform/douyin/danmaku.ts +1187 -0
- package/src/karin/platform/douyin/douyin.ts +1244 -0
- package/src/karin/platform/douyin/getID.ts +101 -0
- package/src/karin/platform/douyin/index.ts +8 -0
- package/src/karin/platform/douyin/login.ts +251 -0
- package/src/karin/platform/douyin/push/favorite.ts +97 -0
- package/src/karin/platform/douyin/push/index.ts +5 -0
- package/src/karin/platform/douyin/push/live.ts +86 -0
- package/src/karin/platform/douyin/push/post.ts +75 -0
- package/src/karin/platform/douyin/push/recommend.ts +96 -0
- package/src/karin/platform/douyin/push/render.ts +768 -0
- package/src/karin/platform/douyin/push/types.ts +41 -0
- package/src/karin/platform/douyin/push.ts +1241 -0
- package/src/karin/platform/douyin/types.ts +151 -0
- package/src/karin/platform/douyin/videoQuality.ts +234 -0
- package/src/karin/platform/douyin/workType.ts +238 -0
- package/src/karin/platform/index.ts +4 -0
- package/src/karin/platform/kuaishou/comments.ts +114 -0
- package/src/karin/platform/kuaishou/getID.ts +48 -0
- package/src/karin/platform/kuaishou/getdata.ts +78 -0
- package/src/karin/platform/kuaishou/index.ts +4 -0
- package/src/karin/platform/kuaishou/kuaishou.ts +130 -0
- package/src/karin/platform/xiaohongshu/comments.ts +227 -0
- package/src/karin/platform/xiaohongshu/getID.ts +127 -0
- package/src/karin/platform/xiaohongshu/index.ts +2 -0
- package/src/karin/platform/xiaohongshu/xiaohongshu.ts +733 -0
- package/src/karin/root.ts +78 -0
- package/src/karin/setup.ts +77 -0
- package/src/karin/types/config/amagi.ts +46 -0
- package/src/karin/types/config/app.ts +129 -0
- package/src/karin/types/config/bilibili.ts +121 -0
- package/src/karin/types/config/cookies.ts +11 -0
- package/src/karin/types/config/douyin.ts +93 -0
- package/src/karin/types/config/index.ts +41 -0
- package/src/karin/types/config/kuaishou.ts +10 -0
- package/src/karin/types/config/pushlist.ts +55 -0
- package/src/karin/types/config/request.ts +27 -0
- package/src/karin/types/config/upload.ts +49 -0
- package/src/karin/types/config/xiaohongshu.ts +24 -0
- package/src/karin/types/datatypes.ts +42 -0
- package/src/karin/types/index.ts +4 -0
- package/src/karin/types/netrorks/NetworksConfigType.ts +61 -0
- package/src/karin/types/netrorks/index.ts +1 -0
- package/src/karin/web.config.ts +48 -0
- package/src/ktr/registry.ts +55 -0
- package/src/ktr/template/_preview/components/PreviewInfoCard.tsx +33 -0
- package/src/ktr/template/_preview/components/PreviewLayout.tsx +65 -0
- package/src/ktr/template/_preview/components/PreviewVideoCard.tsx +22 -0
- package/src/ktr/template/_preview/render.ts +158 -0
- package/src/ktr/template/_preview/types.ts +15 -0
- package/src/ktr/template/_preview/utils/status.ts +29 -0
- package/src/ktr/template/_preview/utils/time.ts +8 -0
- package/src/ktr/template/bilibili/bangumi/components/bangumi.tsx +462 -0
- package/src/ktr/template/bilibili/bangumi/components/types.ts +36 -0
- package/src/ktr/template/bilibili/bangumi/index.tsx +9 -0
- package/src/ktr/template/bilibili/comment/components/Comment.tsx +657 -0
- package/src/ktr/template/bilibili/comment/components/types.ts +26 -0
- package/src/ktr/template/bilibili/comment/index.tsx +11 -0
- package/src/ktr/template/bilibili/components/Icons.tsx +209 -0
- package/src/ktr/template/bilibili/components/shared.tsx +162 -0
- package/src/ktr/template/bilibili/components/types.ts +388 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/components/DYNAMIC_TYPE_ARTICLE.tsx +251 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/components/types.ts +67 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/components/DYNAMIC_TYPE_AV.tsx +238 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/components/types.ts +39 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/components/DYNAMIC_TYPE_DRAW.tsx +205 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/components/types.ts +20 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/index.tsx +11 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/components/DYNAMIC_TYPE_FORWARD.tsx +348 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/components/types.ts +16 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/components/DYNAMIC_TYPE_LIVE_RCMD.tsx +264 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/components/types.ts +32 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/components/DYNAMIC_TYPE_WORD.tsx +68 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/components/types.ts +14 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/components/AdditionalCard.tsx +165 -0
- package/src/ktr/template/bilibili/dynamic/components/CommonComponents.tsx +142 -0
- package/src/ktr/template/bilibili/dynamic/types.ts +382 -0
- package/src/ktr/template/bilibili/qrcodeImg/components/qrcodeImg.tsx +179 -0
- package/src/ktr/template/bilibili/qrcodeImg/components/types.ts +9 -0
- package/src/ktr/template/bilibili/qrcodeImg/index.tsx +12 -0
- package/src/ktr/template/bilibili/userlist/components/UserList.tsx +246 -0
- package/src/ktr/template/bilibili/userlist/components/types.ts +35 -0
- package/src/ktr/template/bilibili/userlist/index.tsx +11 -0
- package/src/ktr/template/bilibili/videoInfo/components/types.ts +28 -0
- package/src/ktr/template/bilibili/videoInfo/components/videoInfo.tsx +217 -0
- package/src/ktr/template/bilibili/videoInfo/index.tsx +12 -0
- package/src/ktr/template/components/AmbientCover.tsx +50 -0
- package/src/ktr/template/components/DefaultLayout.tsx +166 -0
- package/src/ktr/template/components/GlowImage.tsx +572 -0
- package/src/ktr/template/components/QRCodeWithAvatar.tsx +52 -0
- package/src/ktr/template/components/RolldownLogo.tsx +110 -0
- package/src/ktr/template/components/ViteLogo.tsx +134 -0
- package/src/ktr/template/components/iconRegistry.ts +294 -0
- package/src/ktr/template/douyin/article-work/components/ArticleWork.tsx +301 -0
- package/src/ktr/template/douyin/article-work/components/types.ts +53 -0
- package/src/ktr/template/douyin/article-work/index.tsx +12 -0
- package/src/ktr/template/douyin/comment/components/Comment.tsx +612 -0
- package/src/ktr/template/douyin/comment/components/types.ts +85 -0
- package/src/ktr/template/douyin/comment/index.tsx +11 -0
- package/src/ktr/template/douyin/components/Icons.tsx +75 -0
- package/src/ktr/template/douyin/components/types.ts +83 -0
- package/src/ktr/template/douyin/dynamic/components/Dynamic.tsx +283 -0
- package/src/ktr/template/douyin/dynamic/components/types.ts +46 -0
- package/src/ktr/template/douyin/dynamic/index.tsx +11 -0
- package/src/ktr/template/douyin/favorite-list/components/FavoriteList.tsx +201 -0
- package/src/ktr/template/douyin/favorite-list/components/types.ts +38 -0
- package/src/ktr/template/douyin/favorite-list/index.tsx +12 -0
- package/src/ktr/template/douyin/image-work/components/ImageWork.tsx +437 -0
- package/src/ktr/template/douyin/image-work/components/types.ts +78 -0
- package/src/ktr/template/douyin/image-work/index.tsx +11 -0
- package/src/ktr/template/douyin/live/components/Live.tsx +229 -0
- package/src/ktr/template/douyin/live/components/types.ts +47 -0
- package/src/ktr/template/douyin/live/index.tsx +11 -0
- package/src/ktr/template/douyin/musicinfo/components/MusicInfo.tsx +187 -0
- package/src/ktr/template/douyin/musicinfo/components/types.ts +31 -0
- package/src/ktr/template/douyin/musicinfo/index.tsx +11 -0
- package/src/ktr/template/douyin/qrcodeImg/components/qrcodeImg.tsx +170 -0
- package/src/ktr/template/douyin/qrcodeImg/components/types.ts +9 -0
- package/src/ktr/template/douyin/qrcodeImg/index.tsx +9 -0
- package/src/ktr/template/douyin/recommend-list/components/RecommendList.tsx +201 -0
- package/src/ktr/template/douyin/recommend-list/components/types.ts +37 -0
- package/src/ktr/template/douyin/recommend-list/index.tsx +12 -0
- package/src/ktr/template/douyin/user_profile/components/UserVideoList.tsx +225 -0
- package/src/ktr/template/douyin/user_profile/components/types.ts +71 -0
- package/src/ktr/template/douyin/user_profile/index.tsx +9 -0
- package/src/ktr/template/douyin/userlist/components/UserList.tsx +229 -0
- package/src/ktr/template/douyin/userlist/components/types.ts +35 -0
- package/src/ktr/template/douyin/userlist/index.tsx +11 -0
- package/src/ktr/template/douyin/video-work/components/VideoWork.tsx +398 -0
- package/src/ktr/template/douyin/video-work/components/types.ts +80 -0
- package/src/ktr/template/douyin/video-work/index.tsx +11 -0
- package/src/ktr/template/font.css +6071 -0
- package/src/ktr/template/global.d.ts +69 -0
- package/src/ktr/template/kuaishou/comment/components/Comment.tsx +207 -0
- package/src/ktr/template/kuaishou/comment/components/types.ts +47 -0
- package/src/ktr/template/kuaishou/comment/index.tsx +11 -0
- package/src/ktr/template/other/changelog/components/changelog.tsx +411 -0
- package/src/ktr/template/other/changelog/components/types.ts +21 -0
- package/src/ktr/template/other/changelog/index.tsx +9 -0
- package/src/ktr/template/other/handlerError/components/errorTitles.ts +224 -0
- package/src/ktr/template/other/handlerError/components/handlerError.tsx +1076 -0
- package/src/ktr/template/other/handlerError/components/stackHighlight.ts +127 -0
- package/src/ktr/template/other/handlerError/components/types.ts +124 -0
- package/src/ktr/template/other/handlerError/index.tsx +9 -0
- package/src/ktr/template/other/help/components/Help.tsx +249 -0
- package/src/ktr/template/other/help/components/types.ts +47 -0
- package/src/ktr/template/other/help/index.tsx +9 -0
- package/src/ktr/template/other/live-photo-tip/components/LivePhotoTip.tsx +295 -0
- package/src/ktr/template/other/live-photo-tip/components/types.ts +8 -0
- package/src/ktr/template/other/live-photo-tip/index.tsx +9 -0
- package/src/ktr/template/other/qrlogin/components/qrlogin.tsx +295 -0
- package/src/ktr/template/other/qrlogin/components/types.ts +11 -0
- package/src/ktr/template/other/qrlogin/index.tsx +9 -0
- package/src/ktr/template/other/runtime/components/runtime.tsx +347 -0
- package/src/ktr/template/other/runtime/components/types.ts +75 -0
- package/src/ktr/template/other/runtime/index.tsx +9 -0
- package/src/ktr/template/other/version_warning/components/VersionWarning.tsx +392 -0
- package/src/ktr/template/other/version_warning/components/types.ts +8 -0
- package/src/ktr/template/other/version_warning/index.tsx +9 -0
- package/src/ktr/template/statistics/components/BoxplotGuide.tsx +57 -0
- package/src/ktr/template/statistics/components/ChartCard.tsx +40 -0
- package/src/ktr/template/statistics/components/KpiCard.tsx +39 -0
- package/src/ktr/template/statistics/components/PlatformTable.tsx +83 -0
- package/src/ktr/template/statistics/components/RankList.tsx +127 -0
- package/src/ktr/template/statistics/components/SSRChart.tsx +41 -0
- package/src/ktr/template/statistics/components/chartPresets.ts +700 -0
- package/src/ktr/template/statistics/components/chartTheme.ts +234 -0
- package/src/ktr/template/statistics/components/format.ts +33 -0
- package/src/ktr/template/statistics/components/types.ts +92 -0
- package/src/ktr/template/statistics/global/components/GlobalStatistics.tsx +597 -0
- package/src/ktr/template/statistics/global/components/types.ts +138 -0
- package/src/ktr/template/statistics/global/index.tsx +9 -0
- package/src/ktr/template/statistics/group/components/GroupStatistics.tsx +468 -0
- package/src/ktr/template/statistics/group/components/types.ts +113 -0
- package/src/ktr/template/statistics/group/index.tsx +9 -0
- package/src/ktr/template/style.css +65 -0
- package/src/ktr/template/types/ctx.ts +42 -0
- package/src/ktr/template/xiaohongshu/comment/components/Comment.tsx +264 -0
- package/src/ktr/template/xiaohongshu/comment/components/types.ts +119 -0
- package/src/ktr/template/xiaohongshu/comment/index.tsx +9 -0
- package/src/ktr/template/xiaohongshu/noteInfo/components/noteInfo.tsx +271 -0
- package/src/ktr/template/xiaohongshu/noteInfo/components/types.ts +66 -0
- package/src/ktr/template/xiaohongshu/noteInfo/index.tsx +9 -0
- package/src/ktr/utils/QRCodeAvatar.ts +102 -0
- package/src/ktr/utils/QRcode.ts +65 -0
- package/src/ktr/utils/avatarProxy.ts +42 -0
- package/src/ktr/utils/cn.ts +6 -0
- package/src/ktr/utils/theme.ts +10 -0
- package/src/qqFields.json +75 -0
- package/src/qqOptions.ts +64 -0
- package/src/richtext/index.ts +9 -0
- package/src/richtext/parse/index.ts +271 -0
- package/src/richtext/react/cn.ts +6 -0
- package/src/richtext/react/index.tsx +582 -0
- package/src/richtext/types.ts +320 -0
- package/src/schema.ts +372 -0
- package/src/webui.ts +352 -0
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/readme/banner-d-render-gallery.svg" width="100%" alt="koishi-plugin-kkk 的视频详情、抖音评论、B站动态推送和解析统计动画成果墙">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
基于 <a href="https://koishi.chat">koishi</a> 的多平台短视频、图文内容解析与动态推送插件。<br>
|
|
7
|
+
自动识别分享链接,提取视频、图集、热评与动态内容,并渲染成适合群聊直接浏览的图片。
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://www.npmjs.com/package/koishi-plugin-kkk"><img src="https://img.shields.io/npm/v/koishi-plugin-kkk?style=flat-square&logo=npm&logoColor=white&color=CB3837&label=npm" alt="npm 版本"></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/koishi-plugin-kkk"><img src="https://img.shields.io/npm/dw/koishi-plugin-kkk?style=flat-square&logo=npm&logoColor=white&color=CB3837&label=下载" alt="npm 周下载量"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/koishi-plugin-kkk"><img src="https://img.shields.io/npm/unpacked-size/koishi-plugin-kkk?style=flat-square&logo=npm&color=CB3837&label=包大小" alt="npm 解包大小"></a>
|
|
14
|
+
<a href="./LICENSE"><img src="https://img.shields.io/github/license/maimai993/koishi-plugin-kkk?style=flat-square&logo=github&label=许可证" alt="GPL-3.0 许可证"></a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://kkk.tangbot.xyz">使用文档</a> ·
|
|
19
|
+
<a href="https://kkk.tangbot.xyz/docs/guide/quick-start">快速开始</a> ·
|
|
20
|
+
<a href="https://kkk.tangbot.xyz/docs/guide/configuration">配置说明</a> ·
|
|
21
|
+
<a href="https://github.com/maimai993/koishi-plugin-kkk/issues/new/choose">问题反馈</a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
## 核心能力
|
|
25
|
+
|
|
26
|
+
> 分享链接、短链、BV / av 号与 App 分享文本 → 自动识别 → 媒体解析 → 卡片渲染或动态推送
|
|
27
|
+
|
|
28
|
+
- **多平台自动解析** — 识别抖音、B站、快手、小红书分享内容,无需手动复制资源地址。
|
|
29
|
+
- **视频与图文处理** — 提取视频、图集、作者与互动数据,并根据场景发送媒体或渲染卡片。
|
|
30
|
+
- **评论区渲染** — 展示热评、楼中楼、图片评论和评论二维码。
|
|
31
|
+
- **动态订阅推送** — 为抖音和 B站提供订阅、筛选、强制推送与统计能力。
|
|
32
|
+
- **增强媒体能力** — 支持弹幕烧录、Live Photo 兼容导出、视频压缩和临时预览。
|
|
33
|
+
- **30+ 卡片组件** — 覆盖视频详情、动态、评论、帮助、登录、统计与错误诊断,并适配深浅主题。
|
|
34
|
+
|
|
35
|
+
## 快速开始
|
|
36
|
+
|
|
37
|
+
### 1. 准备环境
|
|
38
|
+
|
|
39
|
+
- Koishi >= 4.18.7
|
|
40
|
+
- Node.js >= 18
|
|
41
|
+
- FFmpeg(弹幕烧录、音轨合并;没有会自动降级)
|
|
42
|
+
- Koishi 的 **puppeteer 插件** —— 渲染卡片与长图,必需
|
|
43
|
+
- **assets 服务**(如 `@koishijs/plugin-assets-qqbot-file`)—— QQ 面板里的图片要上传成 https 地址
|
|
44
|
+
- QQ 平台需要官方机器人适配器
|
|
45
|
+
|
|
46
|
+
### 2. 安装插件
|
|
47
|
+
|
|
48
|
+
推荐在 Koishi 控制台的插件市场搜索 `koishi-plugin-kkk` 直接安装。手动管理依赖时可以执行:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pnpm add koishi-plugin-kkk
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. 配置并试跑
|
|
55
|
+
|
|
56
|
+
打开浏览器访问 `/kkk`(插件自带的配置面板),或 Koishi 控制台 → 插件配置 → `kkk`,优先配置抖音与 B站 Cookie。插件启动后发送受支持的分享链接即可自动解析,也可以引用消息后发送:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
解析
|
|
60
|
+
kkk解析
|
|
61
|
+
弹幕解析
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Koishi 的指令前缀按你的配置来,默认直接写命令名即可(上面这种写法)。QQ 上点面板按钮走的也是这些指令。
|
|
65
|
+
|
|
66
|
+
> [!TIP]
|
|
67
|
+
> 其他配置都有默认值兜底。Cookie 主要影响高画质、扫码登录、动态推送与接口稳定性,基础解析可以先直接试跑。
|
|
68
|
+
|
|
69
|
+
## 常用命令
|
|
70
|
+
|
|
71
|
+
- `kkk帮助` — 查看当前命令菜单。
|
|
72
|
+
- `抖音登录` / `B站登录` — 扫码获取并写入平台 Cookie。
|
|
73
|
+
- `设置抖音推送 抖音号` — 订阅或取消订阅抖音创作者。
|
|
74
|
+
- `设置B站推送 UID` — 订阅或取消订阅 B站创作者。
|
|
75
|
+
- `kkk解析统计` — 查看当前群解析统计。
|
|
76
|
+
- `kkk全局解析统计` — 查看全局解析趋势,仅主人可用。
|
|
77
|
+
- `kkk版本` / `kkk更新日志` — 查看运行环境诊断卡片与本地更新日志。
|
|
78
|
+
|
|
79
|
+
## 文档与社区
|
|
80
|
+
|
|
81
|
+
- **使用文档** — [kkk.tangbot.xyz](https://kkk.tangbot.xyz)
|
|
82
|
+
- **交流反馈** — [GitHub Issues](https://github.com/maimai993/koishi-plugin-kkk/issues/new/choose) · [官方 QQ 群 1050229473](https://qm.qq.com/q/viymkIPvvq)
|
|
83
|
+
|
|
84
|
+
## 致谢
|
|
85
|
+
|
|
86
|
+
- [Koishi](https://koishi.chat) — 本项目基于此开发
|
|
87
|
+
- [ikenxuan/karin-plugin-kkk](https://github.com/ikenxuan/karin-plugin-kkk) — 本插件是它的 **Koishi 移植版**,业务逻辑与上游保持一致
|
|
88
|
+
- [ikenxuan/amagi](https://github.com/ikenxuan/amagi) — 本插件使用的平台接口 TypeScript 实现
|
|
89
|
+
|
|
90
|
+
<p align="center">
|
|
91
|
+
<a href="https://github.com/maimai993/koishi-plugin-kkk/graphs/contributors">
|
|
92
|
+
<img src="https://contrib.rocks/image?repo=maimai993/koishi-plugin-kkk" alt="koishi-plugin-kkk 项目贡献者">
|
|
93
|
+
</a>
|
|
94
|
+
</p>
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
本项目采用 [GPL-3.0](./LICENSE) 开源,禁止商用。二次分发请注明出处。使用风险自担。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./separator-CxcFlCzz.js";import{$ as t,A as n,At as r,B as i,Bt as a,Ct as o,D as s,Dt as c,E as l,Et as u,Ft as d,G as f,H as p,It as m,J as h,K as g,L as _,Lt as v,M as y,Mt as b,N as x,Nt as S,O as C,Ot as w,P as T,Pt as E,Q as D,R as O,Rt as k,S as A,St as j,Tt as M,U as N,V as P,W as F,X as I,Y as L,Z as ee,_t as R,at as te,b as ne,bt as re,c as ie,ct as ae,d as z,dt as oe,et as se,f as ce,ft as le,g as B,h as V,ht as ue,it as de,j as fe,jt as pe,k as me,kt as he,l as ge,lt as H,mt as _e,nt as ve,ot as ye,p as be,pt as xe,q as Se,r as Ce,rt as we,st as Te,tt as Ee,u as U,ut as De,v as W,vt as Oe,w as G,wt as K,x as ke,xt as q,y as Ae,yt as je,z as Me,zt as Ne}from"./index-BRROK0vh.js";var Pe=R({base:`header`}),Fe=R({defaultVariants:{fullWidth:!1,variant:`primary`},slots:{base:`number-field`,decrementButton:`number-field__decrement-button`,group:`number-field__group`,incrementButton:`number-field__increment-button`,input:`number-field__input`},variants:{fullWidth:{false:{},true:{base:`number-field--full-width`,group:`number-field__group--full-width`}},variant:{primary:{base:`number-field--primary`},secondary:{base:`number-field--secondary`}}}}),Ie=R({slots:{base:`radio`,content:`radio__content`,control:`radio__control`,indicator:`radio__indicator`}}),Le=R({base:`radio-group`,defaultVariants:{variant:`primary`},variants:{variant:{primary:`radio-group--primary`,secondary:`radio-group--secondary`}}}),Re=RegExp(`^.*\\(.*\\).*$`),ze=[`latn`,`arab`,`hanidec`,`deva`,`beng`,`fullwide`],Be=class{constructor(e,t={}){this.locale=e,this.options=t}parse(e){return He(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return He(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return He(this.locale,this.options,e).options.numberingSystem}},Ve=new Map;function He(e,t,n){let r=Ue(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of ze)if(i!==r.options.numberingSystem){let r=Ue(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function Ue(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``),r=Ve.get(n);return r||(r=new We(e,t),Ve.set(n,r)),r}var We=class{constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits??=t.maximumFractionDigits),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=qe(e,this.formatter,this.options,t),this.options.style===`percent`&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}parse(e){let t=this.formatter.resolvedOptions().useGrouping,n=this.sanitize(e);if(!t&&this.symbols.group&&n.includes(this.symbols.group))return NaN;if(this.symbols.group&&(n=n.replaceAll(this.symbols.group,``)),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,`.`)),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,`-`)),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style===`percent`){let e=n.indexOf(`-`);n=n.replace(`-`,``),n=n.replace(`+`,``);let t=n.indexOf(`.`);t===-1&&(t=n.length),n=n.replace(`.`,``),n=t-2==0?`0.${n}`:t-2==-1?`0.0${n}`:t-2==-2?`0.00`:`${n.slice(0,t-2)}.${n.slice(t-2)}`,e>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style===`percent`){let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new Be(this.locale,e).parse(new ye(this.locale,e).format(r))}return this.options.currencySign===`accounting`&&Re.test(e)&&(r=-1*r),r}sanitize(e){let t=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(t=>t.unit===e)?this.symbols.noNumeralUnits.find(t=>t.unit===e).value.toString():(e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=Je(e,`,`,this.symbols.decimal),e=Je(e,`،`,this.symbols.decimal)),this.symbols.group&&t&&(e=Je(e,`.`,this.symbols.group))),this.symbols.group===`’`&&e.includes(`'`)&&t&&(e=Je(e,`'`,this.symbols.group)),this.symbols.group===`'`&&e.includes(`’`)&&t&&(e=Je(e,`’`,this.symbols.group)),this.options.locale===`fr-FR`&&this.symbols.group&&t&&(e=Je(e,` `,this.symbols.group),e=Je(e,/\u00A0/g,this.symbols.group)),e)}isValidPartialNumber(e,t=-1/0,n=1/0){let r=this.formatter.resolvedOptions().useGrouping;return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&r&&(e=Je(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}},Ge=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),Ke=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function qe(e,t,n,r){let i=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`,useGrouping:!0}),a=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=Ke.map(e=>i.formatToParts(e)),c=s.map((e,t)=>{let n=e.find(e=>e.type===`unit`);return n&&!e.some(e=>e.type===`integer`||e.type===`fraction`)?{unit:n.value,value:Ke[t]}:null}).filter(e=>!!e),l=a.find(e=>e.type===`minusSign`)?.value??`-`,u=o.find(e=>e.type===`plusSign`)?.value;!u&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(u=`+`);let d=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,f=a.find(e=>e.type===`group`)?.value,p=a.filter(e=>!Ge.has(e.type)).map(e=>Ye(e.value)),m=s.flatMap(e=>e.filter(e=>!Ge.has(e.type)).map(e=>Ye(e.value))),h=[...new Set([...p,...m])].sort((e,t)=>t.length-e.length),g=h.length===0?RegExp(`\\p{White_Space}|\\p{Cf}`,`gu`):RegExp(`${h.join(`|`)}|\\p{White_Space}|\\p{Cf}`,`gu`),_=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),v=new Map(_.map((e,t)=>[e,t])),y=RegExp(`[${_.join(``)}]`,`g`);return{minusSign:l,plusSign:u,decimal:d,group:f,literals:g,numeral:y,numerals:_,index:e=>String(v.get(e)),noNumeralUnits:c}}function Je(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var J=a(Ne(),1);function Xe(){return typeof window<`u`&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges==`function`}function Ze(e,t,n){let r=K(e=>{let r=n.current;if(!r)return;let i=null;switch(e.inputType){case`historyUndo`:case`historyRedo`:return;case`insertLineBreak`:return;case`deleteContent`:case`deleteByCut`:case`deleteByDrag`:i=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentForward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentBackward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteSoftLineBackward`:case`deleteHardLineBackward`:i=r.value.slice(r.selectionStart);break;default:e.data!=null&&(i=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd));break}(i==null||!t.validate(i))&&e.preventDefault()});(0,J.useEffect)(()=>{if(!Xe()||!n.current)return;let e=n.current;return e.addEventListener(`beforeinput`,r,!1),()=>{e.removeEventListener(`beforeinput`,r,!1)}},[n]);let i=Xe()?null:e=>{let n=pe(e).value.slice(0,pe(e).selectionStart)+e.data+pe(e).value.slice(pe(e).selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:a,inputProps:o,descriptionProps:s,errorMessageProps:c,...l}=Ae(e,n),u=(0,J.useRef)(null);return{inputProps:w(o,{onBeforeInput:i,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;u.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:i}=u.current;n.current.value=e,n.current.setSelectionRange(r,i),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:c,...l}}function Qe(e,t){let{onScroll:n,isDisabled:r}=e,i=(0,J.useCallback)(e=>{e.ctrlKey||(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);o(t,`wheel`,r?void 0:i)}var $e={};$e={Empty:`فارغ`};var et={};et={Empty:`Изпразни`};var tt={};tt={Empty:`Prázdné`};var nt={};nt={Empty:`Tom`};var rt={};rt={Empty:`Leer`};var it={};it={Empty:`Άδειο`};var at={};at={Empty:`Empty`};var ot={};ot={Empty:`Vacío`};var st={};st={Empty:`Tühjenda`};var ct={};ct={Empty:`Tyhjä`};var lt={};lt={Empty:`Vide`};var ut={};ut={Empty:`ריק`};var dt={};dt={Empty:`Prazno`};var ft={};ft={Empty:`Üres`};var pt={};pt={Empty:`Vuoto`};var mt={};mt={Empty:`空`};var ht={};ht={Empty:`비어 있음`};var gt={};gt={Empty:`Tuščias`};var _t={};_t={Empty:`Tukšs`};var vt={};vt={Empty:`Tom`};var yt={};yt={Empty:`Leeg`};var bt={};bt={Empty:`Pusty`};var xt={};xt={Empty:`Vazio`};var St={};St={Empty:`Vazio`};var Ct={};Ct={Empty:`Gol`};var wt={};wt={Empty:`Не заполнено`};var Tt={};Tt={Empty:`Prázdne`};var Et={};Et={Empty:`Prazen`};var Dt={};Dt={Empty:`Prazno`};var Ot={};Ot={Empty:`Tomt`};var kt={};kt={Empty:`Boş`};var At={};At={Empty:`Пусто`};var jt={};jt={Empty:`空`};var Mt={};Mt={Empty:`空白`};var Nt={};Nt={"ar-AE":$e,"bg-BG":et,"cs-CZ":tt,"da-DK":nt,"de-DE":rt,"el-GR":it,"en-US":at,"es-ES":ot,"et-EE":st,"fi-FI":ct,"fr-FR":lt,"he-IL":ut,"hr-HR":dt,"hu-HU":ft,"it-IT":pt,"ja-JP":mt,"ko-KR":ht,"lt-LT":gt,"lv-LV":_t,"nb-NO":vt,"nl-NL":yt,"pl-PL":bt,"pt-BR":xt,"pt-PT":St,"ro-RO":Ct,"ru-RU":wt,"sk-SK":Tt,"sl-SI":Et,"sr-SP":Dt,"sv-SE":Ot,"tr-TR":kt,"uk-UA":At,"zh-CN":jt,"zh-TW":Mt};function Pt(e){return e&&e.__esModule?e.default:e}var Ft=()=>{};function It(e){let t=(0,J.useRef)(void 0),{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:o,isReadOnly:s,isRequired:c,onIncrement:l,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:m,onIncrementToMax:h}=e,g=P(Pt(Nt),`@react-aria/spinbutton`),_=(0,J.useRef)(!1),v=(0,J.useCallback)(()=>{clearTimeout(t.current),_.current=!1},[]),y=K(()=>{v()});(0,J.useEffect)(()=>()=>y(),[]);let{keyboardProps:b}=Ee({isDisabled:o||s,shortcuts:{PageUp:()=>{if(d){d();return}if(l){l();return}return!1},ArrowUp:()=>{if(l){l();return}return!1},PageDown:()=>{if(p){p();return}if(f){f();return}return!1},ArrowDown:()=>{if(f){f();return}return!1},Home:()=>{if(m){m();return}return!1},End:()=>{if(h){h();return}return!1}},allowRepeats:!0}),x=(0,J.useRef)(!1),S=()=>{x.current=!0},C=()=>{x.current=!1},w=r===``?g.format(`Empty`):(r||`${n}`).replace(`-`,`−`);(0,J.useEffect)(()=>{x.current&&(de(`assertive`),we(w,`assertive`))},[w]);let T=(0,J.useCallback)(()=>{v()},[v]),E=K(l??Ft),D=K(f??Ft),O=K(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&(E(),k(60))}),k=K(e=>{y(),_.current=!0,t.current=window.setTimeout(O,e)}),A=K(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&(D(),j(60))}),j=K(e=>{y(),_.current=!0,t.current=window.setTimeout(A,e)}),M=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:F}=u(),I=(0,J.useRef)(!1),[L,ee]=(0,J.useState)(null);(0,J.useEffect)(()=>{L===`touch`?k(600):L?k(400):L||y()},[L]);let[R,te]=(0,J.useState)(null);return(0,J.useEffect)(()=>{R===`touch`?j(600):R?j(400):R||y()},[R]),{spinButtonProps:{role:`spinbutton`,"aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":w,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":o||void 0,"aria-readonly":s||void 0,"aria-required":c||void 0,...b,onFocus:S,onBlur:C},incrementButtonProps:{onPressStart:e=>{v(),e.pointerType===`touch`?(N(window,`pointercancel`,T,{capture:!0}),I.current=!1,ee(`touch`)):(l?.(),ee(`mouse`)),N(window,`contextmenu`,M)},onPressUp:e=>{v(),e.pointerType===`touch`&&(I.current=!0),F(),ee(null)},onPressEnd:e=>{v(),e.pointerType===`touch`&&!_.current&&I.current&&l?.(),I.current=!1,ee(null)},onFocus:S,onBlur:C},decrementButtonProps:{onPressStart:e=>{v(),e.pointerType===`touch`?(N(window,`pointercancel`,T,{capture:!0}),I.current=!1,te(`touch`)):(f?.(),te(`mouse`))},onPressUp:e=>{v(),e.pointerType===`touch`&&(I.current=!0),F(),te(null)},onPressEnd:e=>{v(),e.pointerType===`touch`&&!_.current&&I.current&&f?.(),I.current=!1,te(null)},onFocus:S,onBlur:C}}}var Lt={};Lt={decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:`حقل رقمي`};var Rt={};Rt={decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:`Номер на полето`};var zt={};zt={decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:`Číselné pole`};var Bt={};Bt={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:`Talfelt`};var Vt={};Vt={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:`Nummernfeld`};var Ht={};Ht={decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:`Πεδίο αριθμού`};var Ut={};Ut={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:`Number field`};var Wt={};Wt={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var Gt={};Gt={decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:`Numbri väli`};var Kt={};Kt={decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:`Numerokenttä`};var qt={};qt={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:`Champ de nombre`};var Jt={};Jt={decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:`שדה מספר`};var Yt={};Yt={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var Xt={};Xt={decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:`Számmező`};var Zt={};Zt={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:`Campo numero`};var Qt={};Qt={decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:`数値フィールド`};var $t={};$t={decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:`번호 필드`};var en={};en={decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:`Numerio laukas`};var tn={};tn={decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:`Skaitļu lauks`};var nn={};nn={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:`Tallfelt`};var rn={};rn={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:`Getalveld`};var an={};an={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:`Pole numeru`};var on={};on={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var sn={};sn={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo numérico`};var cn={};cn={decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:`Câmp numeric`};var ln={};ln={decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:`Числовое поле`};var un={};un={decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:`Číselné pole`};var dn={};dn={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:`Številčno polje`};var fn={};fn={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var pn={};pn={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:`Nummerfält`};var mn={};mn={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:`Sayı alanı`};var hn={};hn={decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:`Поле номера`};var gn={};gn={decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:`数字字段`};var _n={};_n={decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:`數字欄位`};var vn={};vn={"ar-AE":Lt,"bg-BG":Rt,"cs-CZ":zt,"da-DK":Bt,"de-DE":Vt,"el-GR":Ht,"en-US":Ut,"es-ES":Wt,"et-EE":Gt,"fi-FI":Kt,"fr-FR":qt,"he-IL":Jt,"hr-HR":Yt,"hu-HU":Xt,"it-IT":Zt,"ja-JP":Qt,"ko-KR":$t,"lt-LT":en,"lv-LV":tn,"nb-NO":nn,"nl-NL":rn,"pl-PL":an,"pt-BR":on,"pt-PT":sn,"ro-RO":cn,"ru-RU":ln,"sk-SK":un,"sl-SI":dn,"sr-SP":fn,"sv-SE":pn,"tr-TR":mn,"uk-UA":hn,"zh-CN":gn,"zh-TW":_n};var yn=a(k(),1);function bn(e){return e&&e.__esModule?e.default:e}function xn(e,t,n){let{id:i,decrementAriaLabel:a,incrementAriaLabel:o,isDisabled:s,isReadOnly:l,isRequired:u,minValue:f,maxValue:p,autoFocus:h,label:g,formatOptions:_,onBlur:y=()=>{},onFocus:b,onFocusChange:x,onKeyDown:C,onKeyUp:T,description:E,errorMessage:O,isWheelDisabled:k,...A}=e,{increment:M,incrementToMax:N,decrement:F,decrementToMin:I,numberValue:L,inputValue:ee,commit:R,commitValidation:ne}=t,re=P(bn(vn),`@react-aria/numberfield`),ie=(0,J.useCallback)(()=>{let e=n.current?.value??``;(0,yn.flushSync)(()=>{R()}),n.current?.value!==e&&we(n.current?.value??``,`assertive`)},[R,n]),ae=S(i),{focusProps:z}=ve({onBlur(){ie()}}),oe=te(_),se=(0,J.useMemo)(()=>oe.resolvedOptions(),[oe]),ce=te({..._,currencySign:void 0}),{spinButtonProps:le,incrementButtonProps:B,decrementButtonProps:V}=It({isDisabled:s,isReadOnly:l,isRequired:u,maxValue:p,minValue:f,onIncrement:M,onIncrementToMax:N,onDecrement:F,onDecrementToMin:I,value:L,textValue:(0,J.useMemo)(()=>isNaN(L)?``:ce.format(L),[ce,L])}),[ue,de]=(0,J.useState)(!1),{focusWithinProps:fe}=D({isDisabled:s,onFocusWithinChange:de});Qe({onScroll:(0,J.useCallback)(e=>{Math.abs(e.deltaY)<=Math.abs(e.deltaX)||(e.deltaY>0?M():e.deltaY<0&&F())},[F,M]),isDisabled:k||s||l||!ue},n);let he=(se.maximumFractionDigits??0)>0,ge=t.minValue===void 0||isNaN(t.minValue)||t.minValue<0,H=`numeric`;d()?ge?H=`text`:he&&(H=`decimal`):m()&&(ge?H=`numeric`:he&&(H=`decimal`));let _e=e=>{t.validate(e)&&t.setInputValue(e)},ye=t=>{e.onPaste?.(t);let n=pe(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),R(t.clipboardData?.getData?.(`text/plain`)?.trim()??``))},be=c(e),{keyboardProps:xe}=Ee({isDisabled:s||l,shortcuts:{Enter:()=>((0,yn.flushSync)(()=>{R()}),ne(),{shouldPreventDefault:!1})},onKeyDown:C,onKeyUp:T}),{isInvalid:Se,validationErrors:Ce,validationDetails:Te}=t.displayValidation,{labelProps:U,inputProps:De,descriptionProps:W,errorMessageProps:Oe}=Ze({...A,...be,name:void 0,form:void 0,label:g,autoFocus:h,isDisabled:s,isReadOnly:l,isRequired:u,validate:void 0,[me]:t,value:ee,defaultValue:`!`,autoComplete:`off`,"aria-label":e[`aria-label`]||void 0,"aria-labelledby":e[`aria-labelledby`]||void 0,id:ae,type:`text`,inputMode:H,onChange:_e,onBlur:y,onFocus:b,onFocusChange:x,onPaste:ye,description:E,errorMessage:O},t,n),G=w(xe,De);j(n,t.defaultNumberValue,t.setNumberValue),Sn(t,e.validationBehavior,e.commitBehavior,n,t.minValue,t.maxValue,e.step,t.numberValue);let K=w(le,z,G,{role:null,"aria-roledescription":v()?null:re.format(`numberField`),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:`off`,spellCheck:`false`});e.validationBehavior===`native`&&(K[`aria-required`]=void 0);let ke=e=>{r()!==n.current&&(e.pointerType===`mouse`?n.current?.focus():e.target.focus())},q=e[`aria-label`]||(typeof e.label==`string`?e.label:``),Ae;q||(Ae=e.label==null?e[`aria-labelledby`]:U.id);let je=S(),Me=S(),Ne=w(B,{"aria-label":o||re.format(`increase`,{fieldLabel:q}).trim(),id:Ae&&!o?je:null,"aria-labelledby":Ae&&!o?`${je} ${Ae}`:null,"aria-controls":ae,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ke}),Pe=w(V,{"aria-label":a||re.format(`decrease`,{fieldLabel:q}).trim(),id:Ae&&!a?Me:null,"aria-labelledby":Ae&&!a?`${Me} ${Ae}`:null,"aria-controls":ae,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ke});return{groupProps:{...fe,role:`group`,"aria-disabled":s,"aria-invalid":Se?`true`:void 0},labelProps:U,inputProps:K,incrementButtonProps:Ne,decrementButtonProps:Pe,errorMessageProps:Oe,descriptionProps:W,isInvalid:Se,validationErrors:Ce,validationDetails:Te}}var Y=null;function Sn(e,t,n,r,i,a,o,s){E(()=>{let c=r.current;if(n!==`validate`||e.realtimeValidation.isInvalid||!c||c.disabled||(!Y&&typeof document<`u`&&(Y=document.createElement(`input`),Y.type=`number`),!Y))return;Y.min=i!=null&&!isNaN(i)?String(i):``,Y.max=a!=null&&!isNaN(a)?String(a):``,Y.step=o!=null&&!isNaN(o)?String(o):``,Y.value=s!=null&&!isNaN(s)?String(s):``;let l=c.validity.valid&&Y.validity.valid,u=c.validationMessage||Y.validationMessage,d={isInvalid:!l,validationErrors:u?[u]:[],validationDetails:{badInput:c.validity.badInput,customError:c.validity.customError,patternMismatch:c.validity.patternMismatch,rangeOverflow:Y.validity.rangeOverflow,rangeUnderflow:Y.validity.rangeUnderflow,stepMismatch:Y.validity.stepMismatch,tooLong:c.validity.tooLong,tooShort:c.validity.tooShort,typeMismatch:c.validity.typeMismatch,valueMissing:c.validity.valueMissing,valid:l}};e.updateValidation(d),t===`native`&&!Y.validity.valid&&c.setCustomValidity(Y.validationMessage)})}function Cn(e){let{minValue:t,maxValue:r,step:i,formatOptions:a,value:o,defaultValue:s=NaN,onChange:c,locale:l,isDisabled:u,isReadOnly:d,commitBehavior:f=`snap`}=e;o===null&&(o=NaN);let p=(0,J.useCallback)(e=>i===void 0||isNaN(i)?re(e,t,r):q(e,t,r,i),[i,t,r]);o!==void 0&&!isNaN(o)&&f===`snap`&&(o=p(o)),!isNaN(s)&&f===`snap`&&(s=p(s));let[m,h]=Se(o,isNaN(s)?NaN:s,c),[g]=(0,J.useState)(m),[_,v]=(0,J.useState)(()=>isNaN(m)?``:new ye(l,a).format(m)),y=(0,J.useMemo)(()=>new Be(l,a),[l,a]),b=(0,J.useMemo)(()=>y.getNumberingSystem(_),[y,_]),x=(0,J.useMemo)(()=>new ye(l,{...a,numberingSystem:b}),[l,a,b]),S=(0,J.useMemo)(()=>x.resolvedOptions(),[x]),C=(0,J.useCallback)(e=>isNaN(e)||e===null?``:x.format(e),[x]),w=n({...e,value:m}),T=i!==void 0&&!isNaN(i)?i:1;S.style===`percent`&&(i===void 0||isNaN(i))&&(T=.01);let[E,D]=(0,J.useState)(m),[O,k]=(0,J.useState)(l),[A,j]=(0,J.useState)(a);(!Object.is(m,E)||l!==O||!wn(a,A))&&(v(C(m)),D(m),k(l),j(a));let M=(0,J.useMemo)(()=>y.parse(_),[y,_]),N=e=>{let t=e===void 0?_:e,n=M;if(e!==void 0&&(n=y.parse(t)),!t.length){h(NaN),v(o===void 0?``:C(m));return}if(isNaN(n)){v(C(m));return}let r=f===`snap`?p(n):n;r=y.parse(C(r));let i=r!==m;h(r),v(C(o===void 0?r:m)),i&&w.commitValidation()},P=(e,n=0)=>{let i=M;if(isNaN(i))return q(isNaN(n)?0:n,t,r,T);{let n=q(i,t,r,T);return e===`+`&&n>i||e===`-`&&n<i?n:q(Tn(e,i,T),t,r,T)}},F=()=>{let e=P(`+`,t);e===m&&v(C(e)),h(e),w.commitValidation()},I=()=>{let e=P(`-`,r);e===m&&v(C(e)),h(e),w.commitValidation()},L=()=>{r!=null&&(h(q(r,t,r,T)),w.commitValidation())},ee=()=>{t!=null&&(h(t),w.commitValidation())},R=(0,J.useMemo)(()=>!u&&!d&&(isNaN(M)||r===void 0||isNaN(r)||q(M,t,r,T)>M||Tn(`+`,M,T)<=r),[u,d,t,r,T,M]),te=(0,J.useMemo)(()=>!u&&!d&&(isNaN(M)||t===void 0||isNaN(t)||q(M,t,r,T)<M||Tn(`-`,M,T)>=t),[u,d,t,r,T,M]),ne=e=>y.isValidPartialNumber(e,t,r);return{...w,validate:ne,increment:F,incrementToMax:L,decrement:I,decrementToMin:ee,canIncrement:R,canDecrement:te,minValue:t,maxValue:r,numberValue:M,defaultNumberValue:isNaN(s)?g:s,setNumberValue:h,setInputValue:v,inputValue:_,commit:N}}function wn(e,t){if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function Tn(e,t,n){let r=e===`+`?t+n:t-n;if(t%1!=0||n%1!=0){let i=t.toString().split(`.`),a=n.toString().split(`.`),o=i[1]&&i[1].length||0,s=a[1]&&a[1].length||0,c=10**Math.max(o,s);t=Math.round(t*c),n=Math.round(n*c),r=e===`+`?t+n:t-n,r/=c}return r}var En=(0,J.createContext)(null),Dn=(0,J.createContext)(null),On=(0,J.forwardRef)(function(e,t){[e,t]=De(e,t,En);let{validationBehavior:n}=ue(C)||{},r=e.validationBehavior??n??`native`,{locale:i}=Te(),a=Cn({...e,locale:i,validationBehavior:r}),o=(0,J.useRef)(null),[s,l]=le(!e[`aria-label`]&&!e[`aria-labelledby`]),{labelProps:u,groupProps:d,inputProps:f,incrementButtonProps:p,decrementButtonProps:m,descriptionProps:g,errorMessageProps:_,...v}=xn({..._e(e),label:l,validationBehavior:r},a,o),y=oe({...e,values:{state:a,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1,isReadOnly:e.isReadOnly||!1},defaultClassName:`react-aria-NumberField`}),b=c(e,{global:!0});return delete b.id,J.createElement(H,{values:[[Dn,a],[x,d],[ne,{...f,ref:o}],[ae,{...u,ref:s}],[h,{slots:{increment:p,decrement:m}}],[T,{slots:{description:g,errorMessage:_}}],[fe,v]]},J.createElement(xe.div,{...b,...y,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-invalid":v.isInvalid||void 0}),e.name&&J.createElement(`input`,{type:`hidden`,name:e.name,form:e.form,value:isNaN(a.numberValue)?``:a.numberValue,disabled:e.isDisabled||void 0}))}),kn=new WeakMap;function An(e,n,r){let{value:i,children:a,"aria-label":o,"aria-labelledby":s,onPressStart:u,onPressEnd:d,onPressChange:f,onPress:p,onPressUp:m,onClick:h}=e,g=e.isDisabled||n.isDisabled,_=n.selectedValue===i,v=e=>{e.stopPropagation(),n.setSelectedValue(i)},{pressProps:y,isPressed:b}=t({onPressStart:u,onPressEnd:d,onPressChange:f,onPress:p,onPressUp:m,onClick:h,isDisabled:g}),{pressProps:x,isPressed:S}=t({onPressStart:u,onPressEnd:d,onPressChange:f,onPressUp:m,onClick:h,isDisabled:g,onPress(e){p?.(e),n.setSelectedValue(i),r.current?.focus()}}),{focusableProps:C}=se(w(e,{onFocus:()=>n.setLastFocusedValue(i)}),r),T=w(y,C),E=c(e,{labelable:!0}),D=-1;n.selectedValue==null?(n.lastFocusedValue===i||n.lastFocusedValue==null)&&(D=0):n.selectedValue===i&&(D=0),g&&(D=void 0);let{name:O,form:k,descriptionId:M,errorMessageId:N,validationBehavior:P}=kn.get(n);j(r,n.defaultSelectedValue,n.setSelectedValue),l({validationBehavior:P},n,r);let F=A();return{labelProps:w(x,(0,J.useMemo)(()=>({onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault()}),[])),inputProps:w(E,{...T,type:`radio`,name:O,form:k,tabIndex:D,disabled:g,required:n.isRequired&&P===`native`,checked:_,value:i,onChange:v,"aria-describedby":[e[`aria-describedby`],F.id,n.isInvalid?N:null,M].filter(Boolean).join(` `)||void 0}),descriptionProps:F,isDisabled:g,isSelected:_,isPressed:b||S}}function jn(e,t){let{name:n,form:r,isReadOnly:i,isRequired:a,isDisabled:o,orientation:l=`vertical`,validationBehavior:u=`aria`}=e,{direction:d}=Te(),{isInvalid:f,validationErrors:m,validationDetails:h}=t.displayValidation,{labelProps:g,fieldProps:_,descriptionProps:v,errorMessageProps:y}=s({...e,labelElementType:`span`,isInvalid:t.isInvalid,errorMessage:e.errorMessage||m}),x=c(e,{labelable:!0}),{focusWithinProps:C}=D({onBlurWithin(n){e.onBlur?.(n),t.selectedValue||t.setLastFocusedValue(null)},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});function T(e,n){let r=p(n.currentTarget,{from:pe(n),accept:e=>e instanceof b(e).HTMLInputElement&&e.type===`radio`}),i;return e===`next`?(i=r.nextNode(),i||=(r.currentNode=n.currentTarget,r.firstChild())):(i=r.previousNode(),i||=(r.currentNode=n.currentTarget,r.lastChild())),i?(i.focus(),t.setSelectedValue(i.value),!0):!1}let{keyboardProps:E}=Ee({shortcuts:{ArrowRight:e=>T(d===`rtl`&&l!==`vertical`?`prev`:`next`,e),ArrowLeft:e=>T(d===`rtl`&&l!==`vertical`?`next`:`prev`,e),ArrowDown:e=>T(`next`,e),ArrowUp:e=>T(`prev`,e)},allowRepeats:!0}),O=S(n);return kn.set(t,{name:O,form:r,descriptionId:v.id,errorMessageId:y.id,validationBehavior:u}),{radioGroupProps:w(x,{role:`radiogroup`,...E,"aria-invalid":t.isInvalid||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-readonly":i||void 0,"aria-required":a||void 0,"aria-disabled":o||void 0,"aria-orientation":l,..._,...C}),labelProps:g,descriptionProps:v,errorMessageProps:y,isInvalid:f,validationErrors:m,validationDetails:h}}var Mn=Math.round(Math.random()*1e10),Nn=0;function Pn(e){let t=(0,J.useMemo)(()=>e.name||`radio-group-${Mn}-${++Nn}`,[e.name]),[r,i]=Se(e.value,e.defaultValue??null,e.onChange),[a]=(0,J.useState)(r),[o,s]=(0,J.useState)(null),c=n({...e,value:r}),l=t=>{!e.isReadOnly&&!e.isDisabled&&(i(t),c.commitValidation())},u=c.displayValidation.isInvalid;return{...c,name:t,selectedValue:r,defaultSelectedValue:e.value===void 0?e.defaultValue??null:a,setSelectedValue:l,lastFocusedValue:o,setLastFocusedValue:s,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(u?`invalid`:null),isInvalid:u}}var Fn=(0,J.createContext)(null),In=(0,J.createContext)(null),Ln=(0,J.createContext)(null),Rn=(0,J.forwardRef)(function(e,t){[e,t]=De(e,t,Fn);let{validationBehavior:n}=ue(C)||{},r=e.validationBehavior??n??`native`,i=Pn({...e,validationBehavior:r}),[a,o]=le(!e[`aria-label`]&&!e[`aria-labelledby`]),{radioGroupProps:s,labelProps:l,descriptionProps:u,errorMessageProps:d,...f}=jn({...e,label:o,validationBehavior:r},i),p=oe({...e,values:{orientation:e.orientation||`vertical`,isDisabled:i.isDisabled,isReadOnly:i.isReadOnly,isRequired:i.isRequired,isInvalid:i.isInvalid,state:i},defaultClassName:`react-aria-RadioGroup`}),m=c(e,{global:!0});return J.createElement(xe.div,{...w(m,p,s),ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||`vertical`,"data-invalid":i.isInvalid||void 0,"data-disabled":i.isDisabled||void 0,"data-readonly":i.isReadOnly||void 0,"data-required":i.isRequired||void 0},J.createElement(H,{values:[[Ln,i],[ae,{...l,ref:a,elementType:`span`}],[T,{slots:{description:u,errorMessage:d}}],[fe,f]]},J.createElement(O,null,p.children)))}),zn=(0,J.createContext)(null),Bn=(0,J.forwardRef)(function(e,t){let{inputRef:n=null,...r}=e;[e,t]=De(r,t,In);let i=J.useContext(Ln),a=M((0,J.useMemo)(()=>he(n,e.inputRef===void 0?null:e.inputRef),[n,e.inputRef])),o=An({..._e(e),children:typeof e.children==`function`||e.children},i,a),{descriptionProps:s,isSelected:l,isDisabled:u}=o,d=oe({...e,defaultClassName:`react-aria-RadioField`,values:{isSelected:l,isDisabled:u,isReadOnly:i.isReadOnly,isInvalid:i.isInvalid,isRequired:i.isRequired}}),f=c(e,{global:!0});return delete f.id,delete f.onClick,J.createElement(xe.div,{...w(f,d),ref:t,"data-selected":l||void 0,"data-disabled":u||void 0,"data-readonly":i.isReadOnly||void 0,"data-invalid":i.isInvalid||void 0,"data-required":i.isRequired||void 0},J.createElement(H,{values:[[_,{isSelected:l}],[zn,{...o,inputRef:a,defaultClassName:`react-aria-RadioButton`}],[T,{slots:{description:s}}]]},d.children))}),Vn=(0,J.forwardRef)(function(e,t){let{labelProps:n,inputProps:r,isSelected:a,isDisabled:o,isPressed:s,defaultClassName:l,inputRef:u}=(0,J.useContext)(zn),d=J.useContext(Ln),{isFocused:f,isFocusVisible:p,focusProps:m}=ee(),h=o||d.isReadOnly,{hoverProps:g,isHovered:_}=I({...e,isDisabled:h}),v=oe({...e,defaultClassName:l,values:{isSelected:a,isPressed:s,isHovered:_,isFocused:f,isFocusVisible:p,isDisabled:o,isReadOnly:d.isReadOnly,isInvalid:d.isInvalid,isRequired:d.isRequired}}),y=c(e,{global:!0});return delete y.id,delete y.onClick,J.createElement(xe.label,{...w(y,n,g,v),ref:t,"data-selected":a||void 0,"data-pressed":s||void 0,"data-hovered":_||void 0,"data-focused":f||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-readonly":d.isReadOnly||void 0,"data-invalid":d.isInvalid||void 0,"data-required":d.isRequired||void 0},J.createElement(i,{elementType:`span`},J.createElement(`input`,{...w(r,m),ref:u})),v.children)}),X=je(),Hn=({children:e,className:t,...n})=>(0,X.jsx)(Me,{className:Pe({className:t}),"data-slot":`header`,...n,children:e}),Un=(0,J.createContext)({}),Wn=({children:e,className:t,...n})=>{let r=J.useMemo(()=>Ie(),[]);return(0,X.jsx)(Bn,{"data-slot":`radio`,...n,className:g(t,r.base()),children:t=>(0,X.jsx)(Un,{value:{slots:r,state:t},children:typeof e==`function`?e(t):e})})};Wn.displayName=`HeroUI.Radio`;var Gn=({children:e,className:t,...n})=>{let{slots:r}=(0,J.use)(Un);return(0,X.jsx)(Vn,{"data-slot":`radio-content`,...n,className:g(t,r?.content()),children:e})};Gn.displayName=`HeroUI.Radio.Content`;var Kn=({children:e,className:t,...n})=>{let{slots:r}=(0,J.use)(Un);return(0,X.jsx)(Oe.span,{className:f(r?.control,t),"data-slot":`radio-control`,...n,children:e})};Kn.displayName=`HeroUI.Radio.Control`;var qn=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,J.use)(Un),a=typeof e==`function`?e(i??{}):e;return(0,X.jsx)(Oe.span,{"aria-hidden":`true`,className:f(r?.indicator,t),"data-slot":`radio-indicator`,...n,children:a})};qn.displayName=`HeroUI.Radio.Indicator`;var Z=Object.assign(Wn,{Root:Wn,Content:Gn,Control:Kn,Indicator:qn}),Jn=({children:e,className:t,variant:n,...r})=>{let i=J.useMemo(()=>Le({variant:n}),[n]);return(0,X.jsx)(Rn,{"data-slot":`radio-group`,...r,className:g(t,i),children:t=>(0,X.jsx)(X.Fragment,{children:typeof e==`function`?e(t):e})})},Yn=Object.assign(Jn,{Root:Jn}),Xn=(0,J.createContext)({}),Zn=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=J.useMemo(()=>Fe({fullWidth:n,variant:r}),[n,r]);return(0,X.jsx)(Xn,{value:{slots:a},children:(0,X.jsx)(On,{"data-slot":`number-field`,...i,className:g(t,a?.base()),children:t=>(0,X.jsx)(X.Fragment,{children:typeof e==`function`?e(t):e})})})},Q=Object.assign(Zn,{Root:Zn,Group:({children:e,className:t,...n})=>{let{slots:r}=(0,J.use)(Xn);return(0,X.jsx)(y,{className:g(t,r?.group()),"data-slot":`number-field-group`,...n,children:t=>(0,X.jsx)(X.Fragment,{children:typeof e==`function`?e(t):e})})},Input:({className:e,...t})=>{let{slots:n}=(0,J.use)(Xn);return(0,X.jsx)(ke,{className:g(e,n?.input()),"data-slot":`number-field-input`,...t})},IncrementButton:({children:e,className:t,...n})=>{let{slots:r}=(0,J.use)(Xn);return(0,X.jsx)(L,{className:g(t,r?.incrementButton()),"data-slot":`number-field-increment-button`,slot:`increment`,...n,children:e&&J.isValidElement(e)?e:(0,X.jsx)(F,{"data-slot":`number-field-increment-button-icon`})})},DecrementButton:({children:e,className:t,...n})=>{let{slots:r}=(0,J.use)(Xn);return(0,X.jsx)(L,{className:g(t,r?.decrementButton()),"data-slot":`number-field-decrement-button`,slot:`decrement`,...n,children:e&&J.isValidElement(e)?e:(0,X.jsx)(N,{"data-slot":`number-field-decrement-button-icon`})})}}),Qn=Ce(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),$n=`*/10 * * * *`,er=[`周日`,`周一`,`周二`,`周三`,`周四`,`周五`,`周六`],tr=[{title:`高频检查`,presets:[{id:`every5`,label:`每 5 分钟`,description:`更频繁地检查推送,适合更新很密集的账号。`,value:`*/5 * * * *`},{id:`every10`,label:`每 10 分钟`,description:`推荐:全天每 10 分钟检查一次推送。`,value:`*/10 * * * *`},{id:`every15`,label:`每 15 分钟`,description:`兼顾及时性和任务频率,适合大多数推送。`,value:`*/15 * * * *`},{id:`every30`,label:`每 30 分钟`,description:`检查频率较低,适合不太活跃的推送。`,value:`*/30 * * * *`}]},{title:`按小时轮询`,presets:[{id:`hourly`,label:`每小时一次`,description:`每个整点执行,例如 00:00、01:00。`,value:`0 * * * *`},{id:`every2Hours`,label:`每 2 小时`,description:`从 0 点开始,每隔 2 小时执行一次。`,value:`0 */2 * * *`},{id:`every3Hours`,label:`每 3 小时`,description:`从 0 点开始,每隔 3 小时执行一次。`,value:`0 */3 * * *`},{id:`every6Hours`,label:`每 6 小时`,description:`每天 0 点、6 点、12 点、18 点执行。`,value:`0 */6 * * *`}]},{title:`每天固定时间`,presets:[{id:`daily8`,label:`每天上午 8 点`,description:`每天早上固定执行一次。`,value:`0 8 * * *`},{id:`daily9`,label:`每天上午 9 点`,description:`每天固定执行一次。`,value:`0 9 * * *`},{id:`daily12`,label:`每天中午 12 点`,description:`每天午间固定执行一次。`,value:`0 12 * * *`},{id:`daily18`,label:`每天晚上 6 点`,description:`每天傍晚固定执行一次。`,value:`0 18 * * *`},{id:`daily20`,label:`每天晚上 8 点`,description:`适合晚间集中推送。`,value:`0 20 * * *`},{id:`daily22`,label:`每天晚上 10 点`,description:`每天夜间固定执行一次。`,value:`0 22 * * *`}]},{title:`每天多次`,presets:[{id:`daily9And20`,label:`每天 9 点和 20 点`,description:`每天早晚各执行一次。`,value:`0 9,20 * * *`},{id:`daily9And12And18`,label:`每天 9 点、12 点、18 点`,description:`每天早中晚各执行一次。`,value:`0 9,12,18 * * *`}]},{title:`按星期`,presets:[{id:`weekday9`,label:`工作日上午 9 点`,description:`只在周一到周五执行。`,value:`0 9 * * 1,2,3,4,5`},{id:`weekday18`,label:`工作日晚上 6 点`,description:`只在周一到周五的傍晚执行。`,value:`0 18 * * 1,2,3,4,5`},{id:`weekend10`,label:`周末上午 10 点`,description:`只在周六和周日执行。`,value:`0 10 * * 0,6`},{id:`friday20`,label:`每周五晚上 8 点`,description:`每周五固定执行一次。`,value:`0 20 * * 5`}]}],nr=tr.flatMap(e=>e.presets),rr={minuteType:`interval`,minuteInterval:10,specificMinutes:[],hourType:`every`,hourInterval:1,specificHours:[],dayType:`every`,dayInterval:1,specificDays:[],weekType:`every`,specificWeeks:[]},ir=e=>String(e).padStart(2,`0`),ar=(e,t,n,r)=>Number.isFinite(e)?Math.min(n,Math.max(t,Math.trunc(e))):r,$=(e,t,n)=>Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>=t&&e<=n))).sort((e,t)=>e-t),or=(e,t,n)=>$(e.split(`,`).map(e=>Number(e.trim())).filter(e=>Number.isFinite(e)),t,n),sr=e=>$(e.split(`,`).map(e=>{let t=Number(e.trim());return t===7?0:t}).filter(e=>Number.isFinite(e)),0,6),cr=(e,t,n,r)=>{if(e===`*`||e===`*/1`)return{type:`every`,interval:r,specific:[]};let i=e.match(/^\*\/(\d+)$/);if(i){let e=ar(Number(i[1]),1,n,r);return e<=1?{type:`every`,interval:r,specific:[]}:{type:`interval`,interval:e,specific:[]}}let a=or(e,t,n);return a.length>0?{type:`specific`,interval:r,specific:a}:{type:`every`,interval:r,specific:[]}},lr=e=>{let t=(e||$n).trim().split(/\s+/);if(t.length!==5)return{...rr};let[n,r,i,,a]=t,o=cr(n,0,59,10),s=cr(r,0,23,1),c=cr(i,1,31,1),l=a===`*`?[]:sr(a),u=l.length>0;return{minuteType:o.type,minuteInterval:o.interval,specificMinutes:o.specific,hourType:s.type,hourInterval:s.interval,specificHours:s.specific,dayType:u?`every`:c.type,dayInterval:u?1:c.interval,specificDays:u?[]:c.specific,weekType:u?`specific`:`every`,specificWeeks:l}},ur=e=>{let t=`*`,n=`*`,r=`*`,i=`*`;switch(e.minuteType){case`every`:t=`*`;break;case`interval`:t=e.minuteInterval<=1?`*`:`*/${e.minuteInterval}`;break;case`specific`:t=e.specificMinutes.length>0?$(e.specificMinutes,0,59).join(`,`):`0`;break}switch(e.hourType){case`every`:n=`*`;break;case`interval`:n=e.hourInterval<=1?`*`:`*/${e.hourInterval}`;break;case`specific`:n=e.specificHours.length>0?$(e.specificHours,0,23).join(`,`):`0`;break}switch(e.dayType){case`every`:r=`*`;break;case`interval`:r=e.dayInterval<=1?`*`:`*/${e.dayInterval}`;break;case`specific`:r=e.specificDays.length>0?$(e.specificDays,1,31).join(`,`):`1`;break}return e.weekType===`specific`&&(i=e.specificWeeks.length>0?$(e.specificWeeks,0,6).join(`,`):`*`),`${t} ${n} ${r} * ${i}`},dr=e=>{let t=(e||$n).trim().replace(/\s+/g,` `);return nr.find(e=>e.value===t)?.id??null},fr=e=>e.join(`、`),pr=e=>e.map(e=>`${e} 点`).join(`、`),mr=e=>{if(e.weekType===`specific`&&e.specificWeeks.length>0){let t=$(e.specificWeeks,0,6);return t.length===5&&t.every(e=>[1,2,3,4,5].includes(e))?`工作日`:t.length===2&&t.every(e=>[0,6].includes(e))?`周末`:`每${t.map(e=>er[e]).join(`、`)}`}return e.dayType===`interval`&&e.dayInterval>1?`每隔 ${e.dayInterval} 天`:e.dayType===`specific`&&e.specificDays.length>0?`每月 ${fr($(e.specificDays,1,31))} 号`:`每天`},hr=e=>e.minuteType===`every`?`每分钟`:e.minuteType===`interval`?e.minuteInterval<=1?`每分钟`:`每 ${e.minuteInterval} 分钟`:`第 ${fr(e.specificMinutes.length>0?$(e.specificMinutes,0,59):[0])} 分钟`,gr=e=>{let t=hr(e);if(e.hourType===`every`||e.hourType===`interval`&&e.hourInterval<=1)return e.minuteType===`specific`?`每小时的${t}`:`全天${t}`;if(e.hourType===`specific`){let n=e.specificHours.length>0?$(e.specificHours,0,23):[0];return e.minuteType===`specific`?`在 ${pr(n)} 的${t}`:`在 ${pr(n)} 内${t}`}return e.minuteType===`specific`?`从 0 点开始每隔 ${e.hourInterval} 小时,在${t}`:`从 0 点开始每隔 ${e.hourInterval} 小时,该小时内${t}`},_r=e=>{let t=mr(e),n=gr(e);return`${t},${t===`每天`?n.replace(/^全天/,``):n}执行`},vr=e=>_r(lr(e)),yr=e=>{if(e.minuteType===`every`)return Array.from({length:60},(e,t)=>t);if(e.minuteType===`interval`){let t=Math.max(1,e.minuteInterval);return Array.from({length:Math.ceil(60/t)},(e,n)=>n*t).filter(e=>e<=59)}return e.specificMinutes.length>0?$(e.specificMinutes,0,59):[0]},br=e=>{if(e.hourType===`every`)return Array.from({length:24},(e,t)=>t);if(e.hourType===`interval`){let t=Math.max(1,e.hourInterval);return Array.from({length:Math.ceil(24/t)},(e,n)=>n*t).filter(e=>e<=23)}return e.specificHours.length>0?$(e.specificHours,0,23):[0]},xr=e=>{let t=[],n=br(e),r=yr(e);for(let e of n)for(let n of r)if(t.push(`${ir(e)}:${ir(n)}`),t.length>=6)return t;return t},Sr=e=>{let t=xr(e).join(`、`);return`${e.dayType===`every`&&e.weekType===`every`?`一天内示例`:`符合日期时,一天内示例`}:${t}`},Cr=({value:t,onChange:n,disabled:r=!1,device:i=`desktop`})=>{let[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(`quick`),[l,u]=(0,J.useState)(dr(t)),[d,f]=(0,J.useState)(`interval`),[p,m]=(0,J.useState)(10),[h,g]=(0,J.useState)([]),[_,v]=(0,J.useState)(`every`),[y,b]=(0,J.useState)(1),[x,S]=(0,J.useState)([]),[C,w]=(0,J.useState)(`every`),[T,E]=(0,J.useState)(1),[D,O]=(0,J.useState)([]),[k,A]=(0,J.useState)(`every`),[j,M]=(0,J.useState)([]),N=e=>{f(e.minuteType),m(e.minuteInterval),g(e.specificMinutes),v(e.hourType),b(e.hourInterval),S(e.specificHours),w(e.dayType),E(e.dayInterval),O(e.specificDays),A(e.weekType),M(e.specificWeeks)},P=()=>({minuteType:d,minuteInterval:p,specificMinutes:h,hourType:_,hourInterval:y,specificHours:x,dayType:C,dayInterval:T,specificDays:D,weekType:k,specificWeeks:j});(0,J.useEffect)(()=>{if(!a)return;let e=lr(t||$n);N(e),u(dr(ur(e))),c(`quick`)},[t,a]);let F=()=>ur(P()),I=()=>_r(P()),L=()=>Sr(P()),ee=()=>yr({...P(),minuteType:`interval`,minuteInterval:p}).slice(0,5).join(`、`),R=()=>br({...P(),hourType:`interval`,hourInterval:y}).slice(0,5).map(e=>`${e} 点`).join(`、`),te=()=>{n(F()),o(!1)},ne=e=>{let t=lr(e.value);N(t),u(e.id)},re=e=>{if(e===null||Array.isArray(e))return;let t=nr.find(t=>t.id===String(e));t&&ne(t)},ae=e=>{u(null),f(e)},oe=e=>{u(null),v(e)},se=e=>{u(null),w(e),e!==`every`&&(A(`every`),M([]))},le=e=>{u(null),A(e),e!==`every`&&(w(`every`),E(1),O([]))},ue=()=>(0,X.jsxs)(`div`,{className:`min-w-0 space-y-4 overflow-x-hidden`,children:[(0,X.jsxs)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,X.jsxs)(`div`,{className:`mb-3 flex min-w-0 flex-col gap-1`,children:[(0,X.jsx)(z,{className:`block text-base font-semibold`,children:`常用规则`}),(0,X.jsx)(U,{className:`block leading-relaxed`,children:`不用理解 Cron,直接选一个最接近的执行时间,再看下方预览确认。`})]}),(0,X.jsxs)(ie,{fullWidth:!0,variant:`secondary`,placeholder:`选择常用执行规则`,value:l??``,onChange:re,children:[(0,X.jsx)(z,{children:`执行规则`}),(0,X.jsxs)(ie.Trigger,{children:[(0,X.jsx)(ie.Value,{}),(0,X.jsx)(ie.Indicator,{})]}),(0,X.jsx)(ie.Popover,{children:(0,X.jsx)(ge,{children:tr.map((t,n)=>(0,X.jsxs)(J.Fragment,{children:[n>0?(0,X.jsx)(e,{}):null,(0,X.jsxs)(ge.Section,{children:[(0,X.jsx)(Hn,{children:t.title}),t.presets.map(e=>(0,X.jsxs)(ge.Item,{id:e.id,textValue:e.label,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,X.jsx)(z,{children:e.label}),(0,X.jsx)(U,{children:e.description})]}),(0,X.jsx)(ge.ItemIndicator,{})]},e.id))]})]},t.title))})})]})]}),(0,X.jsx)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,X.jsxs)(`div`,{className:`flex flex-row justify-between items-center`,children:[(0,X.jsx)(z,{className:`text-base font-semibold`,children:`需要更细的规则?`}),(0,X.jsx)(G,{size:`sm`,variant:`secondary`,onPress:()=>c(`minute`),children:`转到高级`})]})})]}),de=()=>(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,X.jsxs)(Yn,{"aria-label":`分钟类型`,variant:`secondary`,value:d,onChange:e=>ae(e),children:[(0,X.jsx)(z,{className:`text-base font-semibold`,children:`每个小时里,哪些分钟执行?`}),(0,X.jsx)(U,{className:`mb-3`,children:`例如选“每 10 分钟”,就是 00、10、20、30、40、50 分执行。`}),(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsxs)(Z,{value:`every`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`每分钟`]}),(0,X.jsx)(U,{children:`该小时里的每一分钟都执行,频率最高。`})]}),(0,X.jsxs)(Z,{value:`interval`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`间隔执行`]}),(0,X.jsx)(U,{children:`从第 0 分钟开始,按固定分钟数重复。`})]}),(0,X.jsxs)(Z,{value:`specific`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`指定分钟`]}),(0,X.jsx)(U,{children:`只在你点选的分钟执行,适合“整点”或“半点”。`})]})]})]})}),d===`interval`&&(0,X.jsxs)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,X.jsx)(z,{className:`mb-2 text-base font-semibold`,children:`间隔设置`}),(0,X.jsxs)(Q,{variant:`secondary`,minValue:1,maxValue:59,value:p,onChange:e=>{u(null),m(ar(e,1,59,10))},children:[(0,X.jsx)(z,{children:`间隔(分钟)`}),(0,X.jsxs)(Q.Group,{children:[(0,X.jsx)(Q.DecrementButton,{}),(0,X.jsx)(Q.Input,{className:`w-24`}),(0,X.jsx)(Q.IncrementButton,{})]}),(0,X.jsx)(U,{children:p<=1?`等价于每分钟执行。`:`每个小时的 ${ee()} 分执行。`})]})]}),d===`specific`&&(0,X.jsxs)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col`,children:[(0,X.jsx)(z,{className:`mb-2 text-base font-semibold`,children:`选择分钟`}),(0,X.jsx)(U,{className:`mb-3`,children:`点击选择要执行的分钟数,可多选。选 0 就是整点执行。`})]}),(0,X.jsx)(`div`,{className:`grid max-h-80 grid-cols-5 gap-2 overflow-y-auto p-1 md:grid-cols-10`,children:Array.from({length:60},(e,t)=>t).map(e=>(0,X.jsx)(G,{className:`aspect-square min-w-0 shrink-0 p-0`,size:`sm`,variant:h.includes(e)?`primary`:`secondary`,onPress:()=>{u(null),g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort((e,t)=>e-t))},children:e},e))}),h.length>0&&(0,X.jsxs)(U,{className:`mt-2`,children:[`已选择 `,h.length,` 个:`,h.join(`, `)]})]})]}),fe=()=>(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,X.jsxs)(Yn,{"aria-label":`小时类型`,variant:`secondary`,value:_,onChange:e=>oe(e),children:[(0,X.jsx)(z,{className:`text-base font-semibold`,children:`一天里,哪些小时允许执行?`}),(0,X.jsx)(U,{className:`mb-3`,children:`如果选择“全部小时”,分钟页的规则会全天生效。`}),(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsxs)(Z,{value:`every`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`全部小时`]}),(0,X.jsx)(U,{children:`不限制小时。例如分钟为每 10 分钟时,就是全天每 10 分钟。`})]}),(0,X.jsxs)(Z,{value:`interval`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`间隔执行`]}),(0,X.jsx)(U,{children:`从 0 点开始,每隔几个小时开放一次执行时段。`})]}),(0,X.jsxs)(Z,{value:`specific`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`指定小时`]}),(0,X.jsx)(U,{children:`只在你点选的小时内执行。`})]})]})]})}),_===`interval`&&(0,X.jsxs)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,X.jsx)(z,{className:`mb-2 text-base font-semibold`,children:`间隔设置`}),(0,X.jsxs)(Q,{variant:`secondary`,minValue:1,maxValue:23,value:y,onChange:e=>{u(null),b(ar(e,1,23,1))},children:[(0,X.jsx)(z,{children:`间隔(小时)`}),(0,X.jsxs)(Q.Group,{children:[(0,X.jsx)(Q.DecrementButton,{}),(0,X.jsx)(Q.Input,{className:`w-24`}),(0,X.jsx)(Q.IncrementButton,{})]}),(0,X.jsx)(U,{children:y<=1?`间隔 1 小时等价于全部小时,保存时会自动写成 *。`:`只在 ${R()} 这些小时内执行。`})]})]}),_===`specific`&&(0,X.jsxs)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col`,children:[(0,X.jsx)(z,{className:`mb-2 text-base font-semibold`,children:`选择小时`}),(0,X.jsx)(U,{className:`mb-3`,children:`点击选择允许执行的小时,可多选。具体分钟仍由“分钟”页决定。`})]}),(0,X.jsx)(`div`,{className:`grid max-h-80 grid-cols-4 gap-2 overflow-y-auto p-1 md:grid-cols-6`,children:Array.from({length:24},(e,t)=>t).map(e=>(0,X.jsx)(G,{className:`aspect-square min-w-0 shrink-0 p-0`,size:`sm`,variant:x.includes(e)?`primary`:`secondary`,onPress:()=>{u(null),S(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort((e,t)=>e-t))},children:e},e))}),x.length>0&&(0,X.jsxs)(U,{className:`mt-2`,children:[`已选择 `,x.length,` 个:`,x.map(e=>`${e}点`).join(`, `)]})]})]}),pe=()=>(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,X.jsxs)(Yn,{"aria-label":`日期类型`,variant:`secondary`,value:C,onChange:e=>se(e),children:[(0,X.jsx)(z,{className:`text-base font-semibold`,children:`一个月里,哪些日期允许执行?`}),(0,X.jsx)(U,{className:`mb-3`,children:`日期和星期只保留一个条件。选择日期后,会自动清空星期条件。`}),(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsxs)(Z,{value:`every`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`全部日期`]}),(0,X.jsx)(U,{children:`不限制几号执行。`})]}),(0,X.jsxs)(Z,{value:`interval`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`间隔执行`]}),(0,X.jsx)(U,{children:`从每月 1 号开始,每隔几天开放一次执行日期。`})]}),(0,X.jsxs)(Z,{value:`specific`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`指定日期`]}),(0,X.jsx)(U,{children:`只在你点选的几号执行。`})]})]})]})}),C===`interval`&&(0,X.jsxs)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,X.jsx)(z,{className:`mb-2 text-base font-semibold`,children:`间隔设置`}),(0,X.jsxs)(Q,{variant:`secondary`,minValue:1,maxValue:31,value:T,onChange:e=>{u(null),E(ar(e,1,31,1)),A(`every`),M([])},children:[(0,X.jsx)(z,{children:`间隔(天)`}),(0,X.jsxs)(Q.Group,{children:[(0,X.jsx)(Q.DecrementButton,{}),(0,X.jsx)(Q.Input,{className:`w-24`}),(0,X.jsx)(Q.IncrementButton,{})]}),(0,X.jsx)(U,{children:T<=1?`间隔 1 天等价于全部日期,保存时会自动写成 *。`:`每月从 1 号开始,每隔 ${T} 天执行。`})]})]}),C===`specific`&&(0,X.jsxs)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col`,children:[(0,X.jsx)(z,{className:`mb-2 text-base font-semibold`,children:`选择日期`}),(0,X.jsx)(U,{className:`mb-3`,children:`点击选择允许执行的日期,可多选。月份没有这一天时会自动跳过。`})]}),(0,X.jsx)(`div`,{className:`grid max-h-80 grid-cols-5 gap-2 overflow-y-auto p-1 md:grid-cols-7`,children:Array.from({length:31},(e,t)=>t+1).map(e=>(0,X.jsx)(G,{className:`aspect-square min-w-0 shrink-0 p-0`,size:`sm`,variant:D.includes(e)?`primary`:`secondary`,onPress:()=>{u(null),A(`every`),M([]),O(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort((e,t)=>e-t))},children:e},e))}),D.length>0&&(0,X.jsxs)(U,{className:`mt-2`,children:[`已选择 `,D.length,` 个:`,D.map(e=>`${e}号`).join(`, `)]})]})]}),me=()=>(0,X.jsxs)(`div`,{className:`space-y-4`,children:[(0,X.jsx)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,X.jsxs)(Yn,{"aria-label":`星期类型`,variant:`secondary`,value:k,onChange:e=>le(e),children:[(0,X.jsx)(z,{className:`text-base font-semibold`,children:`一周里,哪些星期允许执行?`}),(0,X.jsx)(U,{className:`mb-3`,children:`日期和星期只保留一个条件。选择星期后,会自动清空日期条件。`}),(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsxs)(Z,{value:`every`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`全部星期`]}),(0,X.jsx)(U,{children:`不限制星期几执行。`})]}),(0,X.jsxs)(Z,{value:`specific`,children:[(0,X.jsxs)(Z.Content,{children:[(0,X.jsx)(Z.Control,{children:(0,X.jsx)(Z.Indicator,{})}),`指定星期`]}),(0,X.jsx)(U,{children:`只在你点选的星期执行。`})]})]})]})}),k===`specific`&&(0,X.jsxs)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col`,children:[(0,X.jsx)(z,{className:`mb-2 text-base font-semibold`,children:`选择星期`}),(0,X.jsx)(U,{className:`mb-3`,children:`点击选择允许执行的星期,可多选。具体时间仍由分钟和小时页决定。`})]}),(0,X.jsx)(`div`,{className:`grid grid-cols-7 gap-2 p-1`,children:[`日`,`一`,`二`,`三`,`四`,`五`,`六`].map((e,t)=>(0,X.jsx)(G,{className:`aspect-square min-w-0 shrink-0 p-0`,size:`sm`,variant:j.includes(t)?`primary`:`secondary`,onPress:()=>{u(null),w(`every`),E(1),O([]),M(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t].sort((e,t)=>e-t))},children:e},t))}),j.length>0&&(0,X.jsxs)(U,{className:`mt-2`,children:[`已选择 `,j.length,` 天:`,j.map(e=>`周${`日一二三四五六`[e]}`).join(`, `)]})]})]}),he=i===`desktop`?`right`:`bottom`,H=vr(t||$n);return(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsxs)(`div`,{className:`flex gap-2 flex-col`,children:[(0,X.jsxs)(`div`,{className:`flex gap-2`,children:[(0,X.jsxs)(ce,{fullWidth:!0,isDisabled:!0,value:t,children:[(0,X.jsx)(z,{className:`sr-only`,children:`定时推送时间`}),(0,X.jsx)(be,{placeholder:`*/10 * * * *`,variant:`secondary`,"aria-label":`定时任务表达式`})]}),(0,X.jsxs)(G,{isDisabled:r,variant:`secondary`,onPress:()=>o(!0),children:[(0,X.jsx)(Qn,{className:`size-4`,"aria-hidden":`true`}),(0,X.jsx)(`span`,{children:`编辑`})]})]}),(0,X.jsxs)(U,{children:[`当前规则:`,H]})]}),(0,X.jsx)(W.Backdrop,{isOpen:a,variant:`blur`,onOpenChange:o,children:(0,X.jsx)(W.Content,{placement:he,children:(0,X.jsxs)(W.Dialog,{className:i===`desktop`?`h-full w-120 max-w-[90vw]`:`max-h-[85dvh]`,children:[(0,X.jsx)(W.Handle,{}),(0,X.jsx)(W.CloseTrigger,{}),(0,X.jsxs)(W.Header,{children:[(0,X.jsx)(W.Heading,{children:`定时推送时间`}),(0,X.jsx)(U,{children:`先选常用规则;需要精细控制时,再进入分钟、小时、日期、星期设置。`})]}),(0,X.jsxs)(W.Body,{className:`min-w-0 space-y-4 overflow-x-hidden`,children:[(0,X.jsxs)(V,{className:`min-w-0`,selectedKey:s,onSelectionChange:e=>c(e),children:[(0,X.jsx)(V.ListContainer,{children:(0,X.jsxs)(V.List,{children:[(0,X.jsxs)(V.Tab,{id:`quick`,children:[(0,X.jsx)(`span`,{children:`常用`}),(0,X.jsx)(V.Indicator,{})]}),(0,X.jsxs)(V.Tab,{id:`minute`,children:[(0,X.jsx)(`span`,{children:`分钟`}),(0,X.jsx)(V.Indicator,{})]}),(0,X.jsxs)(V.Tab,{id:`hour`,children:[(0,X.jsx)(`span`,{children:`小时`}),(0,X.jsx)(V.Indicator,{})]}),(0,X.jsxs)(V.Tab,{id:`day`,children:[(0,X.jsx)(`span`,{children:`日期`}),(0,X.jsx)(V.Indicator,{})]}),(0,X.jsxs)(V.Tab,{id:`week`,children:[(0,X.jsx)(`span`,{children:`星期`}),(0,X.jsx)(V.Indicator,{})]})]})}),(0,X.jsx)(`div`,{className:`h-1`}),(0,X.jsx)(V.Panel,{id:`quick`,className:`p-0`,children:ue()}),(0,X.jsx)(V.Panel,{id:`minute`,className:`p-0`,children:de()}),(0,X.jsx)(V.Panel,{id:`hour`,className:`p-0`,children:fe()}),(0,X.jsx)(V.Panel,{id:`day`,className:`p-0`,children:pe()}),(0,X.jsx)(V.Panel,{id:`week`,className:`p-0`,children:me()})]}),(0,X.jsx)(B,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(z,{className:`text-sm font-medium text-muted`,children:`实际执行时间`}),(0,X.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed`,children:I()}),(0,X.jsx)(U,{className:`mt-1`,children:L()})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(z,{className:`text-sm font-medium text-muted`,children:`表达式`}),(0,X.jsx)(`code`,{className:`mt-1 block font-mono text-base font-semibold`,children:F()})]})]})})]}),(0,X.jsxs)(W.Footer,{children:[(0,X.jsx)(G,{className:`flex-1`,slot:`close`,variant:`tertiary`,children:`取消`}),(0,X.jsx)(G,{className:`flex-1`,variant:`primary`,onPress:te,children:`使用这个规则`})]})]})})})]})};export{Cr as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./separator-CxcFlCzz.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l}from"./ThemeSwitch-DFohhwd9.js";import{Bt as u,T as d,_ as f,a as p,gt as m,i as h,n as g,o as _,r as v,s as y,w as b,yt as x,zt as S}from"./index-BRROK0vh.js";var C=v(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),w=u(S(),1),T=x(),E=({activeMenu:e})=>(0,T.jsx)(`div`,{className:`mx-auto w-full max-w-7xl px-4`,children:(()=>{switch(e){case`config`:return(0,T.jsx)(g,{device:`desktop`});case`about`:return(0,T.jsx)(s,{});default:return(0,T.jsx)(g,{device:`desktop`})}})()}),D=[{id:`config`,label:`配置管理`,icon:r},{id:`about`,label:`关于插件`,icon:n}],O=({collapsed:t,activeMenu:n,onMenuChange:r})=>{let o=y(()=>{window.open(`https://kkk.karinjs.com`,`_blank`,`noopener,noreferrer`)}),s=y(()=>{p(),window.location.reload()});return t?null:(0,T.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,T.jsx)(`div`,{className:`shrink-0 px-4 pt-3 pb-2`,children:(0,T.jsxs)(f,{children:[(0,T.jsx)(f.Trigger,{"aria-label":`用户信息`,children:(0,T.jsxs)(`div`,{className:`flex w-full items-center gap-3 rounded-lg p-2 transition-colors hover:bg-default-100 cursor-pointer`,tabIndex:0,children:[(0,T.jsxs)(d,{size:`lg`,children:[(0,T.jsx)(d.Image,{src:a}),(0,T.jsx)(d.Fallback,{children:`ikenxuan`})]}),(0,T.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col items-start`,children:[(0,T.jsx)(`p`,{className:`truncate text-lg font-semibold`,children:`炫炫`}),(0,T.jsx)(`p`,{className:`truncate text-md text-muted`,children:`Super Admin`})]})]})}),(0,T.jsx)(f.Content,{className:`w-60`,children:(0,T.jsxs)(f.Dialog,{children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-3 pb-3`,children:[(0,T.jsxs)(d,{size:`md`,children:[(0,T.jsx)(d.Image,{src:a}),(0,T.jsx)(d.Fallback,{children:`U`})]}),(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsx)(`p`,{className:`truncate font-medium`,children:`用户`}),(0,T.jsx)(`p`,{className:`truncate text-md text-muted`,children:`Super Admin`})]})]}),(0,T.jsx)(e,{className:`my-2`}),(0,T.jsx)(`p`,{className:`text-xs text-muted`,children:`当前身份:管理员`})]})})]})}),(0,T.jsx)(`nav`,{className:`flex flex-1 flex-col gap-1 overflow-y-auto px-3 py-3`,"aria-label":`主导航`,children:D.map(e=>{let t=e.icon,i=n===e.id;return(0,T.jsxs)(b,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:i?`tertiary`:`ghost`,"aria-label":e.label,"aria-current":i?`page`:void 0,onPress:()=>r(e.id),children:[(0,T.jsx)(t,{size:20,className:m(`shrink-0 mr-3`,!i&&`text-muted`),"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:m(`truncate`,i&&`font-medium`),children:e.label})]},e.id)})}),(0,T.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-1 px-3 py-3`,children:[(0,T.jsxs)(b,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:`ghost`,"aria-label":`查看帮助文档`,onPress:o,children:[(0,T.jsx)(i,{size:20,className:`shrink-0 mr-3 text-muted`,"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:`truncate`,children:`帮助文档`})]}),(0,T.jsxs)(b,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:`ghost`,"aria-label":`登出`,onPress:s,children:[(0,T.jsx)(c,{size:20,className:`shrink-0 mr-3 text-muted`,"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:`truncate`,children:`登出`})]})]})]})},k=({onToggleSidebar:e,sidebarCollapsed:n,currentMenuLabel:r})=>(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,T.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,T.jsx)(b,{isIconOnly:!0,variant:`ghost`,onPress:e,"aria-label":n?`展开侧边栏`:`折叠侧边栏`,"aria-expanded":!n,children:n?(0,T.jsx)(o,{size:20,"aria-hidden":`true`}):(0,T.jsx)(C,{size:20,"aria-hidden":`true`})}),n&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(t,{size:24,"aria-hidden":`true`}),(0,T.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:`KKK Config`})]}),!n&&(0,T.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:r||`配置管理面板`})]}),(0,T.jsx)(l,{})]}),A=[{id:`config`,label:`配置管理`,icon:r},{id:`about`,label:`关于插件`,icon:n}],j=({activeMenu:e,onMenuChange:t})=>{let[n,{toggle:r}]=_(!1),i=(0,w.useRef)(null);return(0,w.useEffect)(()=>{i.current&&(n?h.to(i.current,{width:0,opacity:0,borderRightWidth:0,duration:.3,ease:`power2.inOut`,onComplete:()=>{i.current&&(i.current.style.display=`none`)}}):(i.current.style.display=`flex`,h.fromTo(i.current,{width:0,opacity:0,borderRightWidth:0},{width:260,opacity:1,borderRightWidth:1,duration:.3,ease:`power2.inOut`})))},[n]),(0,T.jsxs)(`div`,{className:`flex h-screen overflow-hidden`,children:[(0,T.jsx)(`aside`,{ref:i,className:`flex h-full w-65 shrink-0 flex-col border-r border-default-100`,"aria-label":`侧边栏导航`,children:(0,T.jsx)(O,{collapsed:n,activeMenu:e,onMenuChange:t,onToggleCollapse:r})}),(0,T.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col overflow-hidden`,children:[(0,T.jsx)(`header`,{className:`flex h-16 shrink-0 items-center px-6`,children:(0,T.jsx)(k,{onToggleSidebar:r,sidebarCollapsed:n,currentMenuLabel:A.find(t=>t.id===e)?.label})}),(0,T.jsx)(`main`,{className:`scrollbar flex-1 overflow-y-auto p-6`,id:`main-content`,children:(0,T.jsx)(`div`,{"data-scrollbar":`thin`,children:(0,T.jsx)(E,{activeMenu:e})})})]})]})};export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./ThemeSwitch-DFohhwd9.js";import{Bt as l,T as u,a as d,g as f,gt as p,n as m,o as h,r as g,s as _,v,w as y,yt as b,zt as x}from"./index-BRROK0vh.js";var S=g(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),C=b(),w=({activeMenu:e})=>(0,C.jsx)(`div`,{className:`w-full max-w-2xl mx-auto`,children:(()=>{switch(e){case`config`:return(0,C.jsx)(m,{device:`mobile`});case`about`:return(0,C.jsx)(o,{});default:return(0,C.jsx)(m,{device:`mobile`})}})()}),T=l(x(),1),E=[{id:`config`,label:`配置管理`,icon:n},{id:`about`,label:`关于插件`,icon:t}],D=({open:e,onClose:t,activeMenu:n,onMenuChange:a})=>{let o=_(()=>{window.open(`https://kkk.karinjs.com`,`_blank`,`noopener,noreferrer`)}),c=_(()=>{d(),window.location.reload()});return(0,T.useEffect)(()=>{let n=n=>{n.key===`Escape`&&e&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),(0,T.useEffect)(()=>(e?document.body.style.overflow=`hidden`:document.body.style.overflow=``,()=>{document.body.style.overflow=``}),[e]),(0,C.jsx)(v.Backdrop,{isOpen:e,isDismissable:!0,className:`backdrop-blur-sm`,onOpenChange:e=>{e||t()},children:(0,C.jsx)(v.Content,{placement:`right`,children:(0,C.jsxs)(v.Dialog,{className:`px-4`,children:[(0,C.jsxs)(v.Header,{className:`flex items-center justify-between pb-4`,children:[(0,C.jsx)(v.Heading,{className:`text-lg font-semibold`,children:`菜单`}),(0,C.jsx)(v.CloseTrigger,{"aria-label":`关闭菜单`,className:`mr-2`,children:(0,C.jsx)(S,{size:24,"aria-hidden":`true`})})]}),(0,C.jsxs)(v.Body,{className:`flex flex-col`,children:[(0,C.jsx)(`div`,{className:`shrink-0 pb-5`,children:(0,C.jsxs)(`div`,{className:`flex items-center gap-3 px-1`,children:[(0,C.jsxs)(u,{size:`md`,children:[(0,C.jsx)(u.Image,{src:i}),(0,C.jsx)(u.Fallback,{children:`ikenxuan`})]}),(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,C.jsx)(`p`,{className:`truncate text-sm font-medium`,children:`炫炫`}),(0,C.jsx)(`p`,{className:`truncate text-xs text-muted`,children:`Super Admin`})]})]})}),(0,C.jsx)(`nav`,{className:`flex flex-1 flex-col gap-2 overflow-y-auto`,"aria-label":`主导航`,children:E.map(e=>{let t=e.icon,r=n===e.id;return(0,C.jsxs)(y,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:r?`tertiary`:`ghost`,"aria-label":e.label,"aria-current":r?`page`:void 0,onPress:()=>a(e.id),children:[(0,C.jsx)(t,{size:20,className:p(`shrink-0 mr-3`,!r&&`text-muted`),"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:p(`truncate`,r&&`font-semibold`),children:e.label})]},e.id)})}),(0,C.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2`,children:[(0,C.jsxs)(y,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:`ghost`,"aria-label":`查看帮助文档`,onPress:o,children:[(0,C.jsx)(r,{size:20,className:`shrink-0 mr-3 text-muted`,"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:`truncate`,children:`帮助文档`})]}),(0,C.jsxs)(y,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:`ghost`,"aria-label":`登出`,onPress:c,children:[(0,C.jsx)(s,{size:20,className:`shrink-0 mr-3 text-muted`,"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:`truncate`,children:`登出`})]})]})]})]})})})},O=({onOpenDrawer:t})=>(0,C.jsxs)(`div`,{className:`flex h-full items-center justify-between px-4`,children:[(0,C.jsx)(c,{className:`shrink-0`}),(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center justify-center gap-2 px-2`,children:[(0,C.jsx)(e,{size:22,"aria-hidden":`true`}),(0,C.jsx)(`h1`,{className:`truncate text-base font-semibold`,children:`KKK Config`})]}),(0,C.jsx)(y,{isIconOnly:!0,className:`shrink-0`,variant:`ghost`,onPress:t,"aria-label":`打开菜单`,"aria-expanded":!1,children:(0,C.jsx)(a,{size:24,"aria-hidden":`true`})})]}),k=({activeMenu:e,onMenuChange:t})=>{let[n,{setTrue:r,setFalse:i}]=h(!1),a=_(e=>{t(e),i()});return(0,C.jsxs)(f,{"data-scrollbar":`thin`,className:`flex min-h-screen flex-col`,children:[(0,C.jsx)(`header`,{className:`sticky top-0 z-50 h-14 shrink-0 backdrop-blur-xs mask-[linear-gradient(to_bottom,black_40%,transparent_100%)]`,children:(0,C.jsx)(O,{onOpenDrawer:r})}),(0,C.jsx)(D,{open:n,onClose:i,activeMenu:e,onMenuChange:a}),(0,C.jsx)(`main`,{className:`scrollbar flex-1 overflow-y-auto p-4`,id:`main-content`,children:(0,C.jsx)(w,{activeMenu:e})})]})};export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,m as t,r as n,t as r,u as i,w as a,yt as o}from"./index-BRROK0vh.js";var s=n(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),c=n(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),l=n(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),u=n(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),d=n(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),f=n(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),p=n(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),m=n(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),h=n(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),g=o(),_=()=>{let t=e=>{window.open(e,`_blank`)};return(0,g.jsxs)(e,{className:`mx-auto max-w-3xl`,children:[(0,g.jsxs)(e.Header,{className:`items-center text-center gap-4 pt-8 pb-6`,children:[(0,g.jsx)(p,{size:64,"aria-hidden":`true`}),(0,g.jsx)(e.Title,{children:`karin-plugin-kkk`}),(0,g.jsx)(e.Description,{children:`版本 2.33.0`})]}),(0,g.jsxs)(e.Content,{className:`flex flex-col gap-6 pb-8`,children:[(0,g.jsxs)(`section`,{children:[(0,g.jsx)(`h3`,{className:`mb-3 text-base font-semibold`,children:`插件简介`}),(0,g.jsx)(i,{children:`Karin 的「抖音」「B站」视频解析/动态推送插件。 支持视频解析、动态推送、扫码登录等功能。`})]}),(0,g.jsxs)(`section`,{children:[(0,g.jsx)(`h3`,{className:`mb-3 text-base font-semibold`,children:`开发者`}),(0,g.jsx)(i,{children:`ikenxuan, sj817`})]}),(0,g.jsxs)(`section`,{children:[(0,g.jsx)(`h3`,{className:`mb-3 text-base font-semibold`,children:`相关链接`}),(0,g.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-3`,children:[(0,g.jsxs)(a,{variant:`outline`,onPress:()=>t(`https://github.com/ikenxuan/karin-plugin-kkk`),children:[(0,g.jsx)(c,{size:18,"aria-hidden":`true`}),(0,g.jsx)(`span`,{children:`GitHub 仓库`})]}),(0,g.jsxs)(a,{variant:`outline`,onPress:()=>t(`https://github.com/ikenxuan/karin-plugin-kkk/issues`),children:[(0,g.jsx)(c,{size:18,"aria-hidden":`true`}),(0,g.jsx)(`span`,{children:`反馈问题`})]})]})]})]})]})},v=`https://github.com/ikenxuan.png`,y=({className:e})=>{let{isDark:n,toggleTheme:i}=r();return(0,g.jsxs)(t,{delay:1,closeDelay:1,children:[(0,g.jsx)(a,{isIconOnly:!0,"aria-label":n?`切换到浅色模式`:`切换到深色模式`,className:e,variant:`ghost`,onPress:i,children:n?(0,g.jsx)(h,{size:20,"aria-hidden":`true`}):(0,g.jsx)(f,{size:20,"aria-hidden":`true`})}),(0,g.jsx)(t.Content,{children:n?`浅色模式`:`深色模式`})]})};export{p as a,l as c,m as i,s as l,v as n,d as o,_ as r,u as s,y as t};
|