From f2df8af8ef67de81191bed420cd2db865006bbc0 Mon Sep 17 00:00:00 2001 From: ROC Date: Tue, 14 Apr 2026 23:11:57 +0800 Subject: [PATCH] feat: add admin-managed system configuration center Introduce a registry-backed KV settings system with encrypted secret storage, add an admin UI for grouped system configuration, and shrink bootstrap YAML to startup-critical settings with docs updated for the new workflow. --- CHANGELOG.md | 2 +- INSTALL.md | 11 +- INSTALL_ZH.md | 11 +- README.md | 12 +- README_ZH.md | 12 +- auto/api/v1/admin.go | 83 + auto/api/v1/site.go | 5 +- cmd/root.go | 4 +- cmd/serve/serve.go | 2 + config.yaml.sample | 233 +- docker/config.yaml | 96 +- internal/conf/conf.go | 2 + internal/conf/config.yaml | 8 +- internal/conf/db.go | 1 + internal/conf/setting.go | 4 + internal/model/web/site.go | 102 +- internal/servants/web/admin.go | 40 +- internal/servants/web/site.go | 12 +- internal/servants/web/web.go | 7 +- internal/sitesetting/crypto.go | 98 + internal/sitesetting/registry.go | 688 +++ internal/sitesetting/service.go | 486 +++ internal/sitesetting/service_test.go | 222 + mirc/web/v1/admin.go | 9 +- .../mysql/0016_site_settings.down.sql | 1 + .../migration/mysql/0016_site_settings.up.sql | 24 + .../migration/mysql/0017_settings_kv.down.sql | 26 + .../migration/mysql/0017_settings_kv.up.sql | 49 + .../postgres/0015_site_settings.down.sql | 1 + .../postgres/0015_site_settings.up.sql | 23 + .../postgres/0016_settings_kv.down.sql | 25 + .../postgres/0016_settings_kv.up.sql | 48 + .../sqlite3/0016_site_settings.down.sql | 1 + .../sqlite3/0016_site_settings.up.sql | 24 + .../sqlite3/0017_settings_kv.down.sql | 26 + .../migration/sqlite3/0017_settings_kv.up.sql | 49 + scripts/paopao-mysql.sql | 12 + scripts/paopao-postgres.sql | 11 + scripts/paopao-sqlite3.sql | 12 + web/.env | 10 +- web/dist/assets/404-kbNT-qSl.js | 1 - web/dist/assets/@css-render-YsNuQTaE.js | 4 - web/dist/assets/@opentiny-Ckw2pOLd.js | 2 - web/dist/assets/@vicons-CZeOmejd.js | 1 - web/dist/assets/@vue-cLJXtEPP.js | 9 - web/dist/assets/Anouncement-C8-AnDac.js | 1 - web/dist/assets/Collection-iBQoAGOC.js | 1 - web/dist/assets/Contacts-DW4FPaU7.js | 1 - web/dist/assets/Following-CY_5MlEv.js | 1 - web/dist/assets/Home-UFcHpouz.css | 1 - web/dist/assets/Home-io1mpLVs.js | 1 - web/dist/assets/IEnum-CpGNgU9g.js | 1 - web/dist/assets/Messages-DJysuVQF.js | 1 - web/dist/assets/Post-B2gFjwjL.js | 1 - web/dist/assets/Profile-gut1_3v-.js | 1 - web/dist/assets/Setting-2E_gtxQU.js | 1 - web/dist/assets/Topic-Ca0AClhU.js | 1 - web/dist/assets/User-CIF97Vf8.js | 1 - web/dist/assets/Wallet-VxFS90vp.js | 1 - web/dist/assets/axios-DKxZWLrQ.js | 6 - web/dist/assets/copy-to-clipboard-qdVIK2zo.js | 1 - web/dist/assets/count-DMzaJPHA.js | 1 - web/dist/assets/dijkstrajs-B3GuVsqA.js | 1 - web/dist/assets/index-BzZcw6rK.js | 2 - .../assets/infinite-load-more-CuisQVv6.js | 1 - web/dist/assets/lodash-DLCDS-2d.js | 20 - web/dist/assets/lodash-es-BfZ3RYx_.js | 1 - web/dist/assets/main-nav-BW6UKmWQ.js | 1 - web/dist/assets/moment-D_9q9veS.js | 4 - web/dist/assets/naive-ui-Dv03sO69.js | 3725 ----------------- .../assets/paopao-video-player-DnRZoPkN.js | 836 ---- web/dist/assets/pinia-TbaIYBWH.js | 1 - web/dist/assets/post-item-iSi0SGnI.js | 1 - web/dist/assets/post-skeleton-CJ8iRGBT.js | 1 - web/dist/assets/qrcode-DSuf5wHF.js | 8 - web/dist/assets/sidebar-B2rODElh.js | 1 - web/dist/assets/usePagination-B2kaN_Rm.js | 1 - web/dist/assets/usePostContent-DV6QgefX.js | 1 - web/dist/assets/useUserAction-DVqObL5J.js | 1 - web/dist/assets/user-card-CSodY5hi.js | 1 - .../assets/v3-infinite-loading-Dj1QGmV8.js | 1 - web/dist/assets/vooks-C54Sdpwj.js | 1 - web/dist/assets/vue-router-Dw9lfhBK.js | 1 - .../assets/whisper-add-friend-CovTVOU-.js | 1 - web/dist/index.html | 24 +- web/src/components/sidebar.vue | 11 +- web/src/router/index.ts | 8 + web/src/store/profile.ts | 18 +- web/src/types/api/Admin.d.ts | 114 +- web/src/views/AdminSettings.vue | 1040 +++++ 90 files changed, 3408 insertions(+), 4949 deletions(-) create mode 100644 internal/sitesetting/crypto.go create mode 100644 internal/sitesetting/registry.go create mode 100644 internal/sitesetting/service.go create mode 100644 internal/sitesetting/service_test.go create mode 100644 scripts/migration/mysql/0016_site_settings.down.sql create mode 100644 scripts/migration/mysql/0016_site_settings.up.sql create mode 100644 scripts/migration/mysql/0017_settings_kv.down.sql create mode 100644 scripts/migration/mysql/0017_settings_kv.up.sql create mode 100644 scripts/migration/postgres/0015_site_settings.down.sql create mode 100644 scripts/migration/postgres/0015_site_settings.up.sql create mode 100644 scripts/migration/postgres/0016_settings_kv.down.sql create mode 100644 scripts/migration/postgres/0016_settings_kv.up.sql create mode 100644 scripts/migration/sqlite3/0016_site_settings.down.sql create mode 100644 scripts/migration/sqlite3/0016_site_settings.up.sql create mode 100644 scripts/migration/sqlite3/0017_settings_kv.down.sql create mode 100644 scripts/migration/sqlite3/0017_settings_kv.up.sql delete mode 100644 web/dist/assets/404-kbNT-qSl.js delete mode 100644 web/dist/assets/@css-render-YsNuQTaE.js delete mode 100644 web/dist/assets/@opentiny-Ckw2pOLd.js delete mode 100644 web/dist/assets/@vicons-CZeOmejd.js delete mode 100644 web/dist/assets/@vue-cLJXtEPP.js delete mode 100644 web/dist/assets/Anouncement-C8-AnDac.js delete mode 100644 web/dist/assets/Collection-iBQoAGOC.js delete mode 100644 web/dist/assets/Contacts-DW4FPaU7.js delete mode 100644 web/dist/assets/Following-CY_5MlEv.js delete mode 100644 web/dist/assets/Home-UFcHpouz.css delete mode 100644 web/dist/assets/Home-io1mpLVs.js delete mode 100644 web/dist/assets/IEnum-CpGNgU9g.js delete mode 100644 web/dist/assets/Messages-DJysuVQF.js delete mode 100644 web/dist/assets/Post-B2gFjwjL.js delete mode 100644 web/dist/assets/Profile-gut1_3v-.js delete mode 100644 web/dist/assets/Setting-2E_gtxQU.js delete mode 100644 web/dist/assets/Topic-Ca0AClhU.js delete mode 100644 web/dist/assets/User-CIF97Vf8.js delete mode 100644 web/dist/assets/Wallet-VxFS90vp.js delete mode 100644 web/dist/assets/axios-DKxZWLrQ.js delete mode 100644 web/dist/assets/copy-to-clipboard-qdVIK2zo.js delete mode 100644 web/dist/assets/count-DMzaJPHA.js delete mode 100644 web/dist/assets/dijkstrajs-B3GuVsqA.js delete mode 100644 web/dist/assets/index-BzZcw6rK.js delete mode 100644 web/dist/assets/infinite-load-more-CuisQVv6.js delete mode 100644 web/dist/assets/lodash-DLCDS-2d.js delete mode 100644 web/dist/assets/lodash-es-BfZ3RYx_.js delete mode 100644 web/dist/assets/main-nav-BW6UKmWQ.js delete mode 100644 web/dist/assets/moment-D_9q9veS.js delete mode 100644 web/dist/assets/naive-ui-Dv03sO69.js delete mode 100644 web/dist/assets/paopao-video-player-DnRZoPkN.js delete mode 100644 web/dist/assets/pinia-TbaIYBWH.js delete mode 100644 web/dist/assets/post-item-iSi0SGnI.js delete mode 100644 web/dist/assets/post-skeleton-CJ8iRGBT.js delete mode 100644 web/dist/assets/qrcode-DSuf5wHF.js delete mode 100644 web/dist/assets/sidebar-B2rODElh.js delete mode 100644 web/dist/assets/usePagination-B2kaN_Rm.js delete mode 100644 web/dist/assets/usePostContent-DV6QgefX.js delete mode 100644 web/dist/assets/useUserAction-DVqObL5J.js delete mode 100644 web/dist/assets/user-card-CSodY5hi.js delete mode 100644 web/dist/assets/v3-infinite-loading-Dj1QGmV8.js delete mode 100644 web/dist/assets/vooks-C54Sdpwj.js delete mode 100644 web/dist/assets/vue-router-Dw9lfhBK.js delete mode 100644 web/dist/assets/whisper-add-friend-CovTVOU-.js create mode 100644 web/src/views/AdminSettings.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b2f9eed..44077aba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -424,4 +424,4 @@ All notable changes to paopao-ce are documented in this file. --- -**Older change logs can be found on [GitHub](https://github.com/rocboss/paopao-ce/releases?after=v0.2.0).** \ No newline at end of file +**Older change logs can be found on [GitHub](https://github.com/rocboss/paopao-ce/releases?after=v0.2.0).** diff --git a/INSTALL.md b/INSTALL.md index 74a54bda..50cff9d8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -157,7 +157,7 @@ If you mount a custom `config.yaml`, make sure `Meili.ApiKey` matches the contai 1. Initialize your database with the matching SQL file for your chosen database engine. 2. Copy the configuration template. -3. Adjust the storage, database, cache, and search settings for your environment. +3. Adjust only the bootstrap-critical settings for your environment. 4. Run or build the backend. ```sh @@ -238,6 +238,15 @@ At startup, PaoPao reads either: The first file found is used. +Important: the external file is no longer expected to carry every runtime knob. PaoPao loads embedded defaults first, then overlays your local config file. + +Recommended split: + +- **Bootstrap YAML**: ports, feature selection, database, Redis, JWT, `AdminSettings.EncryptionKey` +- **Admin UI (`/#/admin/settings`)**: most site, search, storage, SMS, payment, and app-behavior settings + +If a setting is marked **restart required** in the admin page, it is persisted immediately but only becomes active after a process restart. + The `Features` section controls which capability bundles are enabled: ```yaml diff --git a/INSTALL_ZH.md b/INSTALL_ZH.md index 504c7c78..51e2e217 100644 --- a/INSTALL_ZH.md +++ b/INSTALL_ZH.md @@ -157,7 +157,7 @@ docker run --name paopao-ce-allinone -d -p 8000:8008 -p 7700:7700 \ 1. 按照所选数据库导入对应 SQL 初始化脚本。 2. 复制配置模板。 -3. 根据本地环境调整存储、数据库、缓存和搜索相关配置。 +3. 只调整与你环境相关的启动关键配置。 4. 启动或构建后端。 ```sh @@ -238,6 +238,15 @@ make run TAGS='embed' 先找到哪个文件,就使用哪个文件。 +注意:外部配置文件现在不再要求承载全部运行参数。PaoPao 会先加载内置默认配置,再叠加你本地的配置文件。 + +建议的职责划分: + +- **Bootstrap YAML**:端口、Feature 组合、数据库、Redis、JWT、`AdminSettings.EncryptionKey` +- **管理后台**(`/#/admin/settings`):大部分站点、搜索、存储、短信、支付以及应用行为类配置 + +如果某个配置项在后台中被标记为**重启后生效**,表示它会先持久化保存,但需要重启进程后才会真正切换到新值。 + `Features` 用于控制不同能力组合: ```yaml diff --git a/README.md b/README.md index c14cd89c..6368df81 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ Then open: #### Backend 1. Import `scripts/paopao-mysql.sql` into MySQL. -2. Copy the sample config and adjust it for your environment. +2. Copy the sample config and adjust only the bootstrap-critical values for your environment. 3. Start the backend. ```sh @@ -163,7 +163,13 @@ For the full installation guide, Docker build variants, desktop prerequisites, a ## Configuration and Feature Suites -`config.yaml.sample` is the canonical configuration template. At runtime, PaoPao reads either `./custom/config.yaml` or `./config.yaml`, preferring the first file it finds. +`config.yaml.sample` is now a **minimal bootstrap template**. At runtime, PaoPao loads the embedded default config first, then overlays `./custom/config.yaml` or `./config.yaml` if present, preferring the first file it finds. + +That means the external config can stay intentionally small. In the current design: + +- **Keep in YAML**: ports, feature selection, database, Redis, JWT, and `AdminSettings.EncryptionKey` +- **Prefer the admin UI** (`/#/admin/settings`): site profile, app behavior limits, search provider settings, object-storage settings, SMS/payment settings, and other operational knobs supported by the registry +- **Watch apply mode**: some settings are live, while others are marked restart-required in the admin page The `Features` section controls which capability bundles are enabled: @@ -225,7 +231,7 @@ If you plan to contribute new functionality, target **`dev`** unless the maintai ## Contributing -Issues, discussions, and pull requests are welcome. If you want to contribute: +Pull requests are welcome. If you want to contribute: 1. Fork the repository. 2. Create a branch from `dev` for feature work. diff --git a/README_ZH.md b/README_ZH.md index bed01d41..d6d54270 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -116,7 +116,7 @@ docker compose up -d #### 后端 1. 将 `scripts/paopao-mysql.sql` 导入 MySQL。 -2. 复制示例配置并按本地环境调整。 +2. 复制示例配置,并只调整与你环境相关的启动关键项。 3. 启动后端服务。 ```sh @@ -163,7 +163,13 @@ yarn tauri build ## 配置与 Feature 套件 -`config.yaml.sample` 是项目的标准配置模板。运行时,PaoPao 会读取 `./custom/config.yaml` 或 `./config.yaml`,并优先使用先找到的文件。 +`config.yaml.sample` 现在是一个**最小化 bootstrap 模板**。运行时,PaoPao 会先加载内置默认配置,再叠加 `./custom/config.yaml` 或 `./config.yaml`,并优先使用先找到的文件。 + +这意味着外部配置文件可以有意保持精简。当前建议是: + +- **继续放在 YAML 中**:端口、Feature 组合、数据库、Redis、JWT,以及 `AdminSettings.EncryptionKey` +- **尽量改到管理后台**(`/#/admin/settings`):站点资料、应用行为阈值、全文索引、对象存储、短信/支付等已接入 registry 的配置 +- **注意生效方式**:部分配置即时生效,部分会在后台中明确标记为“重启后生效” `Features` 配置用于控制启用哪些能力组合: @@ -225,7 +231,7 @@ release/paopao serve --no-default-features --features sqlite3,localoss,loggerfil ## 参与贡献 -欢迎提交 Issue、讨论和 Pull Request。建议的贡献流程: +欢迎提交 Pull Request。建议的贡献流程: 1. Fork 当前仓库。 2. 从 `dev` 分支拉出自己的功能分支。 diff --git a/auto/api/v1/admin.go b/auto/api/v1/admin.go index d63a5407..4909076f 100644 --- a/auto/api/v1/admin.go +++ b/auto/api/v1/admin.go @@ -33,6 +33,11 @@ type Admin interface { Chain() gin.HandlersChain SiteInfo(*web.SiteInfoReq) (*web.SiteInfoResp, error) + GetSiteSettings() (*web.SiteSettingsResp, error) + UpdateSiteSettings(*web.SiteSettingsReq) (*web.SiteSettingsResp, error) + GetSettingsSchema() (*web.AdminSettingsSchemaResp, error) + GetSettingsValues() (*web.AdminSettingsValuesResp, error) + SaveSettings(*web.AdminSettingsSaveReq) (*web.AdminSettingsSaveResp, error) ChangeUserStatus(*web.ChangeUserStatusReq) error mustEmbedUnimplementedAdminServant() @@ -60,6 +65,64 @@ func RegisterAdminServant(e *gin.Engine, s Admin) { resp, err := s.SiteInfo(req) s.Render(c, resp, err) }) + router.Handle("GET", "admin/site/profile", func(c *gin.Context) { + select { + case <-c.Request.Context().Done(): + return + default: + } + + resp, err := s.GetSiteSettings() + s.Render(c, resp, err) + }) + router.Handle("POST", "admin/site/profile", func(c *gin.Context) { + select { + case <-c.Request.Context().Done(): + return + default: + } + req := new(web.SiteSettingsReq) + if err := s.Bind(c, req); err != nil { + s.Render(c, nil, err) + return + } + resp, err := s.UpdateSiteSettings(req) + s.Render(c, resp, err) + }) + router.Handle("GET", "admin/settings/schema", func(c *gin.Context) { + select { + case <-c.Request.Context().Done(): + return + default: + } + + resp, err := s.GetSettingsSchema() + s.Render(c, resp, err) + }) + router.Handle("GET", "admin/settings/values", func(c *gin.Context) { + select { + case <-c.Request.Context().Done(): + return + default: + } + + resp, err := s.GetSettingsValues() + s.Render(c, resp, err) + }) + router.Handle("POST", "admin/settings/save", func(c *gin.Context) { + select { + case <-c.Request.Context().Done(): + return + default: + } + req := new(web.AdminSettingsSaveReq) + if err := s.Bind(c, req); err != nil { + s.Render(c, nil, err) + return + } + resp, err := s.SaveSettings(req) + s.Render(c, resp, err) + }) router.Handle("POST", "admin/user/status", func(c *gin.Context) { select { case <-c.Request.Context().Done(): @@ -86,6 +149,26 @@ func (UnimplementedAdminServant) SiteInfo(req *web.SiteInfoReq) (*web.SiteInfoRe return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } +func (UnimplementedAdminServant) GetSiteSettings() (*web.SiteSettingsResp, error) { + return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) +} + +func (UnimplementedAdminServant) UpdateSiteSettings(req *web.SiteSettingsReq) (*web.SiteSettingsResp, error) { + return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) +} + +func (UnimplementedAdminServant) GetSettingsSchema() (*web.AdminSettingsSchemaResp, error) { + return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) +} + +func (UnimplementedAdminServant) GetSettingsValues() (*web.AdminSettingsValuesResp, error) { + return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) +} + +func (UnimplementedAdminServant) SaveSettings(req *web.AdminSettingsSaveReq) (*web.AdminSettingsSaveResp, error) { + return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) +} + func (UnimplementedAdminServant) ChangeUserStatus(req *web.ChangeUserStatusReq) error { return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } diff --git a/auto/api/v1/site.go b/auto/api/v1/site.go index a7d2859a..82d1876b 100644 --- a/auto/api/v1/site.go +++ b/auto/api/v1/site.go @@ -9,14 +9,13 @@ import ( "github.com/alimy/mir/v5" "github.com/gin-gonic/gin" - "github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/model/web" ) type Site interface { _default_ - Profile() (*conf.WebProfileConf, error) + Profile() (*web.SiteProfileResp, error) Version() (*web.VersionResp, error) mustEmbedUnimplementedSiteServant() @@ -52,7 +51,7 @@ func RegisterSiteServant(e *gin.Engine, s Site) { // UnimplementedSiteServant can be embedded to have forward compatible implementations. type UnimplementedSiteServant struct{} -func (UnimplementedSiteServant) Profile() (*conf.WebProfileConf, error) { +func (UnimplementedSiteServant) Profile() (*web.SiteProfileResp, error) { return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } diff --git a/cmd/root.go b/cmd/root.go index cc1af061..baf9a3a8 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -10,8 +10,8 @@ import ( var rootCmd = &cobra.Command{ Use: "paopao", - Short: `an artistic "twitter like" community`, - Long: `an artistic "twitter like" community`, + Short: `A scalable social community platform powered by Gin backend and modern TypeScript/Vue frontend architecture`, + Long: `A scalable social community platform powered by Gin backend and modern TypeScript/Vue frontend architecture`, } // Setup set root command name,short-describe, long-describe diff --git a/cmd/serve/serve.go b/cmd/serve/serve.go index 66ff5156..e52d3b1b 100644 --- a/cmd/serve/serve.go +++ b/cmd/serve/serve.go @@ -19,6 +19,7 @@ import ( "github.com/rocboss/paopao-ce/internal" "github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/service" + "github.com/rocboss/paopao-ce/internal/sitesetting" "github.com/rocboss/paopao-ce/pkg/debug" "github.com/rocboss/paopao-ce/pkg/utils" "github.com/rocboss/paopao-ce/pkg/version" @@ -67,6 +68,7 @@ func serveRun(_cmd *cobra.Command, _args []string) { defer shutdownFn() } internal.Initial() + sitesetting.Bootstrap(_cmd.Context(), conf.MustGormDB()) ss := service.MustInitService() if len(ss) < 1 { fmt.Fprintln(color.Output, "no service need start so just exit") diff --git a/config.yaml.sample b/config.yaml.sample index a97b0710..f5fdb19e 100644 --- a/config.yaml.sample +++ b/config.yaml.sample @@ -1,200 +1,59 @@ -App: # APP基础设置项 +# Minimal bootstrap config for first startup. +# Most product and operational settings are now managed in the admin UI: +# /#/admin/settings +# +# Loading behavior: +# - Built-in defaults are embedded in the binary +# - This file only overrides the bootstrap-critical parts +# - Ports / DB / Redis / feature selection stay file-based + +App: RunMode: debug - AttachmentIncomeRate: 0.8 - MaxCommentCount: 10 - DefaultContextTimeout: 60 - DefaultPageSize: 10 - MaxPageSize: 100 -Server: # 服务设置 - RunMode: debug - HttpIp: 0.0.0.0 - HttpPort: 8010 - ReadTimeout: 60 - WriteTimeout: 60 + Features: - Default: ["Web", "Frontend:EmbedWeb", "Meili", "LocalOSS", "MySQL", "BigCacheIndex", "LoggerFile"] - Develop: ["Base", "MySQL", "BigCacheIndex", "Meili", "Sms", "AliOSS", "LoggerMeili", "OSS:Retention"] - Demo: ["Base", "MySQL", "Option", "Zinc", "Sms", "MinIO", "LoggerZinc", "Migration"] - Slim: ["Base", "Sqlite3", "LocalOSS", "LoggerFile", "OSS:TempDir"] - Base: ["Redis", "PhoneBind"] - Docs: ["Docs:OpenAPI"] - Deprecated: ["Deprecated:OldWeb"] - Service: ["Web", "Admin", "SpaceX", "Bot", "LocalOSS", "Mobile", "Frontend:Web", "Frontend:EmbedWeb", "Docs"] - Option: ["SimpleCacheIndex"] - Sms: "SmsJuhe" -WebServer: # Web服务 + Default: ["Web", "Frontend:EmbedWeb", "Meili", "LocalOSS", "MySQL", "BigCacheIndex", "LoggerFile"] + +WebServer: HttpIp: 0.0.0.0 HttpPort: 8008 - ReadTimeout: 60 - WriteTimeout: 60 -AdminServer: # Admin后台运维服务 - HttpIp: 0.0.0.0 - HttpPort: 8014 - ReadTimeout: 60 - WriteTimeout: 60 -SpaceXServer: # SpaceX服务 - HttpIp: 0.0.0.0 - HttpPort: 8012 - ReadTimeout: 60 - WriteTimeout: 60 -BotServer: # Bot服务 - HttpIp: 0.0.0.0 - HttpPort: 8016 - ReadTimeout: 60 - WriteTimeout: 60 -LocalossServer: # Localoss服务 - HttpIp: 0.0.0.0 - HttpPort: 8018 - ReadTimeout: 60 - WriteTimeout: 60 -FrontendWebServer: # Web前端服务 - HttpIp: 0.0.0.0 - HttpPort: 8006 - ReadTimeout: 60 - WriteTimeout: 60 -DocsServer: # 开发文档服务 - HttpIp: 0.0.0.0 - HttpPort: 8011 - ReadTimeout: 60 - WriteTimeout: 60 -MobileServer: # 移动端grpc api服务 - Host: 0.0.0.0 - Port: 8020 -SmsJuhe: - Gateway: https://v.juhe.cn/sms/send - Key: - TplID: - TplVal: "#code#=%s&#m#=%d" -Alipay: - AppID: - InProduction: True - RootCertFile: "custom/alipay/RootCert.crt" - PublicCertFile: "custom/alipay/CertPublicKey_RSA2.crt" - AppPublicCertFile: "custom/alipay/AppCertPublicKey.crt" -CacheIndex: - MaxUpdateQPS: 100 # 最大添加/删除/更新Post的QPS, 设置范围[10, 10000], 默认100 -SimpleCacheIndex: # 缓存泡泡广场消息流 - MaxIndexSize: 200 # 最大缓存条数 - CheckTickDuration: 60 # 循环自检查每多少秒一次 - ExpireTickDuration: 300 # 每多少秒后强制过期缓存, 设置为0禁止强制使缓存过期 -BigCacheIndex: # 使用BigCache缓存泡泡广场消息流 - MaxIndexPage: 1024 # 最大缓存页数,必须是2^n, 代表最大同时缓存多少页数据 - Verbose: False # 是否打印cache操作的log - ExpireInSecond: 300 # 多少秒(>0)后强制过期缓存 -Logger: # 日志通用配置 - Level: debug # 日志级别 panic|fatal|error|warn|info|debug|trace -LoggerFile: # 使用File写日志 - SavePath: custom/data/paopao-ce/logs - FileName: app - FileExt: .log -LoggerOtlp: # 使用OpenTelemetry写日志 - Endpoint: openobserve:5081 - Authorization: Basic ls8icEBvcGVub2JzFXJ2ZS6haCpZTU4ybGdBUFlXcjA0UdNk - Organization: paopao-ce - TraceStream: paopao-trace - MetricStream: paopao-metric - LogStream: paopao-log - Insecure: true -JWT: # 鉴权加密 - Secret: 18a6413dc4fe394c66345ebe501b2f26 - Issuer: paopao-api - Expire: 86400 -TweetSearch: # 推文关键字搜索相关配置 - MaxUpdateQPS: 100 # 最大添加/删除/更新Post的QPS,设置范围[10, 10000], 默认100 - MinWorker: 10 # 最小后台更新工作者, 设置范围[5, 1000], 默认10 -Zinc: # Zinc搜索配置 - Host: zinc:4080 - Index: paopao-data - User: admin - Password: admin - Secure: False -Meili: # Meili搜索配置 - Host: meili:7700 - Index: paopao-data - ApiKey: paopao-meilisearch - Secure: False -ObjectStorage: # 对象存储通用配置 - RetainInDays: 2 # 临时对象过期时间多少天 - TempDir: tmp # 临时对象存放目录名 -AliOSS: # 阿里云OSS存储配置 - Endpoint: - AccessKeyID: - AccessKeySecret: - Bucket: - Domain: -COS: # 腾讯云COS存储配置 - SecretID: - SecretKey: - Region: ap-shanghai - Bucket: demo-1888888888 - Domain: -HuaweiOBS: # 华为云OBS存储配置 - AccessKey: - SecretKey: - Endpoint: - Bucket: paopao - Domain: -MinIO: # MinIO 存储配置 - AccessKey: Q3AM3UQ867SPQQA43P2F - SecretKey: zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG - Secure: False - Endpoint: minio:9000 - Bucket: paopao - Domain: 127.0.0.1:9000 -S3: # Amazon S3 存储配置 - AccessKey: "YOUR-ACCESSKEYID" - SecretKey: "YOUR-SECRETACCESSKEY" - Secure: True - Endpoint: s3.amazonaws.com - Bucket: paopao - Domain: -LocalOSS: # 本地文件OSS存储配置 - SavePath: custom/data/paopao-ce/oss - Secure: False - Bucket: paopao - Domain: 127.0.0.1:8008 -Database: # Database通用配置 - LogLevel: error # 日志级别 silent|error|warn|info - TablePrefix: p_ # 表名前缀 -MySQL: # MySQL数据库 + +Database: + LogLevel: error + TablePrefix: p_ + +MySQL: Username: paopao Password: paopao Host: db:3306 DBName: paopao Charset: utf8mb4 - ParseTime: True + ParseTime: true MaxIdleConns: 10 MaxOpenConns: 30 -Postgres: # PostgreSQL数据库 - User: paopao - Password: paopao - DBName: paopao - Host: localhost - Port: 5432 - SSLMode: disable - TimeZone: Asia/Shanghai -Sqlite3: # Sqlite3数据库 - Path: custom/data/sqlite3/paopao-ce.db + Redis: InitAddress: - - redis:6379 -WebProfile: - UseFriendship: true # 前端是否使用好友体系 - EnableTrendsBar: false # 广场页面是否开启动态条栏功能 - EnableWallet: false # 是否开启钱包功能 - AllowTweetAttachment: true # 是否允许推文附件 - AllowTweetAttachmentPrice: true # 是否允许推文付费附件 - AllowTweetVideo: true # 是否允许视频推文 - AllowUserRegister: true # 是否允许用户注册 - AllowPhoneBind: true # 是否允许手机绑定 - DefaultTweetMaxLength: 2000 # 推文允许输入的最大长度, 默认2000字,值的范围需要查询后端支持的最大字数 - TweetWebEllipsisSize: 400 # Web端推文作为feed显示的最长字数,默认400字 - TweetMobileEllipsisSize: 300 # 移动端推文作为feed显示的最长字数,默认300字 - DefaultTweetVisibility: friend # 推文可见性,默认好友可见 值: public/following/friend/private - DefaultMsgLoopInterval: 5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms - CopyrightTop: "2023 paopao.info" - CopyrightLeft: "Roc's Me" - CopyrightLeftLink: "" - CopyrightRight: "泡泡(PaoPao)开源社区" - CopyrightRightLink: "https://www.paopao.info" - \ No newline at end of file + - redis:6379 + +JWT: + Secret: 18a6413dc4fe394c66345ebe501b2f26 + Issuer: paopao-api + Expire: 86400 + +AdminSettings: + EncryptionKey: "CHANGE-ME-TO-A-LONG-RANDOM-SECRET" + +# Optional first-boot overrides for the providers enabled in Features.Default. +# If the embedded defaults already match your environment, you can remove these +# and manage later adjustments from /#/admin/settings. +Meili: + Host: meili:7700 + Index: paopao-data + ApiKey: paopao-meilisearch + Secure: false + +LocalOSS: + SavePath: custom/data/paopao-ce/oss + Secure: false + Bucket: paopao + Domain: 127.0.0.1:8008 diff --git a/docker/config.yaml b/docker/config.yaml index a3432727..3253f32b 100644 --- a/docker/config.yaml +++ b/docker/config.yaml @@ -1,71 +1,51 @@ -App: # APP基础设置项 +# Minimal Docker bootstrap config. +# The container still starts from embedded defaults; this file keeps only the +# startup-critical overrides for the bundled Docker environment. + +App: RunMode: debug - AttachmentIncomeRate: 0.8 - MaxCommentCount: 10 - DefaultContextTimeout: 60 - DefaultPageSize: 10 - MaxPageSize: 100 + Features: - Default: ["Web", "Frontend:EmbedWeb", "Meili", "LocalOSS", "Sqlite3", "LoggerFile", "Migration"] - Sms: "SmsJuhe" -WebServer: # Web服务 + Default: ["Web", "Frontend:EmbedWeb", "Meili", "LocalOSS", "MySQL", "LoggerFile", "Migration"] + +WebServer: HttpIp: 0.0.0.0 HttpPort: 8008 - ReadTimeout: 60 - WriteTimeout: 60 -SmsJuhe: - Gateway: https://v.juhe.cn/sms/send - Key: - TplID: - TplVal: "#code#=%s&#m#=%d" -Logger: # 日志通用配置 - Level: debug # 日志级别 panic|fatal|error|warn|info|debug|trace -LoggerFile: # 使用File写日志 - SavePath: custom/logs - FileName: app - FileExt: .log -JWT: # 鉴权加密 + +Database: + LogLevel: error + TablePrefix: p_ + +MySQL: # MySQL数据库 + Username: paopao_new # 填写你的数据库账号 + Password: YYwanPQz4sanEZBd # 填写你的数据库密码 + Host: 10.10.10.199:8306 + DBName: paopao_new + Charset: utf8mb4 + ParseTime: True + MaxIdleConns: 10 + MaxOpenConns: 30 + +Redis: + InitAddress: + - 127.0.0.1:6379 + +JWT: Secret: 18a6413dc4fe394c66345ebe501b2f26 Issuer: paopao-api Expire: 86400 -Meili: # Meili搜索配置 + +AdminSettings: + EncryptionKey: "CHANGE-ME-TO-A-LONG-RANDOM-SECRET" + +Meili: Host: 127.0.0.1:7700 Index: paopao-data ApiKey: paopao-meilisearch - Secure: False -ObjectStorage: # 对象存储通用配置 - RetainInDays: 2 # 临时对象过期时间多少天 - TempDir: tmp # 临时对象存放目录名 -LocalOSS: # 本地文件OSS存储配置 + Secure: false + +LocalOSS: SavePath: custom/oss - Secure: False + Secure: false Bucket: paopao Domain: 127.0.0.1:8008 -Database: # Database通用配置 - LogLevel: error # 日志级别 silent|error|warn|info - TablePrefix: p_ # 表名前缀 -Sqlite3: # Sqlite3数据库 - Path: custom/paopao-ce.db -Redis: - InitAddress: - - 127.0.0.1:6379 -WebProfile: - UseFriendship: true # 前端是否使用好友体系 - EnableTrendsBar: true # 广场页面是否开启动态条栏功能 - EnableWallet: false # 是否开启钱包功能 - AllowTweetAttachment: true # 是否允许推文附件 - AllowTweetAttachmentPrice: true # 是否允许推文付费附件 - AllowTweetVideo: true # 是否允许视频推文 - AllowUserRegister: true # 是否允许用户注册 - AllowPhoneBind: true # 是否允许手机绑定 - DefaultTweetMaxLength: 2000 # 推文允许输入的最大长度, 默认2000字,值的范围需要查询后端支持的最大字数 - TweetWebEllipsisSize: 400 # Web端推文作为feed显示的最长字数,默认400字 - TweetMobileEllipsisSize: 300 # 移动端推文作为feed显示的最长字数,默认300字 - DefaultTweetVisibility: friend # 推文可见性,默认好友可见 值: public/following/friend/private - DefaultMsgLoopInterval: 5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms - CopyrightTop: "2023 paopao.info" - CopyrightLeft: "Roc's Me" - CopyrightLeftLink: "" - CopyrightRight: "泡泡(PaoPao)开源社区" - CopyrightRightLink: "https://www.paopao.info" - \ No newline at end of file diff --git a/internal/conf/conf.go b/internal/conf/conf.go index c21f51e8..e0ebf8e7 100644 --- a/internal/conf/conf.go +++ b/internal/conf/conf.go @@ -58,6 +58,7 @@ var ( S3Setting *s3Conf LocalOSSSetting *localossConf JWTSetting *jwtConf + AdminSettingsSetting *adminSettingsConf WebProfileSetting *WebProfileConf ) @@ -113,6 +114,7 @@ func setupSetting(suite []string, noDefault bool) error { "Meili": &MeiliSetting, "Redis": &redisSetting, "JWT": &JWTSetting, + "AdminSettings": &AdminSettingsSetting, "ObjectStorage": &ObjectStorage, "AliOSS": &AliOSSSetting, "COS": &COSSetting, diff --git a/internal/conf/config.yaml b/internal/conf/config.yaml index 912d287c..887b21ef 100644 --- a/internal/conf/config.yaml +++ b/internal/conf/config.yaml @@ -172,6 +172,8 @@ JWT: # 鉴权加密 Secret: 18a6413dc4fe394c66345ebe501b2f26 Issuer: paopao-api Expire: 86400 +AdminSettings: + EncryptionKey: TweetSearch: # 推文关键字搜索相关配置 MaxUpdateQPS: 100 # 最大添加/删除/更新Post的QPS,设置范围[10, 10000], 默认100 MinWorker: 10 # 最小后台更新工作者, 设置范围[5, 1000], 默认10 @@ -270,8 +272,8 @@ WebProfile: TweetMobileEllipsisSize: 300 # 移动端推文作为feed显示的最长字数,默认300字 DefaultTweetVisibility: friend # 推文默认可见性,默认好友可见 值: public/following/friend/private DefaultMsgLoopInterval: 5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms - CopyrightTop: "2023 paopao.info" - CopyrightLeft: "Roc's Me" + CopyrightTop: "2026 PaoPao" + CopyrightLeft: "" CopyrightLeftLink: "" CopyrightRight: "泡泡(PaoPao)开源社区" - CopyrightRightLink: "https://www.paopao.info" + CopyrightRightLink: "https://github.com/rocboss/paopao-ce" diff --git a/internal/conf/db.go b/internal/conf/db.go index f2cbeaa7..1b6afcad 100644 --- a/internal/conf/db.go +++ b/internal/conf/db.go @@ -39,6 +39,7 @@ const ( TablePostContent = "post_content" TablePostStar = "post_star" TableTag = "tag" + TableSiteSettings = "site_settings" TableUser = "user" TableUserRelation = "user_relation" TableUserMetric = "user_metric" diff --git a/internal/conf/setting.go b/internal/conf/setting.go index fdcb3379..282e3837 100644 --- a/internal/conf/setting.go +++ b/internal/conf/setting.go @@ -287,6 +287,10 @@ type redisConf struct { ConnWriteTimeout time.Duration } +type adminSettingsConf struct { + EncryptionKey string +} + type jwtConf struct { Secret string Issuer string diff --git a/internal/model/web/site.go b/internal/model/web/site.go index 9173dc20..ec919da3 100644 --- a/internal/model/web/site.go +++ b/internal/model/web/site.go @@ -5,7 +5,8 @@ package web import ( - "github.com/rocboss/paopao-ce/internal/conf" + "encoding/json" + "github.com/rocboss/paopao-ce/pkg/version" ) @@ -13,4 +14,101 @@ type VersionResp struct { BuildInfo *version.BuildInfo `json:"build_info"` } -type SiteProfileResp = conf.WebProfileConf +type SiteProfileResp struct { + UseFriendship bool `json:"use_friendship"` + EnableTrendsBar bool `json:"enable_trends_bar"` + EnableWallet bool `json:"enable_wallet"` + AllowTweetAttachment bool `json:"allow_tweet_attachment"` + AllowTweetAttachmentPrice bool `json:"allow_tweet_attachment_price"` + AllowTweetVideo bool `json:"allow_tweet_video"` + AllowUserRegister bool `json:"allow_user_register"` + AllowPhoneBind bool `json:"allow_phone_bind"` + DefaultTweetMaxLength int `json:"default_tweet_max_length"` + TweetWebEllipsisSize int `json:"tweet_web_ellipsis_size"` + TweetMobileEllipsisSize int `json:"tweet_mobile_ellipsis_size"` + DefaultTweetVisibility string `json:"default_tweet_visibility"` + DefaultMsgLoopInterval int `json:"default_msg_loop_interval"` + CopyrightTop string `json:"copyright_top"` + CopyrightLeft string `json:"copyright_left"` + CopyrightLeftLink string `json:"copyright_left_link"` + CopyrightRight string `json:"copyright_right"` + CopyrightRightLink string `json:"copyright_right_link"` +} + +type SiteSettingsReq struct { + BaseInfo `json:"-" binding:"-"` + + UseFriendship *bool `json:"use_friendship" binding:"required"` + EnableTrendsBar *bool `json:"enable_trends_bar" binding:"required"` + EnableWallet *bool `json:"enable_wallet" binding:"required"` + AllowTweetAttachment *bool `json:"allow_tweet_attachment" binding:"required"` + AllowTweetAttachmentPrice *bool `json:"allow_tweet_attachment_price" binding:"required"` + AllowTweetVideo *bool `json:"allow_tweet_video" binding:"required"` + DefaultTweetMaxLength *int `json:"default_tweet_max_length" binding:"required,gte=1,lte=2000"` + TweetWebEllipsisSize *int `json:"tweet_web_ellipsis_size" binding:"required,gte=1,lte=2000"` + TweetMobileEllipsisSize *int `json:"tweet_mobile_ellipsis_size" binding:"required,gte=1,lte=2000"` + DefaultTweetVisibility *string `json:"default_tweet_visibility" binding:"required,oneof=public following friend private"` + DefaultMsgLoopInterval *int `json:"default_msg_loop_interval" binding:"required,gte=1000,lte=60000"` + CopyrightTop *string `json:"copyright_top" binding:"required,max=255"` + CopyrightLeft *string `json:"copyright_left" binding:"required,max=255"` + CopyrightLeftLink *string `json:"copyright_left_link" binding:"omitempty,max=255,url"` + CopyrightRight *string `json:"copyright_right" binding:"required,max=255"` + CopyrightRightLink *string `json:"copyright_right_link" binding:"omitempty,max=255,url"` +} + +type SiteSettingsResp struct { + SiteProfileResp + ReadonlyFields []string `json:"readonly_fields"` +} + +type AdminSettingValueInput struct { + Key string `json:"key" binding:"required"` + Value json.RawMessage `json:"value"` +} + +type AdminSettingsSaveReq struct { + BaseInfo `json:"-" binding:"-"` + + Items []AdminSettingValueInput `json:"items" binding:"required"` +} + +type AdminSettingSchemaItem struct { + Key string `json:"key"` + Group string `json:"group"` + Section string `json:"section"` + Type string `json:"type"` + Label string `json:"label"` + Description string `json:"description"` + ApplyMode string `json:"apply_mode"` + Secret bool `json:"secret"` + Readonly bool `json:"readonly"` + Active bool `json:"active"` + BootstrapValue any `json:"bootstrap_value,omitempty"` + BootstrapConfigured bool `json:"bootstrap_configured,omitempty"` + Options any `json:"options,omitempty"` +} + +type AdminSettingsSchemaResp struct { + Items []AdminSettingSchemaItem `json:"items"` +} + +type AdminSettingValue struct { + Key string `json:"key"` + Value any `json:"value,omitempty"` + EffectiveValue any `json:"effective_value,omitempty"` + Source string `json:"source"` + PendingRestart bool `json:"pending_restart"` + Configured bool `json:"configured,omitempty"` + Active bool `json:"active"` +} + +type AdminSettingsValuesResp struct { + Items []AdminSettingValue `json:"items"` + HasPendingRestart bool `json:"has_pending_restart"` +} + +type AdminSettingsSaveResp struct { + Items []AdminSettingValue `json:"items"` + UpdatedKeys []string `json:"updated_keys"` + HasPendingRestart bool `json:"has_pending_restart"` +} diff --git a/internal/servants/web/admin.go b/internal/servants/web/admin.go index 0b393cba..34c1a851 100644 --- a/internal/servants/web/admin.go +++ b/internal/servants/web/admin.go @@ -5,6 +5,7 @@ package web import ( + "context" "time" "github.com/gin-gonic/gin" @@ -14,6 +15,7 @@ import ( "github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/chain" + "github.com/rocboss/paopao-ce/internal/sitesetting" "github.com/rocboss/paopao-ce/pkg/xerror" "github.com/sirupsen/logrus" ) @@ -22,6 +24,7 @@ type adminSrv struct { api.UnimplementedAdminServant *base.DaoServant wc core.WebCache + settings *sitesetting.Service serverUpTime int64 } @@ -61,10 +64,45 @@ func (s *adminSrv) SiteInfo(req *web.SiteInfoReq) (*web.SiteInfoResp, error) { return res, nil } -func newAdminSrv(s *base.DaoServant, wc core.WebCache) api.Admin { +func (s *adminSrv) GetSiteSettings() (*web.SiteSettingsResp, error) { + profile, err := s.settings.GetProfile(context.Background()) + if err != nil { + return nil, err + } + return &web.SiteSettingsResp{ + SiteProfileResp: *profile, + ReadonlyFields: sitesetting.CloneReadonlyFields(), + }, nil +} + +func (s *adminSrv) UpdateSiteSettings(req *web.SiteSettingsReq) (*web.SiteSettingsResp, error) { + profile, err := s.settings.UpdateEditableProfile(context.Background(), sitesetting.EditableFromRequest(req)) + if err != nil { + return nil, err + } + return &web.SiteSettingsResp{ + SiteProfileResp: *profile, + ReadonlyFields: sitesetting.CloneReadonlyFields(), + }, nil +} + +func (s *adminSrv) GetSettingsSchema() (*web.AdminSettingsSchemaResp, error) { + return s.settings.GetSchema() +} + +func (s *adminSrv) GetSettingsValues() (*web.AdminSettingsValuesResp, error) { + return s.settings.GetValues(context.Background()) +} + +func (s *adminSrv) SaveSettings(req *web.AdminSettingsSaveReq) (*web.AdminSettingsSaveResp, error) { + return s.settings.SaveValues(context.Background(), req.Items) +} + +func newAdminSrv(s *base.DaoServant, wc core.WebCache, settings *sitesetting.Service) api.Admin { return &adminSrv{ DaoServant: s, wc: wc, + settings: settings, serverUpTime: time.Now().Unix(), } } diff --git a/internal/servants/web/site.go b/internal/servants/web/site.go index 262c1336..d3471a99 100644 --- a/internal/servants/web/site.go +++ b/internal/servants/web/site.go @@ -5,20 +5,23 @@ package web import ( + "context" + api "github.com/rocboss/paopao-ce/auto/api/v1" - "github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/servants/base" + "github.com/rocboss/paopao-ce/internal/sitesetting" "github.com/rocboss/paopao-ce/pkg/version" ) type siteSrv struct { api.UnimplementedSiteServant *base.BaseServant + settings *sitesetting.Service } -func (*siteSrv) Profile() (*web.SiteProfileResp, error) { - return conf.WebProfileSetting, nil +func (s *siteSrv) Profile() (*web.SiteProfileResp, error) { + return s.settings.GetProfile(context.Background()) } func (*siteSrv) Version() (*web.VersionResp, error) { @@ -27,8 +30,9 @@ func (*siteSrv) Version() (*web.VersionResp, error) { }, nil } -func newSiteSrv() api.Site { +func newSiteSrv(settings *sitesetting.Service) api.Site { return &siteSrv{ BaseServant: base.NewBaseServant(), + settings: settings, } } diff --git a/internal/servants/web/web.go b/internal/servants/web/web.go index 7f95eee2..03809cca 100644 --- a/internal/servants/web/web.go +++ b/internal/servants/web/web.go @@ -15,6 +15,7 @@ import ( "github.com/rocboss/paopao-ce/internal/dao" "github.com/rocboss/paopao-ce/internal/dao/cache" "github.com/rocboss/paopao-ce/internal/servants/base" + "github.com/rocboss/paopao-ce/internal/sitesetting" ) var ( @@ -24,6 +25,7 @@ var ( _ac core.AppCache _wc core.WebCache _oss core.ObjectStorageService + _siteSettings *sitesetting.Service _onceInitial sync.Once ) @@ -32,7 +34,7 @@ func RouteWeb(e *gin.Engine) { lazyInitial() ds := base.NewDaoServant() // aways register servants - api.RegisterAdminServant(e, newAdminSrv(ds, _wc)) + api.RegisterAdminServant(e, newAdminSrv(ds, _wc, _siteSettings)) api.RegisterCoreServant(e, newCoreSrv(ds, _oss, _wc)) api.RegisterRelaxServant(e, newRelaxSrv(ds, _wc), newRelaxChain()) api.RegisterLooseServant(e, newLooseSrv(ds, _ac)) @@ -41,7 +43,7 @@ func RouteWeb(e *gin.Engine) { api.RegisterTrendsServant(e, newTrendsSrv(ds)) api.RegisterFollowshipServant(e, newFollowshipSrv(ds)) api.RegisterFriendshipServant(e, newFriendshipSrv(ds)) - api.RegisterSiteServant(e, newSiteSrv()) + api.RegisterSiteServant(e, newSiteSrv(_siteSettings)) // regster servants if needed by configure cfg.Be("Alipay", func() { client := conf.MustAlipayClient() @@ -63,5 +65,6 @@ func lazyInitial() { _ds = dao.DataService() _ac = cache.NewAppCache() _wc = cache.NewWebCache() + _siteSettings = sitesetting.NewService(conf.MustGormDB()) }) } diff --git a/internal/sitesetting/crypto.go b/internal/sitesetting/crypto.go new file mode 100644 index 00000000..7c15cf89 --- /dev/null +++ b/internal/sitesetting/crypto.go @@ -0,0 +1,98 @@ +// Copyright 2026 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +package sitesetting + +import ( + "crypto/aes" + "crypto/cipher" + "crypto/rand" + "crypto/sha256" + "encoding/base64" + "fmt" + "io" + "strings" + + "github.com/rocboss/paopao-ce/internal/conf" + "github.com/rocboss/paopao-ce/pkg/xerror" +) + +const encryptedValuePrefix = "enc:v1:" + +type secretCodec struct { + key []byte +} + +func newSecretCodec() *secretCodec { + if conf.AdminSettingsSetting == nil { + return &secretCodec{} + } + seed := strings.TrimSpace(conf.AdminSettingsSetting.EncryptionKey) + if seed == "" { + return &secretCodec{} + } + sum := sha256.Sum256([]byte(seed)) + return &secretCodec{key: sum[:]} +} + +func (c *secretCodec) enabled() bool { + return len(c.key) == 32 +} + +func (c *secretCodec) Encrypt(value string) (string, error) { + if value == "" { + return "", nil + } + if !c.enabled() { + return "", xerror.ServerError.WithDetails("admin settings encryption key is not configured") + } + block, err := aes.NewCipher(c.key) + if err != nil { + return "", err + } + gcm, err := cipher.NewGCM(block) + if err != nil { + return "", err + } + nonce := make([]byte, gcm.NonceSize()) + if _, err := io.ReadFull(rand.Reader, nonce); err != nil { + return "", err + } + ciphertext := gcm.Seal(nil, nonce, []byte(value), nil) + payload := append(nonce, ciphertext...) + return encryptedValuePrefix + base64.StdEncoding.EncodeToString(payload), nil +} + +func (c *secretCodec) Decrypt(value string) (string, error) { + if value == "" { + return "", nil + } + if !strings.HasPrefix(value, encryptedValuePrefix) { + return value, nil + } + if !c.enabled() { + return "", xerror.ServerError.WithDetails("admin settings encryption key is not configured") + } + raw, err := base64.StdEncoding.DecodeString(strings.TrimPrefix(value, encryptedValuePrefix)) + if err != nil { + return "", fmt.Errorf("decode encrypted setting: %w", err) + } + block, err := aes.NewCipher(c.key) + if err != nil { + return "", err + } + gcm, err := cipher.NewGCM(block) + if err != nil { + return "", err + } + if len(raw) < gcm.NonceSize() { + return "", xerror.ServerError.WithDetails("invalid encrypted setting payload") + } + nonce, ciphertext := raw[:gcm.NonceSize()], raw[gcm.NonceSize():] + plaintext, err := gcm.Open(nil, nonce, ciphertext, nil) + if err != nil { + return "", err + } + return string(plaintext), nil +} diff --git a/internal/sitesetting/registry.go b/internal/sitesetting/registry.go new file mode 100644 index 00000000..26616035 --- /dev/null +++ b/internal/sitesetting/registry.go @@ -0,0 +1,688 @@ +// Copyright 2026 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +package sitesetting + +import ( + stdjson "encoding/json" + "fmt" + "net/url" + "strconv" + "strings" + + "github.com/alimy/tryst/cfg" + "github.com/rocboss/paopao-ce/internal/conf" + "github.com/rocboss/paopao-ce/pkg/xerror" + "github.com/sirupsen/logrus" +) + +type ValueType string +type ApplyMode string + +const ( + TypeBool ValueType = "bool" + TypeInt ValueType = "int" + TypeFloat ValueType = "float" + TypeString ValueType = "string" + + ApplyModeLive ApplyMode = "live" + ApplyModeRestartRequired ApplyMode = "restart_required" + ApplyModeBootstrapOnly ApplyMode = "bootstrap_only" +) + +type bootstrapSnapshot struct { + App confAppSnapshot + TweetSearch confTweetSearchSnapshot + Zinc confZincSnapshot + Meili confMeiliSnapshot + ObjectStorage confObjectStorageSnapshot + AliOSS confAliOSSSnapshot + COS confCOSSnapshot + HuaweiOBS confHuaweiOBSSnapshot + MinIO confMinIOSnapshot + S3 confS3Snapshot + LocalOSS confLocalOSSSnapshot + SmsJuhe confSmsJuheSnapshot + Alipay confAlipaySnapshot + WebProfile confWebProfileSnapshot +} + +type confAppSnapshot struct { + AttachmentIncomeRate float64 + MaxCommentCount int64 + MaxWhisperDaily int64 + MaxCaptchaTimes int + DefaultPageSize int + MaxPageSize int +} + +type confTweetSearchSnapshot struct { + MaxUpdateQPS int + MinWorker int +} + +type confZincSnapshot struct { + Host string + Index string + User string + Password string + Secure bool +} + +type confMeiliSnapshot struct { + Host string + Index string + ApiKey string + Secure bool +} + +type confObjectStorageSnapshot struct { + RetainInDays int + TempDir string +} + +type confAliOSSSnapshot struct { + Endpoint string + AccessKeyID string + AccessKeySecret string + Bucket string + Domain string +} + +type confCOSSnapshot struct { + SecretID string + SecretKey string + Region string + Bucket string + Domain string +} + +type confHuaweiOBSSnapshot struct { + AccessKey string + SecretKey string + Endpoint string + Bucket string + Domain string +} + +type confMinIOSnapshot struct { + AccessKey string + SecretKey string + Secure bool + Endpoint string + Bucket string + Domain string +} + +type confS3Snapshot struct { + AccessKey string + SecretKey string + Secure bool + Endpoint string + Bucket string + Domain string +} + +type confLocalOSSSnapshot struct { + SavePath string + Secure bool + Bucket string + Domain string +} + +type confSmsJuheSnapshot struct { + Gateway string + Key string + TplID string + TplVal string +} + +type confAlipaySnapshot struct { + AppID string + PrivateKey string + RootCertFile string + PublicCertFile string + AppPublicCertFile string + InProduction bool +} + +type confWebProfileSnapshot struct { + UseFriendship bool + EnableTrendsBar bool + EnableWallet bool + AllowTweetAttachment bool + AllowTweetAttachmentPrice bool + AllowTweetVideo bool + AllowUserRegister bool + AllowPhoneBind bool + DefaultTweetMaxLength int + TweetWebEllipsisSize int + TweetMobileEllipsisSize int + DefaultTweetVisibility string + DefaultMsgLoopInterval int + CopyrightTop string + CopyrightLeft string + CopyrightLeftLink string + CopyrightRight string + CopyrightRightLink string +} + +type Option struct { + Label string `json:"label"` + Value any `json:"value"` +} + +type Definition struct { + Key string + Group string + Section string + Type ValueType + Label string + Description string + ApplyMode ApplyMode + Secret bool + Readonly bool + Options []Option + Active func() bool + CurrentValue func() any + BootstrapDefault func() any + ValidateValue func(any) (any, error) + BootstrapOverride func(any) +} + +var ( + ReadonlyFields = []string{"allow_user_register", "allow_phone_bind"} + bootstrapConfig *bootstrapSnapshot + visibilityOption = []Option{{Label: "Public", Value: "public"}, {Label: "Following", Value: "following"}, {Label: "Friend", Value: "friend"}, {Label: "Private", Value: "private"}} +) + +func ensureBootstrapSnapshot() { + if bootstrapConfig != nil { + return + } + bootstrapConfig = &bootstrapSnapshot{} + if conf.AppSetting != nil { + bootstrapConfig.App = confAppSnapshot{ + AttachmentIncomeRate: conf.AppSetting.AttachmentIncomeRate, + MaxCommentCount: conf.AppSetting.MaxCommentCount, + MaxWhisperDaily: conf.AppSetting.MaxWhisperDaily, + MaxCaptchaTimes: conf.AppSetting.MaxCaptchaTimes, + DefaultPageSize: conf.AppSetting.DefaultPageSize, + MaxPageSize: conf.AppSetting.MaxPageSize, + } + } + if conf.TweetSearchSetting != nil { + bootstrapConfig.TweetSearch = confTweetSearchSnapshot{MaxUpdateQPS: conf.TweetSearchSetting.MaxUpdateQPS, MinWorker: conf.TweetSearchSetting.MinWorker} + } + if conf.ZincSetting != nil { + bootstrapConfig.Zinc = confZincSnapshot{Host: conf.ZincSetting.Host, Index: conf.ZincSetting.Index, User: conf.ZincSetting.User, Password: conf.ZincSetting.Password, Secure: conf.ZincSetting.Secure} + } + if conf.MeiliSetting != nil { + bootstrapConfig.Meili = confMeiliSnapshot{Host: conf.MeiliSetting.Host, Index: conf.MeiliSetting.Index, ApiKey: conf.MeiliSetting.ApiKey, Secure: conf.MeiliSetting.Secure} + } + if conf.ObjectStorage != nil { + bootstrapConfig.ObjectStorage = confObjectStorageSnapshot{RetainInDays: conf.ObjectStorage.RetainInDays, TempDir: conf.ObjectStorage.TempDir} + } + if conf.AliOSSSetting != nil { + bootstrapConfig.AliOSS = confAliOSSSnapshot{Endpoint: conf.AliOSSSetting.Endpoint, AccessKeyID: conf.AliOSSSetting.AccessKeyID, AccessKeySecret: conf.AliOSSSetting.AccessKeySecret, Bucket: conf.AliOSSSetting.Bucket, Domain: conf.AliOSSSetting.Domain} + } + if conf.COSSetting != nil { + bootstrapConfig.COS = confCOSSnapshot{SecretID: conf.COSSetting.SecretID, SecretKey: conf.COSSetting.SecretKey, Region: conf.COSSetting.Region, Bucket: conf.COSSetting.Bucket, Domain: conf.COSSetting.Domain} + } + if conf.HuaweiOBSSetting != nil { + bootstrapConfig.HuaweiOBS = confHuaweiOBSSnapshot{AccessKey: conf.HuaweiOBSSetting.AccessKey, SecretKey: conf.HuaweiOBSSetting.SecretKey, Endpoint: conf.HuaweiOBSSetting.Endpoint, Bucket: conf.HuaweiOBSSetting.Bucket, Domain: conf.HuaweiOBSSetting.Domain} + } + if conf.MinIOSetting != nil { + bootstrapConfig.MinIO = confMinIOSnapshot{AccessKey: conf.MinIOSetting.AccessKey, SecretKey: conf.MinIOSetting.SecretKey, Secure: conf.MinIOSetting.Secure, Endpoint: conf.MinIOSetting.Endpoint, Bucket: conf.MinIOSetting.Bucket, Domain: conf.MinIOSetting.Domain} + } + if conf.S3Setting != nil { + bootstrapConfig.S3 = confS3Snapshot{AccessKey: conf.S3Setting.AccessKey, SecretKey: conf.S3Setting.SecretKey, Secure: conf.S3Setting.Secure, Endpoint: conf.S3Setting.Endpoint, Bucket: conf.S3Setting.Bucket, Domain: conf.S3Setting.Domain} + } + if conf.LocalOSSSetting != nil { + bootstrapConfig.LocalOSS = confLocalOSSSnapshot{SavePath: conf.LocalOSSSetting.SavePath, Secure: conf.LocalOSSSetting.Secure, Bucket: conf.LocalOSSSetting.Bucket, Domain: conf.LocalOSSSetting.Domain} + } + if conf.SmsJuheSetting != nil { + bootstrapConfig.SmsJuhe = confSmsJuheSnapshot{Gateway: conf.SmsJuheSetting.Gateway, Key: conf.SmsJuheSetting.Key, TplID: conf.SmsJuheSetting.TplID, TplVal: conf.SmsJuheSetting.TplVal} + } + if conf.AlipaySetting != nil { + bootstrapConfig.Alipay = confAlipaySnapshot{AppID: conf.AlipaySetting.AppID, PrivateKey: conf.AlipaySetting.PrivateKey, RootCertFile: conf.AlipaySetting.RootCertFile, PublicCertFile: conf.AlipaySetting.PublicCertFile, AppPublicCertFile: conf.AlipaySetting.AppPublicCertFile, InProduction: conf.AlipaySetting.InProduction} + } + if conf.WebProfileSetting != nil { + bootstrapConfig.WebProfile = confWebProfileSnapshot{ + UseFriendship: conf.WebProfileSetting.UseFriendship, + EnableTrendsBar: conf.WebProfileSetting.EnableTrendsBar, + EnableWallet: conf.WebProfileSetting.EnableWallet, + AllowTweetAttachment: conf.WebProfileSetting.AllowTweetAttachment, + AllowTweetAttachmentPrice: conf.WebProfileSetting.AllowTweetAttachmentPrice, + AllowTweetVideo: conf.WebProfileSetting.AllowTweetVideo, + AllowUserRegister: conf.WebProfileSetting.AllowUserRegister, + AllowPhoneBind: conf.WebProfileSetting.AllowPhoneBind, + DefaultTweetMaxLength: conf.WebProfileSetting.DefaultTweetMaxLength, + TweetWebEllipsisSize: conf.WebProfileSetting.TweetWebEllipsisSize, + TweetMobileEllipsisSize: conf.WebProfileSetting.TweetMobileEllipsisSize, + DefaultTweetVisibility: conf.WebProfileSetting.DefaultTweetVisibility, + DefaultMsgLoopInterval: conf.WebProfileSetting.DefaultMsgLoopInterval, + CopyrightTop: conf.WebProfileSetting.CopyrightTop, + CopyrightLeft: conf.WebProfileSetting.CopyrightLeft, + CopyrightLeftLink: conf.WebProfileSetting.CopyrightLeftLink, + CopyrightRight: conf.WebProfileSetting.CopyrightRight, + CopyrightRightLink: conf.WebProfileSetting.CopyrightRightLink, + } + } +} + +func CloneReadonlyFields() []string { + res := make([]string, len(ReadonlyFields)) + copy(res, ReadonlyFields) + return res +} + +func Registry() []Definition { + ensureBootstrapSnapshot() + return []Definition{ + boolDef("web_profile.use_friendship", "web", "profile", "Use friendship", "Switch the frontend friendship model.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.UseFriendship }, func() any { return bootstrapConfig.WebProfile.UseFriendship }, func(v any) { conf.WebProfileSetting.UseFriendship = v.(bool) }), + boolDef("web_profile.enable_trends_bar", "web", "profile", "Enable trends bar", "Show the trends sidebar in the web UI.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.EnableTrendsBar }, func() any { return bootstrapConfig.WebProfile.EnableTrendsBar }, func(v any) { conf.WebProfileSetting.EnableTrendsBar = v.(bool) }), + boolDef("web_profile.enable_wallet", "web", "profile", "Enable wallet", "Enable wallet-related frontend features.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.EnableWallet }, func() any { return bootstrapConfig.WebProfile.EnableWallet }, func(v any) { conf.WebProfileSetting.EnableWallet = v.(bool) }), + boolDef("web_profile.allow_tweet_attachment", "web", "profile", "Allow attachments", "Allow file attachments on posts.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.AllowTweetAttachment }, func() any { return bootstrapConfig.WebProfile.AllowTweetAttachment }, func(v any) { conf.WebProfileSetting.AllowTweetAttachment = v.(bool) }), + boolDef("web_profile.allow_tweet_attachment_price", "web", "profile", "Allow paid attachments", "Allow post attachments to have a price.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.AllowTweetAttachmentPrice }, func() any { return bootstrapConfig.WebProfile.AllowTweetAttachmentPrice }, func(v any) { conf.WebProfileSetting.AllowTweetAttachmentPrice = v.(bool) }), + boolDef("web_profile.allow_tweet_video", "web", "profile", "Allow video posts", "Allow video uploads on posts.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.AllowTweetVideo }, func() any { return bootstrapConfig.WebProfile.AllowTweetVideo }, func(v any) { conf.WebProfileSetting.AllowTweetVideo = v.(bool) }), + boolDef("web_profile.allow_user_register", "web", "profile", "Allow user registration", "Bootstrap-only registration gate from YAML/features.", ApplyModeBootstrapOnly, false, false, func() any { return conf.WebProfileSetting.AllowUserRegister }, func() any { return bootstrapConfig.WebProfile.AllowUserRegister }, nil), + boolDef("web_profile.allow_phone_bind", "web", "profile", "Allow phone binding", "Bootstrap-only phone binding gate from YAML/features.", ApplyModeBootstrapOnly, false, false, func() any { return conf.WebProfileSetting.AllowPhoneBind }, func() any { return bootstrapConfig.WebProfile.AllowPhoneBind }, nil), + intDef("web_profile.default_tweet_max_length", "web", "profile", "Default tweet max length", "Maximum allowed tweet length.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.DefaultTweetMaxLength }, func() any { return bootstrapConfig.WebProfile.DefaultTweetMaxLength }, func(v int) error { return between(v, 1, 2000, "default_tweet_max_length") }, func(v any) { conf.WebProfileSetting.DefaultTweetMaxLength = v.(int) }), + intDef("web_profile.tweet_web_ellipsis_size", "web", "profile", "Web ellipsis size", "Truncated feed length on web.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.TweetWebEllipsisSize }, func() any { return bootstrapConfig.WebProfile.TweetWebEllipsisSize }, func(v int) error { + return between(v, 1, conf.WebProfileSetting.DefaultTweetMaxLength, "tweet_web_ellipsis_size") + }, func(v any) { conf.WebProfileSetting.TweetWebEllipsisSize = v.(int) }), + intDef("web_profile.tweet_mobile_ellipsis_size", "web", "profile", "Mobile ellipsis size", "Truncated feed length on mobile.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.TweetMobileEllipsisSize }, func() any { return bootstrapConfig.WebProfile.TweetMobileEllipsisSize }, func(v int) error { + return between(v, 1, conf.WebProfileSetting.DefaultTweetMaxLength, "tweet_mobile_ellipsis_size") + }, func(v any) { conf.WebProfileSetting.TweetMobileEllipsisSize = v.(int) }), + stringDef("web_profile.default_tweet_visibility", "web", "profile", "Default tweet visibility", "Default visibility for new posts.", ApplyModeLive, false, true, visibilityOption, func() any { return conf.WebProfileSetting.DefaultTweetVisibility }, func() any { return bootstrapConfig.WebProfile.DefaultTweetVisibility }, validateVisibility, func(v any) { conf.WebProfileSetting.DefaultTweetVisibility = v.(string) }), + intDef("web_profile.default_msg_loop_interval", "web", "profile", "Message polling interval", "Polling interval for unread messages in milliseconds.", ApplyModeLive, false, true, func() any { return conf.WebProfileSetting.DefaultMsgLoopInterval }, func() any { return bootstrapConfig.WebProfile.DefaultMsgLoopInterval }, func(v int) error { return between(v, 1000, 60000, "default_msg_loop_interval") }, func(v any) { conf.WebProfileSetting.DefaultMsgLoopInterval = v.(int) }), + stringDef("web_profile.copyright_top", "web", "profile", "Copyright top", "Top copyright line displayed in the UI.", ApplyModeLive, false, true, nil, func() any { return conf.WebProfileSetting.CopyrightTop }, func() any { return bootstrapConfig.WebProfile.CopyrightTop }, validateRequiredTrimmed("copyright_top", 255), func(v any) { conf.WebProfileSetting.CopyrightTop = v.(string) }), + stringDef("web_profile.copyright_left", "web", "profile", "Copyright left", "Left footer label.", ApplyModeLive, false, true, nil, func() any { return conf.WebProfileSetting.CopyrightLeft }, func() any { return bootstrapConfig.WebProfile.CopyrightLeft }, validateRequiredTrimmed("copyright_left", 255), func(v any) { conf.WebProfileSetting.CopyrightLeft = v.(string) }), + stringDef("web_profile.copyright_left_link", "web", "profile", "Copyright left link", "Optional left footer link.", ApplyModeLive, false, true, nil, func() any { return conf.WebProfileSetting.CopyrightLeftLink }, func() any { return bootstrapConfig.WebProfile.CopyrightLeftLink }, validateOptionalURL("copyright_left_link", 255), func(v any) { conf.WebProfileSetting.CopyrightLeftLink = v.(string) }), + stringDef("web_profile.copyright_right", "web", "profile", "Copyright right", "Right footer label.", ApplyModeLive, false, true, nil, func() any { return conf.WebProfileSetting.CopyrightRight }, func() any { return bootstrapConfig.WebProfile.CopyrightRight }, validateRequiredTrimmed("copyright_right", 255), func(v any) { conf.WebProfileSetting.CopyrightRight = v.(string) }), + stringDef("web_profile.copyright_right_link", "web", "profile", "Copyright right link", "Optional right footer link.", ApplyModeLive, false, true, nil, func() any { return conf.WebProfileSetting.CopyrightRightLink }, func() any { return bootstrapConfig.WebProfile.CopyrightRightLink }, validateOptionalURL("copyright_right_link", 255), func(v any) { conf.WebProfileSetting.CopyrightRightLink = v.(string) }), + + int64Def("app.max_comment_count", "app", "general", "Max comment count", "Maximum comments allowed on a post.", ApplyModeLive, func() any { return conf.AppSetting.MaxCommentCount }, func() any { return bootstrapConfig.App.MaxCommentCount }, func(v int64) error { return betweenInt64(v, 1, 100000, "max_comment_count") }, func(v any) { conf.AppSetting.MaxCommentCount = v.(int64) }), + floatDef("app.attachment_income_rate", "app", "general", "Attachment income rate", "Revenue share for paid attachments.", ApplyModeLive, func() any { return conf.AppSetting.AttachmentIncomeRate }, func() any { return bootstrapConfig.App.AttachmentIncomeRate }, func(v float64) error { + if v < 0 || v > 1 { + return xerror.InvalidParams.WithDetails("attachment_income_rate must be between 0 and 1") + } + return nil + }, func(v any) { conf.AppSetting.AttachmentIncomeRate = v.(float64) }), + intDef("app.default_page_size", "app", "general", "Default page size", "Default pagination size.", ApplyModeLive, false, true, func() any { return conf.AppSetting.DefaultPageSize }, func() any { return bootstrapConfig.App.DefaultPageSize }, func(v int) error { return between(v, 1, conf.AppSetting.MaxPageSize, "default_page_size") }, func(v any) { conf.AppSetting.DefaultPageSize = v.(int) }), + intDef("app.max_page_size", "app", "general", "Max page size", "Maximum pagination size.", ApplyModeLive, false, true, func() any { return conf.AppSetting.MaxPageSize }, func() any { return bootstrapConfig.App.MaxPageSize }, func(v int) error { + return between(v, maxInt(conf.AppSetting.DefaultPageSize, 1), 1000, "max_page_size") + }, func(v any) { conf.AppSetting.MaxPageSize = v.(int) }), + int64Def("app.max_whisper_daily", "app", "limits", "Max daily whispers", "Daily whisper send limit. Restart required because servants cache it at startup.", ApplyModeRestartRequired, func() any { return conf.AppSetting.MaxWhisperDaily }, func() any { return bootstrapConfig.App.MaxWhisperDaily }, func(v int64) error { return betweenInt64(v, 1, 1000000, "max_whisper_daily") }, func(v any) { conf.AppSetting.MaxWhisperDaily = v.(int64) }), + intDef("app.max_captcha_times", "app", "limits", "Max captcha times", "Max captcha request count cached at startup by web servants.", ApplyModeRestartRequired, false, true, func() any { return conf.AppSetting.MaxCaptchaTimes }, func() any { return bootstrapConfig.App.MaxCaptchaTimes }, func(v int) error { return between(v, 1, 1000, "max_captcha_times") }, func(v any) { conf.AppSetting.MaxCaptchaTimes = v.(int) }), + + intDef("tweet_search.max_update_qps", "search", "bridge", "Search update QPS", "Buffered update throughput for search indexing.", ApplyModeRestartRequired, false, true, func() any { return conf.TweetSearchSetting.MaxUpdateQPS }, func() any { return bootstrapConfig.TweetSearch.MaxUpdateQPS }, func(v int) error { return between(v, 10, 10000, "max_update_qps") }, func(v any) { conf.TweetSearchSetting.MaxUpdateQPS = v.(int) }), + intDef("tweet_search.min_worker", "search", "bridge", "Search worker count", "Background worker count for search indexing.", ApplyModeRestartRequired, false, true, func() any { return conf.TweetSearchSetting.MinWorker }, func() any { return bootstrapConfig.TweetSearch.MinWorker }, func(v int) error { return between(v, 5, 1000, "min_worker") }, func(v any) { conf.TweetSearchSetting.MinWorker = v.(int) }), + + stringDefWithActive("meili.host", "search", "meili", "Meili host", "Meilisearch host.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Meili") }, func() any { return conf.MeiliSetting.Host }, func() any { return bootstrapConfig.Meili.Host }, validateTrimmedMax("meili.host", 255), func(v any) { conf.MeiliSetting.Host = v.(string) }), + stringDefWithActive("meili.index", "search", "meili", "Meili index", "Meilisearch index name.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Meili") }, func() any { return conf.MeiliSetting.Index }, func() any { return bootstrapConfig.Meili.Index }, validateTrimmedMax("meili.index", 255), func(v any) { conf.MeiliSetting.Index = v.(string) }), + stringDefWithActive("meili.api_key", "search", "meili", "Meili API key", "Meilisearch API key.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("Meili") }, func() any { return conf.MeiliSetting.ApiKey }, func() any { return bootstrapConfig.Meili.ApiKey }, validateTrimmedMax("meili.api_key", 512), func(v any) { conf.MeiliSetting.ApiKey = v.(string) }), + boolDefWithActive("meili.secure", "search", "meili", "Meili secure", "Use HTTPS for Meilisearch.", ApplyModeRestartRequired, false, true, func() bool { return cfg.If("Meili") }, func() any { return conf.MeiliSetting.Secure }, func() any { return bootstrapConfig.Meili.Secure }, func(v any) { conf.MeiliSetting.Secure = v.(bool) }), + + stringDefWithActive("zinc.host", "search", "zinc", "Zinc host", "Zinc host.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Zinc") }, func() any { return conf.ZincSetting.Host }, func() any { return bootstrapConfig.Zinc.Host }, validateTrimmedMax("zinc.host", 255), func(v any) { conf.ZincSetting.Host = v.(string) }), + stringDefWithActive("zinc.index", "search", "zinc", "Zinc index", "Zinc index name.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Zinc") }, func() any { return conf.ZincSetting.Index }, func() any { return bootstrapConfig.Zinc.Index }, validateTrimmedMax("zinc.index", 255), func(v any) { conf.ZincSetting.Index = v.(string) }), + stringDefWithActive("zinc.user", "search", "zinc", "Zinc user", "Zinc username.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Zinc") }, func() any { return conf.ZincSetting.User }, func() any { return bootstrapConfig.Zinc.User }, validateTrimmedMax("zinc.user", 255), func(v any) { conf.ZincSetting.User = v.(string) }), + stringDefWithActive("zinc.password", "search", "zinc", "Zinc password", "Zinc password.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("Zinc") }, func() any { return conf.ZincSetting.Password }, func() any { return bootstrapConfig.Zinc.Password }, validateTrimmedMax("zinc.password", 512), func(v any) { conf.ZincSetting.Password = v.(string) }), + boolDefWithActive("zinc.secure", "search", "zinc", "Zinc secure", "Use HTTPS for Zinc.", ApplyModeRestartRequired, false, true, func() bool { return cfg.If("Zinc") }, func() any { return conf.ZincSetting.Secure }, func() any { return bootstrapConfig.Zinc.Secure }, func(v any) { conf.ZincSetting.Secure = v.(bool) }), + + intDef("object_storage.retain_in_days", "storage", "common", "Object retention days", "Retention window for temporary objects.", ApplyModeRestartRequired, false, true, func() any { return conf.ObjectStorage.RetainInDays }, func() any { return bootstrapConfig.ObjectStorage.RetainInDays }, func(v int) error { return between(v, 0, 3650, "retain_in_days") }, func(v any) { conf.ObjectStorage.RetainInDays = v.(int) }), + stringDef("object_storage.temp_dir", "storage", "common", "Object temp dir", "Temporary directory/prefix for objects.", ApplyModeRestartRequired, false, true, nil, func() any { return conf.ObjectStorage.TempDir }, func() any { return bootstrapConfig.ObjectStorage.TempDir }, validateTrimmedMax("temp_dir", 255), func(v any) { conf.ObjectStorage.TempDir = v.(string) }), + + stringDefWithActive("local_oss.save_path", "storage", "local_oss", "Local OSS save path", "Filesystem path for local object storage.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("LocalOSS") }, func() any { return conf.LocalOSSSetting.SavePath }, func() any { return bootstrapConfig.LocalOSS.SavePath }, validateTrimmedMax("local_oss.save_path", 1024), func(v any) { conf.LocalOSSSetting.SavePath = v.(string) }), + boolDefWithActive("local_oss.secure", "storage", "local_oss", "Local OSS secure", "Generate HTTPS URLs for local object storage.", ApplyModeRestartRequired, false, true, func() bool { return cfg.If("LocalOSS") }, func() any { return conf.LocalOSSSetting.Secure }, func() any { return bootstrapConfig.LocalOSS.Secure }, func(v any) { conf.LocalOSSSetting.Secure = v.(bool) }), + stringDefWithActive("local_oss.bucket", "storage", "local_oss", "Local OSS bucket", "Bucket folder name for local storage.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("LocalOSS") }, func() any { return conf.LocalOSSSetting.Bucket }, func() any { return bootstrapConfig.LocalOSS.Bucket }, validateTrimmedMax("local_oss.bucket", 255), func(v any) { conf.LocalOSSSetting.Bucket = v.(string) }), + stringDefWithActive("local_oss.domain", "storage", "local_oss", "Local OSS domain", "Public domain for local object storage.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("LocalOSS") }, func() any { return conf.LocalOSSSetting.Domain }, func() any { return bootstrapConfig.LocalOSS.Domain }, validateTrimmedMax("local_oss.domain", 255), func(v any) { conf.LocalOSSSetting.Domain = v.(string) }), + + stringDefWithActive("minio.access_key", "storage", "minio", "MinIO access key", "MinIO access key.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("MinIO") }, func() any { return conf.MinIOSetting.AccessKey }, func() any { return bootstrapConfig.MinIO.AccessKey }, validateTrimmedMax("minio.access_key", 255), func(v any) { conf.MinIOSetting.AccessKey = v.(string) }), + stringDefWithActive("minio.secret_key", "storage", "minio", "MinIO secret key", "MinIO secret key.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("MinIO") }, func() any { return conf.MinIOSetting.SecretKey }, func() any { return bootstrapConfig.MinIO.SecretKey }, validateTrimmedMax("minio.secret_key", 512), func(v any) { conf.MinIOSetting.SecretKey = v.(string) }), + boolDefWithActive("minio.secure", "storage", "minio", "MinIO secure", "Use HTTPS for MinIO.", ApplyModeRestartRequired, false, true, func() bool { return cfg.If("MinIO") }, func() any { return conf.MinIOSetting.Secure }, func() any { return bootstrapConfig.MinIO.Secure }, func(v any) { conf.MinIOSetting.Secure = v.(bool) }), + stringDefWithActive("minio.endpoint", "storage", "minio", "MinIO endpoint", "MinIO endpoint.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("MinIO") }, func() any { return conf.MinIOSetting.Endpoint }, func() any { return bootstrapConfig.MinIO.Endpoint }, validateTrimmedMax("minio.endpoint", 255), func(v any) { conf.MinIOSetting.Endpoint = v.(string) }), + stringDefWithActive("minio.bucket", "storage", "minio", "MinIO bucket", "MinIO bucket name.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("MinIO") }, func() any { return conf.MinIOSetting.Bucket }, func() any { return bootstrapConfig.MinIO.Bucket }, validateTrimmedMax("minio.bucket", 255), func(v any) { conf.MinIOSetting.Bucket = v.(string) }), + stringDefWithActive("minio.domain", "storage", "minio", "MinIO domain", "MinIO public domain.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("MinIO") }, func() any { return conf.MinIOSetting.Domain }, func() any { return bootstrapConfig.MinIO.Domain }, validateTrimmedMax("minio.domain", 255), func(v any) { conf.MinIOSetting.Domain = v.(string) }), + + stringDefWithActive("s3.access_key", "storage", "s3", "S3 access key", "Amazon S3 access key.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("S3") }, func() any { return conf.S3Setting.AccessKey }, func() any { return bootstrapConfig.S3.AccessKey }, validateTrimmedMax("s3.access_key", 255), func(v any) { conf.S3Setting.AccessKey = v.(string) }), + stringDefWithActive("s3.secret_key", "storage", "s3", "S3 secret key", "Amazon S3 secret key.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("S3") }, func() any { return conf.S3Setting.SecretKey }, func() any { return bootstrapConfig.S3.SecretKey }, validateTrimmedMax("s3.secret_key", 512), func(v any) { conf.S3Setting.SecretKey = v.(string) }), + boolDefWithActive("s3.secure", "storage", "s3", "S3 secure", "Use HTTPS for S3.", ApplyModeRestartRequired, false, true, func() bool { return cfg.If("S3") }, func() any { return conf.S3Setting.Secure }, func() any { return bootstrapConfig.S3.Secure }, func(v any) { conf.S3Setting.Secure = v.(bool) }), + stringDefWithActive("s3.endpoint", "storage", "s3", "S3 endpoint", "Amazon S3 endpoint.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("S3") }, func() any { return conf.S3Setting.Endpoint }, func() any { return bootstrapConfig.S3.Endpoint }, validateTrimmedMax("s3.endpoint", 255), func(v any) { conf.S3Setting.Endpoint = v.(string) }), + stringDefWithActive("s3.bucket", "storage", "s3", "S3 bucket", "Amazon S3 bucket name.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("S3") }, func() any { return conf.S3Setting.Bucket }, func() any { return bootstrapConfig.S3.Bucket }, validateTrimmedMax("s3.bucket", 255), func(v any) { conf.S3Setting.Bucket = v.(string) }), + stringDefWithActive("s3.domain", "storage", "s3", "S3 domain", "Amazon S3 public domain.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("S3") }, func() any { return conf.S3Setting.Domain }, func() any { return bootstrapConfig.S3.Domain }, validateTrimmedMax("s3.domain", 255), func(v any) { conf.S3Setting.Domain = v.(string) }), + + stringDefWithActive("alioss.endpoint", "storage", "alioss", "AliOSS endpoint", "AliOSS endpoint.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("AliOSS") }, func() any { return conf.AliOSSSetting.Endpoint }, func() any { return bootstrapConfig.AliOSS.Endpoint }, validateTrimmedMax("alioss.endpoint", 255), func(v any) { conf.AliOSSSetting.Endpoint = v.(string) }), + stringDefWithActive("alioss.access_key_id", "storage", "alioss", "AliOSS access key ID", "AliOSS access key ID.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("AliOSS") }, func() any { return conf.AliOSSSetting.AccessKeyID }, func() any { return bootstrapConfig.AliOSS.AccessKeyID }, validateTrimmedMax("alioss.access_key_id", 255), func(v any) { conf.AliOSSSetting.AccessKeyID = v.(string) }), + stringDefWithActive("alioss.access_key_secret", "storage", "alioss", "AliOSS access key secret", "AliOSS secret key.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("AliOSS") }, func() any { return conf.AliOSSSetting.AccessKeySecret }, func() any { return bootstrapConfig.AliOSS.AccessKeySecret }, validateTrimmedMax("alioss.access_key_secret", 512), func(v any) { conf.AliOSSSetting.AccessKeySecret = v.(string) }), + stringDefWithActive("alioss.bucket", "storage", "alioss", "AliOSS bucket", "AliOSS bucket name.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("AliOSS") }, func() any { return conf.AliOSSSetting.Bucket }, func() any { return bootstrapConfig.AliOSS.Bucket }, validateTrimmedMax("alioss.bucket", 255), func(v any) { conf.AliOSSSetting.Bucket = v.(string) }), + stringDefWithActive("alioss.domain", "storage", "alioss", "AliOSS domain", "AliOSS public domain.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("AliOSS") }, func() any { return conf.AliOSSSetting.Domain }, func() any { return bootstrapConfig.AliOSS.Domain }, validateTrimmedMax("alioss.domain", 255), func(v any) { conf.AliOSSSetting.Domain = v.(string) }), + + stringDefWithActive("cos.secret_id", "storage", "cos", "COS secret ID", "Tencent COS secret ID.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("COS") }, func() any { return conf.COSSetting.SecretID }, func() any { return bootstrapConfig.COS.SecretID }, validateTrimmedMax("cos.secret_id", 255), func(v any) { conf.COSSetting.SecretID = v.(string) }), + stringDefWithActive("cos.secret_key", "storage", "cos", "COS secret key", "Tencent COS secret key.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("COS") }, func() any { return conf.COSSetting.SecretKey }, func() any { return bootstrapConfig.COS.SecretKey }, validateTrimmedMax("cos.secret_key", 512), func(v any) { conf.COSSetting.SecretKey = v.(string) }), + stringDefWithActive("cos.region", "storage", "cos", "COS region", "Tencent COS region.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("COS") }, func() any { return conf.COSSetting.Region }, func() any { return bootstrapConfig.COS.Region }, validateTrimmedMax("cos.region", 255), func(v any) { conf.COSSetting.Region = v.(string) }), + stringDefWithActive("cos.bucket", "storage", "cos", "COS bucket", "Tencent COS bucket.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("COS") }, func() any { return conf.COSSetting.Bucket }, func() any { return bootstrapConfig.COS.Bucket }, validateTrimmedMax("cos.bucket", 255), func(v any) { conf.COSSetting.Bucket = v.(string) }), + stringDefWithActive("cos.domain", "storage", "cos", "COS domain", "Tencent COS public domain.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("COS") }, func() any { return conf.COSSetting.Domain }, func() any { return bootstrapConfig.COS.Domain }, validateTrimmedMax("cos.domain", 255), func(v any) { conf.COSSetting.Domain = v.(string) }), + + stringDefWithActive("huawei_obs.access_key", "storage", "huawei_obs", "Huawei OBS access key", "Huawei OBS access key.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("HuaweiOBS") }, func() any { return conf.HuaweiOBSSetting.AccessKey }, func() any { return bootstrapConfig.HuaweiOBS.AccessKey }, validateTrimmedMax("huawei_obs.access_key", 255), func(v any) { conf.HuaweiOBSSetting.AccessKey = v.(string) }), + stringDefWithActive("huawei_obs.secret_key", "storage", "huawei_obs", "Huawei OBS secret key", "Huawei OBS secret key.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("HuaweiOBS") }, func() any { return conf.HuaweiOBSSetting.SecretKey }, func() any { return bootstrapConfig.HuaweiOBS.SecretKey }, validateTrimmedMax("huawei_obs.secret_key", 512), func(v any) { conf.HuaweiOBSSetting.SecretKey = v.(string) }), + stringDefWithActive("huawei_obs.endpoint", "storage", "huawei_obs", "Huawei OBS endpoint", "Huawei OBS endpoint.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("HuaweiOBS") }, func() any { return conf.HuaweiOBSSetting.Endpoint }, func() any { return bootstrapConfig.HuaweiOBS.Endpoint }, validateTrimmedMax("huawei_obs.endpoint", 255), func(v any) { conf.HuaweiOBSSetting.Endpoint = v.(string) }), + stringDefWithActive("huawei_obs.bucket", "storage", "huawei_obs", "Huawei OBS bucket", "Huawei OBS bucket.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("HuaweiOBS") }, func() any { return conf.HuaweiOBSSetting.Bucket }, func() any { return bootstrapConfig.HuaweiOBS.Bucket }, validateTrimmedMax("huawei_obs.bucket", 255), func(v any) { conf.HuaweiOBSSetting.Bucket = v.(string) }), + stringDefWithActive("huawei_obs.domain", "storage", "huawei_obs", "Huawei OBS domain", "Huawei OBS public domain.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("HuaweiOBS") }, func() any { return conf.HuaweiOBSSetting.Domain }, func() any { return bootstrapConfig.HuaweiOBS.Domain }, validateTrimmedMax("huawei_obs.domain", 255), func(v any) { conf.HuaweiOBSSetting.Domain = v.(string) }), + + stringDefWithActive("sms_juhe.gateway", "notifications", "sms_juhe", "SMS gateway", "Juhe SMS gateway URL.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Sms") }, func() any { return conf.SmsJuheSetting.Gateway }, func() any { return bootstrapConfig.SmsJuhe.Gateway }, validateTrimmedMax("sms_juhe.gateway", 255), func(v any) { conf.SmsJuheSetting.Gateway = v.(string) }), + stringDefWithActive("sms_juhe.key", "notifications", "sms_juhe", "SMS key", "Juhe SMS key.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("Sms") }, func() any { return conf.SmsJuheSetting.Key }, func() any { return bootstrapConfig.SmsJuhe.Key }, validateTrimmedMax("sms_juhe.key", 255), func(v any) { conf.SmsJuheSetting.Key = v.(string) }), + stringDefWithActive("sms_juhe.tpl_id", "notifications", "sms_juhe", "SMS template ID", "Juhe SMS template ID.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Sms") }, func() any { return conf.SmsJuheSetting.TplID }, func() any { return bootstrapConfig.SmsJuhe.TplID }, validateTrimmedMax("sms_juhe.tpl_id", 255), func(v any) { conf.SmsJuheSetting.TplID = v.(string) }), + stringDefWithActive("sms_juhe.tpl_val", "notifications", "sms_juhe", "SMS template value", "Juhe SMS template value format.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Sms") }, func() any { return conf.SmsJuheSetting.TplVal }, func() any { return bootstrapConfig.SmsJuhe.TplVal }, validateTrimmedMax("sms_juhe.tpl_val", 255), func(v any) { conf.SmsJuheSetting.TplVal = v.(string) }), + + stringDefWithActive("alipay.app_id", "payments", "alipay", "Alipay app ID", "Alipay application ID.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Alipay") }, func() any { return conf.AlipaySetting.AppID }, func() any { return bootstrapConfig.Alipay.AppID }, validateTrimmedMax("alipay.app_id", 255), func(v any) { conf.AlipaySetting.AppID = v.(string) }), + stringDefWithActive("alipay.private_key", "payments", "alipay", "Alipay private key", "Alipay private key PEM content.", ApplyModeRestartRequired, true, true, nil, func() bool { return cfg.If("Alipay") }, func() any { return conf.AlipaySetting.PrivateKey }, func() any { return bootstrapConfig.Alipay.PrivateKey }, validateTrimmedMax("alipay.private_key", 8192), func(v any) { conf.AlipaySetting.PrivateKey = v.(string) }), + stringDefWithActive("alipay.root_cert_file", "payments", "alipay", "Alipay root cert file", "Path to the Alipay root certificate file.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Alipay") }, func() any { return conf.AlipaySetting.RootCertFile }, func() any { return bootstrapConfig.Alipay.RootCertFile }, validateTrimmedMax("alipay.root_cert_file", 1024), func(v any) { conf.AlipaySetting.RootCertFile = v.(string) }), + stringDefWithActive("alipay.public_cert_file", "payments", "alipay", "Alipay public cert file", "Path to the Alipay public certificate file.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Alipay") }, func() any { return conf.AlipaySetting.PublicCertFile }, func() any { return bootstrapConfig.Alipay.PublicCertFile }, validateTrimmedMax("alipay.public_cert_file", 1024), func(v any) { conf.AlipaySetting.PublicCertFile = v.(string) }), + stringDefWithActive("alipay.app_public_cert_file", "payments", "alipay", "Alipay app public cert file", "Path to the app public certificate file.", ApplyModeRestartRequired, false, true, nil, func() bool { return cfg.If("Alipay") }, func() any { return conf.AlipaySetting.AppPublicCertFile }, func() any { return bootstrapConfig.Alipay.AppPublicCertFile }, validateTrimmedMax("alipay.app_public_cert_file", 1024), func(v any) { conf.AlipaySetting.AppPublicCertFile = v.(string) }), + boolDefWithActive("alipay.in_production", "payments", "alipay", "Alipay production mode", "Use Alipay production environment.", ApplyModeRestartRequired, false, true, func() bool { return cfg.If("Alipay") }, func() any { return conf.AlipaySetting.InProduction }, func() any { return bootstrapConfig.Alipay.InProduction }, func(v any) { conf.AlipaySetting.InProduction = v.(bool) }), + } +} + +func registryMap() map[string]Definition { + defs := Registry() + res := make(map[string]Definition, len(defs)) + for _, def := range defs { + res[def.Key] = def + } + return res +} + +func boolDef(key, group, section, label, description string, applyMode ApplyMode, secret, editable bool, current func() any, bootstrap func() any, apply func(any)) Definition { + return boolDefWithActive(key, group, section, label, description, applyMode, secret, editable, func() bool { return true }, current, bootstrap, apply) +} + +func boolDefWithActive(key, group, section, label, description string, applyMode ApplyMode, secret, editable bool, active func() bool, current func() any, bootstrap func() any, apply func(any)) Definition { + return Definition{Key: key, Group: group, Section: section, Type: TypeBool, Label: label, Description: description, ApplyMode: applyMode, Secret: secret, Readonly: !editable, Active: active, CurrentValue: current, BootstrapDefault: bootstrap, ValidateValue: func(v any) (any, error) { + b, ok := v.(bool) + if !ok { + return nil, invalidType(key, "bool") + } + return b, nil + }, BootstrapOverride: apply} +} + +func intDef(key, group, section, label, description string, applyMode ApplyMode, secret, editable bool, current func() any, bootstrap func() any, validator func(int) error, apply func(any)) Definition { + return Definition{Key: key, Group: group, Section: section, Type: TypeInt, Label: label, Description: description, ApplyMode: applyMode, Secret: secret, Readonly: !editable, Active: func() bool { return true }, CurrentValue: current, BootstrapDefault: bootstrap, ValidateValue: func(v any) (any, error) { + i, ok := asInt(v) + if !ok { + return nil, invalidType(key, "int") + } + if validator != nil { + if err := validator(i); err != nil { + return nil, err + } + } + return i, nil + }, BootstrapOverride: apply} +} + +func int64Def(key, group, section, label, description string, applyMode ApplyMode, current func() any, bootstrap func() any, validator func(int64) error, apply func(any)) Definition { + return Definition{Key: key, Group: group, Section: section, Type: TypeInt, Label: label, Description: description, ApplyMode: applyMode, Active: func() bool { return true }, CurrentValue: current, BootstrapDefault: bootstrap, ValidateValue: func(v any) (any, error) { + i, ok := asInt64(v) + if !ok { + return nil, invalidType(key, "int") + } + if validator != nil { + if err := validator(i); err != nil { + return nil, err + } + } + return i, nil + }, BootstrapOverride: apply} +} + +func floatDef(key, group, section, label, description string, applyMode ApplyMode, current func() any, bootstrap func() any, validator func(float64) error, apply func(any)) Definition { + return Definition{Key: key, Group: group, Section: section, Type: TypeFloat, Label: label, Description: description, ApplyMode: applyMode, Active: func() bool { return true }, CurrentValue: current, BootstrapDefault: bootstrap, ValidateValue: func(v any) (any, error) { + f, ok := asFloat64(v) + if !ok { + return nil, invalidType(key, "float") + } + if validator != nil { + if err := validator(f); err != nil { + return nil, err + } + } + return f, nil + }, BootstrapOverride: apply} +} + +func stringDef(key, group, section, label, description string, applyMode ApplyMode, secret, editable bool, options []Option, current func() any, bootstrap func() any, validator func(string) error, apply func(any)) Definition { + return stringDefWithActive(key, group, section, label, description, applyMode, secret, editable, options, func() bool { return true }, current, bootstrap, validator, apply) +} + +func stringDefWithActive(key, group, section, label, description string, applyMode ApplyMode, secret, editable bool, options []Option, active func() bool, current func() any, bootstrap func() any, validator func(string) error, apply func(any)) Definition { + return Definition{Key: key, Group: group, Section: section, Type: TypeString, Label: label, Description: description, ApplyMode: applyMode, Secret: secret, Readonly: !editable, Options: options, Active: active, CurrentValue: current, BootstrapDefault: bootstrap, ValidateValue: func(v any) (any, error) { + s, ok := v.(string) + if !ok { + return nil, invalidType(key, "string") + } + s = strings.TrimSpace(s) + if validator != nil { + if err := validator(s); err != nil { + return nil, err + } + } + return s, nil + }, BootstrapOverride: apply} +} + +func validateVisibility(v string) error { + for _, option := range visibilityOption { + if option.Value == v { + return nil + } + } + return xerror.InvalidParams.WithDetails("default_tweet_visibility must be one of public/following/friend/private") +} + +func validateRequiredTrimmed(name string, max int) func(string) error { + return func(v string) error { + if v == "" { + return xerror.InvalidParams.WithDetails(name + " must not be empty") + } + if len(v) > max { + return xerror.InvalidParams.WithDetails(fmt.Sprintf("%s length must be <= %d", name, max)) + } + return nil + } +} + +func validateTrimmedMax(name string, max int) func(string) error { + return func(v string) error { + if len(v) > max { + return xerror.InvalidParams.WithDetails(fmt.Sprintf("%s length must be <= %d", name, max)) + } + return nil + } +} + +func validateOptionalURL(name string, max int) func(string) error { + return func(v string) error { + if len(v) > max { + return xerror.InvalidParams.WithDetails(fmt.Sprintf("%s length must be <= %d", name, max)) + } + if v == "" { + return nil + } + parsed, err := url.ParseRequestURI(v) + if err != nil || parsed.Scheme == "" || parsed.Host == "" { + return xerror.InvalidParams.WithDetails(name + " must be a valid URL") + } + return nil + } +} + +func between(v, min, max int, name string) error { + if v < min || v > max { + return xerror.InvalidParams.WithDetails(fmt.Sprintf("%s must be between %d and %d", name, min, max)) + } + return nil +} + +func betweenInt64(v, min, max int64, name string) error { + if v < min || v > max { + return xerror.InvalidParams.WithDetails(fmt.Sprintf("%s must be between %d and %d", name, min, max)) + } + return nil +} + +func invalidType(key, want string) error { + return xerror.InvalidParams.WithDetails(fmt.Sprintf("%s must be %s", key, want)) +} + +func asInt(v any) (int, bool) { + switch n := v.(type) { + case int: + return n, true + case int32: + return int(n), true + case int64: + return int(n), true + case float64: + if n != float64(int(n)) { + return 0, false + } + return int(n), true + default: + return 0, false + } +} + +func asInt64(v any) (int64, bool) { + switch n := v.(type) { + case int: + return int64(n), true + case int32: + return int64(n), true + case int64: + return n, true + case float64: + if n != float64(int64(n)) { + return 0, false + } + return int64(n), true + default: + return 0, false + } +} + +func asFloat64(v any) (float64, bool) { + switch n := v.(type) { + case float64: + return n, true + case float32: + return float64(n), true + case int: + return float64(n), true + case int64: + return float64(n), true + default: + return 0, false + } +} + +func parseRequestValue(def Definition, raw stdjson.RawMessage) (any, error) { + var target any + switch def.Type { + case TypeBool: + var v bool + if err := stdjson.Unmarshal(raw, &v); err != nil { + return nil, invalidType(def.Key, "bool") + } + target = v + case TypeInt: + var v float64 + if err := stdjson.Unmarshal(raw, &v); err != nil { + return nil, invalidType(def.Key, "int") + } + target = v + case TypeFloat: + var v float64 + if err := stdjson.Unmarshal(raw, &v); err != nil { + return nil, invalidType(def.Key, "float") + } + target = v + case TypeString: + var v string + if err := stdjson.Unmarshal(raw, &v); err != nil { + return nil, invalidType(def.Key, "string") + } + target = v + default: + return nil, xerror.ServerError.WithDetails("unsupported settings type") + } + return def.ValidateValue(target) +} + +func parseStoredValue(def Definition, raw string) (any, error) { + switch def.Type { + case TypeBool: + return strconv.ParseBool(raw) + case TypeInt: + if i, err := strconv.ParseInt(raw, 10, 64); err == nil { + return def.ValidateValue(i) + } else { + return nil, err + } + case TypeFloat: + if f, err := strconv.ParseFloat(raw, 64); err == nil { + return def.ValidateValue(f) + } else { + return nil, err + } + case TypeString: + return def.ValidateValue(raw) + default: + return nil, xerror.ServerError.WithDetails("unsupported settings type") + } +} + +func serializeValue(def Definition, value any) string { + switch def.Type { + case TypeBool: + return strconv.FormatBool(value.(bool)) + case TypeInt: + switch v := value.(type) { + case int: + return strconv.Itoa(v) + case int64: + return strconv.FormatInt(v, 10) + default: + return fmt.Sprintf("%v", value) + } + case TypeFloat: + return strconv.FormatFloat(value.(float64), 'f', -1, 64) + default: + return value.(string) + } +} + +func valuesEqual(left, right any) bool { + return fmt.Sprintf("%v", left) == fmt.Sprintf("%v", right) +} + +func activeState(def Definition) bool { + if def.Active == nil { + return true + } + return def.Active() +} + +func maxInt(a, b int) int { + if a > b { + return a + } + return b +} + +func logBootstrapApplyError(def Definition, err error) { + logrus.WithError(err).WithField("key", def.Key).Warn("sitesetting: skip invalid persisted override") +} diff --git a/internal/sitesetting/service.go b/internal/sitesetting/service.go new file mode 100644 index 00000000..575e6a3a --- /dev/null +++ b/internal/sitesetting/service.go @@ -0,0 +1,486 @@ +// Copyright 2026 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +package sitesetting + +import ( + "context" + stdjson "encoding/json" + "errors" + "strings" + "time" + + "github.com/rocboss/paopao-ce/internal/conf" + "github.com/rocboss/paopao-ce/internal/model/web" + "github.com/rocboss/paopao-ce/pkg/xerror" + "github.com/sirupsen/logrus" + "gorm.io/gorm" + "gorm.io/gorm/clause" +) + +type EditableProfile struct { + UseFriendship bool + EnableTrendsBar bool + EnableWallet bool + AllowTweetAttachment bool + AllowTweetAttachmentPrice bool + AllowTweetVideo bool + DefaultTweetMaxLength int + TweetWebEllipsisSize int + TweetMobileEllipsisSize int + DefaultTweetVisibility string + DefaultMsgLoopInterval int + CopyrightTop string + CopyrightLeft string + CopyrightLeftLink string + CopyrightRight string + CopyrightRightLink string +} + +type settingRecord struct { + Key string `gorm:"column:key;type:varchar(191);primaryKey"` + Value string `gorm:"column:value;type:text;not null"` + IsEncrypted bool `gorm:"column:is_encrypted;not null"` + CreatedOn int64 `gorm:"column:created_on;not null"` + ModifiedOn int64 `gorm:"column:modified_on;not null"` + DeletedOn int64 `gorm:"column:deleted_on;not null"` + IsDel int8 `gorm:"column:is_del;not null"` +} + +func (settingRecord) TableName() string { + if conf.DatabaseSetting == nil { + return "p_" + conf.TableSiteSettings + } + return conf.DatabaseSetting.TablePrefix + conf.TableSiteSettings +} + +func (r *settingRecord) BeforeCreate(_ *gorm.DB) error { + now := time.Now().Unix() + r.CreatedOn = now + r.ModifiedOn = now + return nil +} + +func (r *settingRecord) BeforeUpdate(tx *gorm.DB) error { + if !tx.Statement.Changed("modified_on") { + r.ModifiedOn = time.Now().Unix() + } + return nil +} + +type Service struct { + db *gorm.DB + registry map[string]Definition + codec *secretCodec +} + +func NewService(db *gorm.DB) *Service { + ensureBootstrapSnapshot() + return &Service{db: db, registry: registryMap(), codec: newSecretCodec()} +} + +func Bootstrap(ctx context.Context, db *gorm.DB) { + ensureBootstrapSnapshot() + if db == nil { + return + } + if err := NewService(db).ApplyPersistedOverrides(ctx); err != nil { + logrus.WithError(err).Warn("sitesetting: bootstrap override load failed; using bootstrap config only") + } +} + +func (s *Service) ApplyPersistedOverrides(ctx context.Context) error { + records, err := s.loadOverridesLenient(ctx) + if err != nil { + return err + } + for key, record := range records { + def, ok := s.registry[key] + if !ok || def.BootstrapOverride == nil || def.ApplyMode == ApplyModeBootstrapOnly { + continue + } + value, err := s.parseRecord(def, record) + if err != nil { + logBootstrapApplyError(def, err) + continue + } + def.BootstrapOverride(value) + } + return nil +} + +func (s *Service) GetProfile(ctx context.Context) (*web.SiteProfileResp, error) { + _ = ctx + return &web.SiteProfileResp{ + UseFriendship: conf.WebProfileSetting.UseFriendship, + EnableTrendsBar: conf.WebProfileSetting.EnableTrendsBar, + EnableWallet: conf.WebProfileSetting.EnableWallet, + AllowTweetAttachment: conf.WebProfileSetting.AllowTweetAttachment, + AllowTweetAttachmentPrice: conf.WebProfileSetting.AllowTweetAttachmentPrice, + AllowTweetVideo: conf.WebProfileSetting.AllowTweetVideo, + AllowUserRegister: conf.WebProfileSetting.AllowUserRegister, + AllowPhoneBind: conf.WebProfileSetting.AllowPhoneBind, + DefaultTweetMaxLength: conf.WebProfileSetting.DefaultTweetMaxLength, + TweetWebEllipsisSize: conf.WebProfileSetting.TweetWebEllipsisSize, + TweetMobileEllipsisSize: conf.WebProfileSetting.TweetMobileEllipsisSize, + DefaultTweetVisibility: conf.WebProfileSetting.DefaultTweetVisibility, + DefaultMsgLoopInterval: conf.WebProfileSetting.DefaultMsgLoopInterval, + CopyrightTop: conf.WebProfileSetting.CopyrightTop, + CopyrightLeft: conf.WebProfileSetting.CopyrightLeft, + CopyrightLeftLink: conf.WebProfileSetting.CopyrightLeftLink, + CopyrightRight: conf.WebProfileSetting.CopyrightRight, + CopyrightRightLink: conf.WebProfileSetting.CopyrightRightLink, + }, nil +} + +func (s *Service) UpdateEditableProfile(ctx context.Context, input EditableProfile) (*web.SiteProfileResp, error) { + if err := ValidateEditableProfile(input); err != nil { + return nil, err + } + items := []web.AdminSettingValueInput{ + {Key: "web_profile.use_friendship", Value: boolRaw(input.UseFriendship)}, + {Key: "web_profile.enable_trends_bar", Value: boolRaw(input.EnableTrendsBar)}, + {Key: "web_profile.enable_wallet", Value: boolRaw(input.EnableWallet)}, + {Key: "web_profile.allow_tweet_attachment", Value: boolRaw(input.AllowTweetAttachment)}, + {Key: "web_profile.allow_tweet_attachment_price", Value: boolRaw(input.AllowTweetAttachmentPrice)}, + {Key: "web_profile.allow_tweet_video", Value: boolRaw(input.AllowTweetVideo)}, + {Key: "web_profile.default_tweet_max_length", Value: intRaw(input.DefaultTweetMaxLength)}, + {Key: "web_profile.tweet_web_ellipsis_size", Value: intRaw(input.TweetWebEllipsisSize)}, + {Key: "web_profile.tweet_mobile_ellipsis_size", Value: intRaw(input.TweetMobileEllipsisSize)}, + {Key: "web_profile.default_tweet_visibility", Value: stringRaw(input.DefaultTweetVisibility)}, + {Key: "web_profile.default_msg_loop_interval", Value: intRaw(input.DefaultMsgLoopInterval)}, + {Key: "web_profile.copyright_top", Value: stringRaw(input.CopyrightTop)}, + {Key: "web_profile.copyright_left", Value: stringRaw(input.CopyrightLeft)}, + {Key: "web_profile.copyright_left_link", Value: stringRaw(input.CopyrightLeftLink)}, + {Key: "web_profile.copyright_right", Value: stringRaw(input.CopyrightRight)}, + {Key: "web_profile.copyright_right_link", Value: stringRaw(input.CopyrightRightLink)}, + } + if _, err := s.SaveValues(ctx, items); err != nil { + return nil, err + } + return s.GetProfile(ctx) +} + +func (s *Service) GetSchema() (*web.AdminSettingsSchemaResp, error) { + items := make([]web.AdminSettingSchemaItem, 0, len(s.registry)) + for _, def := range Registry() { + item := web.AdminSettingSchemaItem{ + Key: def.Key, + Group: def.Group, + Section: def.Section, + Type: string(def.Type), + Label: def.Label, + Description: def.Description, + ApplyMode: string(def.ApplyMode), + Secret: def.Secret, + Readonly: def.Readonly, + Active: activeState(def), + Options: def.Options, + } + bootstrap := def.BootstrapDefault() + if def.Secret { + item.BootstrapConfigured = configuredValue(bootstrap) + } else { + item.BootstrapValue = bootstrap + } + items = append(items, item) + } + return &web.AdminSettingsSchemaResp{Items: items}, nil +} + +func (s *Service) GetValues(ctx context.Context) (*web.AdminSettingsValuesResp, error) { + records, err := s.loadOverridesLenient(ctx) + if err != nil { + return nil, err + } + items, pending := s.buildValueItems(records) + return &web.AdminSettingsValuesResp{Items: items, HasPendingRestart: pending}, nil +} + +func (s *Service) SaveValues(ctx context.Context, inputs []web.AdminSettingValueInput) (*web.AdminSettingsSaveResp, error) { + if len(inputs) == 0 { + return nil, xerror.InvalidParams.WithDetails("items must not be empty") + } + prepared := make([]preparedValue, 0, len(inputs)) + seen := make(map[string]struct{}, len(inputs)) + for _, input := range inputs { + if len(input.Value) == 0 { + return nil, xerror.InvalidParams.WithDetails("missing setting value: " + input.Key) + } + def, ok := s.registry[input.Key] + if !ok { + return nil, xerror.InvalidParams.WithDetails("unknown setting key: " + input.Key) + } + if def.Readonly || def.ApplyMode == ApplyModeBootstrapOnly || def.BootstrapOverride == nil { + return nil, xerror.InvalidParams.WithDetails("setting is not editable: " + input.Key) + } + if _, ok := seen[input.Key]; ok { + return nil, xerror.InvalidParams.WithDetails("duplicate setting key: " + input.Key) + } + seen[input.Key] = struct{}{} + value, err := parseRequestValue(def, input.Value) + if err != nil { + return nil, err + } + prepared = append(prepared, preparedValue{Definition: def, Value: value}) + } + if err := validatePreparedBatch(prepared); err != nil { + return nil, err + } + if err := s.persistPrepared(ctx, prepared); err != nil { + return nil, err + } + for _, item := range prepared { + if item.ApplyMode == ApplyModeLive { + item.BootstrapOverride(item.Value) + } + } + values, err := s.GetValues(ctx) + if err != nil { + return nil, err + } + updatedKeys := make([]string, 0, len(prepared)) + for _, item := range prepared { + updatedKeys = append(updatedKeys, item.Key) + } + return &web.AdminSettingsSaveResp{Items: values.Items, UpdatedKeys: updatedKeys, HasPendingRestart: values.HasPendingRestart}, nil +} + +type preparedValue struct { + Definition + Value any +} + +func validatePreparedBatch(prepared []preparedValue) error { + defaultTweetMaxLength := preparedInt(prepared, "web_profile.default_tweet_max_length", conf.WebProfileSetting.DefaultTweetMaxLength) + tweetWebEllipsisSize := preparedInt(prepared, "web_profile.tweet_web_ellipsis_size", conf.WebProfileSetting.TweetWebEllipsisSize) + tweetMobileEllipsisSize := preparedInt(prepared, "web_profile.tweet_mobile_ellipsis_size", conf.WebProfileSetting.TweetMobileEllipsisSize) + defaultPageSize := preparedInt(prepared, "app.default_page_size", conf.AppSetting.DefaultPageSize) + maxPageSize := preparedInt(prepared, "app.max_page_size", conf.AppSetting.MaxPageSize) + + if tweetWebEllipsisSize < 1 || tweetWebEllipsisSize > defaultTweetMaxLength { + return xerror.InvalidParams.WithDetails("tweet_web_ellipsis_size must be between 1 and default_tweet_max_length") + } + if tweetMobileEllipsisSize < 1 || tweetMobileEllipsisSize > defaultTweetMaxLength { + return xerror.InvalidParams.WithDetails("tweet_mobile_ellipsis_size must be between 1 and default_tweet_max_length") + } + if defaultPageSize < 1 || defaultPageSize > maxPageSize { + return xerror.InvalidParams.WithDetails("default_page_size must be between 1 and max_page_size") + } + return nil +} + +func preparedInt(prepared []preparedValue, key string, fallback int) int { + for _, item := range prepared { + if item.Key == key { + if value, ok := item.Value.(int); ok { + return value + } + break + } + } + return fallback +} + +func (s *Service) persistPrepared(ctx context.Context, prepared []preparedValue) error { + return s.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + for _, item := range prepared { + serialized := serializeValue(item.Definition, item.Value) + if valuesEqual(item.BootstrapDefault(), item.Value) { + if err := tx.Where("key = ?", item.Key).Delete(&settingRecord{}).Error; err != nil { + return err + } + continue + } + storedValue := serialized + isEncrypted := false + if item.Secret { + encrypted, err := s.codec.Encrypt(serialized) + if err != nil { + return err + } + storedValue = encrypted + isEncrypted = true + } + record := settingRecord{Key: item.Key, Value: storedValue, IsEncrypted: isEncrypted} + if err := tx.Clauses(clause.OnConflict{Columns: []clause.Column{{Name: "key"}}, DoUpdates: clause.AssignmentColumns([]string{"value", "is_encrypted", "modified_on", "deleted_on", "is_del"})}).Create(&record).Error; err != nil { + return err + } + } + return nil + }) +} + +func (s *Service) buildValueItems(records map[string]settingRecord) ([]web.AdminSettingValue, bool) { + items := make([]web.AdminSettingValue, 0, len(s.registry)) + hasPendingRestart := false + for _, def := range Registry() { + current := def.CurrentValue() + item := web.AdminSettingValue{Key: def.Key, Source: "bootstrap", Active: activeState(def)} + if def.Secret { + item.Configured = configuredValue(current) + } else { + item.Value = current + item.EffectiveValue = current + } + if record, ok := records[def.Key]; ok { + storedValue, err := s.parseRecord(def, record) + if err == nil { + item.Source = "override" + if def.Secret { + item.Configured = configuredValue(storedValue) + } else { + item.Value = storedValue + item.EffectiveValue = current + } + if def.ApplyMode == ApplyModeRestartRequired && !valuesEqual(storedValue, current) { + item.PendingRestart = true + hasPendingRestart = true + } + } + } + if def.Secret && item.Source == "bootstrap" { + item.Configured = configuredValue(def.BootstrapDefault()) + } + items = append(items, item) + } + return items, hasPendingRestart +} + +func (s *Service) parseRecord(def Definition, record settingRecord) (any, error) { + raw := record.Value + if record.IsEncrypted { + decrypted, err := s.codec.Decrypt(record.Value) + if err != nil { + return nil, err + } + raw = decrypted + } + return parseStoredValue(def, raw) +} + +func (s *Service) loadOverrides(ctx context.Context) (map[string]settingRecord, error) { + var records []settingRecord + err := s.db.WithContext(ctx).Where("is_del = ?", 0).Find(&records).Error + if err != nil { + return nil, err + } + res := make(map[string]settingRecord, len(records)) + for _, record := range records { + res[record.Key] = record + } + return res, nil +} + +func (s *Service) loadOverridesLenient(ctx context.Context) (map[string]settingRecord, error) { + records, err := s.loadOverrides(ctx) + if err != nil { + if isMissingTableError(err) { + logrus.WithError(err).Warn("sitesetting: overrides table unavailable; falling back to bootstrap values") + return map[string]settingRecord{}, nil + } + return nil, err + } + return records, nil +} + +func isMissingTableError(err error) bool { + if err == nil { + return false + } + text := strings.ToLower(err.Error()) + return strings.Contains(text, "no such table") || strings.Contains(text, "doesn't exist") || strings.Contains(text, "does not exist") || errors.Is(err, gorm.ErrRecordNotFound) +} + +func configuredValue(v any) bool { + switch value := v.(type) { + case nil: + return false + case string: + return strings.TrimSpace(value) != "" + default: + return true + } +} + +func boolRaw(v bool) []byte { + b, _ := stdjson.Marshal(v) + return b +} + +func intRaw(v int) []byte { + b, _ := stdjson.Marshal(v) + return b +} + +func stringRaw(v string) []byte { + b, _ := stdjson.Marshal(strings.TrimSpace(v)) + return b +} + +func ValidateEditableProfile(input EditableProfile) error { + return validateProfileInput(input) +} + +func validateProfileInput(input EditableProfile) error { + if err := between(input.DefaultTweetMaxLength, 1, 2000, "default_tweet_max_length"); err != nil { + return err + } + if err := between(input.TweetWebEllipsisSize, 1, input.DefaultTweetMaxLength, "tweet_web_ellipsis_size"); err != nil { + return err + } + if err := between(input.TweetMobileEllipsisSize, 1, input.DefaultTweetMaxLength, "tweet_mobile_ellipsis_size"); err != nil { + return err + } + if err := between(input.DefaultMsgLoopInterval, 1000, 60000, "default_msg_loop_interval"); err != nil { + return err + } + if err := validateVisibility(strings.TrimSpace(input.DefaultTweetVisibility)); err != nil { + return err + } + if err := validateRequiredTrimmed("copyright_top", 255)(input.CopyrightTop); err != nil { + return err + } + if err := validateRequiredTrimmed("copyright_left", 255)(input.CopyrightLeft); err != nil { + return err + } + if err := validateRequiredTrimmed("copyright_right", 255)(input.CopyrightRight); err != nil { + return err + } + if err := validateOptionalURL("copyright_left_link", 255)(input.CopyrightLeftLink); err != nil { + return err + } + if err := validateOptionalURL("copyright_right_link", 255)(input.CopyrightRightLink); err != nil { + return err + } + return nil +} + +func EditableFromRequest(req *web.SiteSettingsReq) EditableProfile { + return EditableProfile{ + UseFriendship: *req.UseFriendship, + EnableTrendsBar: *req.EnableTrendsBar, + EnableWallet: *req.EnableWallet, + AllowTweetAttachment: *req.AllowTweetAttachment, + AllowTweetAttachmentPrice: *req.AllowTweetAttachmentPrice, + AllowTweetVideo: *req.AllowTweetVideo, + DefaultTweetMaxLength: *req.DefaultTweetMaxLength, + TweetWebEllipsisSize: *req.TweetWebEllipsisSize, + TweetMobileEllipsisSize: *req.TweetMobileEllipsisSize, + DefaultTweetVisibility: *req.DefaultTweetVisibility, + DefaultMsgLoopInterval: *req.DefaultMsgLoopInterval, + CopyrightTop: *req.CopyrightTop, + CopyrightLeft: *req.CopyrightLeft, + CopyrightLeftLink: stringValue(req.CopyrightLeftLink), + CopyrightRight: *req.CopyrightRight, + CopyrightRightLink: stringValue(req.CopyrightRightLink), + } +} + +func stringValue(v *string) string { + if v == nil { + return "" + } + return *v +} diff --git a/internal/sitesetting/service_test.go b/internal/sitesetting/service_test.go new file mode 100644 index 00000000..d1e58097 --- /dev/null +++ b/internal/sitesetting/service_test.go @@ -0,0 +1,222 @@ +package sitesetting + +import ( + "context" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/rocboss/paopao-ce/internal/conf" + "github.com/rocboss/paopao-ce/internal/model/web" + "gorm.io/driver/sqlite" + "gorm.io/gorm" + "gorm.io/gorm/schema" +) + +func TestGetProfileUsesBootstrapDefaultsWhenNoOverride(t *testing.T) { + svc := newTestService(t) + + profile, err := svc.GetProfile(context.Background()) + if err != nil { + t.Fatalf("GetProfile() error = %v", err) + } + if !profile.AllowUserRegister { + t.Fatalf("AllowUserRegister = false, want bootstrap true") + } + if profile.DefaultTweetVisibility != "friend" { + t.Fatalf("DefaultTweetVisibility = %q, want friend", profile.DefaultTweetVisibility) + } + if profile.CopyrightRight != "fallback-right" { + t.Fatalf("CopyrightRight = %q, want fallback-right", profile.CopyrightRight) + } +} + +func TestUpdateEditableProfilePersistsOnlyEditableKeys(t *testing.T) { + svc := newTestService(t) + + profile, err := svc.UpdateEditableProfile(context.Background(), EditableProfile{ + UseFriendship: false, + EnableTrendsBar: true, + EnableWallet: true, + AllowTweetAttachment: false, + AllowTweetAttachmentPrice: false, + AllowTweetVideo: false, + DefaultTweetMaxLength: 1200, + TweetWebEllipsisSize: 300, + TweetMobileEllipsisSize: 200, + DefaultTweetVisibility: "public", + DefaultMsgLoopInterval: 3000, + CopyrightTop: "top", + CopyrightLeft: "left", + CopyrightLeftLink: "https://left.example.com", + CopyrightRight: "right", + CopyrightRightLink: "https://right.example.com", + }) + if err != nil { + t.Fatalf("UpdateEditableProfile() error = %v", err) + } + if !profile.AllowUserRegister { + t.Fatalf("AllowUserRegister = false, want bootstrap true") + } + if !profile.AllowPhoneBind { + t.Fatalf("AllowPhoneBind = false, want bootstrap true") + } + if profile.DefaultTweetVisibility != "public" { + t.Fatalf("DefaultTweetVisibility = %q, want public", profile.DefaultTweetVisibility) + } + values, err := svc.GetValues(context.Background()) + if err != nil { + t.Fatalf("GetValues() error = %v", err) + } + if !hasValue(values.Items, "web_profile.enable_wallet", true, false) { + t.Fatalf("web_profile.enable_wallet override not found") + } +} + +func TestSaveValuesEncryptsSecretsAtRest(t *testing.T) { + svc := newTestService(t) + conf.AdminSettingsSetting.EncryptionKey = "bootstrap-test-encryption-key" + svc.codec = newSecretCodec() + + _, err := svc.SaveValues(context.Background(), []web.AdminSettingValueInput{{ + Key: "meili.api_key", + Value: []byte(`"top-secret-key"`), + }}) + if err != nil { + t.Fatalf("SaveValues() error = %v", err) + } + var record settingRecord + if err := svc.db.WithContext(context.Background()).First(&record, "key = ?", "meili.api_key").Error; err != nil { + t.Fatalf("load record error = %v", err) + } + if !record.IsEncrypted { + t.Fatalf("IsEncrypted = false, want true") + } + if strings.Contains(record.Value, "top-secret-key") { + t.Fatalf("record.Value stored plaintext = %q", record.Value) + } +} + +func TestRestartRequiredValuesReportPendingRestart(t *testing.T) { + svc := newTestService(t) + + resp, err := svc.SaveValues(context.Background(), []web.AdminSettingValueInput{{ + Key: "meili.host", + Value: []byte(`"pending-restart:7700"`), + }}) + if err != nil { + t.Fatalf("SaveValues() error = %v", err) + } + if !resp.HasPendingRestart { + t.Fatal("HasPendingRestart = false, want true") + } + if !hasValue(resp.Items, "meili.host", "pending-restart:7700", true) { + t.Fatalf("meili.host pending_restart not reported") + } +} + +func TestSaveValuesRejectsInvalidSingleIntUpdate(t *testing.T) { + svc := newTestService(t) + + _, err := svc.SaveValues(context.Background(), []web.AdminSettingValueInput{{ + Key: "web_profile.default_tweet_max_length", + Value: []byte(`120`), + }}) + if err == nil { + t.Fatal("SaveValues() error = nil, want invalid params error") + } +} + +func TestSaveValuesAcceptsCoupledProfileUpdate(t *testing.T) { + svc := newTestService(t) + + resp, err := svc.SaveValues(context.Background(), []web.AdminSettingValueInput{ + {Key: "web_profile.default_tweet_max_length", Value: []byte(`120`)}, + {Key: "web_profile.tweet_web_ellipsis_size", Value: []byte(`120`)}, + {Key: "web_profile.tweet_mobile_ellipsis_size", Value: []byte(`120`)}, + }) + if err != nil { + t.Fatalf("SaveValues() error = %v", err) + } + if !hasValue(resp.Items, "web_profile.default_tweet_max_length", 120, false) { + t.Fatalf("web_profile.default_tweet_max_length override not found") + } + if conf.WebProfileSetting.DefaultTweetMaxLength != 120 { + t.Fatalf("DefaultTweetMaxLength = %d, want 120", conf.WebProfileSetting.DefaultTweetMaxLength) + } +} + +func TestBootstrapAppliesPersistedOverrides(t *testing.T) { + svc := newTestService(t) + conf.AdminSettingsSetting.EncryptionKey = "bootstrap-test-encryption-key" + svc.codec = newSecretCodec() + + _, err := svc.SaveValues(context.Background(), []web.AdminSettingValueInput{{ + Key: "web_profile.enable_wallet", + Value: []byte(`true`), + }}) + if err != nil { + t.Fatalf("SaveValues() error = %v", err) + } + conf.WebProfileSetting.EnableWallet = false + Bootstrap(context.Background(), svc.db) + if !conf.WebProfileSetting.EnableWallet { + t.Fatal("Bootstrap() did not apply persisted web_profile.enable_wallet override") + } +} + +func newTestService(t *testing.T) *Service { + t.Helper() + wd, err := os.Getwd() + if err != nil { + t.Fatalf("os.Getwd() error = %v", err) + } + root := filepath.Clean(filepath.Join(wd, "..", "..")) + if err := os.Chdir(root); err != nil { + t.Fatalf("os.Chdir(%q) error = %v", root, err) + } + t.Cleanup(func() { + _ = os.Chdir(wd) + }) + conf.Initial(nil, false) + conf.WebProfileSetting = &conf.WebProfileConf{ + UseFriendship: true, + EnableTrendsBar: false, + EnableWallet: false, + AllowTweetAttachment: true, + AllowTweetAttachmentPrice: true, + AllowTweetVideo: true, + AllowUserRegister: true, + AllowPhoneBind: true, + DefaultTweetMaxLength: 2000, + TweetWebEllipsisSize: 400, + TweetMobileEllipsisSize: 300, + DefaultTweetVisibility: "friend", + DefaultMsgLoopInterval: 5000, + CopyrightTop: "fallback-top", + CopyrightLeft: "fallback-left", + CopyrightLeftLink: "", + CopyrightRight: "fallback-right", + CopyrightRightLink: "https://fallback.example.com", + } + bootstrapConfig = nil + db, err := gorm.Open(sqlite.Open("file::memory:?cache=shared"), &gorm.Config{NamingStrategy: schema.NamingStrategy{TablePrefix: "p_", SingularTable: true}}) + if err != nil { + t.Fatalf("gorm.Open() error = %v", err) + } + if err := db.AutoMigrate(&settingRecord{}); err != nil { + t.Fatalf("AutoMigrate() error = %v", err) + } + return NewService(db) +} + +func hasValue(items []web.AdminSettingValue, key string, expected any, pending bool) bool { + for _, item := range items { + if item.Key != key { + continue + } + return item.Value == expected && item.PendingRestart == pending + } + return false +} diff --git a/mirc/web/v1/admin.go b/mirc/web/v1/admin.go index 87d43238..412360cc 100644 --- a/mirc/web/v1/admin.go +++ b/mirc/web/v1/admin.go @@ -11,6 +11,11 @@ type Admin struct { Schema `mir:"v1,chain"` // ChangeUserStatus 管理·禁言/解封用户 - ChangeUserStatus func(Post, web.ChangeUserStatusReq) `mir:"admin/user/status"` - SiteInfo func(Get, web.SiteInfoReq) web.SiteInfoResp `mir:"admin/site/status"` + ChangeUserStatus func(Post, web.ChangeUserStatusReq) `mir:"admin/user/status"` + SiteInfo func(Get, web.SiteInfoReq) web.SiteInfoResp `mir:"admin/site/status"` + GetSiteSettings func(Get) web.SiteSettingsResp `mir:"admin/site/profile"` + UpdateSiteSettings func(Post, web.SiteSettingsReq) web.SiteSettingsResp `mir:"admin/site/profile"` + GetSettingsSchema func(Get) web.AdminSettingsSchemaResp `mir:"admin/settings/schema"` + GetSettingsValues func(Get) web.AdminSettingsValuesResp `mir:"admin/settings/values"` + SaveSettings func(Post, web.AdminSettingsSaveReq) web.AdminSettingsSaveResp `mir:"admin/settings/save"` } diff --git a/scripts/migration/mysql/0016_site_settings.down.sql b/scripts/migration/mysql/0016_site_settings.down.sql new file mode 100644 index 00000000..43edce07 --- /dev/null +++ b/scripts/migration/mysql/0016_site_settings.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS `p_site_settings`; diff --git a/scripts/migration/mysql/0016_site_settings.up.sql b/scripts/migration/mysql/0016_site_settings.up.sql new file mode 100644 index 00000000..e2ec07eb --- /dev/null +++ b/scripts/migration/mysql/0016_site_settings.up.sql @@ -0,0 +1,24 @@ +CREATE TABLE `p_site_settings` ( + `id` BIGINT NOT NULL DEFAULT 1, + `use_friendship` TINYINT NOT NULL DEFAULT 0, + `enable_trends_bar` TINYINT NOT NULL DEFAULT 0, + `enable_wallet` TINYINT NOT NULL DEFAULT 0, + `allow_tweet_attachment` TINYINT NOT NULL DEFAULT 0, + `allow_tweet_attachment_price` TINYINT NOT NULL DEFAULT 0, + `allow_tweet_video` TINYINT NOT NULL DEFAULT 0, + `default_tweet_max_length` INT NOT NULL DEFAULT 2000, + `tweet_web_ellipsis_size` INT NOT NULL DEFAULT 400, + `tweet_mobile_ellipsis_size` INT NOT NULL DEFAULT 300, + `default_tweet_visibility` VARCHAR(32) NOT NULL DEFAULT 'friend', + `default_msg_loop_interval` INT NOT NULL DEFAULT 5000, + `copyright_top` VARCHAR(255) NOT NULL DEFAULT '', + `copyright_left` VARCHAR(255) NOT NULL DEFAULT '', + `copyright_left_link` VARCHAR(255) NOT NULL DEFAULT '', + `copyright_right` VARCHAR(255) NOT NULL DEFAULT '', + `copyright_right_link` VARCHAR(255) NOT NULL DEFAULT '', + `created_on` BIGINT NOT NULL DEFAULT 0, + `modified_on` BIGINT NOT NULL DEFAULT 0, + `deleted_on` BIGINT NOT NULL DEFAULT 0, + `is_del` TINYINT NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='站点配置'; diff --git a/scripts/migration/mysql/0017_settings_kv.down.sql b/scripts/migration/mysql/0017_settings_kv.down.sql new file mode 100644 index 00000000..ceb8d166 --- /dev/null +++ b/scripts/migration/mysql/0017_settings_kv.down.sql @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS `p_site_settings`; + +CREATE TABLE `p_site_settings` ( + `id` BIGINT NOT NULL DEFAULT 1, + `use_friendship` TINYINT NOT NULL DEFAULT 0, + `enable_trends_bar` TINYINT NOT NULL DEFAULT 0, + `enable_wallet` TINYINT NOT NULL DEFAULT 0, + `allow_tweet_attachment` TINYINT NOT NULL DEFAULT 0, + `allow_tweet_attachment_price` TINYINT NOT NULL DEFAULT 0, + `allow_tweet_video` TINYINT NOT NULL DEFAULT 0, + `default_tweet_max_length` INT NOT NULL DEFAULT 2000, + `tweet_web_ellipsis_size` INT NOT NULL DEFAULT 400, + `tweet_mobile_ellipsis_size` INT NOT NULL DEFAULT 300, + `default_tweet_visibility` VARCHAR(32) NOT NULL DEFAULT 'friend', + `default_msg_loop_interval` INT NOT NULL DEFAULT 5000, + `copyright_top` VARCHAR(255) NOT NULL DEFAULT '', + `copyright_left` VARCHAR(255) NOT NULL DEFAULT '', + `copyright_left_link` VARCHAR(255) NOT NULL DEFAULT '', + `copyright_right` VARCHAR(255) NOT NULL DEFAULT '', + `copyright_right_link` VARCHAR(255) NOT NULL DEFAULT '', + `created_on` BIGINT NOT NULL DEFAULT 0, + `modified_on` BIGINT NOT NULL DEFAULT 0, + `deleted_on` BIGINT NOT NULL DEFAULT 0, + `is_del` TINYINT NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='站点配置'; diff --git a/scripts/migration/mysql/0017_settings_kv.up.sql b/scripts/migration/mysql/0017_settings_kv.up.sql new file mode 100644 index 00000000..03181a55 --- /dev/null +++ b/scripts/migration/mysql/0017_settings_kv.up.sql @@ -0,0 +1,49 @@ +RENAME TABLE `p_site_settings` TO `p_site_settings_legacy`; + +CREATE TABLE `p_site_settings` ( + `key` VARCHAR(191) NOT NULL, + `value` TEXT NOT NULL, + `is_encrypted` TINYINT NOT NULL DEFAULT 0, + `created_on` BIGINT NOT NULL DEFAULT 0, + `modified_on` BIGINT NOT NULL DEFAULT 0, + `deleted_on` BIGINT NOT NULL DEFAULT 0, + `is_del` TINYINT NOT NULL DEFAULT 0, + PRIMARY KEY (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Admin settings overrides'; + +INSERT INTO `p_site_settings` (`key`, `value`, `is_encrypted`, `created_on`, `modified_on`, `deleted_on`, `is_del`) +SELECT `key`, `value`, 0, created_on, modified_on, 0, 0 FROM ( + SELECT 'web_profile.use_friendship' AS `key`, IF(use_friendship <> 0, 'true', 'false') AS `value`, created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.enable_trends_bar', IF(enable_trends_bar <> 0, 'true', 'false'), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.enable_wallet', IF(enable_wallet <> 0, 'true', 'false'), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_attachment', IF(allow_tweet_attachment <> 0, 'true', 'false'), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_attachment_price', IF(allow_tweet_attachment_price <> 0, 'true', 'false'), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_video', IF(allow_tweet_video <> 0, 'true', 'false'), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_tweet_max_length', CAST(default_tweet_max_length AS CHAR), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.tweet_web_ellipsis_size', CAST(tweet_web_ellipsis_size AS CHAR), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.tweet_mobile_ellipsis_size', CAST(tweet_mobile_ellipsis_size AS CHAR), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_tweet_visibility', default_tweet_visibility, created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_msg_loop_interval', CAST(default_msg_loop_interval AS CHAR), created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_top', copyright_top, created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_left', copyright_left, created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_left_link', copyright_left_link, created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_right', copyright_right, created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_right_link', copyright_right_link, created_on, modified_on FROM `p_site_settings_legacy` WHERE id = 1 +) AS legacy_rows; + +DROP TABLE `p_site_settings_legacy`; diff --git a/scripts/migration/postgres/0015_site_settings.down.sql b/scripts/migration/postgres/0015_site_settings.down.sql new file mode 100644 index 00000000..c8446529 --- /dev/null +++ b/scripts/migration/postgres/0015_site_settings.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS p_site_settings; diff --git a/scripts/migration/postgres/0015_site_settings.up.sql b/scripts/migration/postgres/0015_site_settings.up.sql new file mode 100644 index 00000000..4a07267e --- /dev/null +++ b/scripts/migration/postgres/0015_site_settings.up.sql @@ -0,0 +1,23 @@ +CREATE TABLE p_site_settings ( + id BIGINT PRIMARY KEY DEFAULT 1, + use_friendship BOOLEAN NOT NULL DEFAULT false, + enable_trends_bar BOOLEAN NOT NULL DEFAULT false, + enable_wallet BOOLEAN NOT NULL DEFAULT false, + allow_tweet_attachment BOOLEAN NOT NULL DEFAULT false, + allow_tweet_attachment_price BOOLEAN NOT NULL DEFAULT false, + allow_tweet_video BOOLEAN NOT NULL DEFAULT false, + default_tweet_max_length INTEGER NOT NULL DEFAULT 2000, + tweet_web_ellipsis_size INTEGER NOT NULL DEFAULT 400, + tweet_mobile_ellipsis_size INTEGER NOT NULL DEFAULT 300, + default_tweet_visibility VARCHAR(32) NOT NULL DEFAULT 'friend', + default_msg_loop_interval INTEGER NOT NULL DEFAULT 5000, + copyright_top VARCHAR(255) NOT NULL DEFAULT '', + copyright_left VARCHAR(255) NOT NULL DEFAULT '', + copyright_left_link VARCHAR(255) NOT NULL DEFAULT '', + copyright_right VARCHAR(255) NOT NULL DEFAULT '', + copyright_right_link VARCHAR(255) NOT NULL DEFAULT '', + created_on BIGINT NOT NULL DEFAULT 0, + modified_on BIGINT NOT NULL DEFAULT 0, + deleted_on BIGINT NOT NULL DEFAULT 0, + is_del SMALLINT NOT NULL DEFAULT 0 +); diff --git a/scripts/migration/postgres/0016_settings_kv.down.sql b/scripts/migration/postgres/0016_settings_kv.down.sql new file mode 100644 index 00000000..9c487dcc --- /dev/null +++ b/scripts/migration/postgres/0016_settings_kv.down.sql @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS p_site_settings; + +CREATE TABLE p_site_settings ( + id BIGINT PRIMARY KEY DEFAULT 1, + use_friendship BOOLEAN NOT NULL DEFAULT false, + enable_trends_bar BOOLEAN NOT NULL DEFAULT false, + enable_wallet BOOLEAN NOT NULL DEFAULT false, + allow_tweet_attachment BOOLEAN NOT NULL DEFAULT false, + allow_tweet_attachment_price BOOLEAN NOT NULL DEFAULT false, + allow_tweet_video BOOLEAN NOT NULL DEFAULT false, + default_tweet_max_length INTEGER NOT NULL DEFAULT 2000, + tweet_web_ellipsis_size INTEGER NOT NULL DEFAULT 400, + tweet_mobile_ellipsis_size INTEGER NOT NULL DEFAULT 300, + default_tweet_visibility VARCHAR(32) NOT NULL DEFAULT 'friend', + default_msg_loop_interval INTEGER NOT NULL DEFAULT 5000, + copyright_top VARCHAR(255) NOT NULL DEFAULT '', + copyright_left VARCHAR(255) NOT NULL DEFAULT '', + copyright_left_link VARCHAR(255) NOT NULL DEFAULT '', + copyright_right VARCHAR(255) NOT NULL DEFAULT '', + copyright_right_link VARCHAR(255) NOT NULL DEFAULT '', + created_on BIGINT NOT NULL DEFAULT 0, + modified_on BIGINT NOT NULL DEFAULT 0, + deleted_on BIGINT NOT NULL DEFAULT 0, + is_del SMALLINT NOT NULL DEFAULT 0 +); diff --git a/scripts/migration/postgres/0016_settings_kv.up.sql b/scripts/migration/postgres/0016_settings_kv.up.sql new file mode 100644 index 00000000..1ac981e3 --- /dev/null +++ b/scripts/migration/postgres/0016_settings_kv.up.sql @@ -0,0 +1,48 @@ +ALTER TABLE p_site_settings RENAME TO p_site_settings_legacy; + +CREATE TABLE p_site_settings ( + key VARCHAR(191) PRIMARY KEY, + value TEXT NOT NULL, + is_encrypted BOOLEAN NOT NULL DEFAULT false, + created_on BIGINT NOT NULL DEFAULT 0, + modified_on BIGINT NOT NULL DEFAULT 0, + deleted_on BIGINT NOT NULL DEFAULT 0, + is_del SMALLINT NOT NULL DEFAULT 0 +); + +INSERT INTO p_site_settings (key, value, is_encrypted, created_on, modified_on, deleted_on, is_del) +SELECT key, value, false, created_on, modified_on, 0, 0 FROM ( + SELECT 'web_profile.use_friendship' AS key, CASE WHEN use_friendship THEN 'true' ELSE 'false' END AS value, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.enable_trends_bar', CASE WHEN enable_trends_bar THEN 'true' ELSE 'false' END, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.enable_wallet', CASE WHEN enable_wallet THEN 'true' ELSE 'false' END, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_attachment', CASE WHEN allow_tweet_attachment THEN 'true' ELSE 'false' END, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_attachment_price', CASE WHEN allow_tweet_attachment_price THEN 'true' ELSE 'false' END, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_video', CASE WHEN allow_tweet_video THEN 'true' ELSE 'false' END, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_tweet_max_length', default_tweet_max_length::TEXT, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.tweet_web_ellipsis_size', tweet_web_ellipsis_size::TEXT, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.tweet_mobile_ellipsis_size', tweet_mobile_ellipsis_size::TEXT, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_tweet_visibility', default_tweet_visibility, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_msg_loop_interval', default_msg_loop_interval::TEXT, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_top', copyright_top, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_left', copyright_left, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_left_link', copyright_left_link, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_right', copyright_right, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_right_link', copyright_right_link, created_on, modified_on FROM p_site_settings_legacy WHERE id = 1 +) legacy_rows; + +DROP TABLE p_site_settings_legacy; diff --git a/scripts/migration/sqlite3/0016_site_settings.down.sql b/scripts/migration/sqlite3/0016_site_settings.down.sql new file mode 100644 index 00000000..42d15774 --- /dev/null +++ b/scripts/migration/sqlite3/0016_site_settings.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS "p_site_settings"; diff --git a/scripts/migration/sqlite3/0016_site_settings.up.sql b/scripts/migration/sqlite3/0016_site_settings.up.sql new file mode 100644 index 00000000..aca40389 --- /dev/null +++ b/scripts/migration/sqlite3/0016_site_settings.up.sql @@ -0,0 +1,24 @@ +CREATE TABLE "p_site_settings" ( + "id" integer NOT NULL DEFAULT 1, + "use_friendship" integer NOT NULL DEFAULT 0, + "enable_trends_bar" integer NOT NULL DEFAULT 0, + "enable_wallet" integer NOT NULL DEFAULT 0, + "allow_tweet_attachment" integer NOT NULL DEFAULT 0, + "allow_tweet_attachment_price" integer NOT NULL DEFAULT 0, + "allow_tweet_video" integer NOT NULL DEFAULT 0, + "default_tweet_max_length" integer NOT NULL DEFAULT 2000, + "tweet_web_ellipsis_size" integer NOT NULL DEFAULT 400, + "tweet_mobile_ellipsis_size" integer NOT NULL DEFAULT 300, + "default_tweet_visibility" text(32) NOT NULL DEFAULT 'friend', + "default_msg_loop_interval" integer NOT NULL DEFAULT 5000, + "copyright_top" text(255) NOT NULL DEFAULT '', + "copyright_left" text(255) NOT NULL DEFAULT '', + "copyright_left_link" text(255) NOT NULL DEFAULT '', + "copyright_right" text(255) NOT NULL DEFAULT '', + "copyright_right_link" text(255) NOT NULL DEFAULT '', + "created_on" integer NOT NULL DEFAULT 0, + "modified_on" integer NOT NULL DEFAULT 0, + "deleted_on" integer NOT NULL DEFAULT 0, + "is_del" integer NOT NULL DEFAULT 0, + PRIMARY KEY ("id") +); diff --git a/scripts/migration/sqlite3/0017_settings_kv.down.sql b/scripts/migration/sqlite3/0017_settings_kv.down.sql new file mode 100644 index 00000000..81953c5a --- /dev/null +++ b/scripts/migration/sqlite3/0017_settings_kv.down.sql @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS "p_site_settings"; + +CREATE TABLE "p_site_settings" ( + "id" integer NOT NULL DEFAULT 1, + "use_friendship" integer NOT NULL DEFAULT 0, + "enable_trends_bar" integer NOT NULL DEFAULT 0, + "enable_wallet" integer NOT NULL DEFAULT 0, + "allow_tweet_attachment" integer NOT NULL DEFAULT 0, + "allow_tweet_attachment_price" integer NOT NULL DEFAULT 0, + "allow_tweet_video" integer NOT NULL DEFAULT 0, + "default_tweet_max_length" integer NOT NULL DEFAULT 2000, + "tweet_web_ellipsis_size" integer NOT NULL DEFAULT 400, + "tweet_mobile_ellipsis_size" integer NOT NULL DEFAULT 300, + "default_tweet_visibility" text(32) NOT NULL DEFAULT 'friend', + "default_msg_loop_interval" integer NOT NULL DEFAULT 5000, + "copyright_top" text(255) NOT NULL DEFAULT '', + "copyright_left" text(255) NOT NULL DEFAULT '', + "copyright_left_link" text(255) NOT NULL DEFAULT '', + "copyright_right" text(255) NOT NULL DEFAULT '', + "copyright_right_link" text(255) NOT NULL DEFAULT '', + "created_on" integer NOT NULL DEFAULT 0, + "modified_on" integer NOT NULL DEFAULT 0, + "deleted_on" integer NOT NULL DEFAULT 0, + "is_del" integer NOT NULL DEFAULT 0, + PRIMARY KEY ("id") +); diff --git a/scripts/migration/sqlite3/0017_settings_kv.up.sql b/scripts/migration/sqlite3/0017_settings_kv.up.sql new file mode 100644 index 00000000..2d856cf0 --- /dev/null +++ b/scripts/migration/sqlite3/0017_settings_kv.up.sql @@ -0,0 +1,49 @@ +ALTER TABLE "p_site_settings" RENAME TO "p_site_settings_legacy"; + +CREATE TABLE "p_site_settings" ( + "key" text NOT NULL, + "value" text NOT NULL DEFAULT '', + "is_encrypted" integer NOT NULL DEFAULT 0, + "created_on" integer NOT NULL DEFAULT 0, + "modified_on" integer NOT NULL DEFAULT 0, + "deleted_on" integer NOT NULL DEFAULT 0, + "is_del" integer NOT NULL DEFAULT 0, + PRIMARY KEY ("key") +); + +INSERT INTO "p_site_settings" ("key", "value", "is_encrypted", "created_on", "modified_on", "deleted_on", "is_del") +SELECT "key", "value", 0, created_on, modified_on, 0, 0 FROM ( + SELECT 'web_profile.use_friendship' AS "key", CASE WHEN use_friendship <> 0 THEN 'true' ELSE 'false' END AS "value", created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.enable_trends_bar', CASE WHEN enable_trends_bar <> 0 THEN 'true' ELSE 'false' END, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.enable_wallet', CASE WHEN enable_wallet <> 0 THEN 'true' ELSE 'false' END, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_attachment', CASE WHEN allow_tweet_attachment <> 0 THEN 'true' ELSE 'false' END, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_attachment_price', CASE WHEN allow_tweet_attachment_price <> 0 THEN 'true' ELSE 'false' END, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.allow_tweet_video', CASE WHEN allow_tweet_video <> 0 THEN 'true' ELSE 'false' END, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_tweet_max_length', CAST(default_tweet_max_length AS TEXT), created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.tweet_web_ellipsis_size', CAST(tweet_web_ellipsis_size AS TEXT), created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.tweet_mobile_ellipsis_size', CAST(tweet_mobile_ellipsis_size AS TEXT), created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_tweet_visibility', default_tweet_visibility, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.default_msg_loop_interval', CAST(default_msg_loop_interval AS TEXT), created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_top', copyright_top, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_left', copyright_left, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_left_link', copyright_left_link, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_right', copyright_right, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 + UNION ALL + SELECT 'web_profile.copyright_right_link', copyright_right_link, created_on, modified_on FROM "p_site_settings_legacy" WHERE id = 1 +); + +DROP TABLE "p_site_settings_legacy"; diff --git a/scripts/paopao-mysql.sql b/scripts/paopao-mysql.sql index 3e47c691..bc509523 100644 --- a/scripts/paopao-mysql.sql +++ b/scripts/paopao-mysql.sql @@ -513,4 +513,16 @@ UNION SELECT user_id, follow_id he_uid, 10 AS style FROM p_following WHERE is_del=0; +DROP TABLE IF EXISTS `p_site_settings`; +CREATE TABLE `p_site_settings` ( + `key` VARCHAR(191) NOT NULL, + `value` TEXT NOT NULL, + `is_encrypted` TINYINT NOT NULL DEFAULT 0, + `created_on` BIGINT NOT NULL DEFAULT 0, + `modified_on` BIGINT NOT NULL DEFAULT 0, + `deleted_on` BIGINT NOT NULL DEFAULT 0, + `is_del` TINYINT NOT NULL DEFAULT 0, + PRIMARY KEY (`key`) USING BTREE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Admin settings overrides'; + SET FOREIGN_KEY_CHECKS = 1; diff --git a/scripts/paopao-postgres.sql b/scripts/paopao-postgres.sql index 274c1fe1..10a58d58 100644 --- a/scripts/paopao-postgres.sql +++ b/scripts/paopao-postgres.sql @@ -425,3 +425,14 @@ FROM p_contact WHERE status=2 AND is_del=0 UNION SELECT user_id, follow_id he_uid, 10 AS style FROM p_following WHERE is_del=0; + +DROP TABLE IF EXISTS p_site_settings; +CREATE TABLE p_site_settings ( + key VARCHAR(191) PRIMARY KEY, + value TEXT NOT NULL, + is_encrypted BOOLEAN NOT NULL DEFAULT false, + created_on BIGINT NOT NULL DEFAULT 0, + modified_on BIGINT NOT NULL DEFAULT 0, + deleted_on BIGINT NOT NULL DEFAULT 0, + is_del SMALLINT NOT NULL DEFAULT 0 +); diff --git a/scripts/paopao-sqlite3.sql b/scripts/paopao-sqlite3.sql index 7f1e92bc..b957732d 100644 --- a/scripts/paopao-sqlite3.sql +++ b/scripts/paopao-sqlite3.sql @@ -734,4 +734,16 @@ ON "p_wallet_statement" ( "user_id" ASC ); +DROP TABLE IF EXISTS "p_site_settings"; +CREATE TABLE "p_site_settings" ( + "key" text NOT NULL, + "value" text NOT NULL DEFAULT '', + "is_encrypted" integer NOT NULL DEFAULT 0, + "created_on" integer NOT NULL DEFAULT 0, + "modified_on" integer NOT NULL DEFAULT 0, + "deleted_on" integer NOT NULL DEFAULT 0, + "is_del" integer NOT NULL DEFAULT 0, + PRIMARY KEY ("key") +); + PRAGMA foreign_keys = true; diff --git a/web/.env b/web/.env index f4229aa0..569ff2e7 100644 --- a/web/.env +++ b/web/.env @@ -1,4 +1,4 @@ -VITE_HOST="" +VITE_HOST="http://10.10.100.113:8008" # 功能特性开启 VITE_USE_FRIENDSHIP=true @@ -28,11 +28,11 @@ VITE_DEFAULT_COMMENT_MAX_LENGTH=300 # 评论最大长度, 默认300字 VITE_DEFAULT_REPLY_MAX_LENGTH=300 # 评论最大长度, 默认300字 VITE_RIGHT_FOLLOW_TOPIC_MAX_SIZE=6 # 右侧关注话题最大条目数, 默认6条 VITE_RIGHT_HOT_TOPIC_MAX_SIZE=12 # 右侧热门话题最大条目数, 默认12条 -VITE_COPYRIGHT_TOP="2023 paopao.info" -VITE_COPYRIGHT_LEFT="Roc's Me" +VITE_COPYRIGHT_TOP="2026 PaoPao" +VITE_COPYRIGHT_LEFT="" VITE_COPYRIGHT_LEFT_LINK="" -VITE_COPYRIGHT_RIGHT="泡泡(PaoPao)开源社区" -VITE_COPYRIGHT_RIGHT_LINK="https://www.paopao.info" +VITE_COPYRIGHT_RIGHT="Github" +VITE_COPYRIGHT_RIGHT_LINK="https://github.com/rocboss/paopao-ce" # 图片推文参数 VITE_DEFAULT_TWEET_IMAGE_404="https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png" diff --git a/web/dist/assets/404-kbNT-qSl.js b/web/dist/assets/404-kbNT-qSl.js deleted file mode 100644 index d6b3fb33..00000000 --- a/web/dist/assets/404-kbNT-qSl.js +++ /dev/null @@ -1 +0,0 @@ -import{A as e,D as t,O as n,Q as r,W as i,w as a}from"./@css-render-YsNuQTaE.js";import{i as o}from"./vue-router-Dw9lfhBK.js";import{$ as s,m as c,x as l}from"./naive-ui-Dv03sO69.js";import"./@juggle-BrKhuOcS.js";import{r as u}from"./sidebar-B2rODElh.js";import{t as d}from"./main-nav-BW6UKmWQ.js";var f=u(e({__name:`404`,setup(e){let u=o(),f=()=>{u.push({path:`/`})};return(e,o)=>{let u=d,p=s,m=c,h=l;return i(),a(`div`,null,[n(u,{title:`404`}),n(h,{class:`main-content-wrap wrap404`,bordered:``},{default:r(()=>[n(m,{status:`404`,title:`404 资源不存在`,description:`再看看其他的吧`},{footer:r(()=>[n(p,{onClick:f},{default:r(()=>[...o[0]||=[t(`回主页`,-1)]]),_:1})]),_:1})]),_:1})])}}}),[[`__scopeId`,`data-v-21b99e62`]]);export{f as default}; \ No newline at end of file diff --git a/web/dist/assets/@css-render-YsNuQTaE.js b/web/dist/assets/@css-render-YsNuQTaE.js deleted file mode 100644 index 6bf74f96..00000000 --- a/web/dist/assets/@css-render-YsNuQTaE.js +++ /dev/null @@ -1,4 +0,0 @@ -import{n as e,r as t}from"./rolldown-runtime-Bhmf7a9N.js";var n=t({EMPTY_ARR:()=>ee,EMPTY_OBJ:()=>S,NO:()=>te,NOOP:()=>C,PatchFlagNames:()=>Oe,PatchFlags:()=>De,ShapeFlags:()=>ke,SlotFlags:()=>Ae,camelize:()=>P,capitalize:()=>ve,cssVarNameEscapeSymbolsRE:()=>rt,def:()=>xe,escapeHtml:()=>h,escapeHtmlComment:()=>g,extend:()=>E,genCacheKey:()=>a,genPropsAccessExp:()=>i,generateCodeFrame:()=>o,getEscapedCssVarName:()=>_,getGlobalThis:()=>Te,hasChanged:()=>I,hasOwn:()=>D,hyphenate:()=>F,includeBooleanAttr:()=>f,invokeArrayFns:()=>be,isArray:()=>O,isBooleanAttr:()=>Je,isBuiltInDirective:()=>me,isDate:()=>ae,isFunction:()=>A,isGloballyAllowed:()=>Me,isGloballyWhitelisted:()=>Ne,isHTMLTag:()=>He,isIntegerKey:()=>fe,isKnownHtmlAttr:()=>Qe,isKnownMathMLAttr:()=>et,isKnownSvgAttr:()=>$e,isMap:()=>k,isMathMLTag:()=>We,isModelListener:()=>T,isObject:()=>N,isOn:()=>w,isPlainObject:()=>de,isPromise:()=>se,isRegExp:()=>oe,isRenderableAttrValue:()=>m,isReservedProp:()=>pe,isSSRSafeAttrName:()=>p,isSVGTag:()=>Ue,isSet:()=>ie,isSpecialBooleanAttr:()=>qe,isString:()=>j,isSymbol:()=>M,isVoidTag:()=>Ge,looseEqual:()=>y,looseIndexOf:()=>b,looseToNumber:()=>Se,makeMap:()=>r,normalizeClass:()=>u,normalizeCssVarValue:()=>x,normalizeProps:()=>d,normalizeStyle:()=>s,objectToString:()=>ce,parseStringStyle:()=>c,propsToAttrMap:()=>Ze,remove:()=>ne,slotFlagsText:()=>je,stringifyStyle:()=>l,toDisplayString:()=>at,toHandlerKey:()=>ye,toNumber:()=>Ce,toRawType:()=>ue,toTypeString:()=>le});function r(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}function i(e){return Ee.test(e)?`__props.${e}`:`__props[${JSON.stringify(e)}]`}function a(e,t){return e+JSON.stringify(t,(e,t)=>typeof t==`function`?t.toString():t)}function o(e,t=0,n=e.length){if(t=Math.max(0,Math.min(t,e.length)),n=Math.max(0,Math.min(n,e.length)),t>n)return``;let r=e.split(/(\r?\n)/),i=r.filter((e,t)=>t%2==1);r=r.filter((e,t)=>t%2==0);let a=0,o=[];for(let e=0;e=t){for(let s=e-Pe;s<=e+Pe||n>a;s++){if(s<0||s>=r.length)continue;let c=s+1;o.push(`${c}${` `.repeat(Math.max(3-String(c).length,0))}| ${r[s]}`);let l=r[s].length,u=i[s]&&i[s].length||0;if(s===e){let e=t-(a-(l+u)),r=Math.max(1,n>a?l-e:n-t);o.push(` | `+` `.repeat(e)+`^`.repeat(r))}else if(s>e){if(n>a){let e=Math.max(Math.min(n-a,l),1);o.push(` | `+`^`.repeat(e))}a+=l+u}}break}return o.join(` -`)}function s(e){if(O(e)){let t={};for(let n=0;n{if(e){let n=e.split(Ie);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function l(e){if(!e)return``;if(j(e))return e;let t=``;for(let n in e){let r=e[n];if(j(r)||typeof r==`number`){let e=n.startsWith(`--`)?n:F(n);t+=`${e}:${r};`}}return t}function u(e){let t=``;if(j(e))t=e;else if(O(e))for(let n=0;nt?e===`"`?`\\\\\\"`:`\\\\${e}`:`\\${e}`)}function v(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&ry(e,t))}function x(e){return e==null?`initial`:typeof e==`string`?e===``?` `:e:String(e)}var S,ee,C,te,w,T,E,ne,re,D,O,k,ie,ae,oe,A,j,M,N,se,ce,le,ue,de,fe,pe,me,he,ge,P,_e,F,ve,ye,I,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct=e((()=>{S={},ee=[],C=()=>{},te=()=>!1,w=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),T=e=>e.startsWith(`onUpdate:`),E=Object.assign,ne=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},re=Object.prototype.hasOwnProperty,D=(e,t)=>re.call(e,t),O=Array.isArray,k=e=>le(e)===`[object Map]`,ie=e=>le(e)===`[object Set]`,ae=e=>le(e)===`[object Date]`,oe=e=>le(e)===`[object RegExp]`,A=e=>typeof e==`function`,j=e=>typeof e==`string`,M=e=>typeof e==`symbol`,N=e=>typeof e==`object`&&!!e,se=e=>(N(e)||A(e))&&A(e.then)&&A(e.catch),ce=Object.prototype.toString,le=e=>ce.call(e),ue=e=>le(e).slice(8,-1),de=e=>le(e)===`[object Object]`,fe=e=>j(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,pe=r(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),me=r(`bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo`),he=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ge=/-\w/g,P=he(e=>e.replace(ge,e=>e.slice(1).toUpperCase())),_e=/\B([A-Z])/g,F=he(e=>e.replace(_e,`-$1`).toLowerCase()),ve=he(e=>e.charAt(0).toUpperCase()+e.slice(1)),ye=he(e=>e?`on${ve(e)}`:``),I=(e,t)=>!Object.is(e,t),be=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Se=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Ce=e=>{let t=j(e)?Number(e):NaN;return isNaN(t)?e:t},Te=()=>we||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{},Ee=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/,De={TEXT:1,1:`TEXT`,CLASS:2,2:`CLASS`,STYLE:4,4:`STYLE`,PROPS:8,8:`PROPS`,FULL_PROPS:16,16:`FULL_PROPS`,NEED_HYDRATION:32,32:`NEED_HYDRATION`,STABLE_FRAGMENT:64,64:`STABLE_FRAGMENT`,KEYED_FRAGMENT:128,128:`KEYED_FRAGMENT`,UNKEYED_FRAGMENT:256,256:`UNKEYED_FRAGMENT`,NEED_PATCH:512,512:`NEED_PATCH`,DYNAMIC_SLOTS:1024,1024:`DYNAMIC_SLOTS`,DEV_ROOT_FRAGMENT:2048,2048:`DEV_ROOT_FRAGMENT`,CACHED:-1,"-1":`CACHED`,BAIL:-2,"-2":`BAIL`},Oe={1:`TEXT`,2:`CLASS`,4:`STYLE`,8:`PROPS`,16:`FULL_PROPS`,32:`NEED_HYDRATION`,64:`STABLE_FRAGMENT`,128:`KEYED_FRAGMENT`,256:`UNKEYED_FRAGMENT`,512:`NEED_PATCH`,1024:`DYNAMIC_SLOTS`,2048:`DEV_ROOT_FRAGMENT`,[-1]:`CACHED`,[-2]:`BAIL`},ke={ELEMENT:1,1:`ELEMENT`,FUNCTIONAL_COMPONENT:2,2:`FUNCTIONAL_COMPONENT`,STATEFUL_COMPONENT:4,4:`STATEFUL_COMPONENT`,TEXT_CHILDREN:8,8:`TEXT_CHILDREN`,ARRAY_CHILDREN:16,16:`ARRAY_CHILDREN`,SLOTS_CHILDREN:32,32:`SLOTS_CHILDREN`,TELEPORT:64,64:`TELEPORT`,SUSPENSE:128,128:`SUSPENSE`,COMPONENT_SHOULD_KEEP_ALIVE:256,256:`COMPONENT_SHOULD_KEEP_ALIVE`,COMPONENT_KEPT_ALIVE:512,512:`COMPONENT_KEPT_ALIVE`,COMPONENT:6,6:`COMPONENT`},Ae={STABLE:1,1:`STABLE`,DYNAMIC:2,2:`DYNAMIC`,FORWARDED:3,3:`FORWARDED`},je={1:`STABLE`,2:`DYNAMIC`,3:`FORWARDED`},Me=r(`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`),Ne=Me,Pe=2,Fe=/;(?![^(]*\))/g,Ie=/:([^]+)/,Le=/\/\*[^]*?\*\//g,Re=`html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot`,ze=`svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view`,Be=`annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics`,Ve=`area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr`,He=r(Re),Ue=r(ze),We=r(Be),Ge=r(Ve),Ke=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,qe=r(Ke),Je=r(Ke+`,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`),Ye=/[>/="'\u0009\u000a\u000c\u0020]/,Xe={},Ze={acceptCharset:`accept-charset`,className:`class`,htmlFor:`for`,httpEquiv:`http-equiv`},Qe=r(`accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`),$e=r(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`),et=r(`accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`),tt=/["'&<>]/,nt=/^-?>||--!>|?@[\\\]^`{|}~]/g,it=e=>!!(e&&e.__v_isRef===!0),at=e=>j(e)?e:e==null?``:O(e)||N(e)&&(e.toString===ce||!A(e.toString))?it(e)?at(e.value):JSON.stringify(e,ot,2):String(e),ot=(e,t)=>it(t)?ot(e,t.value):k(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[st(t,r)+` =>`]=n,e),{})}:ie(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>st(e))}:M(t)?st(t):N(t)&&!O(t)&&!de(t)?String(t):t,st=(e,t=``)=>M(e)?`Symbol(${e.description??t})`:e}));function lt(e){return new gn(e)}function ut(){return V}function dt(e,t=!1){V&&V.cleanups.push(e)}function ft(e,t=!1){if(e.flags|=8,t){e.next=xn,xn=e;return}e.next=bn,bn=e}function pt(){yn++}function mt(){if(--yn>0)return;if(xn){let e=xn;for(xn=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;bn;){let t=bn;for(bn=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function ht(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function gt(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),yt(r),bt(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function _t(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(vt(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function vt(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wn)||(e.globalVersion=wn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_t(e))))return;e.flags|=2;let t=e.dep,n=H,r=Sn;H=e,Sn=!0;try{ht(e);let n=e.fn(e._value);(t.version===0||I(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{H=n,Sn=r,gt(e),e.flags&=-3}}function yt(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)yt(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function bt(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function xt(e,t){e.effect instanceof vn&&(e=e.effect.fn);let n=new vn(e);t&&E(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function St(e){e.effect.stop()}function Ct(){Cn.push(Sn),Sn=!1}function wt(){let e=Cn.pop();Sn=e===void 0?!0:e}function Tt(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=H;H=void 0;try{t()}finally{H=e}}}function Et(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Et(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}function L(e,t,n){if(Sn&&H){let t=Dn.get(e);t||Dn.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new En),r.map=t,r.key=n),r.track()}}function Dt(e,t,n,r,i,a){let o=Dn.get(e);if(!o){wn++;return}let s=e=>{e&&e.trigger()};if(pt(),t===`clear`)o.forEach(s);else{let i=O(e),a=i&&fe(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===An||!M(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(An)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(On)),k(e)&&s(o.get(kn)));break;case`delete`:i||(s(o.get(On)),k(e)&&s(o.get(kn)));break;case`set`:k(e)&&s(o.get(On));break}}mt()}function Ot(e,t){let n=Dn.get(e);return n&&n.get(t)}function kt(e){let t=z(e);return t===e?t:(L(t,`iterate`,An),R(e)?t:t.map(Qn))}function At(e){return L(e=z(e),`iterate`,An),e}function jt(e,t){return Xt(e)?Yt(e)?$n(Qn(t)):$n(t):Qn(t)}function Mt(e,t,n){let r=At(e),i=r[t]();return r!==e&&!R(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}function Nt(e,t,n,r,i,a){let o=At(e),s=o!==e&&!R(e),c=o[t];if(c!==Mn[t]){let t=c.apply(e,a);return s?Qn(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,jt(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Pt(e,t,n,r){let i=At(e),a=i!==e&&!R(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=jt(e,t)),n.call(this,t,jt(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?jt(e,c):c}function Ft(e,t,n){let r=z(e);L(r,`iterate`,An);let i=r[t](...n);return(i===-1||i===!1)&&Zt(n[0])?(n[0]=z(n[0]),r[t](...n)):i}function It(e,t,n=[]){Ct(),pt();let r=z(e)[t].apply(e,n);return mt(),wt(),r}function Lt(e){M(e)||(e=String(e));let t=z(this);return L(t,`has`,e),t.hasOwnProperty(e)}function Rt(e,t,n){return function(...r){let i=this.__v_raw,a=z(i),o=k(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Hn:t?$n:Qn;return!t&&L(a,`iterate`,c?kn:On),E(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function zt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Bt(e,t){let n={get(n){let r=this.__v_raw,i=z(r),a=z(n);e||(I(n,a)&&L(i,`get`,n),L(i,`get`,a));let{has:o}=Un(i),s=t?Hn:e?$n:Qn;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&L(z(t),`iterate`,On),t.size},has(t){let n=this.__v_raw,r=z(n),i=z(t);return e||(I(t,i)&&L(r,`has`,t),L(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=z(a),s=t?Hn:e?$n:Qn;return!e&&L(o,`iterate`,On),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return E(n,e?{add:zt(`add`),set:zt(`set`),delete:zt(`delete`),clear:zt(`clear`)}:{add(e){let n=z(this),r=Un(n),i=z(e),a=!t&&!R(e)&&!Xt(e)?i:e;return r.has.call(n,a)||I(e,a)&&r.has.call(n,e)||I(i,a)&&r.has.call(n,i)||(n.add(a),Dt(n,`add`,a,a)),this},set(e,n){!t&&!R(n)&&!Xt(n)&&(n=z(n));let r=z(this),{has:i,get:a}=Un(r),o=i.call(r,e);o||=(e=z(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?I(n,s)&&Dt(r,`set`,e,n,s):Dt(r,`add`,e,n),this},delete(e){let t=z(this),{has:n,get:r}=Un(t),i=n.call(t,e);i||=(e=z(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&Dt(t,`delete`,e,void 0,a),o},clear(){let e=z(this),t=e.size!==0,n=e.clear();return t&&Dt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Rt(r,e,t)}),n}function Vt(e,t){let n=Bt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(D(n,r)&&r in t?n:t,r,i)}function Ht(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ut(e){return e.__v_skip||!Object.isExtensible(e)?0:Ht(ue(e))}function Wt(e){return Xt(e)?e:Jt(e,!1,Rn,Wn,Jn)}function Gt(e){return Jt(e,!1,Bn,Gn,Yn)}function Kt(e){return Jt(e,!0,zn,Kn,Xn)}function qt(e){return Jt(e,!0,Vn,qn,Zn)}function Jt(e,t,n,r,i){if(!N(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Ut(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function Yt(e){return Xt(e)?Yt(e.__v_raw):!!(e&&e.__v_isReactive)}function Xt(e){return!!(e&&e.__v_isReadonly)}function R(e){return!!(e&&e.__v_isShallow)}function Zt(e){return e?!!e.__v_raw:!1}function z(e){let t=e&&e.__v_raw;return t?z(t):e}function Qt(e){return!D(e,`__v_skip`)&&Object.isExtensible(e)&&xe(e,`__v_skip`,!0),e}function B(e){return e?e.__v_isRef===!0:!1}function $t(e){return tn(e,!1)}function en(e){return tn(e,!0)}function tn(e,t){return B(e)?e:new er(e,t)}function nn(e){e.dep&&e.dep.trigger()}function rn(e){return B(e)?e.value:e}function an(e){return A(e)?e():rn(e)}function on(e){return Yt(e)?e:new Proxy(e,tr)}function sn(e){return new nr(e)}function cn(e){let t=O(e)?Array(e.length):{};for(let n in e)t[n]=un(e,n);return t}function ln(e,t,n){return B(e)?e:A(e)?new ir(e):N(e)&&arguments.length>1?un(e,t,n):$t(e)}function un(e,t,n){return new rr(e,t,n)}function dn(e,t,n=!1){let r,i;return A(e)?r=e:(r=e.get,i=e.set),new ar(r,i,n)}function fn(){return ur}function pn(e,t=!1,n=ur){if(n){let t=lr.get(n);t||lr.set(n,t=[]),t.push(e)}}function mn(e,t,n=S){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:R(e)||i===!1||i===0?hn(e,1):hn(e),u,d,f,p,m=!1,h=!1;if(B(e)?(d=()=>e.value,m=R(e)):Yt(e)?(d=()=>l(e),m=!0):O(e)?(h=!0,m=e.some(e=>Yt(e)||R(e)),d=()=>e.map(e=>{if(B(e))return e.value;if(Yt(e))return l(e);if(A(e))return c?c(e,2):e()})):d=A(e)?t?c?()=>c(e,2):e:()=>{if(f){Ct();try{f()}finally{wt()}}let t=ur;ur=u;try{return c?c(e,3,[p]):e(p)}finally{ur=t}}:C,t&&i){let e=d,t=i===!0?1/0:i;d=()=>hn(e(),t)}let g=ut(),_=()=>{u.stop(),g&&g.active&&ne(g.effects,u)};if(a&&t){let e=t;t=(...t)=>{e(...t),_()}}let v=h?Array(e.length).fill(cr):cr,y=e=>{if(!(!(u.flags&1)||!u.dirty&&!e))if(t){let e=u.run();if(i||m||(h?e.some((e,t)=>I(e,v[t])):I(e,v))){f&&f();let n=ur;ur=u;try{let n=[e,v===cr?void 0:h&&v[0]===cr?[]:v,p];v=e,c?c(t,3,n):t(...n)}finally{ur=n}}}else u.run()};return s&&s(y),u=new vn(d),u.scheduler=o?()=>o(y,!1):y,p=e=>pn(e,!1,u),f=u.onStop=()=>{let e=lr.get(u);if(e){if(c)c(e,4);else for(let t of e)t();lr.delete(u)}},t?r?y(!0):v=u.run():o?o(y.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function hn(e,t=1/0,n){if(t<=0||!N(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,B(e))hn(e.value,t,n);else if(O(e))for(let r=0;r{hn(e,t,n)});else if(de(e)){for(let r in e)hn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&hn(e[r],t,n)}return e}var V,gn,H,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr=e((()=>{ct(),gn=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=V,!e&&V&&(this.index=(V.scopes||=[]).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(V=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;tjt(this,e))},concat(...e){return kt(this).concat(...e.map(e=>O(e)?kt(e):e))},entries(){return Mt(this,`entries`,e=>(e[1]=jt(this,e[1]),e))},every(e,t){return Nt(this,`every`,e,t,void 0,arguments)},filter(e,t){return Nt(this,`filter`,e,t,e=>e.map(e=>jt(this,e)),arguments)},find(e,t){return Nt(this,`find`,e,t,e=>jt(this,e),arguments)},findIndex(e,t){return Nt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return Nt(this,`findLast`,e,t,e=>jt(this,e),arguments)},findLastIndex(e,t){return Nt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return Nt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return Ft(this,`includes`,e)},indexOf(...e){return Ft(this,`indexOf`,e)},join(e){return kt(this).join(e)},lastIndexOf(...e){return Ft(this,`lastIndexOf`,e)},map(e,t){return Nt(this,`map`,e,t,void 0,arguments)},pop(){return It(this,`pop`)},push(...e){return It(this,`push`,e)},reduce(e,...t){return Pt(this,`reduce`,e,t)},reduceRight(e,...t){return Pt(this,`reduceRight`,e,t)},shift(){return It(this,`shift`)},some(e,t){return Nt(this,`some`,e,t,void 0,arguments)},splice(...e){return It(this,`splice`,e)},toReversed(){return kt(this).toReversed()},toSorted(e){return kt(this).toSorted(e)},toSpliced(...e){return kt(this).toSpliced(...e)},unshift(...e){return It(this,`unshift`,e)},values(){return Mt(this,`values`,e=>jt(this,e))}},Mn=Array.prototype,Nn=r(`__proto__,__v_isRef,__isVue`),Pn=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(M)),Fn=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Zn:Xn:i?Yn:Jn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=O(e);if(!r){let e;if(a&&(e=jn[t]))return e;if(t===`hasOwnProperty`)return Lt}let o=Reflect.get(e,t,B(e)?e:n);if((M(t)?Pn.has(t):Nn(t))||(r||L(e,`get`,t),i))return o;if(B(o)){let e=a&&fe(t)?o:o.value;return r&&N(e)?Kt(e):e}return N(o)?r?Kt(o):Wt(o):o}},In=class extends Fn{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=O(e)&&fe(t);if(!this._isShallow){let e=Xt(i);if(!R(n)&&!Xt(n)&&(i=z(i),n=z(n)),!a&&B(i)&&!B(n))return e||(i.value=n),!0}let o=a?Number(t)e,Un=e=>Reflect.getPrototypeOf(e),Wn={get:Vt(!1,!1)},Gn={get:Vt(!1,!0)},Kn={get:Vt(!0,!1)},qn={get:Vt(!0,!0)},Jn=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,Zn=new WeakMap,Qn=e=>N(e)?Wt(e):e,$n=e=>N(e)?Kt(e):e,er=class{constructor(e,t){this.dep=new En,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:z(e),this._value=t?e:Qn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||R(e)||Xt(e);e=n?e:z(e),I(e,t)&&(this._rawValue=e,this._value=n?e:Qn(e),this.dep.trigger())}},tr={get:(e,t,n)=>t===`__v_raw`?e:rn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return B(i)&&!B(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}},nr=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new En,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}},rr=class{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._raw=z(e);let r=!0,i=e;if(!O(e)||!fe(String(t)))do r=!Zt(i)||R(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=rn(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&B(this._raw[this._key])){let t=this._object[this._key];if(B(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Ot(this._raw,this._key)}},ir=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}},ar=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new En(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&H!==this)return ft(this,!0),!0}get value(){let e=this.dep.track();return vt(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}},or={GET:`get`,HAS:`has`,ITERATE:`iterate`},sr={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},cr={},lr=new WeakMap,ur=void 0}));function fr(e){Oo.push(e)}function pr(){Oo.pop()}function mr(e,t){}function hr(e,t,n,r){try{return r?e(...r):e()}catch(e){_r(e,t,n)}}function gr(e,t,n,r){if(A(e)){let i=hr(e,t,n,r);return i&&se(i)&&i.catch(e=>{_r(e,t,n)}),i}if(O(e)){let i=[];for(let a=0;a>>1,i=G[r],a=Lo(i);a=Lo(n)?G.push(e):G.splice(br(t),0,e),e.flags|=1,Sr()}}function Sr(){Io||=Fo.then(Er)}function Cr(e){O(e)?Mo.push(...e):No&&e.id===-1?No.splice(Po+1,0,e):e.flags&1||(Mo.push(e),e.flags|=1),Sr()}function wr(e,t,n=jo+1){for(;nLo(e)-Lo(t));if(Mo.length=0,No){No.push(...e);return}for(No=e,Po=0;PoRo.emit(e,...t)),zo=[]):typeof window<`u`&&window.HTMLElement&&!(window.navigator?.userAgent)?.includes(`jsdom`)?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(e=>{Dr(e,t)}),setTimeout(()=>{Ro||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,zo=[])},3e3)):zo=[]}function Or(e){let t=K;return K=e,Bo=e&&e.type.__scopeId||null,t}function kr(e){Bo=e}function Ar(){Bo=null}function jr(e,t=K,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Ja(-1);let i=Or(t),a;try{a=e(...n)}finally{Or(i),r._d&&Ja(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Mr(e,t){if(K===null)return e;let n=xo(K),r=e.dirs||=[];for(let e=0;e1)return n&&A(t)?t.call(r&&r.proxy):t}}function Ir(){return!!($()||Gs)}function Lr(e,t){return Vr(e,null,t)}function Rr(e,t){return Vr(e,null,{flush:`post`})}function zr(e,t){return Vr(e,null,{flush:`sync`})}function Br(e,t,n){return Vr(e,t,n)}function Vr(e,t,n=S){let{immediate:r,deep:i,flush:a,once:o}=n,s=E({},n),c=t&&r||!t&&a!==`post`,l;if(Cc){if(a===`sync`){let e=Uo();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=C,e.resume=C,e.pause=C,e}}let u=Q;s.call=(e,t,n)=>gr(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{q(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():xr(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=mn(e,t,s);return Cc&&(l?l.push(f):c&&f()),f}function Hr(e,t,n){let r=this.proxy,i=j(e)?e.includes(`.`)?Ur(r,e):()=>r[e]:e.bind(r,r),a;A(t)?a=t:(a=t.handler,n=t);let o=xc(this),s=Vr(i,a.bind(r),n);return o(),s}function Ur(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e{e.isMounted=!0}),ks(()=>{e.isUnmounting=!0}),e}function Yr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Y){t=n;break}}return t}function Xr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Zr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:h,onBeforeAppear:g,onAppear:_,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),x=Xr(n,e),S=(e,t)=>{e&&gr(e,r,9,t)},ee=(e,t)=>{let n=t[1];S(e,t),O(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},C={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=g||c;else return;t[$o]&&t[$o](!0);let i=x[b];i&&$a(e,i)&&i.el[$o]&&i.el[$o](),S(r,[t])},enter(t){if(x[b]===e)return;let r=l,i=u,o=d;if(!n.isMounted)if(a)r=_||l,i=v||u,o=y||d;else return;let s=!1;t[es]=e=>{s||(s=!0,S(e?o:i,[t]),C.delayedLeave&&C.delayedLeave(),t[es]=void 0)};let c=t[es].bind(null,!1);r?ee(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[es]&&t[es](!0),n.isUnmounting)return r();S(f,[t]);let a=!1;t[$o]=n=>{a||(a=!0,r(),S(n?h:m,[t]),t[$o]=void 0,x[i]===e&&delete x[i])};let o=t[$o].bind(null,!1);x[i]=e,p?ee(p,[t,o]):o()},clone(e){let a=Zr(e,t,n,r,i);return i&&i(a),a}};return C}function Qr(e){if(Ss(e))return e=io(e),e.children=null,e}function $r(e){if(!Ss(e))return Go(e.type)&&e.children?Yr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&A(n.default))return n.default()}}function ei(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ei(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ti(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;en.value,set:e=>n.value=e})}return n}function oi(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}function si(e,t,n,r,i=!1){if(O(e)){e.forEach((e,a)=>si(e,t&&(O(t)?t[a]:t),n,r,i));return}if(xs(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&si(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?xo(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===S?s.refs={}:s.refs,d=s.setupState,f=z(d),p=d===S?te:e=>oi(u,e)?!1:D(f,e),m=(e,t)=>!(t&&oi(u,t));if(l!=null&&l!==c){if(ci(t),j(l))u[l]=null,p(l)&&(d[l]=null);else if(B(l)){let e=t;m(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(A(c))hr(c,s,12,[o,u]);else{let t=j(c),r=B(c);if(t||r){let s=()=>{if(e.f){let n=t?p(c)?d[c]:u[c]:m(c)||!e.k?c.value:u[e.k];if(i)O(n)&&ne(n,a);else if(O(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],p(c)&&(d[c]=u[c]);else{let t=[a];m(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,p(c)&&(d[c]=o)):r&&(m(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),os.delete(e)};t.id=-1,os.set(e,t),q(t,n)}else ci(e),s()}}}function ci(e){let t=os.get(e);t&&(t.flags|=8,os.delete(e))}function li(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:o,remove:s,insert:c,createComment:l}}=e,u=(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),Tr(),t._vnode=e;return}d(t.firstChild,e,null,null,null),Tr(),t._vnode=e},d=(n,r,s,l,u,y=!1)=>{y||=!!r.dynamicChildren;let b=fs(n)&&n.data===`[`,x=()=>h(n,r,s,l,u,b),{type:S,ref:ee,shapeFlag:C,patchFlag:te}=r,w=n.nodeType;r.el=n,te===-2&&(y=!1,r.dynamicChildren=null);let T=null;switch(S){case dc:w===3?(n.data!==r.children&&(cs(),n.data=r.children),T=a(n)):r.children===``?(c(r.el=i(``),o(n),n),T=n):T=x();break;case Y:v(n)?(T=a(n),_(r.el=n.content.firstChild,n,s)):T=w!==8||b?x():a(n);break;case fc:if(b&&(n=a(n),w=n.nodeType),w===1||w===3){T=n;let e=!r.children.length;for(let t=0;t{o||=!!t.dynamicChildren;let{type:c,props:l,patchFlag:u,shapeFlag:d,dirs:f,transition:m}=t,h=c===`input`||c===`option`;if(h||u!==-1){f&&Nr(t,null,n,`created`);let c=!1;if(v(e)){c=Aa(null,m)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;if(c){let e=r.getAttribute(`class`);e&&(r.$cls=e),m.beforeEnter(r)}_(r,e,n),t.el=e=r}if(d&16&&!(l&&(l.innerHTML||l.textContent))){let r=p(e.firstChild,t,e,n,i,a,o);for(;r;){ui(e,1)||cs();let t=r;r=r.nextSibling,s(t)}}else if(d&8){let n=t.children;n[0]===` -`&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,` -`)&&(ui(e,0)||cs(),e.textContent=t.children)}if(l){if(h||!o||u&48){let t=e.tagName.includes(`-`);for(let i in l)(h&&(i.endsWith(`value`)||i===`indeterminate`)||w(i)&&!pe(i)||i[0]===`.`||t&&!pe(i))&&r(e,i,null,l[i],void 0,n)}else if(l.onClick)r(e,`onClick`,null,l.onClick,void 0,n);else if(u&4&&Yt(l.style))for(let e in l.style)l.style[e]}let g;(g=l&&l.onVnodeBeforeMount)&&fo(g,n,t),f&&Nr(t,null,n,`beforeMount`),((g=l&&l.onVnodeMounted)||f||c)&&Ua(()=>{g&&fo(g,n,t),c&&m.enter(e),f&&Nr(t,null,n,`mounted`)},i)}return e.nextSibling},p=(e,t,r,o,s,l,u)=>{u||=!!t.dynamicChildren;let f=t.children,p=f.length;for(let t=0;t{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=o(e),f=p(a(e),t,d,n,r,i,s);return f&&fs(f)&&f.data===`]`?a(t.anchor=f):(cs(),c(t.anchor=l(`]`),d,f),f)},h=(e,t,r,i,c,l)=>{if(ui(e.parentElement,1)||cs(),t.el=null,l){let t=g(e);for(;;){let n=a(e);if(n&&n!==t)s(n);else break}}let u=a(e),d=o(e);return s(e),n(null,t,d,u,r,i,ds(d),c),r&&(r.vnode.el=t.el,va(r,t.el)),u},g=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&fs(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},_=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},v=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[u,d]}function ui(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(ps);)e=e.parentElement;let n=e&&e.getAttribute(ps);if(n==null)return!1;if(n===``)return!0;{let e=n.split(`,`);return t===0&&e.includes(`children`)?!0:e.includes(ms[t])}}function di(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t0&&r0&&n0&&i(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return ni({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=!1;(t.bu||=[]).push(()=>r=!0);let i=()=>{r||n()},o=a?()=>{let n=a(i,t=>fi(e,t));n&&(t.bum||=[]).push(n)}:i;u?o():p().then(()=>!t.isUnmounted&&o())},get __asyncResolved(){return u},setup(){let e=Q;if(ii(e),u)return()=>mi(u,e);let t=t=>{l=null,_r(t,e,13,!r)};if(s&&e.suspense||Cc)return p().then(t=>()=>mi(t,e)).catch(e=>(t(e),()=>r?Z(r,{error:e}):null));let a=$t(!1),c=$t(),d=$t(!!i);return i&&setTimeout(()=>{d.value=!1},i),o!=null&&setTimeout(()=>{if(!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o),p().then(()=>{a.value=!0,e.parent&&Ss(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>{if(a.value&&u)return mi(u,e);if(c.value&&r)return Z(r,{error:c.value});if(n&&!d.value)return mi(n,e)}}})}function mi(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=Z(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}function hi(e,t){return O(e)?e.some(e=>hi(e,t)):j(e)?e.split(`,`).includes(t):oe(e)?(e.lastIndex=0,e.test(t)):!1}function gi(e,t){vi(e,`a`,t)}function _i(e,t){vi(e,`da`,t)}function vi(e,t,n=Q){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Si(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Ss(e.parent.vnode)&&yi(r,t,n,e),e=e.parent}}function yi(e,t,n,r){let i=Si(t,e,r,!0);As(()=>{ne(r[t],i)},n)}function bi(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function xi(e){return e.shapeFlag&128?e.ssContent:e}function Si(e,t,n=Q,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ct();let i=xc(n),a=gr(t,n,e,r);return i(),wt(),a};return r?i.unshift(a):i.push(a),a}}function Ci(e,t=Q){Si(`ec`,e,t)}function wi(e,t){return Di(Ps,e,!0,t)||e}function Ti(e){return j(e)?Di(Ps,e,!1)||e:e||Is}function Ei(e){return Di(Fs,e)}function Di(e,t,n=!0,r=!1){let i=K||Q;if(i){let n=i.type;if(e===Ps){let e=So(n,!1);if(e&&(e===t||e===P(t)||e===ve(P(t))))return n}let a=Oi(i[e]||n[e],t)||Oi(i.appContext[e],t);return!a&&r?n:a}}function Oi(e,t){return e&&(e[t]||e[P(t)]||e[ve(P(t))])}function ki(e,t,n,r){let i,a=n&&n[r],o=O(e);if(o||j(e)){let n=o&&Yt(e),r=!1,s=!1;n&&(r=!R(e),s=Xt(e),e=At(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function ji(e,t,n={},r,i){if(K.ce||K.parent&&xs(K.parent)&&K.parent.ce){let e=Object.keys(n).length>0;return t!==`default`&&(n.name=t),Ka(),Za(J,null,[Z(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),Ka();let o=a&&Mi(a(n)),s=n.key||o&&o.key,c=Za(J,{key:(s&&!M(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function Mi(e){return e.some(e=>Qa(e)?!(e.type===Y||e.type===J&&!Mi(e.children)):!0)?e:null}function Ni(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:ye(r)]=e[r];return n}function Pi(){return null}function Fi(){return null}function Ii(e){}function Li(e){}function Ri(){return null}function zi(){}function Bi(e,t){return null}function Vi(){return Ui(`useSlots`).slots}function Hi(){return Ui(`useAttrs`).attrs}function Ui(e){let t=$();return t.setupContext||=bo(t)}function Wi(e){return O(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Gi(e,t){let n=Wi(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?O(r)||A(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function Ki(e,t){return!e||!t?e||t:O(e)&&O(t)?e.concat(t):E({},Wi(e),Wi(t))}function qi(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function Ji(e){let t=$(),n=Cc,r=e();Sc(),n&&bc(!1);let i=()=>{xc(t),n&&bc(!0)},a=()=>{$()!==t&&t.scope.off(),Sc(),n&&bc(!1)};return se(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(a)),e})),[r,()=>{i(),Promise.resolve().then(a)}]}function Yi(e){let t=$i(e),n=e.proxy,r=e.ctx;Hs=!1,t.beforeCreate&&Zi(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:h,deactivated:g,beforeDestroy:_,beforeUnmount:v,destroyed:y,unmounted:b,render:x,renderTracked:S,renderTriggered:ee,errorCaptured:te,serverPrefetch:w,expose:T,inheritAttrs:E,components:ne,directives:re,filters:D}=t;if(l&&Xi(l,r,null),o)for(let e in o){let t=o[e];A(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);N(t)&&(e.data=Wt(t))}if(Hs=!0,a)for(let e in a){let t=a[e],i=Oc({get:A(t)?t.bind(n,n):A(t.get)?t.get.bind(n,n):C,set:!A(t)&&A(t.set)?t.set.bind(n):C});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)Qi(s[e],r,n,e);if(c){let e=A(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Pr(t,e[t])})}u&&Zi(u,e,`c`);function k(e,t){O(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(Ts,d),k(Es,f),k(Ds,p),k(Os,m),k(gi,h),k(_i,g),k(Ci,te),k(Ns,S),k(Ms,ee),k(ks,v),k(As,b),k(js,w),O(T))if(T.length){let t=e.exposed||={};T.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};x&&e.render===C&&(e.render=x),E!=null&&(e.inheritAttrs=E),ne&&(e.components=ne),re&&(e.directives=re),w&&ii(e)}function Xi(e,t,n=C){O(e)&&(e=ra(e));for(let n in e){let r=e[n],i;i=N(r)?`default`in r?Fr(r.from||n,r.default,!0):Fr(r.from||n):Fr(r),B(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Zi(e,t,n){gr(O(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Qi(e,t,n,r){let i=r.includes(`.`)?Ur(n,r):()=>n[r];if(j(e)){let n=t[e];A(n)&&Br(i,n)}else if(A(e))Br(i,e.bind(n));else if(N(e))if(O(e))e.forEach(e=>Qi(e,t,n,r));else{let r=A(e.handler)?e.handler.bind(n):t[e.handler];A(r)&&Br(i,r,e)}}function $i(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ea(c,e,o,!0)),ea(c,t,o)),N(t)&&a.set(t,c),c}function ea(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ea(e,a,n,!0),i&&i.forEach(t=>ea(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Us[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}function ta(e,t){return t?e?function(){return E(A(e)?e.call(this,this):e,A(t)?t.call(this,this):t)}:t:e}function na(e,t){return ia(ra(e),ra(t))}function ra(e){if(O(e)){let t={};for(let n=0;n{let c,l=S,u;return zr(()=>{let t=e[i];I(c,t)&&(c=t,s())}),{get(){return o(),n.get?n.get(c):c},set(e){let o=n.set?n.set(e):e;if(!I(o,c)&&!(l!==S&&I(e,l)))return;let d=r.vnode.props;d&&(t in d||i in d||a in d)&&(`onUpdate:${t}`in d||`onUpdate:${i}`in d||`onUpdate:${a}`in d)||(c=e,s()),r.emit(`update:${t}`,o),I(e,o)&&I(e,l)&&!I(o,u)&&s(),l=e,u=o}}});return s[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?o||S:s,done:!1}:{done:!0}}}},s}function ua(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||S,i=n,a=t.startsWith(`update:`),o=a&&Ks(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>j(e)?e.trim():e)),o.number&&(i=n.map(Se)));let s,c=r[s=ye(t)]||r[s=ye(P(t))];!c&&a&&(c=r[s=ye(F(t))]),c&&gr(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,gr(l,e,6,i)}}function da(e,t,n=!1){let r=n?qs:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!A(e)){let r=e=>{let n=da(e,t,!0);n&&(s=!0,E(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(N(e)&&r.set(e,null),null):(O(a)?a.forEach(e=>o[e]=null):E(o,a),N(e)&&r.set(e,o),o)}function fa(e,t){return!e||!w(t)?!1:(t=t.slice(2).replace(/Once$/,``),D(e,t[0].toLowerCase()+t.slice(1))||D(e,F(t))||D(e,t))}function pa(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=Or(e),_,v;try{if(n.shapeFlag&4){let e=i||r,t=e;_=W(l.call(t,e,u,d,p,f,m)),v=s}else{let e=t;_=W(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),v=t.props?s:Js(s)}}catch(t){pc.length=0,_r(t,e,1),_=Z(Y)}let y=_;if(v&&h!==!1){let e=Object.keys(v),{shapeFlag:t}=y;e.length&&t&7&&(a&&e.some(T)&&(v=Ys(v,a)),y=io(y,v,!1,!0))}return n.dirs&&(y=io(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&ei(y,n.transition),_=y,Or(g),_}function ma(e,t=!0){let n;for(let t=0;t=0){if(c&1024)return!0;if(c&16)return r?ga(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{c=!0;let[n,r]=Ca(e,t,!0);E(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return N(e)&&r.set(e,ee),ee;if(O(a))for(let e=0;e{if(e===t)return;e&&!$a(e,t)&&(r=fe(e),se(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case dc:g(e,t,n,r);break;case Y:_(e,t,n,r);break;case fc:e??v(t,n,r,o);break;case J:D(e,t,n,r,i,a,o,s,c);break;default:d&1?x(e,t,n,r,i,a,o,s,c):d&6?O(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ge)}u!=null&&i?si(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&si(e.ref,null,a,e,!0)},g=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},_=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},v=(e,t,n,r)=>{[e.el,e.anchor]=m(e.children,t,n,r,e.el,e.anchor)},y=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},x=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),E(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&T(e.children,f,null,i,s,Oa(e,c),l,d),_&&Nr(e,null,i,`created`),w(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!pe(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&fo(p,i,e)}_&&Nr(e,null,i,`beforeMount`);let v=Aa(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&q(()=>{p&&fo(p,i,e),v&&g.enter(f),_&&Nr(e,null,i,`mounted`)},s)},w=(e,t,n,r,i)=>{if(n&&p(e,n),r)for(let t=0;t{for(let l=c;l{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let p=e.props||S,m=t.props||S,h;if(n&&ka(n,!1),(h=m.onVnodeBeforeUpdate)&&fo(h,n,t,e),f&&Nr(t,e,n,`beforeUpdate`),n&&ka(n,!0),(p.innerHTML&&m.innerHTML==null||p.textContent&&m.textContent==null)&&u(c,``),d?ne(e.dynamicChildren,d,c,n,r,Oa(t,i),o):s||A(e,t,c,null,n,r,Oa(t,i),o,!1),l>0){if(l&16)re(c,p,m,n,i);else if(l&2&&p.class!==m.class&&a(c,`class`,null,m.class,i),l&4&&a(c,`style`,p.style,m.style,i),l&8){let e=t.dynamicProps;for(let t=0;t{h&&fo(h,n,t,e),f&&Nr(t,e,n,`updated`)},r)},ne=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==S)for(let o in t)!pe(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(pe(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},D=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),T(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(ne(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&ja(e,t,!0)):A(e,t,n,f,a,o,c,l,u)},O=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):k(t,n,r,i,a,o,c):ie(e,t,c)},k=(e,t,n,r,i,a,o)=>{let s=e.component=po(e,r,i);if(Ss(e)&&(s.ctx.renderer=ge),ho(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ae,o),!e.el){let r=s.subTree=Z(Y);_(null,r,t,n),e.placeholder=r.el}}else ae(s,e,t,n,i,a,o)},ie=(e,t,n)=>{let r=t.component=e.component;if(ha(e,t,n))if(r.asyncDep&&!r.asyncResolved){oe(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},ae=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Na(e);if(n){t&&(t.el=c.el,oe(e,t,o)),n.asyncDep.then(()=>{q(()=>{e.isUnmounted||l()},i)});return}}let u=t,f;ka(e,!1),t?(t.el=c.el,oe(e,t,o)):t=c,n&&be(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&fo(f,s,t,c),ka(e,!0);let p=pa(e),m=e.subTree;e.subTree=p,h(m,p,d(m.el),fe(m),e,i,a),t.el=p.el,u===null&&va(e,p.el),r&&q(r,i),(f=t.props&&t.props.onVnodeUpdated)&&q(()=>fo(f,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=xs(t);if(ka(e,!1),l&&be(l),!m&&(o=c&&c.onVnodeBeforeMount)&&fo(o,d,t),ka(e,!0),s&&_e){let t=()=>{e.subTree=pa(e),_e(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=pa(e);h(null,o,n,r,e,i,a),t.el=o.el}if(u&&q(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;q(()=>fo(o,d,e),i)}(t.shapeFlag&256||d&&xs(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&q(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new vn(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>xr(u),ka(e,!0),l()},oe=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ba(e,t.props,r,n),sc(e,t.children,n),Ct(),wr(e),wt()},A=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){M(l,f,n,r,i,a,o,s,c);return}else if(p&256){j(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&de(l,i,a),f!==l&&u(n,f)):d&16?m&16?M(l,f,n,r,i,a,o,s,c):de(l,i,a,!0):(d&8&&u(n,``),m&16&&T(f,n,r,i,a,o,s,c))},j=(e,t,n,r,i,a,o,s,c)=>{e||=ee,t||=ee;let l=e.length,u=t.length,d=Math.min(l,u),f;for(f=0;fu?de(e,i,a,!0,!1,d):T(t,n,r,i,a,o,s,c,d)},M=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?co(t[l]):W(t[l]);if($a(r,u))h(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?co(t[f]):W(t[f]);if($a(r,l))h(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=ef)for(;l<=d;)se(e[l],i,a,!0),l++;else{let p=l,m=l,g=new Map;for(l=m;l<=f;l++){let e=t[l]=c?co(t[l]):W(t[l]);e.key!=null&&g.set(e.key,l)}let _,v=0,y=f-m+1,b=!1,x=0,S=Array(y);for(l=0;l=y){se(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=m;_<=f;_++)if(S[_-m]===0&&$a(r,t[_])){u=_;break}u===void 0?se(r,i,a,!0):(S[u-m]=l+1,u>=x?x=u:b=!0,h(r,t[u],n,null,i,a,o,s,c),v++)}let C=b?Ma(S):ee;for(_=C.length-1,l=y-1;l>=0;l--){let e=m+l,d=t[e],f=t[e+1],p=e+1{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){N(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,ge);return}if(c===J){r(s,t,n);for(let e=0;el.enter(s),o);else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{s._isLeaving&&s[$o](!0),a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},se=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(d===-2&&(i=!1),s!=null&&(Ct(),si(s,null,n,e,!0),wt()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let m=u&1&&f,h=!xs(e),g;if(h&&(g=o&&o.onVnodeBeforeUnmount)&&fo(g,t,e),u&6)ue(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}m&&Nr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ge,r):l&&!l.hasOnce&&(a!==J||d>0&&d&64)?de(l,t,n,!1,!0):(a===J&&d&384||!i&&u&16)&&de(c,t,n),r&&ce(e)}(h&&(g=o&&o.onVnodeUnmounted)||m)&&q(()=>{g&&fo(g,t,e),m&&Nr(e,null,t,`unmounted`)},n)},ce=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===J){le(n,r);return}if(t===fc){b(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},le=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},ue=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Pa(c),Pa(l),r&&be(r),i.stop(),a&&(a.flags|=8,se(o,e,t,n)),s&&q(s,t),q(()=>{e.isUnmounted=!0},t)},de=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return fe(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[Wo];return n?f(n):t},me=!1,he=(e,t,n)=>{let r;e==null?t._vnode&&(se(t._vnode,null,null,!0),r=t._vnode.component):h(t._vnode||null,e,t,null,null,null,n),t._vnode=e,me||=(me=!0,wr(r),Tr(),!1)},ge={p:h,um:se,m:N,r:ce,mt:k,mc:T,pc:A,pbc:ne,n:fe,o:e},P,_e;return t&&([P,_e]=t(ge)),{render:he,hydrate:P,createApp:ca(he,P)}}function Oa({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function ka({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Aa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ja(e,t,n=!1){let r=e.children,i=t.children;if(O(r)&&O(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function Na(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Na(t)}function Pa(e){if(e)for(let t=0;t0?(Ia(e,`onPending`),Ia(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),Wa(f,e.ssFallback)):f.resolve(!1,!0)}function Ra(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,$a(h,f)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&(_||(c(m,p,n,r,i,null,a,o,s),Wa(d,p)))):(d.pendingId=lc++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():(c(m,p,n,r,i,null,a,o,s),Wa(d,p))):m&&$a(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&$a(m,f))c(m,f,n,r,i,d,a,o,s),Wa(d,f);else if(Ia(t,`onPending`),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=lc++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function za(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=Ga(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?Ce(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:lc++,timeout:typeof y==`number`?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;x.isHydrating?x.isHydrating=!1:e||(g=i&&o.transition&&o.transition.mode===`out-in`,g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b?m(i):a,0),Cr(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&(h(i.el)===u&&(a=m(i)),p(i,l,x,!0),!g&&d&&r.ssFallback&&q(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)),Wa(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){y.effects.push(...c),S=!0;break}y=y.parent}!S&&!g&&Cr(c),x.effects=[],v&&t&&t.pendingBranch&&_===t.pendingId&&(t.deps--,t.deps===0&&!n&&t.resolve()),Ia(r,`onResolve`)},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:a}=x;Ia(t,`onFallback`);let o=m(n),l=()=>{x.isInFallback&&(d(null,e,i,o,r,null,a,s,c),Wa(x,e))},u=e.transition&&e.transition.mode===`out-in`;u&&(n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{_r(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:s}=e;_o(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),va(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function Ba(e,t,n,r,i,a,o,s,c){let l=t.suspense=za(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function Va(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Ha(r?n.default:n),e.ssFallback=r?Ha(n.fallback):Z(Y)}function Ha(e){let t;if(A(e)){let n=mc&&e._c;n&&(e._d=!1,Ka()),e=e(),n&&(e._d=!0,t=X,qa())}return O(e)&&(e=ma(e)),e=W(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function Ua(e,t){t&&t.pendingBranch?O(e)?t.effects.push(...e):t.effects.push(e):Cr(e)}function Wa(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,va(r,i))}function Ga(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}function Ka(e=!1){pc.push(X=e?null:[])}function qa(){pc.pop(),X=pc[pc.length-1]||null}function Ja(e,t=!1){mc+=e,e<0&&X&&t&&(X.hasOnce=!0)}function Ya(e){return e.dynamicChildren=mc>0?X||ee:null,qa(),mc>0&&X&&X.push(e),e}function Xa(e,t,n,r,i,a){return Ya(to(e,t,n,r,i,a,!0))}function Za(e,t,n,r,i){return Ya(Z(e,t,n,r,i,!0))}function Qa(e){return e?e.__v_isVNode===!0:!1}function $a(e,t){return e.type===t.type&&e.key===t.key}function eo(e){}function to(e,t=null,n=null,r=0,i=null,a=e===J?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&hc(t),ref:t&&gc(t),scopeId:Bo,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:K};return s?(lo(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=j(n)?8:16),mc>0&&!o&&X&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&X.push(c),c}function no(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Is)&&(e=Y),Qa(e)){let r=io(e,t,!0);return n&&lo(r,n),mc>0&&!a&&X&&(r.shapeFlag&6?X[X.indexOf(e)]=r:X.push(r)),r.patchFlag=-2,r}if(Co(e)&&(e=e.__vccOpts),t){t=ro(t);let{class:e,style:n}=t;e&&!j(e)&&(t.class=u(e)),N(n)&&(Zt(n)&&!O(n)&&(n=E({},n)),t.style=s(n))}let o=j(e)?1:cc(e)?128:Go(e)?64:N(e)?4:A(e)?2:0;return to(e,t,n,r,i,o,a,!0)}function ro(e){return e?Zt(e)||Qs(e)?E({},e):e:null}function io(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?uo(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&hc(l),ref:t&&t.ref?n&&a?O(a)?a.concat(gc(t)):[a,gc(t)]:gc(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==J?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&io(e.ssContent),ssFallback:e.ssFallback&&io(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&ei(u,c.clone(u)),u}function ao(e=` `,t=0){return Z(dc,null,e,t)}function oo(e,t){let n=Z(fc,null,e);return n.staticCount=t,n}function so(e=``,t=!1){return t?(Ka(),Za(Y,null,e)):Z(Y,null,e)}function W(e){return e==null||typeof e==`boolean`?Z(Y):O(e)?Z(J,null,e.slice()):Qa(e)?co(e):Z(dc,null,String(e))}function co(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:io(e)}function lo(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(O(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),lo(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Qs(t)?t._ctx=K:r===3&&K&&(K.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else A(t)?(t={default:t,_ctx:K},n=32):(t=String(t),r&64?(n=16,t=[ao(t)]):n=8);e.children=t,e.shapeFlag|=n}function uo(...e){let t={};for(let n=0;n1?bo(e):null,i=xc(e),a=hr(r,e,0,[e.props,n]),o=se(a);if(wt(),i(),(o||e.sp)&&!xs(e)&&ii(e),o){if(a.then(Sc,Sc),t)return a.then(n=>{_o(e,n,t)}).catch(t=>{_r(t,e,0)});e.asyncDep=a}else _o(e,a,t)}else yo(e,t)}function _o(e,t,n){A(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:N(t)&&(e.setupState=on(t)),yo(e,n)}function vo(e){wc=e,Tc=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Vs))}}function yo(e,t,n){let r=e.type;if(!e.render){if(!t&&wc&&!r.render){let t=r.template||$i(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=E(E({isCustomElement:n,delimiters:a},i),o);r.render=wc(t,s)}}e.render=r.render||C,Tc&&Tc(e)}{let t=xc(e);Ct();try{Yi(e)}finally{wt(),t()}}}function bo(e){return{attrs:new Proxy(e.attrs,Dc),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function xo(e){return e.exposed?e.exposeProxy||=new Proxy(on(Qt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rs)return Rs[n](e)},has(e,t){return t in e||t in Rs}}):e.proxy}function So(e,t=!0){return A(e)?e.displayName||e.name:e.name||t&&e.__name}function Co(e){return A(e)&&`__vccOpts`in e}function wo(e,t,n){try{Ja(-1);let r=arguments.length;return r===2?N(t)&&!O(t)?Qa(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Qa(n)&&(n=[n]),Z(e,t,n))}finally{Ja(1)}}function To(){return;function e(t,n,r){let i=t[r];if(O(i)&&i.includes(n)||N(i)&&n in i||t.extends&&e(t.extends,n,r)||t.mixins&&t.mixins.some(t=>e(t,n,r)))return!0}}function Eo(e,t,n,r){let i=n[r];if(i&&Do(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function Do(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&X&&X.push(e),!0}var Oo,ko,Ao,G,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,K,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,q,cc,lc,uc,J,dc,Y,fc,pc,X,mc,hc,gc,Z,_c,vc,Q,$,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc=e((()=>{dr(),ct(),Oo=[],ko={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},Ao={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`},G=[],jo=-1,Mo=[],No=null,Po=0,Fo=Promise.resolve(),Io=null,Lo=e=>e.id==null?e.flags&2?-1:1/0:e.id,zo=[],K=null,Bo=null,Vo=e=>jr,Ho=Symbol.for(`v-scx`),Uo=()=>Fr(Ho),Wo=Symbol(`_vte`),Go=e=>e.__isTeleport,Ko=e=>e&&(e.disabled||e.disabled===``),qo=e=>e&&(e.defer||e.defer===``),Jo=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Yo=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,Xo=(e,t)=>{let n=e&&e.to;return j(n)?t?t(n):null:n},Zo={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g}}=l,_=Ko(t.props),{shapeFlag:v,children:y,dynamicChildren:b}=t;if(e==null){let e=t.el=h(``),l=t.anchor=h(``);p(e,n,r),p(l,n,r);let d=(e,t)=>{v&16&&u(y,e,t,i,a,o,s,c)},f=()=>{let e=t.target=Xo(t.props,m),n=qr(e,t,h,p);e&&(o!==`svg`&&Jo(e)?o=`svg`:o!==`mathml`&&Yo(e)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(e),_||(d(e,n),Kr(t,!1)))};_&&(d(n,l),Kr(t,!0)),qo(t.props)?(t.el.__isMounted=!1,q(()=>{f(),delete t.el.__isMounted},a)):f()}else{if(qo(t.props)&&e.el.__isMounted===!1){q(()=>{Zo.process(e,t,n,r,i,a,o,s,c,l)},a);return}t.el=e.el,t.targetStart=e.targetStart;let u=t.anchor=e.anchor,p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Ko(e.props),v=g?n:p,y=g?u:h;if(o===`svg`||Jo(p)?o=`svg`:(o===`mathml`||Yo(p))&&(o=`mathml`),b?(f(e.dynamicChildren,b,v,i,a,o,s),ja(e,t,!0)):c||d(e,t,v,y,i,a,o,s,!1),_)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Wr(t,n,u,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=Xo(t.props,m);e&&Wr(t,e,null,l,0)}else g&&Wr(t,p,h,l,1);Kr(t,_)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e;if(d&&(i(l),i(u)),a&&i(c),o&16){let e=a||!Ko(f);for(let i=0;i{let t=e.subTree;return t.component?rs(t.component):t},is={name:`BaseTransition`,props:ns,setup(e,{slots:t}){let n=$(),r=Jr();return()=>{let i=t.default&&ti(t.default(),!0);if(!i||!i.length)return;let a=Yr(i),o=z(e),{mode:s}=o;if(r.isLeaving)return Qr(a);let c=$r(a);if(!c)return Qr(a);let l=Zr(c,o,r,n,e=>l=e);c.type!==Y&&ei(c,l);let u=n.subTree&&$r(n.subTree);if(u&&u.type!==Y&&!$a(u,c)&&rs(n).type!==Y){let e=Zr(u,o,r,n);if(ei(u,e),s===`out-in`&&c.type!==Y)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},Qr(a);s===`in-out`&&c.type!==Y?e.delayLeave=(e,t,n)=>{let i=Xr(r,u);i[String(u.key)]=u,e[$o]=()=>{t(),e[$o]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}},as=is,os=new WeakMap,ss=!1,cs=()=>{ss||=(console.error(`Hydration completed but contains mismatches.`),!0)},ls=e=>e.namespaceURI.includes(`svg`)&&e.tagName!==`foreignObject`,us=e=>e.namespaceURI.includes(`MathML`),ds=e=>{if(e.nodeType===1){if(ls(e))return`svg`;if(us(e))return`mathml`}},fs=e=>e.nodeType===8,ps=`data-allow-mismatch`,ms={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`},hs=Te().requestIdleCallback||(e=>setTimeout(e,1)),gs=Te().cancelIdleCallback||(e=>clearTimeout(e)),_s=(e=1e4)=>t=>{let n=hs(t,{timeout:e});return()=>gs(n)},vs=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(di(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},ys=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},bs=(e=[])=>(t,n)=>{j(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a},xs=e=>!!e.type.__asyncLoader,Ss=e=>e.type.__isKeepAlive,Cs={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=$(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),q(()=>{a.isDeactivated=!1,a.a&&be(a.a);let t=e.props&&e.props.onVnodeMounted;t&&fo(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;Pa(t.m),Pa(t.a),l(e,f,null,1,s),q(()=>{t.da&&be(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&fo(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){bi(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=So(xs(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!$a(t,o))?p(t):o&&bi(o),i.delete(e),a.delete(e)}Br(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>hi(e,t)),t&&m(e=>!hi(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(cc(n.subTree.type)?q(()=>{i.set(g,xi(n.subTree))},n.subTree.suspense):i.set(g,xi(n.subTree)))};return Es(_),Os(_),ks(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=xi(t);if(e.type===i.type&&e.key===i.key){bi(i);let e=i.component.da;e&&q(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!Qa(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=xi(r);if(s.type===Y)return o=null,s;let c=s.type,l=So(xs(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!hi(u,l))||d&&l&&hi(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=io(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&ei(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,cc(r.type)?r:s}}},ws=e=>(t,n=Q)=>{(!Cc||e===`sp`)&&Si(e,(...e)=>t(...e),n)},Ts=ws(`bm`),Es=ws(`m`),Ds=ws(`bu`),Os=ws(`u`),ks=ws(`bum`),As=ws(`um`),js=ws(`sp`),Ms=ws(`rtg`),Ns=ws(`rtc`),Ps=`components`,Fs=`directives`,Is=Symbol.for(`v-ndc`),Ls=e=>e?mo(e)?xo(e):Ls(e.parent):null,Rs=E(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ls(e.parent),$root:e=>Ls(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>$i(e),$forceUpdate:e=>e.f||=()=>{xr(e.update)},$nextTick:e=>e.n||=yr.bind(e.proxy),$watch:e=>Hr.bind(e)}),zs=(e,t)=>e!==S&&!e.__isScriptSetup&&D(e,t),Bs={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(zs(r,t))return o[t]=1,r[t];else if(i!==S&&D(i,t))return o[t]=2,i[t];else if(D(a,t))return o[t]=3,a[t];else if(n!==S&&D(n,t))return o[t]=4,n[t];else Hs&&(o[t]=0)}let l=Rs[t],u,d;if(l)return t===`$attrs`&&L(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==S&&D(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,D(d,t))return d[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return zs(i,t)?(i[t]=n,!0):r!==S&&D(r,t)?(r[t]=n,!0):D(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==S&&s[0]!==`$`&&D(e,s)||zs(t,s)||D(a,s)||D(r,s)||D(Rs,s)||D(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?D(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},Vs=E({},Bs,{get(e,t){if(t!==Symbol.unscopables)return Bs.get(e,t,e)},has(e,t){return t[0]!==`_`&&!Me(t)}}),Hs=!0,Us={data:ta,props:aa,emits:aa,methods:ia,computed:ia,beforeCreate:U,created:U,beforeMount:U,mounted:U,beforeUpdate:U,updated:U,beforeDestroy:U,beforeUnmount:U,destroyed:U,unmounted:U,activated:U,deactivated:U,errorCaptured:U,serverPrefetch:U,components:ia,directives:ia,watch:oa,provide:ta,inject:na},Ws=0,Gs=null,Ks=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${P(t)}Modifiers`]||e[`${F(t)}Modifiers`],qs=new WeakMap,Js=e=>{let t;for(let n in e)(n===`class`||n===`style`||w(n))&&((t||={})[n]=e[n]);return t},Ys=(e,t)=>{let n={};for(let r in e)(!T(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Xs={},Zs=()=>Object.create(Xs),Qs=e=>Object.getPrototypeOf(e)===Xs,$s=new WeakMap,ec=e=>e===`_`||e===`_ctx`||e===`$stable`,tc=e=>O(e)?e.map(W):[W(e)],nc=(e,t,n)=>{if(t._n)return t;let r=jr((...e)=>tc(t(...e)),n);return r._c=!1,r},rc=(e,t,n)=>{let r=e._ctx;for(let n in e){if(ec(n))continue;let i=e[n];if(A(i))t[n]=nc(n,i,r);else if(i!=null){let e=tc(i);t[n]=()=>e}}},ic=(e,t)=>{let n=tc(t);e.slots.default=()=>n},ac=(e,t,n)=>{for(let r in t)(n||!ec(r))&&(e[r]=t[r])},oc=(e,t,n)=>{let r=e.slots=Zs();if(e.vnode.shapeFlag&32){let e=t._;e?(ac(r,t,n),n&&xe(r,`_`,e,!0)):rc(t,r)}else t&&ic(e,t)},sc=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=S;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:ac(i,t,n):(a=!t.$stable,rc(t,i)),o=t}else t&&(ic(e,t),o={default:1});if(a)for(let e in i)!ec(e)&&o[e]==null&&delete i[e]},q=Ua,cc=e=>e.__isSuspense,lc=0,uc={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)La(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Ra(e,t,n,r,i,o,s,c,l)}},hydrate:Ba,normalize:Va},J=Symbol.for(`v-fgt`),dc=Symbol.for(`v-txt`),Y=Symbol.for(`v-cmt`),fc=Symbol.for(`v-stc`),pc=[],X=null,mc=1,hc=({key:e})=>e??null,gc=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:j(e)||B(e)||A(e)?{i:K,r:e,k:t,f:!!n}:e),Z=no,_c=sa(),vc=0,Q=null,$=()=>Q||K;{let e=Te(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};yc=t(`__VUE_INSTANCE_SETTERS__`,e=>Q=e),bc=t(`__VUE_SSR_SETTERS__`,e=>Cc=e)}xc=e=>{let t=Q;return yc(e),e.scope.on(),()=>{e.scope.off(),yc(t)}},Sc=()=>{Q&&Q.scope.off(),yc(null)},Cc=!1,Ec=()=>!wc,Dc={get(e,t){return L(e,`get`,``),e[t]}},Oc=(e,t)=>dn(e,t,Cc),kc=`3.5.30`,Ac=C,jc=Ao,Mc=Ro,Nc=Dr,Pc={createComponentInstance:po,setupComponent:ho,renderComponentRoot:pa,setCurrentRenderingInstance:Or,isVNode:Qa,normalizeVNode:W,getComponentPublicInstance:xo,ensureValidVNode:Mi,pushWarningContext:fr,popWarningContext:pr}})),Ic=t({BaseTransition:()=>as,BaseTransitionPropsValidators:()=>ns,Comment:()=>Y,DeprecationTypes:()=>null,EffectScope:()=>gn,ErrorCodes:()=>ko,ErrorTypeStrings:()=>jc,Fragment:()=>J,KeepAlive:()=>Cs,ReactiveEffect:()=>vn,Static:()=>fc,Suspense:()=>uc,Teleport:()=>Qo,Text:()=>dc,TrackOpTypes:()=>or,Transition:()=>Xl,TransitionGroup:()=>Tu,TriggerOpTypes:()=>sr,VueElement:()=>yu,assertNumber:()=>mr,callWithAsyncErrorHandling:()=>gr,callWithErrorHandling:()=>hr,camelize:()=>P,capitalize:()=>ve,cloneVNode:()=>io,compatUtils:()=>null,computed:()=>Oc,createApp:()=>Uu,createBlock:()=>Za,createCommentVNode:()=>so,createElementBlock:()=>Xa,createElementVNode:()=>to,createHydrationRenderer:()=>Ea,createPropsRestProxy:()=>qi,createRenderer:()=>Ta,createSSRApp:()=>Wu,createSlots:()=>Ai,createStaticVNode:()=>oo,createTextVNode:()=>ao,createVNode:()=>Z,customRef:()=>sn,defineAsyncComponent:()=>pi,defineComponent:()=>ni,defineCustomElement:()=>pl,defineEmits:()=>Fi,defineExpose:()=>Ii,defineModel:()=>zi,defineOptions:()=>Li,defineProps:()=>Pi,defineSSRCustomElement:()=>_u,defineSlots:()=>Ri,devtools:()=>Mc,effect:()=>xt,effectScope:()=>lt,getCurrentInstance:()=>$,getCurrentScope:()=>ut,getCurrentWatcher:()=>fn,getTransitionRawChildren:()=>ti,guardReactiveProps:()=>ro,h:()=>wo,handleError:()=>_r,hasInjectionContext:()=>Ir,hydrate:()=>Hu,hydrateOnIdle:()=>_s,hydrateOnInteraction:()=>bs,hydrateOnMediaQuery:()=>ys,hydrateOnVisible:()=>vs,initCustomFormatter:()=>To,initDirectivesForSSR:()=>Ku,inject:()=>Fr,isMemoSame:()=>Do,isProxy:()=>Zt,isReactive:()=>Yt,isReadonly:()=>Xt,isRef:()=>B,isRuntimeOnly:()=>Ec,isShallow:()=>R,isVNode:()=>Qa,markRaw:()=>Qt,mergeDefaults:()=>Gi,mergeModels:()=>Ki,mergeProps:()=>uo,nextTick:()=>yr,nodeOps:()=>Ul,normalizeClass:()=>u,normalizeProps:()=>d,normalizeStyle:()=>s,onActivated:()=>gi,onBeforeMount:()=>Ts,onBeforeUnmount:()=>ks,onBeforeUpdate:()=>Ds,onDeactivated:()=>_i,onErrorCaptured:()=>Ci,onMounted:()=>Es,onRenderTracked:()=>Ns,onRenderTriggered:()=>Ms,onScopeDispose:()=>dt,onServerPrefetch:()=>js,onUnmounted:()=>As,onUpdated:()=>Os,onWatcherCleanup:()=>pn,openBlock:()=>Ka,patchProp:()=>hu,popScopeId:()=>Ar,provide:()=>Pr,proxyRefs:()=>on,pushScopeId:()=>kr,queuePostFlushCb:()=>Cr,reactive:()=>Wt,readonly:()=>Kt,ref:()=>$t,registerRuntimeCompiler:()=>vo,render:()=>Vu,renderList:()=>ki,renderSlot:()=>ji,resolveComponent:()=>wi,resolveDirective:()=>Ei,resolveDynamicComponent:()=>Ti,resolveFilter:()=>null,resolveTransitionHooks:()=>Zr,setBlockTracking:()=>Ja,setDevtoolsHook:()=>Nc,setTransitionHooks:()=>ei,shallowReactive:()=>Gt,shallowReadonly:()=>qt,shallowRef:()=>en,ssrContextKey:()=>Ho,ssrUtils:()=>Pc,stop:()=>St,toDisplayString:()=>at,toHandlerKey:()=>ye,toHandlers:()=>Ni,toRaw:()=>z,toRef:()=>ln,toRefs:()=>cn,toValue:()=>an,transformVNodeArgs:()=>eo,triggerRef:()=>nn,unref:()=>rn,useAttrs:()=>Hi,useCssModule:()=>gl,useCssVars:()=>Zc,useHost:()=>ml,useId:()=>ri,useModel:()=>la,useSSRContext:()=>Uo,useShadowRoot:()=>hl,useSlots:()=>Vi,useTemplateRef:()=>ai,useTransitionState:()=>Jr,vModelCheckbox:()=>ku,vModelDynamic:()=>Mu,vModelRadio:()=>Au,vModelSelect:()=>ju,vModelText:()=>Ou,vShow:()=>nu,version:()=>kc,warn:()=>Ac,watch:()=>Br,watchEffect:()=>Lr,watchPostEffect:()=>Rr,watchSyncEffect:()=>zr,withAsyncContext:()=>Ji,withCtx:()=>jr,withDefaults:()=>Bi,withDirectives:()=>Mr,withKeys:()=>Lu,withMemo:()=>Eo,withModifiers:()=>Fu,withScopeId:()=>Vo});function Lc(e){let t={};for(let n in e)n in ql||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=Rc(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:_,onEnter:v,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:S=_,onAppear:ee=v,onAppearCancelled:C=y}=t,te=(e,t,n,r)=>{e._enterCancelled=r,Vc(e,t?u:s),Vc(e,t?l:o),n&&n()},w=(e,t)=>{e._isLeaving=!1,Vc(e,d),Vc(e,p),Vc(e,f),t&&t()},T=e=>(t,n)=>{let i=e?ee:v,o=()=>te(t,e,n);Zl(i,[t,o]),Hc(()=>{Vc(t,e?c:a),Bc(t,e?u:s),Ql(i)||Uc(t,r,h,o)})};return E(t,{onBeforeEnter(e){Zl(_,[e]),Bc(e,a),Bc(e,o)},onBeforeAppear(e){Zl(S,[e]),Bc(e,c),Bc(e,l)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>w(e,t);Bc(e,d),e._enterCancelled?(Bc(e,f),qc(e)):(qc(e),Bc(e,f)),Hc(()=>{e._isLeaving&&(Vc(e,d),Bc(e,p),Ql(b)||Uc(e,r,g,n))}),Zl(b,[e,n])},onEnterCancelled(e){te(e,!1,void 0,!0),Zl(y,[e])},onAppearCancelled(e){te(e,!0,void 0,!0),Zl(C,[e])},onLeaveCancelled(e){w(e),Zl(x,[e])}})}function Rc(e){if(e==null)return null;if(N(e))return[zc(e.enter),zc(e.leave)];{let t=zc(e);return[t,t]}}function zc(e){return Ce(e)}function Bc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[Kl]||(e[Kl]=new Set)).add(t)}function Vc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[Kl];n&&(n.delete(t),n.size||(e[Kl]=void 0))}function Hc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}function Uc(e,t,n,r){let i=e._endId=++$l,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Wc(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${Wl}Delay`),a=r(`${Wl}Duration`),o=Gc(i,a),s=r(`${Gl}Delay`),c=r(`${Gl}Duration`),l=Gc(s,c),u=null,d=0,f=0;t===Wl?o>0&&(u=Wl,d=o,f=a.length):t===Gl?l>0&&(u=Gl,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?Wl:Gl:null,f=u?u===Wl?a.length:c.length:0);let p=u===Wl&&/\b(?:transform|all)(?:,|$)/.test(r(`${Wl}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Gc(e,t){for(;e.lengthKc(t)+Kc(e[n])))}function Kc(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function qc(e){return(e?e.ownerDocument:document).body.offsetHeight}function Jc(e,t,n){let r=e[Kl];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}function Yc(e,t){e.style.display=t?e[eu]:`none`,e[tu]=!t}function Xc(){nu.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}function Zc(e){let t=$();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>$c(e,n))},r=()=>{let r=e(t.proxy);t.ce?$c(t.ce,r):Qc(t.subTree,r),n(r)};Ds(()=>{Cr(r)}),Es(()=>{Br(r,C,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),As(()=>e.disconnect())})}function Qc(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Qc(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)$c(e.el,t);else if(e.type===J)e.children.forEach(e=>Qc(e,t));else if(e.type===fc){let{el:n,anchor:r}=e;for(;n&&($c(n,t),n!==r);)n=n.nextSibling}}function $c(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=x(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[ru]=r}}function el(e,t,n){let r=e.style,i=j(n),a=!1;if(n&&!i){if(t)if(j(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??tl(r,t,``)}else for(let e in t)n[e]??tl(r,e,``);for(let e in n)e===`display`&&(a=!0),tl(r,e,n[e])}else if(i){if(t!==n){let e=r[ru];e&&(n+=`;`+e),r.cssText=n,a=iu.test(n)}}else t&&e.removeAttribute(`style`);eu in e&&(e[eu]=a?r.display:``,e[tu]&&(r.display=`none`))}function tl(e,t,n){if(O(n))n.forEach(n=>tl(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=nl(e,t);au.test(n)?e.setProperty(F(r),n.replace(au,``),`important`):e[r]=n}}function nl(e,t){let n=su[t];if(n)return n;let r=P(t);if(r!==`filter`&&r in e)return su[t]=r;r=ve(r);for(let n=0;n{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;gr(ul(e,n.value),t,5,[e])};return n.value=e,n.attached=pu(),n}function ul(e,t){if(O(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}function dl(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&mu(t)&&A(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return mu(t)&&j(n)?!1:t in e}function fl(e,t){let n=e._def.props;if(!n)return!1;let r=P(t);return Array.isArray(n)?n.some(e=>P(e)===r):Object.keys(n).some(e=>P(e)===r)}function pl(e,t,n){let r=ni(e,t);de(r)&&(r=E({},r,t));class i extends yu{constructor(e){super(r,e,n)}}return i.def=r,i}function ml(e){let t=$();return t&&t.ce||null}function hl(){let e=ml();return e&&e.shadowRoot}function gl(e=`$style`){{let t=$();if(!t)return S;let n=t.type.__cssModules;return n&&n[e]||S}}function _l(e){let t=e.el;t[Su]&&t[Su](),t[Cu]&&t[Cu]()}function vl(e){xu.set(e,bl(e.el))}function yl(e){let t=bu.get(e),n=xu.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el,n=t.style,a=t.getBoundingClientRect(),o=1,s=1;return t.offsetWidth&&(o=a.width/t.offsetWidth),t.offsetHeight&&(s=a.height/t.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(s)||s===0)&&(s=1),Math.abs(o-1)<.01&&(o=1),Math.abs(s-1)<.01&&(s=1),n.transform=n.webkitTransform=`translate(${r/o}px,${i/s}px)`,n.transitionDuration=`0s`,e}}function bl(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function xl(e,t,n){let r=e.cloneNode(),i=e[Kl];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Wc(r);return a.removeChild(r),o}function Sl(e){e.target.composing=!0}function Cl(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}function wl(e,t,n){return t&&(e=e.trim()),n&&(e=Se(e)),e}function Tl(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(O(t))i=b(t,r.props.value)>-1;else if(ie(t))i=t.has(r.props.value);else{if(t===n)return;i=y(t,Ol(e,!0))}e.checked!==i&&(e.checked=i)}function El(e,t){let n=e.multiple,r=O(t);if(!(n&&!r&&!ie(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):a.selected=b(t,o)>-1}else a.selected=t.has(o);else if(y(Dl(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Dl(e){return`_value`in e?e._value:e.value}function Ol(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}function kl(e,t){switch(e){case`SELECT`:return ju;case`TEXTAREA`:return Ou;default:switch(t){case`checkbox`:return ku;case`radio`:return Au;default:return Ou}}}function Al(e,t,n,r,i){let a=kl(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function jl(){Ou.getSSRProps=({value:e})=>({value:e}),Au.getSSRProps=({value:e},t)=>{if(t.props&&y(t.props.value,e))return{checked:!0}},ku.getSSRProps=({value:e},t)=>{if(O(e)){if(t.props&&b(e,t.props.value)>-1)return{checked:!0}}else if(ie(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Mu.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=kl(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}function Ml(){return zu||=Ta(Ru)}function Nl(){return zu=Bu?zu:Ea(Ru),Bu=!0,zu}function Pl(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Fl(e){return j(e)?document.querySelector(e):e}var Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu=e((()=>{if(Fc(),Fc(),ct(),Il=void 0,Ll=typeof window<`u`&&window.trustedTypes,Ll)try{Il=Ll.createPolicy(`vue`,{createHTML:e=>e})}catch{}Rl=Il?e=>Il.createHTML(e):e=>e,zl=`http://www.w3.org/2000/svg`,Bl=`http://www.w3.org/1998/Math/MathML`,Vl=typeof document<`u`?document:null,Hl=Vl&&Vl.createElement(`template`),Ul={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Vl.createElementNS(zl,e):t===`mathml`?Vl.createElementNS(Bl,e):n?Vl.createElement(e,{is:n}):Vl.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Vl.createTextNode(e),createComment:e=>Vl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Vl.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Hl.innerHTML=Rl(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=Hl.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Wl=`transition`,Gl=`animation`,Kl=Symbol(`_vtc`),ql={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Jl=E({},ns,ql),Yl=e=>(e.displayName=`Transition`,e.props=Jl,e),Xl=Yl((e,{slots:t})=>wo(as,Lc(e),t)),Zl=(e,t=[])=>{O(e)?e.forEach(e=>e(...t)):e&&e(...t)},Ql=e=>e?O(e)?e.some(e=>e.length>1):e.length>1:!1,$l=0,eu=Symbol(`_vod`),tu=Symbol(`_vsh`),nu={name:`show`,beforeMount(e,{value:t},{transition:n}){e[eu]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Yc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Yc(e,!0),r.enter(e)):r.leave(e,()=>{Yc(e,!1)}):Yc(e,t))},beforeUnmount(e,{value:t}){Yc(e,t)}},ru=Symbol(``),iu=/(?:^|;)\s*display\s*:/,au=/\s*!important$/,ou=[`Webkit`,`Moz`,`ms`],su={},cu=`http://www.w3.org/1999/xlink`,lu=Symbol(`_vei`),uu=/(?:Once|Passive|Capture)$/,du=0,fu=Promise.resolve(),pu=()=>du||=(fu.then(()=>du=0),Date.now()),mu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,hu=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Jc(e,r,o):t===`style`?el(e,n,r):w(t)?T(t)||sl(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):dl(e,t,r,o))?(il(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&rl(e,t,r,o,a,t!==`value`)):e._isVueCE&&(fl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!j(r)))?il(e,P(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),rl(e,t,r,o))},gu={},_u=((e,t)=>pl(e,t,Wu)),vu=typeof HTMLElement<`u`?HTMLElement:class{},yu=class e extends vu{constructor(e,t={},n=Uu){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Uu?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(E({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,yr(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!O(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Ce(this._props[e])),(i||=Object.create(null))[P(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)D(this,e)||Object.defineProperty(this,e,{get:()=>rn(t[e])})}_resolveProps(e){let{props:t}=e,n=O(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(P))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):gu,r=P(e);t&&this._numberProps&&this._numberProps[r]&&(n=Ce(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===gu?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(F(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(F(e),t+``):t||this.removeAttribute(F(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),Vu(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=Z(this._def,E(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,de(t[0])?E({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),F(e)!==e&&t(F(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t(delete e.props.mode,e),Tu=wu({name:`TransitionGroup`,props:E({},Jl,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=$(),r=Jr(),i,a;return Os(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!xl(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(_l),i.forEach(vl);let r=i.filter(yl);qc(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Bc(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Su]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[Su]=null,Vc(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=z(e),s=Lc(o),c=o.tag||J;if(i=[],a)for(let e=0;e{let t=e.props[`onUpdate:modelValue`]||!1;return O(t)?e=>be(t,e):t},Du=Symbol(`_assign`),Ou={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Du]=Eu(i);let a=r||i.props&&i.props.type===`number`;al(e,t?`change`:`input`,t=>{t.target.composing||e[Du](wl(e.value,n,a))}),(n||a)&&al(e,`change`,()=>{e.value=wl(e.value,n,a)}),t||(al(e,`compositionstart`,Sl),al(e,`compositionend`,Cl),al(e,`change`,Cl))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Du]=Eu(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?Se(e.value):e.value,c=t??``;s!==c&&(document.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c))}},ku={deep:!0,created(e,t,n){e[Du]=Eu(n),al(e,`change`,()=>{let t=e._modelValue,n=Dl(e),r=e.checked,i=e[Du];if(O(t)){let e=b(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(ie(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Ol(e,r))})},mounted:Tl,beforeUpdate(e,t,n){e[Du]=Eu(n),Tl(e,t,n)}},Au={created(e,{value:t},n){e.checked=y(t,n.props.value),e[Du]=Eu(n),al(e,`change`,()=>{e[Du](Dl(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Du]=Eu(r),t!==n&&(e.checked=y(t,r.props.value))}},ju={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=ie(t);al(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Se(Dl(e)):Dl(e));e[Du](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,yr(()=>{e._assigning=!1})}),e[Du]=Eu(r)},mounted(e,{value:t}){El(e,t)},beforeUpdate(e,t,n){e[Du]=Eu(n)},updated(e,{value:t}){e._assigning||El(e,t)}},Mu={created(e,t,n){Al(e,t,n,null,`created`)},mounted(e,t,n){Al(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Al(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Al(e,t,n,r,`updated`)}},Nu=[`ctrl`,`shift`,`alt`,`meta`],Pu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Nu.some(n=>e[`${n}Key`]&&!t.includes(n))},Fu=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=F(n.key);if(t.some(e=>e===r||Iu[e]===r))return e(n)}))},Ru=E({patchProp:hu},Ul),Bu=!1,Vu=((...e)=>{Ml().render(...e)}),Hu=((...e)=>{Nl().hydrate(...e)}),Uu=((...e)=>{let t=Ml().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Fl(e);if(!r)return;let i=t._component;!A(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Pl(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),Wu=((...e)=>{let t=Nl().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=Fl(e);if(t)return n(t,!0,Pl(t))},t}),Gu=!1,Ku=()=>{Gu||(Gu=!0,jl(),Xc())}})),Ju=t({BaseTransition:()=>as,BaseTransitionPropsValidators:()=>ns,Comment:()=>Y,DeprecationTypes:()=>null,EffectScope:()=>gn,ErrorCodes:()=>ko,ErrorTypeStrings:()=>jc,Fragment:()=>J,KeepAlive:()=>Cs,ReactiveEffect:()=>vn,Static:()=>fc,Suspense:()=>uc,Teleport:()=>Qo,Text:()=>dc,TrackOpTypes:()=>or,Transition:()=>Xl,TransitionGroup:()=>Tu,TriggerOpTypes:()=>sr,VueElement:()=>yu,assertNumber:()=>mr,callWithAsyncErrorHandling:()=>gr,callWithErrorHandling:()=>hr,camelize:()=>P,capitalize:()=>ve,cloneVNode:()=>io,compatUtils:()=>null,compile:()=>Yu,computed:()=>Oc,createApp:()=>Uu,createBlock:()=>Za,createCommentVNode:()=>so,createElementBlock:()=>Xa,createElementVNode:()=>to,createHydrationRenderer:()=>Ea,createPropsRestProxy:()=>qi,createRenderer:()=>Ta,createSSRApp:()=>Wu,createSlots:()=>Ai,createStaticVNode:()=>oo,createTextVNode:()=>ao,createVNode:()=>Z,customRef:()=>sn,defineAsyncComponent:()=>pi,defineComponent:()=>ni,defineCustomElement:()=>pl,defineEmits:()=>Fi,defineExpose:()=>Ii,defineModel:()=>zi,defineOptions:()=>Li,defineProps:()=>Pi,defineSSRCustomElement:()=>_u,defineSlots:()=>Ri,devtools:()=>Mc,effect:()=>xt,effectScope:()=>lt,getCurrentInstance:()=>$,getCurrentScope:()=>ut,getCurrentWatcher:()=>fn,getTransitionRawChildren:()=>ti,guardReactiveProps:()=>ro,h:()=>wo,handleError:()=>_r,hasInjectionContext:()=>Ir,hydrate:()=>Hu,hydrateOnIdle:()=>_s,hydrateOnInteraction:()=>bs,hydrateOnMediaQuery:()=>ys,hydrateOnVisible:()=>vs,initCustomFormatter:()=>To,initDirectivesForSSR:()=>Ku,inject:()=>Fr,isMemoSame:()=>Do,isProxy:()=>Zt,isReactive:()=>Yt,isReadonly:()=>Xt,isRef:()=>B,isRuntimeOnly:()=>Ec,isShallow:()=>R,isVNode:()=>Qa,markRaw:()=>Qt,mergeDefaults:()=>Gi,mergeModels:()=>Ki,mergeProps:()=>uo,nextTick:()=>yr,nodeOps:()=>Ul,normalizeClass:()=>u,normalizeProps:()=>d,normalizeStyle:()=>s,onActivated:()=>gi,onBeforeMount:()=>Ts,onBeforeUnmount:()=>ks,onBeforeUpdate:()=>Ds,onDeactivated:()=>_i,onErrorCaptured:()=>Ci,onMounted:()=>Es,onRenderTracked:()=>Ns,onRenderTriggered:()=>Ms,onScopeDispose:()=>dt,onServerPrefetch:()=>js,onUnmounted:()=>As,onUpdated:()=>Os,onWatcherCleanup:()=>pn,openBlock:()=>Ka,patchProp:()=>hu,popScopeId:()=>Ar,provide:()=>Pr,proxyRefs:()=>on,pushScopeId:()=>kr,queuePostFlushCb:()=>Cr,reactive:()=>Wt,readonly:()=>Kt,ref:()=>$t,registerRuntimeCompiler:()=>vo,render:()=>Vu,renderList:()=>ki,renderSlot:()=>ji,resolveComponent:()=>wi,resolveDirective:()=>Ei,resolveDynamicComponent:()=>Ti,resolveFilter:()=>null,resolveTransitionHooks:()=>Zr,setBlockTracking:()=>Ja,setDevtoolsHook:()=>Nc,setTransitionHooks:()=>ei,shallowReactive:()=>Gt,shallowReadonly:()=>qt,shallowRef:()=>en,ssrContextKey:()=>Ho,ssrUtils:()=>Pc,stop:()=>St,toDisplayString:()=>at,toHandlerKey:()=>ye,toHandlers:()=>Ni,toRaw:()=>z,toRef:()=>ln,toRefs:()=>cn,toValue:()=>an,transformVNodeArgs:()=>eo,triggerRef:()=>nn,unref:()=>rn,useAttrs:()=>Hi,useCssModule:()=>gl,useCssVars:()=>Zc,useHost:()=>ml,useId:()=>ri,useModel:()=>la,useSSRContext:()=>Uo,useShadowRoot:()=>hl,useSlots:()=>Vi,useTemplateRef:()=>ai,useTransitionState:()=>Jr,vModelCheckbox:()=>ku,vModelDynamic:()=>Mu,vModelRadio:()=>Au,vModelSelect:()=>ju,vModelText:()=>Ou,vShow:()=>nu,version:()=>kc,warn:()=>Ac,watch:()=>Br,watchEffect:()=>Lr,watchPostEffect:()=>Rr,watchSyncEffect:()=>zr,withAsyncContext:()=>Ji,withCtx:()=>jr,withDefaults:()=>Bi,withDirectives:()=>Mr,withKeys:()=>Lu,withMemo:()=>Eo,withModifiers:()=>Fu,withScopeId:()=>Vo});qu();var Yu=()=>{};function Xu(e){let t=`.`,n=`__`,r=`--`,i;if(e){let i=e.blockPrefix;i&&(t=i),i=e.elementPrefix,i&&(n=i),i=e.modifierPrefix,i&&(r=i)}let a={install(e){i=e.c;let t=e.context;t.bem={},t.bem.b=null,t.bem.els=null}};function o(e){let n,r;return{before(e){n=e.bem.b,r=e.bem.els,e.bem.els=null},after(e){e.bem.b=n,e.bem.els=r},$({context:n,props:r}){return e=typeof e==`string`?e:e({context:n,props:r}),n.bem.b=e,`${r?.bPrefix||t}${n.bem.b}`}}}function s(e){let r;return{before(e){r=e.bem.els},after(e){e.bem.els=r},$({context:r,props:i}){return e=typeof e==`string`?e:e({context:r,props:i}),r.bem.els=e.split(`,`).map(e=>e.trim()),r.bem.els.map(e=>`${i?.bPrefix||t}${r.bem.b}${n}${e}`).join(`, `)}}}function c(e){return{$({context:i,props:a}){e=typeof e==`string`?e:e({context:i,props:a});let o=e.split(`,`).map(e=>e.trim());function s(e){return o.map(o=>`&${a?.bPrefix||t}${i.bem.b}${e===void 0?``:`${n}${e}`}${r}${o}`).join(`, `)}let c=i.bem.els;return c===null?s():s(c[0])}}}function l(e){return{$({context:i,props:a}){e=typeof e==`string`?e:e({context:i,props:a});let o=i.bem.els;return`&:not(${a?.bPrefix||t}${i.bem.b}${o!==null&&o.length>0?`${n}${o[0]}`:``}${r}${e})`}}}return Object.assign(a,{cB:((...e)=>i(o(e[0]),e[1],e[2])),cE:((...e)=>i(s(e[0]),e[1],e[2])),cM:((...e)=>i(c(e[0]),e[1],e[2])),cNotM:((...e)=>i(l(e[0]),e[1],e[2]))}),a}var Zu=`@css-render/vue3-ssr`;function Qu(e,t){return``}function $u(e,t,n){let{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(Qu(e,t)))}var ed=typeof document<`u`;function td(){if(ed)return;let e=Fr(Zu,null);if(e!==null)return{adapter:(t,n)=>$u(t,n,e),context:e}}export{Mr as $,ni as A,pe as At,ks as B,at as Bt,so as C,ct as Ct,ao as D,We as Dt,oo as E,He as Et,Qa as F,r as Ft,Pr as G,Es as H,uo as I,u as It,wi as J,ki as K,yr as L,s as Lt,wo as M,j as Mt,Ir as N,M as Nt,Z as O,N as Ot,Fr as P,Ge as Pt,jr as Q,gi as R,c as Rt,Za as S,o as St,Ai as T,me as Tt,As as U,_i as V,ye as Vt,Ka as W,Br as X,Ti as Y,Lr as Z,Qo as _,te as _t,Tu as a,Qt as at,Oc as b,ve as bt,Vu as c,Kt as ct,nu as d,en as dt,lt as et,Lu as f,z as ft,Cs as g,S as gt,J as h,rn as ht,Xl as i,B as it,$ as j,Ue as jt,pi as k,w as kt,Ic as l,$t as lt,Y as m,cn as mt,Xu as n,Zt as nt,Uu as o,dt as ot,Fu as p,ln as pt,ji as q,Ju as r,Yt as rt,qu as s,Wt as st,td as t,ut as tt,Ou as u,Gt as ut,dc as v,C as vt,Xa as w,O as wt,to as x,E as xt,io as y,P as yt,Ts as z,n as zt}; \ No newline at end of file diff --git a/web/dist/assets/@opentiny-Ckw2pOLd.js b/web/dist/assets/@opentiny-Ckw2pOLd.js deleted file mode 100644 index 333dd89b..00000000 --- a/web/dist/assets/@opentiny-Ckw2pOLd.js +++ /dev/null @@ -1,2 +0,0 @@ -import"./rolldown-runtime-Bhmf7a9N.js";import{A as e,B as t,Bt as n,G as r,H as i,It as a,J as o,K as s,L as c,Lt as l,M as u,O as d,P as f,Q as p,S as m,W as h,Y as g,at as _,b as v,h as y,i as b,j as x,k as ee,lt as te,p as ne,q as re,r as ie,w as S,x as C,z as ae}from"./@css-render-YsNuQTaE.js";var w=Object.prototype.toString,T=Object.prototype.hasOwnProperty,oe=Object.getPrototypeOf,se=T.toString,ce=se.call(Object),E={"[object Error]":`error`,"[object Object]":`object`,"[object RegExp]":`regExp`,"[object Date]":`date`,"[object Array]":`array`,"[object Function]":`function`,"[object AsyncFunction]":`asyncFunction`,"[object String]":`string`,"[object Number]":`number`,"[object Boolean]":`boolean`},D=e=>e==null,O=e=>D(e)?String(e):E[w.call(e)]||`object`,k=e=>O(e)===`object`,A=e=>{if(!e||w.call(e)!==`[object Object]`)return!1;let t=oe(e);if(!t)return!0;let n=T.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&se.call(n)===ce},le=e=>typeof e==`number`&&isFinite(e),ue=e=>e-parseFloat(e)>=0,de=e=>O(e)===`date`,fe=(e,t)=>{if(typeof t==`function`){for(let n in e)if(T.call(e,n)&&t(n,e[n])===!1)break}},j,pe=(e,t,n)=>{if(!e||!A(e)||!t||typeof t!=`string`)return;let r=t.split(`.`),i=e,a=r.length;if(a>1){let e=n?1:0;for(let t=e;t{if(!e||!A(e)||!t||typeof t!=`string`)return e;let i=t.split(`.`),a=e,o=i.length,s=i[0];if(o>1){o--;let e=a,t,c;for(let n=0;n{let i=(e,n,r,a,o)=>{let s=a.indexOf(r)===0,c=a.split(r),l=c[1]&&c[1].indexOf(`.`)===0;r===a||s&&l?r!==a&&fe(pe(e,r),t=>(i(e,n,`${r}.${t}`,a),!0)):t&&!t.includes(r)&&me(n,r,pe(e,r),o)};return A(e)?Array.isArray(t)?((e,t,n,r)=>{let a={};return r?fe(e,r=>t.forEach(t=>i(e,a,r,t,n))):t.forEach(t=>me(a,t,pe(e,t),n)),a})(e,t,n,r):j(n!==!1,{},e):e},ge=e=>Array.isArray(e)?e.map(e=>he(e)):e,_e=(e,t,n,r,i)=>{let a;if(n&&r&&(A(r)||(a=Array.isArray(r))))if(a)a=!1,e[t]=ge(r);else{let a=i&&A(i)?i:{};e[t]=j(n,a,r)}else if(r!==void 0)try{e[t]=r}catch{}};j=function(...e){let t=e.length,n=e[0]||{},r=1,i=!1;for(O(n)===`boolean`&&(i=n,n=e[r]||{},r++),!k(n)&&O(n)!==`function`&&(n={});r{if(O(e)===O(t)){if(n=n!==!1,Array.isArray(r))return ye(he(e,r),he(t,r),n);let i=ve(e,t,n),a=ve(t,e,n);return i&&a}return!1};ve=(e,t,n)=>{if(!A(e)){if(!Array.isArray(e))return e===t;if(e.length!==t.length)return!1;for(let r=0,i=e.length;r{let e=8;return document.addEventListener&&window.performance&&(e=9,window.atob&&window.matchMedia&&(e=10,!window.attachEvent&&!document.all&&(e=11))),e},xe=e=>{e.chrome&&~navigator.userAgent.indexOf(`Edg`)?(e.name=`edge`,e.edge=!0,delete e.chrome):!document.documentMode&&window.StyleMedia&&(e.name=`edge`,e.edge=!0)},Se=typeof window<`u`&&typeof document<`u`&&window.document===document;(()=>{let e={name:void 0,version:void 0,isDoc:typeof document<`u`,isMobile:!1,isPC:!0,isNode:typeof window>`u`};if(Se){let t=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent);e.isMobile=t,e.isPC=!t;let n;if(window.chrome&&(window.chrome.webstore||/^Google\b/.test(window.navigator.vendor))?(e.name=`chrome`,e.chrome=!0,n=navigator.userAgent.match(/chrome\/(\d+)/i),e.version=!!n&&!!n[1]&&parseInt(n[1],10),n=void 0):document.all||document.documentMode?(e.name=`ie`,e.version=be(),e.ie=!0):window.InstallTrigger===void 0?Object.prototype.toString.call(window.HTMLElement).indexOf(`Constructor`)>0?(e.name=`safari`,e.safari=!0):(window.opr&&window.opr.addons||window.opera)&&(e.name=`opera`,e.opera=!0):(e.name=`firefox`,e.firefox=!0),xe(e),!~[`ie`,`chrome`].indexOf(e.name)){let t=e.name+`/(\\d+)`;n=navigator.userAgent.match(new RegExp(t,`i`)),e.version=!!n&&!!n[1]&&parseInt(n[1],10),n=void 0}if(e.isDoc){let t=document.body||document.documentElement;[`webkit`,`khtml`,`moz`,`ms`,`o`].forEach(n=>{e[`-`+n]=!!t[n+`MatchesSelector`]})}}return e})();var M=Se?window.BigInt:global.BigInt;function Ce(){return typeof M==`function`}function N(e){let t=e.toString().trim(),n=t.startsWith(`-`);n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,`$1`).replace(/\.0*$/,``).replace(/^0+/,``),t.startsWith(`.`)&&(t=`0${t}`);let r=t||`0`,i=r.split(`.`),a=i[0]||`0`,o=i[1]||`0`;a===`0`&&o===`0`&&(n=!1);let s=n?`-`:``;return{negative:n,negativeStr:s,trimStr:r,integerStr:a,decimalStr:o,fullStr:`${s}${r}`}}function we(e){let t=String(e);return!isNaN(Number(t))&&~t.indexOf(`e`)}function Te(e){return typeof e==`number`?!isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}function Ee(e){let t=String(e);if(we(e)){let e=Number(t.slice(t.indexOf(`e-`)+2)),n=t.match(/\.(\d+)/);return n?.[1]&&(e+=n[1].length),e}return~t.indexOf(`.`)&&Te(t)?t.length-t.indexOf(`.`)-1:0}function De(e){let t=String(e);if(we(e)){if(e>2**53-1)return String(Ce()?M(e).toString():2**53-1);if(e<-(2**53-1))return String(Ce()?M(e).toString():-(2**53-1));t=e.toFixed(Ee(t))}return N(t).fullStr}function Oe(e){return e.add||Object.assign(e,{add:e.plus,lessEquals:e.isLessThan,equals:e.isEqualTo}),e}var ke={CLS:null},Ae;function je(e,t){return ke.CLS||Ae(t),Oe(new ke.CLS(e))}var Me=class e{constructor(e){if(!e&&e!==0||!String(e).trim()){this.empty=!0;return}if(this.origin=String(e),this.negative=void 0,this.integer=void 0,this.decimal=void 0,this.decimalLen=void 0,this.empty=void 0,this.nan=void 0,e===`-`){this.nan=!0;return}let t=we(e)?Number(e):e;typeof t!=`string`&&De(t);let n=Function,r=e=>n(`return BigInt('${e.replace(/^0+/,``)||`0`}')`)();if(Te(t)){let e=N(t);this.negative=e.negative;let n=e.trimStr.split(`.`);this.integer=n[0].includes(`e`)?n[0]:M(n[0]);let i=n[1]||`0`;this.decimal=i.includes(`e`)?r(i):M(i),this.decimalLen=i.length}else this.nan=!0}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,`0`)}getIntegerStr(){return this.integer.toString()}getMark(){return this.negative?`-`:``}alignDecimal(e){return M(`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,`0`)}`)}add(t){if(this.isInvalidate())return new e(t);let n=new e(t);if(n.isInvalidate())return this;let r=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),i=n.alignDecimal(r),{negativeStr:a,trimStr:o}=N(`${this.alignDecimal(r)+i}`),s=`${a}${o.padStart(r+1,`0`)}`;return je(`${s.slice(0,-r)}.${s.slice(-r)}`)}negate(){let t=new e(this.toString());return t.negative=!t.negative,t}isNaN(){return this.nan}isEmpty(){return this.empty}isInvalidate(){return this.isEmpty()||this.isNaN()}lessEquals(e){return this.add(e.negate().toString()).toNumber()<=0}equals(e){return this.toString()===(e&&e.toString())}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(e=!0){return e?this.isInvalidate()?``:N(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}},Ne=class e{constructor(e=``){if(!e&&e!==0||!String(e).trim()){this.empty=!0;return}this.origin=``,this.number=void 0,this.empty=void 0,this.origin=String(e),this.number=Number(e)}negate(){return new e(-this.toNumber())}add(t){if(this.isInvalidate())return new e(t);let n=Number(t);if(isNaN(n))return this;let r=this.number+n;if(r<-(2**53-1))return new e(-(2**53-1));if(r>2**53-1)return new e(2**53-1);let i=Math.max(Ee(n),Ee(this.number));return new e(r.toFixed(i))}isNaN(){return isNaN(this.number)}isEmpty(){return this.empty}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(e){return this.toNumber()===(e&&e.toNumber())}lessEquals(e){return this.add(e.negate().toString()).toNumber()<=0}toNumber(){return this.number}toString(e=!0){return e?this.isInvalidate()?``:De(this.number):this.origin}};Ae=function(e){ke.CLS=Ce()?Me:typeof e==`function`?e:Ne};function Pe(e,t,n=5){if(e===``)return``;let{negativeStr:r,integerStr:i,decimalStr:a}=N(e),o=`.${a}`,s=`${r}${i}`;if(t>=0){let e=Number(a[t]);return e>=n&&n!==0?Pe(r+je(`${i}.${a}`).add(`0.${Ye(``,t,!0)}${10-e}`).toString(),t,0):t===0?s:`${s}.${Ye(a,t,!0).slice(0,t)}`}return o===`.0`?s:`${s}${o}`}var Fe=`.`,Ie=e=>{let t=e.split(Fe),n=t[0],r=t[1],i,a;if(r)i=parseInt(e.split(Fe).join(``),10),a=r.length*-1;else{let e=n.match(/0+$/);if(e){let t=e[0].length;i=n.substr(0,n.length-t),a=t}else i=n,a=0}return{value:i,exp:a}},Le=e=>{let t;return t=e<=0?``:String.prototype.repeat?`0`.repeat(e):(e=>{let t=[];for(let n=0;n{t=Math.abs(t);let n=t-e.length,r=Fe;n>=0&&(e=Le(n)+e,r=`0.`);let i=e.length,a=i-t,o=e.substr(0,a),s=e.substring(a,i);return o+r+s},ze=(e,t)=>String(e+Le(t)),Be=(e,t)=>(t>=0?ze:Re)(String(e),t);function P(e){if(!this||this.constructor!==P)return new P(e);if(e instanceof P)return e;this.internal=String(e),this.asInt=Ie(this.internal),this.add=e=>{let t=[this,new P(e)];t.sort((e,t)=>e.asInt.exp-t.asInt.exp);let n=t[0].asInt.exp,r=t[1].asInt.exp,i=Number(Be(t[1].asInt.value,r-n)),a=Number(t[0].asInt.value);return new P(Be(String(i+a),n))},this.sub=e=>new P(this.add(e*-1)),this.mul=e=>(e=new P(e),new P(Be(String(this.asInt.value*e.asInt.value),this.asInt.exp+e.asInt.exp))),this.div=e=>{e=new P(e);let t=Math.min(this.asInt.exp,e.asInt.exp),n=10**Math.abs(t);return new P(P.mul(n,this)/P.mul(n,e))},this.toString=()=>this.internal,this.toNumber=()=>Number(this.internal)}P.add=(e,t)=>new P(e).add(t),P.mul=(e,t)=>new P(e).mul(t),P.sub=(e,t)=>new P(e).sub(t),P.div=(e,t)=>new P(e).div(t);var Ve=(e,{secondaryGroupSize:t=3,groupSize:n=0,groupSeparator:r=`,`})=>{let i=/^-\d+/.test(e),a=i?e.slice(1):e,o=t||n;if(n&&a.length>n){let e=a.slice(0,0-n),t=a.slice(0-n);e=e.replace(RegExp(`\\B(?=(\\d{${o}})+(?!\\d))`,`g`),r),a=`${e}${r}${t}`}return`${i?`-`:``}${a}`},He=e=>{let t=[];for(let n=0;n{let r=RegExp(`\\B(?=(\\d{${t}})+(?!\\d))`,`g`);return He(He(e).replace(r,n))},We=(e,t={})=>{let{fraction:n,rounding:r,prefix:i=``,decimalSeparator:a=`.`,suffix:o=``}=t,s=je(e);return s.isNaN()||!s.toString()?e:(s=Pe(s.toString(),n,r),t.zeroize===!1&&s.match(/\./)&&(s=s.replace(/\.?0+$/g,``)),`${i}${s.toString().split(`.`).slice(0,2).map((e,n)=>n?Ue(e,t):Ve(e,t)).join(a)}${o}`)},Ge=(e,t={})=>{let{prefix:n=``,suffix:r=``,decimalSeparator:i=`.`}=t,a=e;return typeof e==`string`&&(a=e.replace(RegExp(`^${n}(.+)${r}$`),(e,t)=>t).split(i).map(e=>e.replace(/[^\d]/g,``)).join(`.`)),Number(a)};function Ke(e){let t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var qe=/\B([A-Z])/g,Je=Ke(e=>e.replace(qe,`-$1`).toLowerCase()),Ye=(e,t,n,r=`0`)=>{if(typeof e==`string`&&typeof r==`string`&&le(t)){let i=e.length-t;if(i>0)return n?e.substr(0,t):e.substr(i,t);{let t=[];for(i=Math.abs(i)/r.length;i>0;i--)t.push(r);let a=t.join(``);return n?e+a:a+e}}},Xe=[31,28,31,30,31,30,31,31,30,31,30,31],Ze=RegExp(`^(\\d{4})(/|-)(((0)?[1-9])|(1[0-2]))((/|-)(((0)?[1-9])|([1-2][0-9])|(3[0-1])))?( ((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?$`),Qe=RegExp(`^(((0)?[1-9])|(1[0-2]))(/|-)(((0)?[1-9])|([1-2][0-9])|(3[0-1]))?(/|-)?(\\d{4})( ((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?$`),$e=RegExp(`^(\\d{4})-(((0)?[1-9])|(1[0-2]))-(((0)?[1-9])|([1-2][0-9])|(3[0-1]))T(((0)?[0-9]|1[0-9]|20|21|22|23):([0-5]?[0-9])((:([0-5]?[0-9]))?(.([0-9]{1,6}))?)?)?(Z|([+-])((0)?[0-9]|1[0-9]|20|21|22|23):?([0-5]?[0-9]))$`),F={YEAR:9999,MONTH:11,DATE:31,HOUR:23,MINUTE:59,SECOND:59,MILLISECOND:999},et=[].concat(`-12:00,-11:00,-10:00,-09:30,-08:00,-07:00,-06:00,-05:00,-04:30,-04:00,-03:30,-02:00,-01:00`.split(`,`),`-00:00,+00:00,+01:00,+02:00,+03:00,+03:30,+04:00,+04:30,+05:00,+05:30,+05:45,+06:00`.split(`,`),`+06:30,+07:00,+08:00,+09:00,+10:00,+10:30,+11:00,+11:30,+12:00,+12:45,+13:00,+14:00`.split(`,`)),tt=e=>e%400==0||e%4==0&&e%100!=0,nt=e=>e>F.MILLISECOND?Number(String(e).substring(0,3)):e,rt=({year:e,month:t,date:n,hours:r,minutes:i,seconds:a,milliseconds:o})=>{let s=Xe[t];if(tt(e)&&t===1&&(s+=1),n<=s)return new Date(e,t,n,r,i,a,nt(o))},it=[[Ze,e=>{if(e.length===23){let t=Number(e[1]),n=e[3]-1,r=Number(e[9]||1),i=e[15]||0,a=e[17]||0;return rt({date:r,year:t,hours:i,month:n,seconds:e[20]||0,minutes:a,milliseconds:e[22]||0})}}],[Qe,e=>{if(e.length===22)return rt({year:Number(e[12]),month:e[1]-1,date:Number(e[6]||1),hours:e[14]||0,minutes:e[16]||0,seconds:e[19]||0,milliseconds:e[21]||0})}],[$e,e=>{if(e.length!==25)return;let t=Number(e[1]),n=e[2]-1,r=Number(e[6]),i=new Date(t,n,r).getTimezoneOffset(),a=e[12]||0,o=e[14]||0,s=e[17]||0,c=e[19]||0,l=e[20],u=e[21],d=e[22]||0,f=e[24]||0,p=Xe[n],m,h;if(tt(t)&&n===1&&(p+=1),r<=p){if(l===`Z`)m=a-i/60,h=o;else{if(l.includes(`:`)||(l=l.substr(0,3)+`:`+l.substr(3)),!et.includes(l))return;m=u===`+`?a-d-i/60:Number(a)+Number(d)-i/60,h=u===`+`?o-f:Number(o)+Number(f)}return new Date(t,n,r,m,h,s,nt(c))}}]],at=e=>{for(let t=0,n=it.length;t0)return it[t][1](n)}},ot=(e,t,n)=>{if(n)switch(n){case`yyyy`:case`yy`:e[0]=t;break;case`M`:case`MM`:e[1]=t-1;break;case`d`:case`dd`:e[2]=t;break;case`h`:case`hh`:e[3]=t;break;case`m`:case`mm`:e[4]=t;break;case`s`:case`ss`:e[5]=t;break;case`S`:case`SS`:case`SSS`:e[6]=t;break;default:break}},st=(e,t)=>{let n=[0,-1,0,0,0,0];if(e.length!==t.length)return n;let r=0,i=0;for(let a=0,o=e.length;aisNaN(e)||en,ct=({year:e,month:t,date:n,hours:r,minutes:i,seconds:a,milliseconds:o})=>I(e,0,F.YEAR)||I(t,0,F.MONTH)||I(n,0,F.DATE)||I(r,0,F.HOUR)||I(i,0,F.MINUTE)||I(a,0,F.SECOND)||I(o,0,F.MILLISECOND),lt=(e,t)=>{if(typeof t==`string`){let n=st(e,t),r=Number(n[0]),i=Number(n[1]),a=Number(n[2]||1),o=Number(n[3]||0),s=Number(n[4]||0),c=Number(n[5]||0),l=Number(n[6]||0);return ct({year:r,month:i,date:a,hours:o,minutes:s,seconds:c,milliseconds:l})?void 0:rt({year:r,date:a,month:i,minutes:s,hours:o,milliseconds:l,seconds:c})}else return at(e)},ut=(e,t,n)=>{let r;if(le(e)?r=new Date(e):typeof e==`string`&&(r=lt(e,t)),n){let e=n&&ut(n)||new Date(1,1,1,0,0,0);return r&&r{if(!de(e)||!ue(t)||!ue(n)||!ue(r))return;let i=-t*60,a=-n*60,o=r*60,s=e.getTime()+i*6e4;return new Date(s-(a-o)*6e4)},ft=`date,datetime,time,time-select,week,month,year,years,yearrange,daterange,monthrange,timerange,datetimerange,dates`,L={Day:`day`,Date:`date`,Dates:`dates`,Year:`year`,Years:`years`,YearRange:`yearrange`,PanelYearNum:12,Month:`month`,Week:`week`,Normal:`normal`,Today:`today`,PreMonth:`pre-month`,NextMonth:`next-month`,YearI18n:`ui.datepicker.year`,List:[38,40,37,39],YearObj:{38:-4,40:4,37:-1,39:1},WeekObj:{38:-1,40:1,37:-1,39:1},DayObj:{38:-7,40:7,37:-1,39:1},Aviailable:`available`,Default:`default`,Current:`current`,InRange:`in-range`,StartDate:`start-date`,EndDate:`end-date`,Selected:`selected`,Disabled:`disabled`,Range:`range`,fullMonths:`January,February,March,April,May,June,July,August,September,October,November,December`.split(`,`),fullWeeks:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],MonhtList:[`jan`,`feb`,`mar`,`apr`,`may`,`jun`,`jul`,`aug`,`sep`,`oct`,`nov`,`dec`],Weeks:[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`],PlacementMap:{left:`bottom-start`,center:`bottom`,right:`bottom-end`},TriggerTypes:ft.split(`,`),DateFormats:{year:`yyyy`,years:`yyyy`,yearrange:`yyyy`,month:`yyyy-MM`,time:`HH:mm:ss`,week:`yyyywWW`,date:`yyyy-MM-dd`,timerange:`HH:mm:ss`,monthrange:`yyyy-MM`,daterange:`yyyy-MM-dd`,datetime:`yyyy-MM-dd HH:mm:ss`,datetimerange:`yyyy-MM-dd HH:mm:ss`},Time:`time`,TimeRange:`timerange`,IconTime:`icon-time`,IconDate:`icon-Calendar`,DateRange:`daterange`,DateTimeRange:`datetimerange`,MonthRange:`monthrange`,TimeSelect:`time-select`,TimesTamp:`timestamp`,DateTime:`datetime`,SelectbaleRange:`selectableRange`,Start:`09:00`,End:`18:00`,Step:`00:30`,CompareOne:`-1:-1`,CompareHundred:`100:100`,selClass:`.selected`,queryClass:`.tiny-picker-panel__content`,disableClass:`.time-select-item:not(.disabled)`,defaultClass:`.default`,Qurtyli:`[data-tag="li"]`,MappingKeyCode:{40:1,38:-1},DatePicker:`DatePicker`,TimePicker:`TimePicker`},R={},pt=[`\\d\\d?`,`\\d{3}`,`\\d{4}`],z=pt[0],mt=pt[1],ht=pt[2],B=`[^\\s]+`,gt=/\[([^]*?)\]/gm,_t=()=>void 0,vt={shortDate:`M/D/yy`,mediumDate:`MMM d, yyyy`,longDate:`MMMM d, yyyy`,fullDate:`dddd, MMMM d, yyyy`,default:`ddd MMM dd yyyy HH:mm:ss`,shortTime:`HH:mm`,mediumTime:`HH:mm:ss`,longTime:`HH:mm:ss.SSS`},yt=(e,t)=>{let n=[];for(let r=0,i=e.length;r(t,n,r)=>{let i=r[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~i&&(t.month=i)},V=(e,t)=>{for(e=String(e),t||=2;e.lengthe.replace(/[|\\{()[^$+*?.-]/g,`\\$&`),St=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Ct=L.fullWeeks,wt=L.fullMonths,Tt=yt(wt,3),Et=yt(Ct,3),Dt=[`th`,`st`,`nd`,`rd`];R.i18n={dayNames:Ct,monthNames:wt,dayNamesShort:Et,monthNamesShort:Tt,amPm:[`am`,`pm`],doFn:e=>e+Dt[e%10>3?0:(e-e%10!=10)*e%10]};var Ot={D:e=>e.getDay(),DD:e=>V(e.getDay()),Do:(e,t)=>t.doFn(e.getDate()),d:e=>e.getDate(),dd:e=>V(e.getDate()),ddd:(e,t)=>t.dayNamesShort[e.getDay()],dddd:(e,t)=>t.dayNames[e.getDay()],M:e=>e.getMonth()+1,MM:e=>V(e.getMonth()+1),MMM:(e,t)=>t.monthNamesShort[e.getMonth()],MMMM:(e,t)=>t.monthNames[e.getMonth()],yy:e=>V(String(e.getFullYear()),4).substr(2),yyyy:e=>V(e.getFullYear(),4),h:e=>e.getHours()%12||12,hh:e=>V(e.getHours()%12||12),H:e=>e.getHours(),HH:e=>V(e.getHours()),m:e=>e.getMinutes(),mm:e=>V(e.getMinutes()),s:e=>e.getSeconds(),ss:e=>V(e.getSeconds()),S:e=>Math.round(e.getMilliseconds()/100),SS:e=>V(Math.round(e.getMilliseconds()/10),2),SSS:e=>V(e.getMilliseconds(),3),a:(e,t)=>e.getHours()<12?t.amPm[0]:t.amPm[1],A:(e,t)=>e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase(),ZZ:e=>{let t=e.getTimezoneOffset();return(t>0?`-`:`+`)+V(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},H={d:[z,(e,t)=>{e.day=t}],Do:[z+B,(e,t)=>{e.day=parseInt(t,10)}],M:[z,(e,t)=>{e.month=t-1}],yy:[z,(e,t)=>{let n=new Date,r=Number(String(n.getFullYear()).substr(0,2));e.year=String(t>68?r-1:r)+t}],h:[z,(e,t)=>{e.hour=t}],m:[z,(e,t)=>{e.minute=t}],s:[z,(e,t)=>{e.second=t}],yyyy:[ht,(e,t)=>{e.year=t}],S:[`\\d`,(e,t)=>{e.millisecond=t*100}],SS:[`\\d{2}`,(e,t)=>{e.millisecond=t*10}],SSS:[mt,(e,t)=>{e.millisecond=t}],D:[z,_t],ddd:[B,_t],MMM:[B,bt(`monthNamesShort`)],MMMM:[B,bt(`monthNames`)],a:[B,(e,t,n)=>{let r=t.toLowerCase();r===n.amPm[0]?e.isPm=!1:r===n.amPm[1]&&(e.isPm=!0)}],ZZ:[`[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z`,(e,t)=>{let n=String(t).match(/([+-]|\d\d)/gi),r;n&&(r=Number(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]===`+`?r:-r)}]};R.masks=vt,H.dddd=H.ddd,[`A`,`DD`,`dd`,`mm`,`hh`,`MM`,`ss`,`hh`,`H`,`HH`].forEach(e=>{e===`MM`?H[e]=H[e.substr(0,1)]:H[e]=H[e.substr(0,1).toLowerCase()]}),R.format=(e,t,n)=>{let r=n||R.i18n;if(typeof e==`number`&&(e=new Date(e)),!de(e)||isNaN(e.getTime()))throw Error(`Invalid Date in fecha.format`);t=R.masks[t]||t||R.masks.default;let i=[];return t=t.replace(gt,(e,t)=>(i.push(t),`@@@`)),t=t.replace(St,t=>t in Ot?Ot[t](e,r):t.slice(1,t.length-1)),t.replace(/@@@/g,()=>i.shift())};var kt=(e,t)=>{let n=[],r=xt(e).replace(St,e=>{if(H[e]){let n=H[e];return t.push(n[1]),`(`+n[0]+`)`}return e});return r=r.replace(/@@@/g,()=>n.shift()),r},At=e=>{let t,n=new Date;if(D(e.timezoneOffset)){let{year:r,month:i,day:a,hour:o,minute:s,second:c,millisecond:l}=e;t=new Date(r||n.getFullYear(),i||0,a||1,o||0,s||0,c||0,l||0)}else{e.minute=Number(e.minute||0)-Number(e.timezoneOffset);let{year:r,month:i,day:a,hour:o,minute:s,second:c,millisecond:l}=e;t=new Date(Date.UTC(r||n.getFullYear(),i||0,a||1,o||0,s||0,c||0,l||0))}return t};R.parse=(e,t,n)=>{let r=n||R.i18n;if(typeof t!=`string`)throw TypeError(`Invalid format in fecha.parse`);if(t=R.masks[t]||t,e.length>1e3)return null;let i={},a=[],o=[];t=t.replace(gt,(e,t)=>(o.push(t),`@@@`));let s=kt(t,a),c=e.match(new RegExp(s,`i`));if(!c)return null;for(let e=1,t=c.length;e({dayNamesShort:Mt.map(t=>e(`ui.datepicker.weeks.${t}`)),dayNames:Mt.map(t=>e(`ui.datepicker.weeks.${t}`)),monthNamesShort:Nt.map(t=>e(`ui.datepicker.months.${t}`)),monthNames:Nt.map((t,n)=>e(`ui.datepicker.month${n+1}`)),amPm:[`am`,`pm`]}),It=function(e){return!(D(e)||isNaN(new Date(e).getTime())||Array.isArray(e))},Lt=e=>It(e)?new Date(e):null,Rt=(e,t,n)=>(e=Lt(e),e?jt.format(e,t||Pt,Ft(n)):``);function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t=-12&&e<=12?e:t};function an(e){return function(t){var n=U({},tn(t),{NumberFormat:en(t.NumberFormat),DbTimezone:rn(t.DbTimezone),Timezone:rn(t.Timezone),TimezoneOffset:t.TimezoneOffset});return{getFormatConfig:function(){return n},setFormatConfig:function(e){Object.assign(n,e)},getNumberFormat:function(){return n.NumberFormat},getDateFormat:function(){return{DateTimeFormat:n.DateTimeFormat,TimeFormat:n.TimeFormat,Timezone:n.Timezone,DateFormat:n.DateFormat,DbTimezone:n.DbTimezone,TimezoneOffset:n.TimezoneOffset}},formatDate:function(t,r){if(D(t))return t;var i=de(t)?t:ut(t),a=n.DbTimezone,o=t.match&&t.match(nn),s=r===!1||arguments[2]===!1;return o&&(a=rn(t),i=ut(t.replace(`T`,` `).slice(0,-5))),s||(i=this.getDateWithNewTimezone(i,a,n.Timezone,n.TimezoneOffset)),de(i)?Rt(i,r||n.DateFormat,e):null},formatNumber:function(e,t){return We(e,U({},n.NumberFormat,t))},recoverNumber:function(e,t){return Ge(e,U({},n.NumberFormat,t))},getDateWithNewTimezone:function(e,t,r,i){return t=t===0?t:t||n.DbTimezone,r=r===0?r:r||n.Timezone,i=i===0?i:i||n.TimezoneOffset,dt(e,t,r,i)}}}}W.use;var on=W.t;W.i18n,W.initI18n,W.extend,W.zhCN,W.enUS;var sn=W.language,cn=an(on);U({},$t,{language:sn,globalization:cn});var ln=typeof window>`u`;function un(e,t,n,r){let i,a=0;typeof t!=`boolean`&&(r=n,n=t,t=void 0);function o(){let o=this,s=new Date().valueOf()-a,c=arguments;function l(){a=new Date().valueOf(),n.apply(o,c)}function u(){i=void 0}r&&!i&&l(),i&&clearTimeout(i);let d=r===void 0;d&&s>e?l():t!==!0&&(i=setTimeout(r?u:l,d?e-s:e))}return o}function dn(e,t,n){return n===void 0?un(e,t,!1):un(e,n,t!==!1)}function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;te&&(t=0,r=n,n=new Map)}return{get:function(e){var t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set:function(e,t){n.has(e)?n.set(e,t):i(e,t)}}}var er=`!`;function tr(e){var t=e.separator||`:`,n=t.length===1,r=t[0],i=t.length;return function(e){for(var a=[],o=0,s=0,c,l=0;ls?c-s:void 0}}}function nr(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(e){e[0]===`[`?(t.push.apply(t,n.sort().concat([e])),n=[]):n.push(e)}),t.push.apply(t,n.sort()),t}function rr(e){return fn({cache:$n(e.cacheSize),splitModifiers:tr(e)},Wn(e))}var ir=/\s+/;function ar(e,t){var n=t.splitModifiers,r=t.getClassGroupId,i=t.getConflictingClassGroupIds,a=new Set;return e.trim().split(ir).map(function(e){var t=n(e),i=t.modifiers,a=t.hasImportantModifier,o=t.baseClassName,s=t.maybePostfixModifierPosition,c=r(s?o.substring(0,s):o),l=!!s;if(!c){if(!s||(c=r(o),!c))return{isTailwindClass:!1,originalClassName:e};l=!1}var u=nr(i).join(`:`);return{isTailwindClass:!0,modifierId:a?u+er:u,classGroupId:c,originalClassName:e,hasPostfixModifier:l}}).reverse().filter(function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,n=e.classGroupId,r=e.hasPostfixModifier,o=t+n;return a.has(o)?!1:(a.add(o),i(n,r).forEach(function(e){return a.add(t+e)}),!0)}).reverse().map(function(e){return e.originalClassName}).join(` `)}function or(){var e=[...arguments],t,n,r,i=a;function a(a){var s=e[0];return t=rr(e.slice(1).reduce(function(e,t){return t(e)},s())),n=t.cache.get,r=t.cache.set,i=o,o(a)}function o(e){var i=n(e);if(i)return i;var a=ar(e,t);return r(e,a),a}return function(){return i(Vn.apply(null,arguments))}}function K(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var sr=/^\[(?:([a-z-]+):)?(.+)\]$/i,cr=/^\d+\/\d+$/,lr=new Set([`px`,`full`,`screen`]),ur=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fr=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function q(e){return J(e)||lr.has(e)||cr.test(e)||pr(e)}function pr(e){return Q(e,`length`,xr)}function mr(e){return Q(e,`size`,Sr)}function hr(e){return Q(e,`position`,Sr)}function gr(e){return Q(e,`url`,Cr)}function _r(e){return Q(e,`number`,J)}function J(e){return!Number.isNaN(Number(e))}function vr(e){return e.endsWith(`%`)&&J(e.slice(0,-1))}function Y(e){return wr(e)||Q(e,`number`,wr)}function X(e){return sr.test(e)}function yr(){return!0}function Z(e){return ur.test(e)}function br(e){return Q(e,``,Tr)}function Q(e,t,n){var r=sr.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function xr(e){return dr.test(e)}function Sr(){return!1}function Cr(e){return e.startsWith(`url(`)}function wr(e){return Number.isInteger(Number(e))}function Tr(e){return fr.test(e)}function Er(){var e=K(`colors`),t=K(`spacing`),n=K(`blur`),r=K(`brightness`),i=K(`borderColor`),a=K(`borderRadius`),o=K(`borderSpacing`),s=K(`borderWidth`),c=K(`contrast`),l=K(`grayscale`),u=K(`hueRotate`),d=K(`invert`),f=K(`gap`),p=K(`gradientColorStops`),m=K(`gradientColorStopPositions`),h=K(`inset`),g=K(`margin`),_=K(`opacity`),v=K(`padding`),y=K(`saturate`),b=K(`scale`),x=K(`sepia`),ee=K(`skew`),te=K(`space`),ne=K(`translate`),re=function(){return[`auto`,`contain`,`none`]},ie=function(){return[`auto`,`hidden`,`clip`,`visible`,`scroll`]},S=function(){return[`auto`,X,t]},C=function(){return[X,t]},ae=function(){return[``,q]},w=function(){return[`auto`,J,X]},T=function(){return[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`]},oe=function(){return[`solid`,`dashed`,`dotted`,`double`,`none`]},se=function(){return[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`,`plus-lighter`]},ce=function(){return[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`]},E=function(){return[``,`0`,X]},D=function(){return[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`]},O=function(){return[J,_r]},k=function(){return[J,X]};return{cacheSize:500,theme:{colors:[yr],spacing:[q],blur:[`none`,``,Z,X],brightness:O(),borderColor:[e],borderRadius:[`none`,``,`full`,Z,X],borderSpacing:C(),borderWidth:ae(),contrast:O(),grayscale:E(),hueRotate:k(),invert:E(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[vr,pr],inset:S(),margin:S(),opacity:O(),padding:C(),saturate:O(),scale:O(),sepia:E(),skew:k(),space:C(),translate:C()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,X]}],container:[`container`],columns:[{columns:[Z]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],float:[{float:[`right`,`left`,`none`]}],clear:[{clear:[`left`,`right`,`both`,`none`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:[].concat(T(),[X])}],overflow:[{overflow:ie()}],"overflow-x":[{"overflow-x":ie()}],"overflow-y":[{"overflow-y":ie()}],overscroll:[{overscroll:re()}],"overscroll-x":[{"overscroll-x":re()}],"overscroll-y":[{"overscroll-y":re()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Y]}],basis:[{basis:S()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,X]}],grow:[{grow:E()}],shrink:[{shrink:E()}],order:[{order:[`first`,`last`,`none`,Y]}],"grid-cols":[{"grid-cols":[yr]}],"col-start-end":[{col:[`auto`,{span:[`full`,Y]},X]}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":[yr]}],"row-start-end":[{row:[`auto`,{span:[Y]},X]}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,X]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,X]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`].concat(ce())}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`].concat(ce(),[`baseline`])}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[].concat(ce(),[`baseline`])}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[te]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[te]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,X,t]}],"min-w":[{"min-w":[`min`,`max`,`fit`,X,q]}],"max-w":[{"max-w":[`0`,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[Z]},Z,X]}],h:[{h:[X,t,`auto`,`min`,`max`,`fit`]}],"min-h":[{"min-h":[`min`,`max`,`fit`,X,q]}],"max-h":[{"max-h":[X,t,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,Z,pr]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,_r]}],"font-family":[{font:[yr]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractons`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,X]}],"line-clamp":[{"line-clamp":[`none`,J,_r]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,X,q]}],"list-image":[{"list-image":[`none`,X]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[].concat(oe(),[`wavy`])}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,q]}],"underline-offset":[{"underline-offset":[`auto`,X,q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],indent:[{indent:C()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[].concat(T(),[hr])}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,mr]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},gr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[].concat(oe(),[`hidden`])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:oe()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``].concat(oe())}],"outline-offset":[{"outline-offset":[X,q]}],"outline-w":[{outline:[q]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ae()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[q]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,Z,br]}],"shadow-color":[{shadow:[yr]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":se()}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,Z,X]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,X]}],duration:[{duration:k()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,X]}],delay:[{delay:k()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,X]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Y,X]}],"translate-x":[{"translate-x":[ne]}],"translate-y":[{"translate-y":[ne]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,X]}],accent:[{accent:[`auto`,e]}],appearance:[`appearance-none`],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,X]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`pinch-zoom`,`manipulation`,{pan:[`x`,`left`,`right`,`y`,`up`,`down`]}]}],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,X]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[q,_r]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}}var Dr=or(Er),Or=function(){if(!ln){var e=te(``),n=[`2xl`,`xl`,`lg`,`md`,`sm`],r={"2xl":window.matchMedia(`(min-width:1536px)`),xl:window.matchMedia(`(min-width:1280px)`),lg:window.matchMedia(`(min-width:1024px)`),md:window.matchMedia(`(min-width:768px)`),sm:window.matchMedia(`(min-width:640px)`)},i=function(){for(var t=0;t{let r=!1;if(typeof e==`function`&&typeof t==`string`){let i=document.createEvent(`HTMLEvents`);i.initEvent(t,!1,!0),i.preventDefault=()=>{r=!0},n.unshift(i),n.unshift(t),e.apply(null,n)}return!r},Gr=({api:e,props:t,vm:n,state:r})=>()=>{r.leftLength>=0||(r.leftLength+=(r.blockWidth+r.blockMargin)*t.wheelBlocks,n.$refs.insider.style.left=r.leftLength+`px`,e.changeState())},Kr=({api:e,props:t,vm:n,state:r})=>()=>{r.blockWrapper({item:n,index:r})=>{Wr(e,`before-click`)&&(t.currentIndex=r,e(`click`,n,r))},Jr=({state:e})=>()=>{let t=e.blockWrapper;e.showLeft=!(parseInt(e.leftLength,10)>=0),e.showRight=t<=Math.abs(e.leftLength)+e.wrapperWidth},Yr=({api:e,state:t})=>n=>{n.wheelDelta>=0?t.leftLength<0&&e.leftClick():t.blockWrapper>Math.abs(t.leftLength)+t.wrapperWidth&&e.rightClick()},Xr=({props:e,state:t,vm:n})=>()=>{t.wrapperWidth=n.$refs.wrapper.offsetWidth,t.blockWidth=parseInt((1-(e.initBlocks-1)*.02)/e.initBlocks*t.wrapperWidth,10),t.blockMargin=parseInt(t.wrapperWidth*.02,10),t.blockWrapper=e.modelValue.length*t.blockWidth+(e.modelValue.length-1)*t.blockMargin},Zr=[`state`,`mouseEvent`,`rightClick`,`leftClick`,`blockClick`],Qr=(e,{onMounted:t,reactive:n},{vm:r,parent:i,emit:a})=>{let o={},s=n({leftLength:0,blockWidth:0,blockMargin:0,showLeft:!1,showRight:!1,blockWrapper:0,wrapperWidth:0,currentIndex:-1,offsetWidth:0});return Object.assign(o,{state:s,blockClick:qr({emit:a,state:s}),changeState:Jr({props:e,state:s}),changeSize:Xr({props:e,vm:r,state:s}),leftClick:Gr({api:o,props:e,vm:r,state:s}),mouseEvent:Yr({api:o,props:e,vm:r,state:s}),rightClick:Kr({api:o,parent:i,props:e,vm:r,state:s})}),t(o.changeSize),o},$r={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,"xml:space":`preserve`},ei=[C(`path`,{class:`chevron-left_svg__st0`,d:`M17 21c-.2 0-.5-.1-.6-.2l-9.9-8c-.4-.2-.5-.5-.5-.8 0-.3.1-.6.4-.8l9.9-7.9c.4-.4 1.1-.3 1.4.2.4.4.3 1.1-.2 1.4L8.7 12l8.9 7.2c.4.4.5 1 .2 1.4-.3.3-.5.4-.8.4z`},null,-1)];function ti(e,t){return h(),S(`svg`,$r,[].concat(ei))}var ni={render:ti},ri=function(){return Br({name:`IconChevronLeft`,component:ni})()},ii={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,"xml:space":`preserve`},ai=[C(`path`,{class:`chevron-right_svg__st0`,d:`M7 21c.2 0 .5-.1.6-.2l9.9-8c.2-.2.4-.5.4-.8 0-.3-.1-.6-.4-.8L7.6 3.3c-.4-.4-1.1-.3-1.4.2-.4.4-.3 1.1.2 1.4l8.9 7.2-8.9 7.2c-.4.4-.5 1-.2 1.4.2.2.5.3.8.3z`},null,-1)];function oi(e,t){return h(),S(`svg`,ii,[].concat(ai))}var si={render:oi},ci=function(){return Br({name:`IconChevronRight`,component:si})()},li={viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`},ui=[C(`path`,{d:`M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 1a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z`},null,-1),C(`path`,{d:`M3.757 12.243a6 6 0 1 0 8.486-8.486 6 6 0 0 0-8.486 8.486Z`,fill:`#FFF`},null,-1)];function di(e,t){return h(),S(`svg`,li,[].concat(ui))}var fi={render:di},pi=function(){return Br({name:`IconRadio`,component:fi})()};function mi(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=hi(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hi(e,t){if(e){if(typeof e==`string`)return gi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gi(e,t)}}function gi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`,5)])}}),L={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},R=e({name:`EyeOutline`,render:function(e,t){return n(),r(`svg`,L,t[0]||=[i(`path`,{d:`M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`circle`,{cx:`256`,cy:`256`,r:`80`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`},null,-1)])}}),z={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},B=e({name:`FlameOutline`,render:function(e,t){return n(),r(`svg`,z,t[0]||=[i(`path`,{d:`M112 320c0-93 124-165 96-272c66 0 192 96 192 272a144 144 0 0 1-288 0z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M320 368c0 57.71-32 80-64 80s-64-22.29-64-80s40-86 32-128c42 0 96 70.29 96 128z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1)])}}),V={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},H=e({name:`Heart`,render:function(e,t){return n(),r(`svg`,V,t[0]||=[i(`path`,{d:`M256 448a32 32 0 0 1-18-5.57c-78.59-53.35-112.62-89.93-131.39-112.8c-40-48.75-59.15-98.8-58.61-153C48.63 114.52 98.46 64 159.08 64c44.08 0 74.61 24.83 92.39 45.51a6 6 0 0 0 9.06 0C278.31 88.81 308.84 64 352.92 64c60.62 0 110.45 50.52 111.08 112.64c.54 54.21-18.63 104.26-58.61 153c-18.77 22.87-52.8 59.45-131.39 112.8a32 32 0 0 1-18 5.56z`,fill:`currentColor`},null,-1)])}}),U={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},W=e({name:`HeartOutline`,render:function(e,t){return n(),r(`svg`,U,t[0]||=[i(`path`,{d:`M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81c-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0 0 18 0c96.26-65.34 184.09-143.09 183-252.42c-.54-52.67-42.32-96.81-95.08-96.81z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1)])}}),G={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},K=e({name:`HomeOutline`,render:function(e,t){return n(),r(`svg`,G,t[0]||=[i(`path`,{d:`M80 212v236a16 16 0 0 0 16 16h96V328a24 24 0 0 1 24-24h80a24 24 0 0 1 24 24v136h96a16 16 0 0 0 16-16V212`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M400 179V64h-48v69`},null,-1)])}}),q={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},J=e({name:`ImageOutline`,render:function(e,t){return n(),r(`svg`,q,t[0]||=[i(`rect`,{x:`48`,y:`80`,width:`416`,height:`352`,rx:`48`,ry:`48`,fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`circle`,{cx:`336`,cy:`176`,r:`32`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`},null,-1),i(`path`,{d:`M304 335.79l-90.66-90.49a32 32 0 0 0-43.87-1.3L48 352`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M224 432l123.34-123.34a32 32 0 0 1 43.11-2L464 368`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1)])}}),Y={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},X=e({name:`LayersOutline`,render:function(e,t){return n(),r(`svg`,Y,t[0]||=[i(`path`,{d:`M434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1)])}}),Z={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},Q=e({name:`LeafOutline`,render:function(e,t){return n(),r(`svg`,Z,t[0]||=[i(`path`,{d:`M321.89 171.42C233 114 141 155.22 56 65.22c-19.8-21-8.3 235.5 98.1 332.7c77.79 71 197.9 63.08 238.4-5.92s18.28-163.17-70.61-220.58z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M173 253c86 81 175 129 292 147`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1)])}}),ne={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},re=e({name:`LinkOutline`,render:function(e,t){return n(),r(`svg`,ne,t[0]||=[i(`path`,{d:`M208 352h-64a96 96 0 0 1 0-192h64`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`36`},null,-1),i(`path`,{d:`M304 160h64a96 96 0 0 1 0 192h-64`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`36`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`36`,d:`M163.29 256h187.42`},null,-1)])}}),ie={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},ae=e({name:`LockClosedOutline`,render:function(e,t){return n(),r(`svg`,ie,t[0]||=[i(`path`,{d:`M336 208v-95a80 80 0 0 0-160 0v95`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`rect`,{x:`96`,y:`208`,width:`320`,height:`272`,rx:`48`,ry:`48`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1)])}}),oe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},se=e({name:`LockOpenOutline`,render:function(e,t){return n(),r(`svg`,oe,t[0]||=[i(`path`,{d:`M336 112a80 80 0 0 0-160 0v96`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`rect`,{x:`96`,y:`208`,width:`320`,height:`272`,rx:`48`,ry:`48`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1)])}}),ce={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},le=e({name:`LogOutOutline`,render:function(e,t){return n(),r(`svg`,ce,t[0]||=[i(`path`,{d:`M304 336v40a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V136a40 40 0 0 1 40-40h152c22.09 0 48 17.91 48 40v40`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M368 336l80-80l-80-80`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M176 256h256`},null,-1)])}}),ue={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},de=e({name:`LogoAlipay`,render:function(e,t){return n(),r(`svg`,ue,t[0]||=[i(`path`,{d:`M102.41 32C62.38 32 32 64.12 32 103.78v304.45C32 447.86 64.38 480 104.41 480h303.2c40 0 72.39-32.14 72.39-71.77v-3.11c-1.35-.56-115.47-48.57-174.5-76.7c-39.82 48.57-91.18 78-144.5 78c-90.18 0-120.8-78.22-78.1-129.72c9.31-11.22 25.15-21.94 49.73-28c38.45-9.36 99.64 5.85 157 24.61a309.41 309.41 0 0 0 25.46-61.67H138.34V194h91.13v-31.83H119.09v-17.75h110.38V99s0-7.65 7.82-7.65h44.55v53H391v17.75H281.84V194h89.08a359.41 359.41 0 0 1-37.72 94.43c27 9.69 49.31 18.88 67.39 24.89c60.32 20 77.23 22.45 79.41 22.7V103.78C480 64.12 447.6 32 407.61 32h-305.2zM152 274.73q-5.81.06-11.67.63c-11.3 1.13-32.5 6.07-44.09 16.23c-34.74 30-13.94 84.93 56.37 84.93c40.87 0 81.71-25.9 113.79-67.37c-41.36-20-77-34.85-114.4-34.42z`,fill:`currentColor`},null,-1)])}}),fe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},pe=e({name:`MegaphoneOutline`,render:function(e,i){return n(),r(`svg`,fe,i[0]||=[t(``,6)])}}),me={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},he=e({name:`OptionsOutline`,render:function(e,i){return n(),r(`svg`,me,i[0]||=[t(``,9)])}}),ge={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},_e=e({name:`PaperPlaneOutline`,render:function(e,t){return n(),r(`svg`,ge,t[0]||=[i(`path`,{d:`M53.12 199.94l400-151.39a8 8 0 0 1 10.33 10.33l-151.39 400a8 8 0 0 1-15-.34l-67.4-166.09a16 16 0 0 0-10.11-10.11L53.46 215a8 8 0 0 1-.34-15.06z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M460 52L227 285`},null,-1)])}}),ve={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},ye=e({name:`PeopleOutline`,render:function(e,t){return n(),r(`svg`,ve,t[0]||=[i(`path`,{d:`M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M336 304c-65.17 0-127.84 32.37-143.54 95.41c-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`},null,-1),i(`path`,{d:`M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M206 306c-18.05-8.27-37.93-11.45-59-11.45c-52 0-102.1 25.85-114.65 76.2c-1.65 6.66 2.53 13.25 9.37 13.25H154`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-miterlimit":`10`,"stroke-width":`32`},null,-1)])}}),be={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},xe=e({name:`PersonAddOutline`,render:function(e,t){return n(),r(`svg`,be,t[0]||=[i(`path`,{d:`M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M88 176v112`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M144 232H32`},null,-1)])}}),Se={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},Ce=e({name:`PersonOutline`,render:function(e,t){return n(),r(`svg`,Se,t[0]||=[i(`path`,{d:`M344 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M256 304c-87 0-175.3 48-191.64 138.6C62.39 453.52 68.57 464 80 464h352c11.44 0 17.62-10.48 15.65-21.4C431.3 352 343 304 256 304z`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`},null,-1)])}}),we={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},Te=e({name:`PersonRemoveOutline`,render:function(e,t){return n(),r(`svg`,we,t[0]||=[i(`path`,{d:`M376 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M288 304c-87 0-175.3 48-191.64 138.6c-2 10.92 4.21 21.4 15.65 21.4H464c11.44 0 17.62-10.48 15.65-21.4C463.3 352 375 304 288 304z`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M144 232H32`},null,-1)])}}),Ee={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},De=e({name:`PushOutline`,render:function(e,t){return n(),r(`svg`,Ee,t[0]||=[i(`path`,{d:`M336 336h40a40 40 0 0 0 40-40V88a40 40 0 0 0-40-40H136a40 40 0 0 0-40 40v208a40 40 0 0 0 40 40h40`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M176 240l80-80l80 80`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M256 464V176`},null,-1)])}}),Oe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},ke=e({name:`Search`,render:function(e,t){return n(),r(`svg`,Oe,t[0]||=[i(`path`,{d:`M456.69 421.39L362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8a124.95 124.95 0 0 1-124.8-124.8z`,fill:`currentColor`},null,-1)])}}),Ae={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},je=e({name:`SettingsOutline`,render:function(e,t){return n(),r(`svg`,Ae,t[0]||=[i(`path`,{d:`M262.29 192.31a64 64 0 1 0 57.4 57.4a64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22a155.3 155.3 0 0 1-21.46-12.57a16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22a155.3 155.3 0 0 1 21.46 12.57a16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1)])}}),Me={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},Ne=e({name:`ShareOutline`,render:function(e,t){return n(),r(`svg`,Me,t[0]||=[i(`path`,{d:`M336 192h40a40 40 0 0 1 40 40v192a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V232a40 40 0 0 1 40-40h40`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M336 128l-80-80l-80 80`},null,-1),i(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`,d:`M256 321V48`},null,-1)])}}),Pe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},Fe=e({name:`ShareSocialOutline`,render:function(e,i){return n(),r(`svg`,Pe,i[0]||=[t(``,5)])}}),Ie={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},Le=e({name:`TrashOutline`,render:function(e,i){return n(),r(`svg`,Ie,i[0]||=[t(``,6)])}}),Re={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},ze=e({name:`VideocamOutline`,render:function(e,t){return n(),r(`svg`,Re,t[0]||=[i(`path`,{d:`M374.79 308.78L457.5 367a16 16 0 0 0 22.5-14.62V159.62A16 16 0 0 0 457.5 145l-82.71 58.22A16 16 0 0 0 368 216.3v79.4a16 16 0 0 0 6.79 13.08z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M268 384H84a52.15 52.15 0 0 1-52-52V180a52.15 52.15 0 0 1 52-52h184.48A51.68 51.68 0 0 1 320 179.52V332a52.15 52.15 0 0 1-52 52z`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`},null,-1)])}}),Be={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},Ve=e({name:`WalkOutline`,render:function(e,i){return n(),r(`svg`,Be,i[0]||=[t(``,5)])}}),He={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 512 512`},Ue=e({name:`WalletOutline`,render:function(e,t){return n(),r(`svg`,He,t[0]||=[i(`rect`,{x:`48`,y:`144`,width:`416`,height:`288`,rx:`48`,ry:`48`,fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M411.36 144v-30A50 50 0 0 0 352 64.9L88.64 109.85A50 50 0 0 0 48 159v49`,fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`32`},null,-1),i(`path`,{d:`M368 320a32 32 0 1 1 32-32a32 32 0 0 1-32 32z`,fill:`currentColor`},null,-1)])}}),We={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Ge=e({name:`ArrowBarDown`,render:function(e,i){return n(),r(`svg`,We,i[0]||=[t(``,1)])}}),Ke={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},qe=e({name:`ArrowBarToUp`,render:function(e,i){return n(),r(`svg`,Ke,i[0]||=[t(``,1)])}}),Je={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Ye=e({name:`Edit`,render:function(e,t){return n(),r(`svg`,Je,t[0]||=[i(`g`,{fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[i(`path`,{d:`M9 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3`}),i(`path`,{d:`M9 15h3l8.5-8.5a1.5 1.5 0 0 0-3-3L9 12v3`}),i(`path`,{d:`M16 5l3 3`})],-1)])}}),Xe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Ze=e({name:`Hash`,render:function(e,i){return n(),r(`svg`,Xe,i[0]||=[t(``,1)])}}),Qe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},$e=e({name:`Trash`,render:function(e,i){return n(),r(`svg`,Qe,i[0]||=[t(``,1)])}}),et={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},tt=e({name:`ChevronLeftRound`,render:function(e,t){return n(),r(`svg`,et,t[0]||=[i(`path`,{d:`M14.71 6.71a.996.996 0 0 0-1.41 0L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59a.996.996 0 1 0 1.41-1.41L10.83 12l3.88-3.88c.39-.39.38-1.03 0-1.41z`,fill:`currentColor`},null,-1)])}}),$={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},nt=e({name:`DarkModeOutlined`,render:function(e,t){return n(),r(`svg`,$,t[0]||=[i(`path`,{d:`M9.37 5.51A7.35 7.35 0 0 0 9.1 7.5c0 4.08 3.32 7.4 7.4 7.4c.68 0 1.35-.09 1.99-.27A7.014 7.014 0 0 1 12 19c-3.86 0-7-3.14-7-7c0-2.93 1.81-5.45 4.37-6.49zM12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26a5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z`,fill:`currentColor`},null,-1)])}}),rt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},it=e({name:`DehazeRound`,render:function(e,t){return n(),r(`svg`,rt,t[0]||=[i(`path`,{d:`M2 17c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1z`,fill:`currentColor`},null,-1)])}}),at={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},ot=e({name:`LightModeOutlined`,render:function(e,t){return n(),r(`svg`,at,t[0]||=[i(`path`,{d:`M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3s-3-1.35-3-3s1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z`,fill:`currentColor`},null,-1)])}}),st={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},ct=e({name:`MoreHorizFilled`,render:function(e,t){return n(),r(`svg`,st,t[0]||=[i(`path`,{d:`M6 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z`,fill:`currentColor`},null,-1)])}}),lt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},ut=e({name:`MoreVertOutlined`,render:function(e,t){return n(),r(`svg`,lt,t[0]||=[i(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z`,fill:`currentColor`},null,-1)])}}),dt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},ft=e({name:`ThumbDownOutlined`,render:function(e,t){return n(),r(`svg`,dt,t[0]||=[i(`path`,{d:`M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z`,fill:`currentColor`},null,-1)])}}),pt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},mt=e({name:`ThumbDownTwotone`,render:function(e,t){return n(),r(`svg`,pt,t[0]||=[i(`path`,{opacity:`.3`,d:`M3 12v2h9l-1.34 5.34L15 15V5H6z`,fill:`currentColor`},null,-1),i(`path`,{d:`M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z`,fill:`currentColor`},null,-1)])}}),ht={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},gt=e({name:`ThumbUpOutlined`,render:function(e,t){return n(),r(`svg`,ht,t[0]||=[i(`path`,{d:`M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z`,fill:`currentColor`},null,-1)])}}),_t={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},vt=e({name:`ThumbUpTwotone`,render:function(e,t){return n(),r(`svg`,_t,t[0]||=[i(`path`,{opacity:`.3`,d:`M21 12v-2h-9l1.34-5.34L9 9v10h9z`,fill:`currentColor`},null,-1),i(`path`,{d:`M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z`,fill:`currentColor`},null,-1)])}});export{b as $,he as A,K as B,ke as C,xe as D,Ce as E,ae as F,I as G,H,re as I,A as J,P as K,Q as L,de as M,le as N,ye as O,se as P,S as Q,X as R,je as S,Te as T,B as U,W as V,R as W,E as X,O as Y,w as Z,Ve as _,ut as a,c as at,Fe as b,it as c,$e as d,v as et,Ze as f,Ue as g,Ge as h,ft as i,u as it,pe as j,_e as k,nt as l,qe as m,gt as n,m as nt,ct as o,o as ot,Ye as p,M as q,mt as r,f as rt,ot as s,te as st,vt as t,g as tt,tt as u,ze as v,De as w,Ne as x,Le as y,J as z}; \ No newline at end of file diff --git a/web/dist/assets/@vue-cLJXtEPP.js b/web/dist/assets/@vue-cLJXtEPP.js deleted file mode 100644 index 3ad48d6e..00000000 --- a/web/dist/assets/@vue-cLJXtEPP.js +++ /dev/null @@ -1,9 +0,0 @@ -import{n as e,r as t}from"./rolldown-runtime-Bhmf7a9N.js";import{At as n,Ct as r,Dt as i,Et as a,Ft as o,Mt as s,Nt as c,Ot as l,Pt as u,Rt as d,St as f,Tt as p,Vt as m,_t as h,bt as g,gt as _,jt as v,kt as ee,vt as y,wt as b,xt as x,yt as S}from"./@css-render-YsNuQTaE.js";function C(e){Object.getOwnPropertySymbols(e).forEach(t=>{dr[t]=e[t]})}function te(e,t=``){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:H}}function w(e,t,n,r,i,a,o,s=!1,c=!1,l=!1,u=H){return e&&(s?(e.helper(V),e.helper(pe(e.inSSR,l))):e.helper(fe(e.inSSR,l)),o&&e.helper(Un)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:a,directives:o,isBlock:s,disableTracking:c,isComponent:l,loc:u}}function T(e,t=H){return{type:17,loc:t,elements:e}}function E(e,t=H){return{type:15,loc:t,properties:e}}function D(e,t){return{type:16,loc:H,key:s(e)?O(e,!0):e,value:t}}function O(e,t=!1,n=H,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function ne(e,t){return{type:5,loc:t,content:s(e)?O(e,!1,t):e}}function k(e,t=H){return{type:8,loc:t,children:e}}function A(e,t=[],n=H){return{type:14,loc:n,callee:e,arguments:t}}function re(e,t=void 0,n=!1,r=!1,i=H){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function ie(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:H}}function ae(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:H}}function oe(e){return{type:21,body:e,loc:H}}function se(e){return{type:22,elements:e,loc:H}}function ce(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:H}}function le(e,t){return{type:24,left:e,right:t,loc:H}}function ue(e){return{type:25,expressions:e,loc:H}}function de(e){return{type:26,returns:e,loc:H}}function fe(e,t){return e||t?Pn:Fn}function pe(e,t){return e||t?Mn:Nn}function me(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(fe(r,e.isComponent)),t(V),t(pe(r,e.isComponent)))}function he(e){return e>=97&&e<=122||e>=65&&e<=90}function j(e){return e===32||e===10||e===9||e===12||e===13}function ge(e){return e===47||e===62||j(e)}function _e(e){let t=new Uint8Array(e.length);for(let n=0;n{e&&N(e,t)});break;case`RestElement`:N(e.argument,t);break;case`AssignmentPattern`:N(e.left,t);break}return t}function Ne(e){return Er.includes(e.type)?Ne(e.expression):e}function Pe(e){switch(e){case`Teleport`:case`teleport`:return On;case`Suspense`:case`suspense`:return kn;case`KeepAlive`:case`keep-alive`:return An;case`BaseTransition`:case`base-transition`:return jn}}function Fe(e,t,n=t.length){return Ie({offset:e.offset,line:e.line,column:e.column},t,n)}function Ie(e,t,n=t.length){let r=0,i=-1;for(let e=0;ee.type===7&&e.name===`bind`&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function Ve(e){return e.type===5||e.type===2}function He(e){return e.type===7&&e.name===`pre`}function Ue(e){return e.type===7&&e.name===`slot`}function We(e){return e.type===1&&e.tagType===3}function Ge(e){return e.type===1&&e.tagType===2}function Ke(e,t=[]){if(e&&!s(e)&&e.type===14){let n=e.callee;if(!s(n)&&Br.has(n))return Ke(e.arguments[0],t.concat(e))}return[e,t]}function qe(e,t,n){let r,i=e.type===13?e.props:e.arguments[2],a=[],o;if(i&&!s(i)&&i.type===14){let e=Ke(i);i=e[0],a=e[1],o=a[a.length-1]}if(i==null||s(i))r=E([t]);else if(i.type===14){let e=i.arguments[0];!s(e)&&e.type===15?Je(t,e)||e.properties.unshift(t):i.callee===$n?r=A(n.helper(Jn),[E([t]),i]):i.arguments.unshift(E([t])),!r&&(r=i)}else i.type===15?(Je(t,i)||i.properties.unshift(t),r=i):(r=A(n.helper(Jn),[E([t]),i]),o&&o.callee===Qn&&(o=a[a.length-2]));e.type===13?o?o.arguments[0]=r:e.props=r:o?o.arguments[0]=r:e.arguments[2]=r}function Je(e,t){let n=!1;if(e.key.type===4){let r=e.key.content;n=t.properties.some(e=>e.key.type===4&&e.key.content===r)}return n}function Ye(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>t===`-`?`_`:e.charCodeAt(n).toString())}`}function F(e,t){if(!e||Object.keys(t).length===0)return!1;switch(e.type){case 1:for(let n=0;nF(e,t));case 11:return F(e.source,t)?!0:e.children.some(e=>F(e,t));case 9:return e.branches.some(e=>F(e,t));case 10:return F(e.condition,t)?!0:e.children.some(e=>F(e,t));case 4:return!e.isStatic&&Or(e.content)&&!!t[e.content];case 8:return e.children.some(e=>l(e)&&F(e,t));case 5:case 12:return F(e.content,t);case 2:case 3:case 20:return!1;default:return!1}}function Xe(e){return e.type===14&&e.callee===lr?e.arguments[1].returns:e}function Ze(e){for(let t=0;t{let i=t.start.offset+n;return gt(e,!1,L(i,i+e.length),0,r?1:0)},s={source:o(a.trim(),n.indexOf(a,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},c=i.trim().replace(Yr,``).trim(),l=i.indexOf(c),u=c.match(Jr);if(u){c=c.replace(Jr,``).trim();let e=u[1].trim(),t;if(e&&(t=n.indexOf(e,l+c.length),s.key=o(e,t,!0)),u[2]){let r=u[2].trim();r&&(s.index=o(r,n.indexOf(r,s.key?t+e.length:l+c.length),!0))}}return c&&(s.value=o(c,l,!0)),s}function I(e,t){return K.slice(e,t)}function tt(e){Q.inSFCRoot&&(q.innerLoc=L(e+1,e+1)),ft(q);let{tag:t,ns:n}=q;n===0&&G.isPreTag(t)&&Gr++,G.isVoidTag(t)?rt(q,e):(Z.unshift(q),(n===1||n===2)&&(Q.inXML=!0)),q=null}function nt(e,t,n){{let t=Z[0]&&Z[0].tag;t!==`script`&&t!==`style`&&e.includes(`&`)&&(e=G.decodeEntities(e,!1))}let r=Z[0]||Ur,i=r.children[r.children.length-1];i&&i.type===2?(i.content+=e,mt(i.loc,n)):r.children.push({type:2,content:e,loc:L(t,n)})}function rt(e,t,n=!1){n?mt(e.loc,at(t,60)):mt(e.loc,it(t,62)+1),Q.inSFCRoot&&(e.children.length?e.innerLoc.end=x({},e.children[e.children.length-1].loc.end):e.innerLoc.end=x({},e.innerLoc.start),e.innerLoc.source=I(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:r,ns:i,children:a}=e;if(Kr||(r===`slot`?e.tagType=2:ot(e)?e.tagType=3:st(e)&&(e.tagType=1)),Q.inRCDATA||(e.children=lt(a)),i===0&&G.isIgnoreNewlineTag(r)){let e=a[0];e&&e.type===2&&(e.content=e.content.replace(/^\r?\n/,``))}i===0&&G.isPreTag(r)&&Gr--,qr===e&&(Kr=Q.inVPre=!1,qr=null),Q.inXML&&(Z[0]?Z[0].ns:G.ns)===0&&(Q.inXML=!1);{let t=e.props;if(!Q.inSFCRoot&&ye(`COMPILER_NATIVE_TEMPLATE`,G)&&e.tag===`template`&&!ot(e)){let t=Z[0]||Ur,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>e.type===6&&e.name===`inline-template`);n&&be(`COMPILER_INLINE_TEMPLATE`,G,n.loc)&&e.children.length&&(n.value={type:2,content:I(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function it(e,t){let n=e;for(;K.charCodeAt(n)!==t&&n=0;)n--;return n}function ot({tag:e,props:t}){if(e===`template`){for(let e=0;e64&&e<91}function lt(e){let t=G.whitespace!==`preserve`,n=!1;for(let r=0;re.type!==3);return t.length===1&&t[0].type===1&&!Ge(t[0])?t[0]:null}function xt(e,t,n,r=!1,i=!1){let{children:a}=e,o=[];for(let t=0;t0){if(e>=2){s.codegenNode.patchFlag=-1,o.push(s);continue}}else{let e=s.codegenNode;if(e.type===13){let t=e.patchFlag;if((t===void 0||t===512||t===1)&&Ct(s,n)>=2){let t=wt(s);t&&(e.props=n.hoist(t))}e.dynamicProps&&=n.hoist(e.dynamicProps)}}}else if(s.type===12&&(r?0:z(s,n))>=2){s.codegenNode.type===14&&s.codegenNode.arguments.length>0&&s.codegenNode.arguments.push(`-1`),o.push(s);continue}if(s.type===1){let t=s.tagType===1;t&&n.scopes.vSlot++,xt(s,e,n,!1,i),t&&n.scopes.vSlot--}else if(s.type===11)xt(s,e,n,s.children.length===1,!0);else if(s.type===9)for(let t=0;te.key===t||e.key.content===t);return n&&n.value}}o.length&&n.transformHoist&&n.transformHoist(a,n,e)}function z(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;let r=n.get(e);if(r!==void 0)return r;let i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!==`svg`&&e.tag!==`foreignObject`&&e.tag!==`math`)return 0;if(i.patchFlag===void 0){let r=3,a=Ct(e,t);if(a===0)return n.set(e,0),0;a1)for(let i=0;in&&(D.childIndex--,D.onNodeRemoved()),D.parent.children.splice(n,1)},onNodeRemoved:y,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){s(e)&&(e=O(e)),D.hoists.push(e);let t=O(`_hoisted_${D.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let r=ae(D.cached.length,e,t,n);return D.cached.push(r),r}};return D.filters=new Set,D}function Et(e,t){let n=Tt(e,t);kt(e,n),t.hoistStatic&&yt(e,n),t.ssr||Dt(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function Dt(e,t){let{helper:n}=t,{children:r}=e;if(r.length===1){let n=bt(e);if(n&&n.codegenNode){let r=n.codegenNode;r.type===13&&me(r,t),e.codegenNode=r}else e.codegenNode=r[0]}else r.length>1&&(e.codegenNode=w(t,n(Dn),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}function Ot(e,t){let n=0,r=()=>{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(e.type===1){let{props:i}=e;if(e.tagType===3&&i.some(Ue))return;let a=[];for(let o=0;o0,p=!a&&r!==`module`;if(Nt(e,n),i(`function ${u?`ssrRender`:`render`}(${(u?[`_ctx`,`_push`,`_parent`,`_attrs`]:[`_ctx`,`_cache`]).join(`, `)}) {`),o(),p&&(i(`with (_ctx) {`),o(),f&&(i(`const { ${d.map(ei).join(`, `)} } = _Vue -`,-1),c())),e.components.length&&(Pt(e.components,`component`,n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Pt(e.directives,`directive`,n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Pt(e.filters,`filter`,n),c()),e.temps>0){i(`let `);for(let t=0;t0?`, `:``}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` -`,0),c()),u||i(`return `),e.codegenNode?B(e.codegenNode,n):i(`null`),p&&(s(),i(`}`)),s(),i(`}`),{ast:e,code:n.code,preamble:``,map:n.map?n.map.toJSON():void 0}}function Nt(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:a,runtimeModuleName:o,runtimeGlobalName:s,ssrRuntimeModuleName:c}=t,l=s,u=Array.from(e.helpers);u.length>0&&(i(`const _Vue = ${l} -`,-1),e.hoists.length&&i(`const { ${[Pn,Fn,In,Ln,Rn].filter(e=>u.includes(e)).map(ei).join(`, `)} } = _Vue -`,-1)),Ft(e.hoists,t),a(),i(`return `)}function Pt(e,t,{helper:n,push:r,newline:i,isTS:a}){let o=n(t===`filter`?Hn:t===`component`?zn:Vn);for(let n=0;n3||!1;t.push(`[`),n&&t.indent(),Lt(e,t,n),n&&t.deindent(),t.push(`]`)}function Lt(e,t,n=!1,r=!0){let{push:i,newline:a}=t;for(let o=0;oe||`null`)}function Kt(e,t){let{push:n,helper:r,pure:i}=t,a=s(e.callee)?e.callee:r(e.callee);i&&n($r),n(a+`(`,-2,e),Lt(e.arguments,t),n(`)`)}function qt(e,t){let{push:n,indent:r,deindent:i,newline:a}=t,{properties:o}=e;if(!o.length){n(`{}`,-2,e);return}let s=o.length>1||!1;n(s?`{`:`{ `),s&&r();for(let e=0;e `),(c||s)&&(n(`{`),r()),o?(c&&n(`return `),b(o)?It(o,t):B(o,t)):s&&B(s,t),(c||s)&&(i(),n(`}`)),l&&(e.isNonScopedSlot&&n(`, undefined, true`),n(`)`))}function Xt(e,t){let{test:n,consequent:r,alternate:i,newline:a}=e,{push:o,indent:s,deindent:c,newline:l}=t;if(n.type===4){let e=!Or(n.content);e&&o(`(`),zt(n,t),e&&o(`)`)}else o(`(`),B(n,t),o(`)`);a&&s(),t.indentLevel++,a||o(` `),o(`? `),B(r,t),t.indentLevel--,a&&l(),a||o(` `),o(`: `);let u=i.type===19;u||t.indentLevel++,B(i,t),u||t.indentLevel--,a&&c(!0)}function Zt(e,t){let{push:n,helper:r,indent:i,deindent:a,newline:o}=t,{needPauseTracking:s,needArraySpread:c}=e;c&&n(`[...(`),n(`_cache[${e.index}] || (`),s&&(i(),n(`${r(rr)}(-1`),e.inVOnce&&n(`, true`),n(`),`),o(),n(`(`)),n(`_cache[${e.index}] = `),B(e.value,t),s&&(n(`).cacheIndex = ${e.index},`),o(),n(`${r(rr)}(1),`),o(),n(`_cache[${e.index}]`),a()),n(`)`),c&&n(`)]`)}function Qt(e,t,n=!1,r=!1,i=Object.create(t.identifiers)){return e}function $t(e){return s(e)?e:e.type===4?e.content:e.children.map($t).join(``)}function en(e,t,n,r){if(t.name!==`else`&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(M(28,t.loc)),t.exp=O(`true`,!1,r)}if(t.name===`if`){let i=tn(e,t),a={type:9,loc:pt(e.loc),branches:[i]};if(n.replaceNode(a),r)return r(a,i,!0)}else{let i=n.parent.children,a=i.indexOf(e);for(;a-->=-1;){let o=i[a];if(o&&$e(o)){n.removeNode(o);continue}if(o&&o.type===9){(t.name===`else-if`||t.name===`else`)&&o.branches[o.branches.length-1].condition===void 0&&n.onError(M(30,e.loc)),n.removeNode();let i=tn(e,t);o.branches.push(i);let a=r&&r(o,i,!1);kt(i,n),a&&a(),n.currentNode=null}else n.onError(M(30,e.loc));break}}}function tn(e,t){let n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name===`else`?void 0:t.exp,children:n&&!P(e,`for`)?e.children:[e],userKey:Re(e,`key`),isTemplateIf:n}}function nn(e,t,n){return e.condition?ie(e.condition,rn(e,t,n),A(n.helper(In),[`""`,`true`])):rn(e,t,n)}function rn(e,t,n){let{helper:r}=n,i=D(`key`,O(`${t}`,!1,H,2)),{children:a}=e,o=a[0];if(a.length!==1||o.type!==1)if(a.length===1&&o.type===11){let e=o.codegenNode;return qe(e,i,n),e}else return w(n,r(Dn),E([i]),a,64,void 0,void 0,!0,!1,!1,e.loc);else{let e=o.codegenNode,t=Xe(e);return t.type===13&&me(t,n),qe(t,i,n),e}}function an(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}function on(e,t,n,r){if(!t.exp){n.onError(M(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(M(32,t.loc));return}sn(i,n);let{addIdentifiers:a,removeIdentifiers:o,scopes:s}=n,{source:c,value:l,key:u,index:d}=i,f={type:11,loc:t.loc,source:c,valueAlias:l,keyAlias:u,objectIndexAlias:d,parseResult:i,children:We(e)?e.children:[e]};n.replaceNode(f),s.vFor++;let p=r&&r(f);return()=>{s.vFor--,p&&p()}}function sn(e,t){e.finalized||=!0}function cn({value:e,key:t,index:n},r=[]){return ln([e,t,n,...r])}function ln(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||O(`_`.repeat(t+1),!1))}function un(e,t,n=si){t.helper(or);let{children:r,loc:i}=e,a=[],o=[],s=t.scopes.vSlot>0||t.scopes.vFor>0,c=P(e,`slot`,!0);if(c){let{arg:e,exp:t}=c;e&&!W(e)&&(s=!0),a.push(D(e||O(`default`,!0),n(t,void 0,r,i)))}let l=!1,u=!1,d=[],f=new Set,p=0;for(let e=0;e{let a=n(e,void 0,r,i);return t.compatConfig&&(a.isNonScopedSlot=!0),D(`default`,a)};l?d.length&&!d.every(Qe)&&(u?t.onError(M(39,d[0].loc)):a.push(e(void 0,d))):a.push(e(void 0,r))}let m=s?2:fn(e.children)?3:1,h=E(a.concat(D(`_`,O(m+``,!1))),i);return o.length&&(h=A(t.helper(Kn),[h,T(o)])),{slots:h,hasDynamicSlots:s}}function dn(e,t,n){let r=[D(`name`,e),D(`fn`,t)];return n!=null&&r.push(D(`key`,O(String(n),!0))),E(r)}function fn(e){for(let t=0;t0,g=!1,_=0,v=!1,y=!1,b=!1,x=!1,S=!1,C=!1,te=[],w=e=>{d.length&&(f.push(E(hn(d),l)),d=[]),e&&f.push(e)},T=()=>{t.scopes.vFor>0&&d.push(D(O(`ref_for`,!0),O(`true`)))},ne=({key:e,value:r})=>{if(W(e)){let o=e.content,s=ee(o);if(s&&(!i||a)&&o.toLowerCase()!==`onclick`&&o!==`onUpdate:modelValue`&&!n(o)&&(x=!0),s&&n(o)&&(C=!0),s&&r.type===14&&(r=r.arguments[0]),r.type===20||(r.type===4||r.type===8)&&z(r,t)>0)return;o===`ref`?v=!0:o===`class`?y=!0:o===`style`?b=!0:o!==`key`&&!te.includes(o)&&te.push(o),i&&(o===`class`||o===`style`)&&!te.includes(o)&&te.push(o)}else S=!0};for(let n=0;ne.content===`prop`)&&(_|=32);let x=t.directiveTransforms[n];if(x){let{props:n,needRuntime:i}=x(a,e,t);!o&&n.forEach(ne),b&&r&&!W(r)?w(E(n,l)):d.push(...n),i&&(m.push(a),c(i)&&ci.set(a,i))}else p(n)||(m.push(a),h&&(g=!0))}}let k;if(f.length?(w(),k=f.length>1?A(t.helper(Jn),f,l):f[0]):d.length&&(k=E(hn(d),l)),S?_|=16:(y&&!i&&(_|=2),b&&!i&&(_|=4),te.length&&(_|=8),x&&(_|=32)),!g&&(_===0||_===32)&&(v||C||m.length>0)&&(_|=512),!t.inSSR&&k)switch(k.type){case 15:let e=-1,n=-1,r=!1;for(let t=0;tD(e,t)),i))}return T(n,e.loc)}function vn(e){let t=`[`;for(let n=0,r=e.length;n0){let{props:n,directives:a}=mn(e,t,i,!1,!1);r=n,a.length&&t.onError(M(36,a[0].loc))}return{slotName:n,slotProps:r}}function xn(e=[]){return{props:e}}function Sn(e,t){if(e.type===4)Cn(e,t);else for(let n=0;n=0&&(t=n.charAt(e),t===` `);e--);(!t||!vi.test(t))&&(o=!0)}}m===void 0?m=n.slice(0,p).trim():u!==0&&g();function g(){h.push(n.slice(u,p).trim()),u=p+1}if(h.length){for(p=0;p{r(),Dn=Symbol(``),On=Symbol(``),kn=Symbol(``),An=Symbol(``),jn=Symbol(``),V=Symbol(``),Mn=Symbol(``),Nn=Symbol(``),Pn=Symbol(``),Fn=Symbol(``),In=Symbol(``),Ln=Symbol(``),Rn=Symbol(``),zn=Symbol(``),Bn=Symbol(``),Vn=Symbol(``),Hn=Symbol(``),Un=Symbol(``),Wn=Symbol(``),Gn=Symbol(``),Kn=Symbol(``),qn=Symbol(``),Jn=Symbol(``),Yn=Symbol(``),Xn=Symbol(``),Zn=Symbol(``),Qn=Symbol(``),$n=Symbol(``),er=Symbol(``),tr=Symbol(``),nr=Symbol(``),rr=Symbol(``),ir=Symbol(``),ar=Symbol(``),or=Symbol(``),sr=Symbol(``),cr=Symbol(``),lr=Symbol(``),ur=Symbol(``),dr={[Dn]:`Fragment`,[On]:`Teleport`,[kn]:`Suspense`,[An]:`KeepAlive`,[jn]:`BaseTransition`,[V]:`openBlock`,[Mn]:`createBlock`,[Nn]:`createElementBlock`,[Pn]:`createVNode`,[Fn]:`createElementVNode`,[In]:`createCommentVNode`,[Ln]:`createTextVNode`,[Rn]:`createStaticVNode`,[zn]:`resolveComponent`,[Bn]:`resolveDynamicComponent`,[Vn]:`resolveDirective`,[Hn]:`resolveFilter`,[Un]:`withDirectives`,[Wn]:`renderList`,[Gn]:`renderSlot`,[Kn]:`createSlots`,[qn]:`toDisplayString`,[Jn]:`mergeProps`,[Yn]:`normalizeClass`,[Xn]:`normalizeStyle`,[Zn]:`normalizeProps`,[Qn]:`guardReactiveProps`,[$n]:`toHandlers`,[er]:`camelize`,[tr]:`capitalize`,[nr]:`toHandlerKey`,[rr]:`setBlockTracking`,[ir]:`pushScopeId`,[ar]:`popScopeId`,[or]:`withCtx`,[sr]:`unref`,[cr]:`isRef`,[lr]:`withMemo`,[ur]:`isMemoSame`},fr={HTML:0,0:`HTML`,SVG:1,1:`SVG`,MATH_ML:2,2:`MATH_ML`},pr={ROOT:0,0:`ROOT`,ELEMENT:1,1:`ELEMENT`,TEXT:2,2:`TEXT`,COMMENT:3,3:`COMMENT`,SIMPLE_EXPRESSION:4,4:`SIMPLE_EXPRESSION`,INTERPOLATION:5,5:`INTERPOLATION`,ATTRIBUTE:6,6:`ATTRIBUTE`,DIRECTIVE:7,7:`DIRECTIVE`,COMPOUND_EXPRESSION:8,8:`COMPOUND_EXPRESSION`,IF:9,9:`IF`,IF_BRANCH:10,10:`IF_BRANCH`,FOR:11,11:`FOR`,TEXT_CALL:12,12:`TEXT_CALL`,VNODE_CALL:13,13:`VNODE_CALL`,JS_CALL_EXPRESSION:14,14:`JS_CALL_EXPRESSION`,JS_OBJECT_EXPRESSION:15,15:`JS_OBJECT_EXPRESSION`,JS_PROPERTY:16,16:`JS_PROPERTY`,JS_ARRAY_EXPRESSION:17,17:`JS_ARRAY_EXPRESSION`,JS_FUNCTION_EXPRESSION:18,18:`JS_FUNCTION_EXPRESSION`,JS_CONDITIONAL_EXPRESSION:19,19:`JS_CONDITIONAL_EXPRESSION`,JS_CACHE_EXPRESSION:20,20:`JS_CACHE_EXPRESSION`,JS_BLOCK_STATEMENT:21,21:`JS_BLOCK_STATEMENT`,JS_TEMPLATE_LITERAL:22,22:`JS_TEMPLATE_LITERAL`,JS_IF_STATEMENT:23,23:`JS_IF_STATEMENT`,JS_ASSIGNMENT_EXPRESSION:24,24:`JS_ASSIGNMENT_EXPRESSION`,JS_SEQUENCE_EXPRESSION:25,25:`JS_SEQUENCE_EXPRESSION`,JS_RETURN_STATEMENT:26,26:`JS_RETURN_STATEMENT`},mr={ELEMENT:0,0:`ELEMENT`,COMPONENT:1,1:`COMPONENT`,SLOT:2,2:`SLOT`,TEMPLATE:3,3:`TEMPLATE`},hr={NOT_CONSTANT:0,0:`NOT_CONSTANT`,CAN_SKIP_PATCH:1,1:`CAN_SKIP_PATCH`,CAN_CACHE:2,2:`CAN_CACHE`,CAN_STRINGIFY:3,3:`CAN_STRINGIFY`},H={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:``},gr=new Uint8Array([123,123]),_r=new Uint8Array([125,125]),U={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},vr=class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer=``,this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=gr,this.delimiterClose=_r,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer=``,this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=gr,this.delimiterClose=_r}getPos(e){let t=1,n=e+1,r=this.newlines.length,i=-1;if(r>100){let t=-1,n=r;for(;t+1>>1;this.newlines[r]=0;t--)if(e>this.newlines[t]){i=t;break}return i>=0&&(t=i+2,n=e-this.newlines[i]),{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(!(t?ge(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!t){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||j(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(this.state===28?this.currentSequence===U.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}},yr={COMPILER_IS_ON_ELEMENT:`COMPILER_IS_ON_ELEMENT`,COMPILER_V_BIND_SYNC:`COMPILER_V_BIND_SYNC`,COMPILER_V_BIND_OBJECT_ORDER:`COMPILER_V_BIND_OBJECT_ORDER`,COMPILER_V_ON_NATIVE:`COMPILER_V_ON_NATIVE`,COMPILER_V_IF_V_FOR_PRECEDENCE:`COMPILER_V_IF_V_FOR_PRECEDENCE`,COMPILER_NATIVE_TEMPLATE:`COMPILER_NATIVE_TEMPLATE`,COMPILER_INLINE_TEMPLATE:`COMPILER_INLINE_TEMPLATE`,COMPILER_FILTERS:`COMPILER_FILTERS`},br={COMPILER_IS_ON_ELEMENT:{message:`Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`,link:`https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:`https://v3-migration.vuejs.org/breaking-changes/v-model.html`},COMPILER_V_BIND_OBJECT_ORDER:{message:`v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`,link:`https://v3-migration.vuejs.org/breaking-changes/v-bind.html`},COMPILER_V_ON_NATIVE:{message:`.native modifier for v-on has been removed as is no longer necessary.`,link:`https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:`v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with