From 147e5551a7c1456a9cdb4a54c23c6d701918994f Mon Sep 17 00:00:00 2001 From: minglipro Date: Sat, 28 Jun 2025 22:28:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=89=8D=E7=AB=AF=E4=B8=8E?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E9=93=BE=E6=8E=A5=20=E7=99=BB=E5=BD=95API?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yaml | 8 +- application.yaml | 17 + build.gradle.kts | 44 +- package.json | 3 +- .../com/mingliqiye/disk/DiskApplication.java | 4 + .../disk/cache/MyBatisRedisCache.java | 64 + .../disk/config/ApplicationContextHolder.java | 30 + .../mingliqiye/disk/config/RedisConfig.java | 23 + .../disk/config/SaTokenConfigure.java | 23 + .../disk/config/SpringDocConfig.java | 51 + .../mingliqiye/disk/configuration/Config.java | 14 + .../disk/configuration/DataSource.java | 12 + .../mingliqiye/disk/configuration/Mysql.java | 15 + .../mingliqiye/disk/configuration/Redis.java | 15 + .../disk/controller/AuthController.java | 56 + .../disk/controller/IndexController.java | 27 + .../com/mingliqiye/disk/dto/auth/Login.java | 14 + .../disk/exception/BaseException.java | 34 + .../disk/exception/BaseExceptionHandler.java | 103 + .../exception/BaseExceptionInterface.java | 19 + .../disk/exception/ExceptionCode.java | 29 + .../exception/InternalServerException.java | 14 + .../disk/exception/NotFoundException.java | 14 + .../mingliqiye/disk/function/P1Function.java | 6 + .../disk/function/P1R1Function.java | 6 + .../com/mingliqiye/disk/http/Respose.java | 82 + .../mingliqiye/disk/mappers/UserMapper.java | 9 + .../java/com/mingliqiye/disk/model/User.java | 42 + .../com/mingliqiye/disk/time/DateTime.java | 241 + .../disk/time/DateTimeJsonDeserializer.java | 17 + .../disk/time/DateTimeJsonSerializer.java | 33 + .../typeHandlers/DateTimeTypeHandler.java | 45 + .../typeHandlers/UUIDBinaryTypeHandler.java | 55 + .../com/mingliqiye/disk/util/FileUtil.java | 264 + .../com/mingliqiye/disk/util/HashUtil.java | 3 + .../com/mingliqiye/disk/util/ListUtil.java | 17 + .../com/mingliqiye/disk/util/NullUtil.java | 17 + .../com/mingliqiye/disk/util/PanStpUtil.java | 16 + .../com/mingliqiye/disk/util/StringUtil.java | 66 + .../com/mingliqiye/disk/util/SystemUtil.java | 40 + .../disk/util/ThreadLocalDataHolderUtil.java | 82 + .../java/com/mingliqiye/disk/uuid/UUID.java | 141 + .../mingliqiye/disk/uuid/UUIDException.java | 12 + .../disk/uuid/UUIDJsonDeserializer.java | 17 + .../disk/uuid/UUIDJsonSerializer.java | 34 + src/main/resources/application.yaml | 90 + src/main/resources/banner/banner.txt | 6 + src/main/resources/html/index.html | 14 + .../resources/html/static/css/B-HidlUH.css | 1 + .../resources/html/static/css/E68f7lAM.css | 1 + src/main/resources/html/static/js/CcCh4Sgi.js | 5362 +++++++++++++++++ src/main/resources/html/static/js/flDiIF0y.js | 13 + .../resources/html/static/svg/BIklAcGo.svg | 9 + src/main/resources/log4j2.yaml | 29 + src/main/resources/sql/database.sql | 3 + src/main/resources/sql/users.sql | 18 + .../mingliqiye/disk/DiskApplicationTests.java | 17 +- vite.config.ts | 8 +- web-src/App.vue | 4 +- web-src/assets/icon.svg | 9 + web-src/assets/logo.svg | 1 - web-src/index.html | 20 +- 62 files changed, 7457 insertions(+), 26 deletions(-) create mode 100644 application.yaml create mode 100644 src/main/java/com/mingliqiye/disk/cache/MyBatisRedisCache.java create mode 100644 src/main/java/com/mingliqiye/disk/config/ApplicationContextHolder.java create mode 100644 src/main/java/com/mingliqiye/disk/config/RedisConfig.java create mode 100644 src/main/java/com/mingliqiye/disk/config/SaTokenConfigure.java create mode 100644 src/main/java/com/mingliqiye/disk/config/SpringDocConfig.java create mode 100644 src/main/java/com/mingliqiye/disk/configuration/Config.java create mode 100644 src/main/java/com/mingliqiye/disk/configuration/DataSource.java create mode 100644 src/main/java/com/mingliqiye/disk/configuration/Mysql.java create mode 100644 src/main/java/com/mingliqiye/disk/configuration/Redis.java create mode 100644 src/main/java/com/mingliqiye/disk/controller/AuthController.java create mode 100644 src/main/java/com/mingliqiye/disk/controller/IndexController.java create mode 100644 src/main/java/com/mingliqiye/disk/dto/auth/Login.java create mode 100644 src/main/java/com/mingliqiye/disk/exception/BaseException.java create mode 100644 src/main/java/com/mingliqiye/disk/exception/BaseExceptionHandler.java create mode 100644 src/main/java/com/mingliqiye/disk/exception/BaseExceptionInterface.java create mode 100644 src/main/java/com/mingliqiye/disk/exception/ExceptionCode.java create mode 100644 src/main/java/com/mingliqiye/disk/exception/InternalServerException.java create mode 100644 src/main/java/com/mingliqiye/disk/exception/NotFoundException.java create mode 100644 src/main/java/com/mingliqiye/disk/function/P1Function.java create mode 100644 src/main/java/com/mingliqiye/disk/function/P1R1Function.java create mode 100644 src/main/java/com/mingliqiye/disk/http/Respose.java create mode 100644 src/main/java/com/mingliqiye/disk/mappers/UserMapper.java create mode 100644 src/main/java/com/mingliqiye/disk/model/User.java create mode 100644 src/main/java/com/mingliqiye/disk/time/DateTime.java create mode 100644 src/main/java/com/mingliqiye/disk/time/DateTimeJsonDeserializer.java create mode 100644 src/main/java/com/mingliqiye/disk/time/DateTimeJsonSerializer.java create mode 100644 src/main/java/com/mingliqiye/disk/typeHandlers/DateTimeTypeHandler.java create mode 100644 src/main/java/com/mingliqiye/disk/typeHandlers/UUIDBinaryTypeHandler.java create mode 100644 src/main/java/com/mingliqiye/disk/util/FileUtil.java create mode 100644 src/main/java/com/mingliqiye/disk/util/HashUtil.java create mode 100644 src/main/java/com/mingliqiye/disk/util/ListUtil.java create mode 100644 src/main/java/com/mingliqiye/disk/util/NullUtil.java create mode 100644 src/main/java/com/mingliqiye/disk/util/PanStpUtil.java create mode 100644 src/main/java/com/mingliqiye/disk/util/StringUtil.java create mode 100644 src/main/java/com/mingliqiye/disk/util/SystemUtil.java create mode 100644 src/main/java/com/mingliqiye/disk/util/ThreadLocalDataHolderUtil.java create mode 100644 src/main/java/com/mingliqiye/disk/uuid/UUID.java create mode 100644 src/main/java/com/mingliqiye/disk/uuid/UUIDException.java create mode 100644 src/main/java/com/mingliqiye/disk/uuid/UUIDJsonDeserializer.java create mode 100644 src/main/java/com/mingliqiye/disk/uuid/UUIDJsonSerializer.java create mode 100644 src/main/resources/application.yaml create mode 100644 src/main/resources/banner/banner.txt create mode 100644 src/main/resources/html/index.html create mode 100644 src/main/resources/html/static/css/B-HidlUH.css create mode 100644 src/main/resources/html/static/css/E68f7lAM.css create mode 100644 src/main/resources/html/static/js/CcCh4Sgi.js create mode 100644 src/main/resources/html/static/js/flDiIF0y.js create mode 100644 src/main/resources/html/static/svg/BIklAcGo.svg create mode 100644 src/main/resources/log4j2.yaml create mode 100644 src/main/resources/sql/database.sql create mode 100644 src/main/resources/sql/users.sql create mode 100644 web-src/assets/icon.svg delete mode 100644 web-src/assets/logo.svg diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 415d197..6618138 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -8,14 +8,14 @@ jobs: Build: runs-on: ubuntu-dev steps: - + - name: Check out repository code uses: https://git.mingliqiye.com/Actions/checkout@v4 - - - name: build-test + + - name: Build run: | pnpm install - pnpm run build-jar + pnpm run build-jar-auto - name: Releases run: | diff --git a/application.yaml b/application.yaml new file mode 100644 index 0000000..15eff44 --- /dev/null +++ b/application.yaml @@ -0,0 +1,17 @@ +config: + port: 9963 + app-name: maven-repository + app-version: 1.0 + data-source: + mysql: + username: pan + password: PhXCRiCfEmiGesEm + host: 10.0.0.4 + port: 3307 + database: pan + redis: + host: 10.0.0.4 + port: 6380 + database: 0 + username: '' + password: redis_kTJpsa diff --git a/build.gradle.kts b/build.gradle.kts index d5b3194..af24fa2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,12 @@ import java.security.MessageDigest import java.text.SimpleDateFormat -import java.util.Date +import java.util.* plugins { java - id("org.springframework.boot") version "3.5.3" + idea + id("io.freefair.lombok") version "8.4" + id("org.springframework.boot") version "3.5.0" id("io.spring.dependency-management") version "1.1.7" } val GROUPSID = project.properties["GROUPSID"] as String @@ -20,19 +22,55 @@ version = VERSIONS val libDir = rootDir.resolve("build").resolve("libs") val srcDir = rootDir.resolve("src").resolve("main").resolve("java") -val webDir = rootDir.resolve("src").resolve("main").resolve("resources").resolve("static") +val webDir = rootDir.resolve("src").resolve("main").resolve("resources").resolve("html") java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } +allprojects { + configurations.all { + exclude(group = "org.springframework.boot", module = "spring-boot-starter-logging") + } +} + +tasks.test { + useJUnitPlatform() + jvmArgs = listOf( + "-javaagent:${classpath.find { it.name.contains("mockito-core") }?.absolutePath}", + "-XX:+EnableDynamicAgentLoading", + ) +} dependencies { implementation("org.springframework.boot:spring-boot-starter") + implementation("org.springframework.boot:spring-boot-starter-log4j2") + implementation("org.springframework.boot:spring-boot-starter-web") + implementation("org.springframework.boot:spring-boot-starter-data-redis") + implementation("org.springframework.boot:spring-boot-starter-actuator") + compileOnly("org.projectlombok:lombok") + testRuntimeOnly("org.projectlombok:lombok") + annotationProcessor("org.projectlombok:lombok") + implementation("org.jetbrains:annotations:24.0.0") + implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.19.1") testImplementation("org.springframework.boot:spring-boot-starter-test") + developmentOnly("org.springframework.boot:spring-boot-devtools") + runtimeOnly("com.mysql:mysql-connector-j") testRuntimeOnly("org.junit.platform:junit-platform-launcher") + implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9") + implementation("cn.dev33:sa-token-redis-jackson:1.44.0") + implementation("cn.hutool:hutool-all:5.8.24") + implementation("cn.dev33:sa-token-jwt:1.44.0") + implementation("org.mindrot:jbcrypt:0.4") + implementation("com.github.f4b6a3:uuid-creator:6.1.0") + implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.16") + implementation("com.alibaba:druid-spring-boot-3-starter:1.2.25") + implementation("cn.dev33:sa-token-jwt:1.44.0") + implementation("cn.dev33:sa-token-spring-boot3-starter:1.44.0") + implementation("cn.dev33:sa-token-redis-jackson:1.44.0") + implementation("com.baomidou:mybatis-plus-spring-boot3-starter:3.5.12") } private fun generateHash(file: File, string: String): String { diff --git a/package.json b/package.json index 0e11af5..7d98ccf 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "type": "module", "scripts": { "dev": "vite", - "build-jar": "run-p \"build-only\" && gradle -Dorg.gradle.java.home=/opt/jdk/21.0.7/ build-jar", + "build-jar": "run-p \"build-only\" && gradle build-jar", + "build-jar-auto": "run-p \"build-only\" && gradle -Dorg.gradle.java.home=/opt/jdk/21.0.7/ build-jar", "build": "run-p type-check \"build-only {@}\" --", "preview": "vite preview", "build-only": "vite build", diff --git a/src/main/java/com/mingliqiye/disk/DiskApplication.java b/src/main/java/com/mingliqiye/disk/DiskApplication.java index 9ffce6d..cc632d6 100644 --- a/src/main/java/com/mingliqiye/disk/DiskApplication.java +++ b/src/main/java/com/mingliqiye/disk/DiskApplication.java @@ -1,9 +1,13 @@ package com.mingliqiye.disk; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; @SpringBootApplication +@ConfigurationPropertiesScan +@MapperScan("com.mingliqiye.disk.mappers") public class DiskApplication { public static void main(String[] args) { diff --git a/src/main/java/com/mingliqiye/disk/cache/MyBatisRedisCache.java b/src/main/java/com/mingliqiye/disk/cache/MyBatisRedisCache.java new file mode 100644 index 0000000..2950ee7 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/cache/MyBatisRedisCache.java @@ -0,0 +1,64 @@ +package com.mingliqiye.disk.cache; + +import com.mingliqiye.disk.config.ApplicationContextHolder; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import org.apache.ibatis.cache.Cache; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.util.DigestUtils; + +public class MyBatisRedisCache implements Cache { + + private final String id; + private final RedisTemplate redisTemplate; + private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock(); + + public MyBatisRedisCache(String id) { + this.id = id; + this.redisTemplate = ApplicationContextHolder.getBean(RedisTemplate.class); + } + + @Override + public String getId() { + return id; + } + + @Override + public void putObject(Object key, Object value) { + String redisKey = getRedisKey(key); + redisTemplate.opsForValue().set(redisKey, value, 1, TimeUnit.HOURS); // 设置1小时过期 + } + + @Override + public Object getObject(Object key) { + String redisKey = getRedisKey(key); + return redisTemplate.opsForValue().get(redisKey); + } + + @Override + public Object removeObject(Object key) { + String redisKey = getRedisKey(key); + redisTemplate.delete(redisKey); + return null; + } + + @Override + public void clear() { + redisTemplate.delete(redisTemplate.keys(id + ":*")); + } + + @Override + public int getSize() { + return 0; + } + + @Override + public ReadWriteLock getReadWriteLock() { + return readWriteLock; + } + + private String getRedisKey(Object key) { + return (id + ":" + DigestUtils.md5DigestAsHex(String.valueOf(key).getBytes())); + } +} diff --git a/src/main/java/com/mingliqiye/disk/config/ApplicationContextHolder.java b/src/main/java/com/mingliqiye/disk/config/ApplicationContextHolder.java new file mode 100644 index 0000000..15c4528 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/config/ApplicationContextHolder.java @@ -0,0 +1,30 @@ +package com.mingliqiye.disk.config; + +import org.jetbrains.annotations.NotNull; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +@Component +public class ApplicationContextHolder implements ApplicationContextAware { + + private static ApplicationContext context; + + public static T getBean(Class name) { + return context.getBean(name); + } + + public static T getBean(String beanName) { + return (T) context.getBean(beanName); + } + + public static T getBean(String beanName, Class beanType) { + return context.getBean(beanName, beanType); + } + + @Override + public void setApplicationContext(@NotNull ApplicationContext applicationContext) throws BeansException { + context = applicationContext; + } +} diff --git a/src/main/java/com/mingliqiye/disk/config/RedisConfig.java b/src/main/java/com/mingliqiye/disk/config/RedisConfig.java new file mode 100644 index 0000000..e07bfb1 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/config/RedisConfig.java @@ -0,0 +1,23 @@ +package com.mingliqiye.disk.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.StringRedisSerializer; + +@Configuration +public class RedisConfig { + + @Primary + @Bean + public RedisTemplate redisTemplate(RedisConnectionFactory connectionFactory) { + RedisTemplate template = new RedisTemplate<>(); + template.setConnectionFactory(connectionFactory); + template.setKeySerializer(new StringRedisSerializer()); + template.setValueSerializer(new GenericJackson2JsonRedisSerializer()); + return template; + } +} diff --git a/src/main/java/com/mingliqiye/disk/config/SaTokenConfigure.java b/src/main/java/com/mingliqiye/disk/config/SaTokenConfigure.java new file mode 100644 index 0000000..f9f962e --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/config/SaTokenConfigure.java @@ -0,0 +1,23 @@ +package com.mingliqiye.disk.config; + +import cn.dev33.satoken.interceptor.SaInterceptor; +import cn.dev33.satoken.jwt.StpLogicJwtForSimple; +import cn.dev33.satoken.stp.StpLogic; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class SaTokenConfigure implements WebMvcConfigurer { + + @Bean + public StpLogic getStpLogicJwt() { + return new StpLogicJwtForSimple(); + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(new SaInterceptor()).addPathPatterns("/**"); + } +} diff --git a/src/main/java/com/mingliqiye/disk/config/SpringDocConfig.java b/src/main/java/com/mingliqiye/disk/config/SpringDocConfig.java new file mode 100644 index 0000000..a847aac --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/config/SpringDocConfig.java @@ -0,0 +1,51 @@ +package com.mingliqiye.disk.config; + +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; +import io.swagger.v3.oas.annotations.security.SecurityScheme; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Contact; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@OpenAPIDefinition( + externalDocs = @ExternalDocumentation( + description = "@git.mingliqiye", + url = "https://git.mingliqiye.com/mingliqiye/pan-disk" + ) +) +@SecurityScheme( + name = "Authorization-Bearer-Token", // 认证方案名称 + type = SecuritySchemeType.HTTP, // 认证类型,当前为http认证 + description = "Authorization: bearer {token}", // 描述信息 + in = SecuritySchemeIn.HEADER, // 代表在http请求头部 + scheme = "bearer", // 认证方案,如:Authorization: bearer token信息 + bearerFormat = "JWT" +) // 表示使用 JWT 格式作为 Bearer Token 的格式 +@Configuration +public class SpringDocConfig { + + @Bean + public OpenAPI openAPI() { + return new OpenAPI() + // 配置接口文档基本信息 + .info(this.getApiInfo()); + } + + private Info getApiInfo() { + return new Info() + .title("pan-disk") + .description("SpringBoot3 pan-disk Swagger3 ApiDoc") + .contact( + new Contact().name("mingliqiye").url("https://www.mingliqiye.com").email("minglipro@mingliqiye.com") + ) + .license(new License().name("Apache 2.0").url("https://www.apache.org/licenses/LICENSE-2.0")) + .summary("ApiDoc") + .termsOfService("https://pan.mingliqiye.com/") + .version("1.0"); + } +} diff --git a/src/main/java/com/mingliqiye/disk/configuration/Config.java b/src/main/java/com/mingliqiye/disk/configuration/Config.java new file mode 100644 index 0000000..efe4085 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/configuration/Config.java @@ -0,0 +1,14 @@ +package com.mingliqiye.disk.configuration; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@Data +@ConfigurationProperties(prefix = "config") +public class Config { + + private String appName; + private String appVersion; + private Integer port; + private DataSource dataSource; +} diff --git a/src/main/java/com/mingliqiye/disk/configuration/DataSource.java b/src/main/java/com/mingliqiye/disk/configuration/DataSource.java new file mode 100644 index 0000000..4b9d6b2 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/configuration/DataSource.java @@ -0,0 +1,12 @@ +package com.mingliqiye.disk.configuration; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@Data +@ConfigurationProperties(prefix = "config.data-source") +public class DataSource { + + private Mysql mysql; + private Redis redis; +} diff --git a/src/main/java/com/mingliqiye/disk/configuration/Mysql.java b/src/main/java/com/mingliqiye/disk/configuration/Mysql.java new file mode 100644 index 0000000..9ad3071 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/configuration/Mysql.java @@ -0,0 +1,15 @@ +package com.mingliqiye.disk.configuration; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@Data +@ConfigurationProperties(prefix = "config.data-source.mysql") +public class Mysql { + + private String host; + private Integer port; + private String database; + private String username; + private String password; +} diff --git a/src/main/java/com/mingliqiye/disk/configuration/Redis.java b/src/main/java/com/mingliqiye/disk/configuration/Redis.java new file mode 100644 index 0000000..e39dcf4 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/configuration/Redis.java @@ -0,0 +1,15 @@ +package com.mingliqiye.disk.configuration; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +@Data +@ConfigurationProperties(prefix = "config.data-source.redis") +public class Redis { + + private String host; + private Integer port; + private Integer database; + private String username; + private String password; +} diff --git a/src/main/java/com/mingliqiye/disk/controller/AuthController.java b/src/main/java/com/mingliqiye/disk/controller/AuthController.java new file mode 100644 index 0000000..8622f86 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/controller/AuthController.java @@ -0,0 +1,56 @@ +package com.mingliqiye.disk.controller; + +import cn.dev33.satoken.annotation.SaCheckLogin; +import cn.dev33.satoken.stp.StpUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.mingliqiye.disk.dto.auth.Login; +import com.mingliqiye.disk.exception.ExceptionCode; +import com.mingliqiye.disk.http.Respose; +import com.mingliqiye.disk.mappers.UserMapper; +import com.mingliqiye.disk.model.User; +import com.mingliqiye.disk.util.PanStpUtil; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import lombok.extern.slf4j.Slf4j; +import org.mindrot.jbcrypt.BCrypt; +import org.springframework.web.bind.annotation.*; + +@Slf4j +@RestController +@RequestMapping("/apis/auth") +@Tag(name = "权限管理", description = "权限和用户管理") +public class AuthController { + + private final UserMapper userMapper; + + public AuthController(UserMapper userMapper) { + this.userMapper = userMapper; + } + + @Operation(summary = "登陆") + @PostMapping("/login") + public Respose login(@Valid @RequestBody Login loginBody) { + User user = userMapper.selectOne(new QueryWrapper().eq("username", loginBody.getUsername())); + if (user != null && BCrypt.checkpw(loginBody.getPassword(), user.getPassword())) { + return Respose.builder(PanStpUtil.login(user.getId())); + } + return Respose.error(String.class, ExceptionCode.ERROR_INTERNAL_SERVER, "用户名或密码错误"); + } + + @Operation(summary = "获取当前登陆用户的信息") + @SecurityRequirement(name = "Authorization-Bearer-Token") + @GetMapping("/who-is-me") + public Respose whoIsMe() { + return Respose.builder().setData(userMapper.selectById(PanStpUtil.getLoginId()).setPasswordNull()); + } + + @Operation(summary = "登出", security = @SecurityRequirement(name = "Authorization-Bearer-Token")) + @DeleteMapping("/logout") + @SaCheckLogin + public Respose logout() { + StpUtil.logout(); + return Respose.builder(); + } +} diff --git a/src/main/java/com/mingliqiye/disk/controller/IndexController.java b/src/main/java/com/mingliqiye/disk/controller/IndexController.java new file mode 100644 index 0000000..c930989 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/controller/IndexController.java @@ -0,0 +1,27 @@ +package com.mingliqiye.disk.controller; + +import io.swagger.v3.oas.annotations.tags.Tag; +import java.io.InputStream; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; + +@RestController +@RequestMapping +@Tag(name = "前端路由", description = "统一匹配路径指向VueRouter") +public class IndexController { + + @GetMapping(value = { "/", "/{path:^(?!static|apis).*$}/**" }) + public ResponseEntity index() { + StreamingResponseBody streamingResponseBody = s -> { + try (InputStream stream = this.getClass().getResourceAsStream("/html/index.html")) { + if (stream != null) { + stream.transferTo(s); + } + } + }; + return ResponseEntity.ok().body(streamingResponseBody); + } +} diff --git a/src/main/java/com/mingliqiye/disk/dto/auth/Login.java b/src/main/java/com/mingliqiye/disk/dto/auth/Login.java new file mode 100644 index 0000000..1ff3dfc --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/dto/auth/Login.java @@ -0,0 +1,14 @@ +package com.mingliqiye.disk.dto.auth; + +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Data +public class Login { + + @NotNull(message = "用户名不能为空") + private String username; + + @NotNull(message = "用户密码不能为空") + private String password; +} diff --git a/src/main/java/com/mingliqiye/disk/exception/BaseException.java b/src/main/java/com/mingliqiye/disk/exception/BaseException.java new file mode 100644 index 0000000..1c25bcc --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/exception/BaseException.java @@ -0,0 +1,34 @@ +package com.mingliqiye.disk.exception; + +import java.io.Serializable; + +public class BaseException extends RuntimeException implements BaseExceptionInterface, Serializable { + + private Integer code; + private String message; + + public BaseException(String message, Integer code, Throwable throwable) { + super(message, throwable); + this.code = code; + this.message = message; + } + + public BaseException(String message, Integer code) { + this(message, code, null); + } + + @Override + public Integer getCode() { + return code; + } + + @Override + public Throwable getThrowable() { + return this.getCause(); + } + + @Override + public String getMessage() { + return message; + } +} diff --git a/src/main/java/com/mingliqiye/disk/exception/BaseExceptionHandler.java b/src/main/java/com/mingliqiye/disk/exception/BaseExceptionHandler.java new file mode 100644 index 0000000..16b863b --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/exception/BaseExceptionHandler.java @@ -0,0 +1,103 @@ +package com.mingliqiye.disk.exception; + +import cn.dev33.satoken.exception.NotLoginException; +import cn.dev33.satoken.exception.NotPermissionException; +import cn.dev33.satoken.exception.NotRoleException; +import com.mingliqiye.disk.http.Respose; +import com.mingliqiye.disk.util.StringUtil; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.support.DefaultMessageSourceResolvable; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.http.converter.HttpMessageNotReadableException; +import org.springframework.web.HttpRequestMethodNotSupportedException; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +@Slf4j +@RestControllerAdvice +public class BaseExceptionHandler { + + @ExceptionHandler(BaseException.class) + public ResponseEntity> exceptionHandler(BaseException e, HttpServletRequest request) { + return ResponseEntity.status(e.getCode()).body( + Respose.builder().setCode(e.getCode()).setMessage(StringUtil.format("{}", e.getMessage())) + ); + } + + @ExceptionHandler(HttpRequestMethodNotSupportedException.class) + public Respose exceptionHandler(HttpRequestMethodNotSupportedException e, HttpServletRequest request) { + return Respose.builder() + .setCode(ExceptionCode.ERROR_METHOD_NOT_ALLOWED.getValue()) + .setMessage(StringUtil.format("{} by {}", e.getMessage(), e.getClass().getName())); + } + + @ExceptionHandler(NoHandlerFoundException.class) + public ResponseEntity> exceptionHandler( + NoHandlerFoundException e, + HttpServletRequest request, + HttpServletResponse response + ) { + return ResponseEntity.status(HttpStatus.NOT_FOUND).body( + Respose.builder() + .setCode(ExceptionCode.ERROR_NOT_FOUND.getValue()) + .setMessage(StringUtil.format("{} by {}", e.getMessage(), e.getClass().getName())) + ); + } + + @ExceptionHandler(NotLoginException.class) + public Respose exceptionHandler(NotLoginException e, HttpServletRequest request) { + return Respose.builder() + .setCode(ExceptionCode.ERROR_UNAUTHORIZED.getValue()) + .setMessage(e.getMessage()) + .setData(e.getType()); + } + + @ExceptionHandler(HttpMessageNotReadableException.class) + public Respose exceptionHandler(HttpMessageNotReadableException e, HttpServletRequest request) { + return Respose.builder() + .setCode(ExceptionCode.ERROR_FORBIDDEN.getValue()) + .setMessage(StringUtil.format("{} by {}", e.getMessage(), e.getClass().getName())); + } + + @ExceptionHandler(NotRoleException.class) + public Respose exceptionHandler(NotRoleException e) { + return Respose.builder() + .setCode(ExceptionCode.ERROR_FORBIDDEN.getValue()) + .setMessage(e.getMessage()) + .setData(e.getCode()); + } + + @ExceptionHandler(NotPermissionException.class) + public Respose exceptionHandler(NotPermissionException e) { + return Respose.builder() + .setCode(ExceptionCode.ERROR_FORBIDDEN.getValue()) + .setMessage(e.getMessage()) + .setData(e.getCode()); + } + + @ExceptionHandler(MethodArgumentNotValidException.class) + public Respose exceptionHandler(MethodArgumentNotValidException e) { + return Respose.builder() + .setCode(ExceptionCode.ERROR_FORBIDDEN.getValue()) + .setMessage( + StringUtil.join( + ",", + e.getBindingResult().getFieldErrors(), + DefaultMessageSourceResolvable::getDefaultMessage + ) + ); + } + + @ExceptionHandler(Exception.class) + public Respose exceptionHandler(Exception e) { + log.error(e.getMessage(), e); + return Respose.builder() + .setCode(ExceptionCode.ERROR_INTERNAL_SERVER.getValue()) + .setMessage(StringUtil.format("{} by {}", e.getMessage(), e.getClass().getName())); + } +} diff --git a/src/main/java/com/mingliqiye/disk/exception/BaseExceptionInterface.java b/src/main/java/com/mingliqiye/disk/exception/BaseExceptionInterface.java new file mode 100644 index 0000000..e243603 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/exception/BaseExceptionInterface.java @@ -0,0 +1,19 @@ +package com.mingliqiye.disk.exception; + +import java.io.Serializable; + +public interface BaseExceptionInterface extends Serializable { + String getMessage(); + + Integer getCode(); + + StackTraceElement[] getStackTrace(); + + Throwable getThrowable(); + + String toString(); + + default String getClassName() { + return this.getClass().getName(); + } +} diff --git a/src/main/java/com/mingliqiye/disk/exception/ExceptionCode.java b/src/main/java/com/mingliqiye/disk/exception/ExceptionCode.java new file mode 100644 index 0000000..6ede23e --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/exception/ExceptionCode.java @@ -0,0 +1,29 @@ +package com.mingliqiye.disk.exception; + +import lombok.Getter; + +public enum ExceptionCode { + ERROR_INTERNAL_SERVER(500), + ERROR_PAYMENT_REQUIRED(402), + ERROR_NOT_FOUND(404), + ERROR_METHOD_NOT_ALLOWED(405), + ERROR_UNAUTHORIZED(401), + ERROR_FORBIDDEN(403), + OK(200); + + @Getter + private final int value; + + ExceptionCode(int value) { + this.value = value; + } + + public static ExceptionCode getExceptionCode(int value) { + for (ExceptionCode exceptionCode : ExceptionCode.values()) { + if (exceptionCode.value == value) { + return exceptionCode; + } + } + return null; + } +} diff --git a/src/main/java/com/mingliqiye/disk/exception/InternalServerException.java b/src/main/java/com/mingliqiye/disk/exception/InternalServerException.java new file mode 100644 index 0000000..696bc6b --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/exception/InternalServerException.java @@ -0,0 +1,14 @@ +package com.mingliqiye.disk.exception; + +public class InternalServerException extends BaseException { + + private static final Integer code = ExceptionCode.ERROR_INTERNAL_SERVER.getValue(); + + public InternalServerException(String message, Throwable throwable) { + super(message, code, throwable); + } + + public InternalServerException(String message) { + super(message, code); + } +} diff --git a/src/main/java/com/mingliqiye/disk/exception/NotFoundException.java b/src/main/java/com/mingliqiye/disk/exception/NotFoundException.java new file mode 100644 index 0000000..e6d5e81 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/exception/NotFoundException.java @@ -0,0 +1,14 @@ +package com.mingliqiye.disk.exception; + +public class NotFoundException extends BaseException { + + private static final Integer code = ExceptionCode.ERROR_NOT_FOUND.getValue(); + + public NotFoundException(String message, Throwable throwable) { + super(message, code, throwable); + } + + public NotFoundException(String message) { + super(message, code); + } +} diff --git a/src/main/java/com/mingliqiye/disk/function/P1Function.java b/src/main/java/com/mingliqiye/disk/function/P1Function.java new file mode 100644 index 0000000..c8159a2 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/function/P1Function.java @@ -0,0 +1,6 @@ +package com.mingliqiye.disk.function; + +@FunctionalInterface +public interface P1Function

{ + void call(P p); +} diff --git a/src/main/java/com/mingliqiye/disk/function/P1R1Function.java b/src/main/java/com/mingliqiye/disk/function/P1R1Function.java new file mode 100644 index 0000000..1151bd4 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/function/P1R1Function.java @@ -0,0 +1,6 @@ +package com.mingliqiye.disk.function; + +@FunctionalInterface +public interface P1R1Function { + R call(P p); +} diff --git a/src/main/java/com/mingliqiye/disk/http/Respose.java b/src/main/java/com/mingliqiye/disk/http/Respose.java new file mode 100644 index 0000000..cb7f663 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/http/Respose.java @@ -0,0 +1,82 @@ +package com.mingliqiye.disk.http; + +import com.mingliqiye.disk.exception.ExceptionCode; +import com.mingliqiye.disk.time.DateTime; + +public class Respose { + + private int code = ExceptionCode.OK.getValue(); + private String message = "操作成功"; + private T data; + private DateTime dateTime = DateTime.now(); + + public Respose(int code, String message, T data, DateTime dateTime) { + this.code = code; + this.message = message; + this.data = data; + this.dateTime = dateTime; + } + + public Respose(int code, String message, T data) { + this.code = code; + this.message = message; + this.data = data; + } + + public Respose(int code, String message) { + this.code = code; + this.message = message; + } + + public Respose(T data) { + this.data = data; + } + + public Respose() {} + + public static Respose builder() { + return new Respose<>(); + } + + public static Respose builder(T data) { + return new Respose<>().setData(data); + } + + public static Respose error(Class type, Integer code, String message) { + return new Respose().setCode(code).setMessage(message); + } + + public static Respose error(Class type, ExceptionCode code, String message) { + return error(type, code.getValue(), message); + } + + public String getMessage() { + return message; + } + + public Respose setMessage(String message) { + this.message = message; + return this; + } + + public int getCode() { + return code; + } + + public Respose setCode(int code) { + this.code = code; + return this; + } + + public DateTime getDateTime() { + return dateTime; + } + + public T getData() { + return data; + } + + public Respose setData(TD data) { + return new Respose<>(code, message, data); + } +} diff --git a/src/main/java/com/mingliqiye/disk/mappers/UserMapper.java b/src/main/java/com/mingliqiye/disk/mappers/UserMapper.java new file mode 100644 index 0000000..8e5d6c9 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/mappers/UserMapper.java @@ -0,0 +1,9 @@ +package com.mingliqiye.disk.mappers; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.mingliqiye.disk.cache.MyBatisRedisCache; +import com.mingliqiye.disk.model.User; +import org.apache.ibatis.annotations.CacheNamespace; + +@CacheNamespace(implementation = MyBatisRedisCache.class) +public interface UserMapper extends BaseMapper {} diff --git a/src/main/java/com/mingliqiye/disk/model/User.java b/src/main/java/com/mingliqiye/disk/model/User.java new file mode 100644 index 0000000..128574f --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/model/User.java @@ -0,0 +1,42 @@ +package com.mingliqiye.disk.model; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; +import com.mingliqiye.disk.time.DateTime; +import com.mingliqiye.disk.uuid.UUID; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +@TableName(value = "users", autoResultMap = true) +public class User { + + private UUID id; + private String username; + private String password; + + private String nickname; + + @TableField(typeHandler = JacksonTypeHandler.class) + private List prermissions; + + @TableField(typeHandler = JacksonTypeHandler.class) + private List roles; + + private byte[] icon; + private boolean admin; + private DateTime creationTime; + private DateTime updateTime; + + public User setPasswordNull() { + setPassword("***"); + return this; + } +} diff --git a/src/main/java/com/mingliqiye/disk/time/DateTime.java b/src/main/java/com/mingliqiye/disk/time/DateTime.java new file mode 100644 index 0000000..26c3d08 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/time/DateTime.java @@ -0,0 +1,241 @@ +package com.mingliqiye.disk.time; + +import com.fasterxml.jackson.annotation.JsonView; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import lombok.Getter; +import lombok.Setter; + +/** + * com.mingliqiye.libs.Main + *

自定义时间类 + * + * @author MingLiPro|Armamem0t + * @version 1.0 + * @see LocalDateTime + * @see Date + * @see ZoneId + */ +@JsonSerialize(using = DateTimeJsonSerializer.class) +@JsonDeserialize(using = DateTimeJsonDeserializer.class) +@Schema(type = "String") +@JsonView(String.class) +public class DateTime implements Serializable { + + @Getter + @Setter + private LocalDateTime localDateTime; + + @Getter + @Setter + private ZoneId zoneId = ZoneId.systemDefault(); + + DateTime() { + this(Instant.now()); + } + + DateTime(Instant instant) { + this(LocalDateTime.ofInstant(instant, ZoneId.systemDefault())); + } + + DateTime(LocalDateTime localDateTime) { + this.localDateTime = localDateTime; + } + + DateTime(Instant instant, ZoneId zoneId) { + this(LocalDateTime.ofInstant(instant, zoneId)); + } + + DateTime(Date date) { + this(date.toInstant()); + } + + public static DateTime now() { + return new DateTime(); + } + + public static DateTime ofCurrentTimeMillis(long time) { + return new DateTime(Instant.ofEpochMilli(time)); + } + + public static DateTime of(Instant instant) { + return new DateTime(instant); + } + + public static String format(Date date, String formater) { + return format(toLocalDateTime(date), formater); + } + + public static String format(LocalDateTime date, String formater) { + return DateTimeFormatter.ofPattern(formater).format(date); + } + + public static LocalDateTime toLocalDateTime(Date date) { + return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); + } + + public static String format(LocalDateTime date, Formats formats) { + return format(date, formats.value); + } + + public static DateTime parse(String timestr, Formats formater) { + return parse(timestr, formater.value); + } + + public static DateTime parse(String timestr, String formater) { + DateTimeFormatter sdf = DateTimeFormatter.ofPattern(formater); + return of(LocalDateTime.parse(timestr, sdf)); + } + + public static DateTime of(LocalDateTime localDateTime) { + return new DateTime(localDateTime); + } + + public static void main(String[] args) {} + + @Override + public String toString() { + return ( + this.getClass().getName() + + '@' + + Integer.toHexString(hashCode()) + + '(' + + format(Formats.STANDARD_DATETIME_MILLISECOUND7) + + ")" + ); + } + + public String format(Formats formater) { + return format(localDateTime, formater.value); + } + + public Instant toInstant() { + return toInstant(localDateTime); + } + + public static Instant toInstant(LocalDateTime localDateTime) { + return toInstant(localDateTime, ZoneId.systemDefault()); + } + + public static Instant toInstant(LocalDateTime localDateTime, ZoneId zoneId) { + return localDateTime.atZone(zoneId).toInstant(); + } + + public Instant toInstant(ZoneId zoneId) { + return toInstant(localDateTime, zoneId); + } + + public Date toDate() { + return toDate(localDateTime); + } + + public static Date toDate(LocalDateTime localDateTime) { + return Date.from(toInstant(localDateTime)); + } + + public String format(String formater) { + return format(localDateTime, formater); + } + + public DateTime plusYears(long years) { + return plusYears(this, years); + } + + public static DateTime plusYears(DateTime dateTime, long years) { + dateTime.setLocalDateTime(dateTime.getLocalDateTime().plusYears(years)); + return dateTime; + } + + public DateTime plusMonths(long months) { + return plusMonths(this, months); + } + + public static DateTime plusMonths(DateTime dateTime, long months) { + dateTime.setLocalDateTime(dateTime.getLocalDateTime().plusMonths(months)); + return dateTime; + } + + public DateTime plusWeeks(long weeks) { + return plusWeeks(this, weeks); + } + + public static DateTime plusWeeks(DateTime dateTime, long weeks) { + dateTime.setLocalDateTime(dateTime.getLocalDateTime().plusWeeks(weeks)); + return dateTime; + } + + public DateTime plusDays(long days) { + return plusDays(this, days); + } + + public static DateTime plusDays(DateTime dateTime, long days) { + dateTime.setLocalDateTime(dateTime.getLocalDateTime().plusDays(days)); + return dateTime; + } + + public DateTime plusHours(long hours) { + return plusHours(this, hours); + } + + public static DateTime plusHours(DateTime dateTime, long hours) { + dateTime.setLocalDateTime(dateTime.getLocalDateTime().plusHours(hours)); + return dateTime; + } + + public DateTime plusMinutes(long minutes) { + return plusMinutes(this, minutes); + } + + public static DateTime plusMinutes(DateTime dateTime, long minutes) { + dateTime.setLocalDateTime(dateTime.getLocalDateTime().plusMinutes(minutes)); + return dateTime; + } + + public DateTime plusSeconds(long seconds) { + return plusSeconds(this, seconds); + } + + public static DateTime plusSeconds(DateTime dateTime, long seconds) { + dateTime.setLocalDateTime(dateTime.getLocalDateTime().plusSeconds(seconds)); + return dateTime; + } + + public DateTime plusNanos(long nanos) { + return plusNanos(this, nanos); + } + + public static DateTime plusNanos(DateTime dateTime, long nanos) { + dateTime.setLocalDateTime(dateTime.getLocalDateTime().plusNanos(nanos)); + return dateTime; + } + + @Getter + public enum Formats { + STANDARD_DATETIME("yyyy-MM-dd HH:mm:ss"), + STANDARD_DATETIME_MILLISECOUND7("yyyy-MM-dd HH:mm:ss.SSSSSSS"), + STANDARD_DATETIME_MILLISECOUND6("yyyy-MM-dd HH:mm:ss.SSSSSS"), + STANDARD_DATETIME_MILLISECOUND5("yyyy-MM-dd HH:mm:ss.SSSSS"), + STANDARD_DATETIME_MILLISECOUND4("yyyy-MM-dd HH:mm:ss.SSSS"), + STANDARD_DATETIME_MILLISECOUND3("yyyy-MM-dd HH:mm:ss.SSS"), + STANDARD_DATETIME_MILLISECOUND2("yyyy-MM-dd HH:mm:ss.SS"), + STANDARD_DATETIME_MILLISECOUND1("yyyy-MM-dd HH:mm:ss.S"), + STANDARD_ISO("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"), + STANDARD_DATETIME_SECOUND("yyyy-MM-dd HH:mm:ss"), + STANDARD_DATE("yyyy-MM-dd"), + ISO8601("yyyy-MM-dd'T'HH:mm:ss.SSS'000'"), + COMPACT_DATETIME("yyyyMMddHHmmss"); + + private final String value; + + Formats(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/mingliqiye/disk/time/DateTimeJsonDeserializer.java b/src/main/java/com/mingliqiye/disk/time/DateTimeJsonDeserializer.java new file mode 100644 index 0000000..92847ff --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/time/DateTimeJsonDeserializer.java @@ -0,0 +1,17 @@ +package com.mingliqiye.disk.time; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import java.io.IOException; + +public class DateTimeJsonDeserializer extends JsonDeserializer { + + @Override + public DateTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + if (p.isNaN()) { + return null; + } + return DateTime.parse(p.getValueAsString(), DateTime.Formats.STANDARD_DATETIME_MILLISECOUND6); + } +} diff --git a/src/main/java/com/mingliqiye/disk/time/DateTimeJsonSerializer.java b/src/main/java/com/mingliqiye/disk/time/DateTimeJsonSerializer.java new file mode 100644 index 0000000..024b0c1 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/time/DateTimeJsonSerializer.java @@ -0,0 +1,33 @@ +package com.mingliqiye.disk.time; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.WritableTypeId; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.jsontype.TypeSerializer; +import java.io.IOException; + +public class DateTimeJsonSerializer extends JsonSerializer { + + @Override + public void serialize(DateTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException { + if (value == null) { + gen.writeNull(); + return; + } + gen.writeString(value.format(DateTime.Formats.STANDARD_DATETIME_MILLISECOUND6)); + } + + @Override + public void serializeWithType( + DateTime value, + JsonGenerator gen, + SerializerProvider serializers, + TypeSerializer typeSer + ) throws IOException { + WritableTypeId typeId = typeSer.writeTypePrefix(gen, typeSer.typeId(value, JsonToken.VALUE_STRING)); + serialize(value, gen, serializers); + typeSer.writeTypeSuffix(gen, typeId); + } +} diff --git a/src/main/java/com/mingliqiye/disk/typeHandlers/DateTimeTypeHandler.java b/src/main/java/com/mingliqiye/disk/typeHandlers/DateTimeTypeHandler.java new file mode 100644 index 0000000..3e923b5 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/typeHandlers/DateTimeTypeHandler.java @@ -0,0 +1,45 @@ +package com.mingliqiye.disk.typeHandlers; + +import com.mingliqiye.disk.time.DateTime; +import java.sql.*; +import org.apache.ibatis.type.BaseTypeHandler; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.MappedJdbcTypes; +import org.apache.ibatis.type.MappedTypes; + +@MappedTypes({ DateTime.class }) +@MappedJdbcTypes(JdbcType.VARCHAR) +public class DateTimeTypeHandler extends BaseTypeHandler { + + @Override + public void setNonNullParameter(PreparedStatement ps, int i, DateTime parameter, JdbcType jdbcType) + throws SQLException { + ps.setTimestamp(i, Timestamp.valueOf(parameter.getLocalDateTime())); + } + + @Override + public DateTime getNullableResult(ResultSet rs, String columnName) throws SQLException { + return parse(rs.getString(columnName)); + } + + @Override + public DateTime getNullableResult(ResultSet rs, int columnIndex) throws SQLException { + return parse(rs.getString(columnIndex)); + } + + @Override + public DateTime getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { + return parse(cs.getString(columnIndex)); + } + + public DateTime parse(String s) { + if (s == null) { + return null; + } + return DateTime.parse(s, DateTime.Formats.STANDARD_DATETIME_MILLISECOUND6); + } + + public String format(DateTime t) { + return t.format(DateTime.Formats.STANDARD_DATETIME_MILLISECOUND6); + } +} diff --git a/src/main/java/com/mingliqiye/disk/typeHandlers/UUIDBinaryTypeHandler.java b/src/main/java/com/mingliqiye/disk/typeHandlers/UUIDBinaryTypeHandler.java new file mode 100644 index 0000000..2276861 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/typeHandlers/UUIDBinaryTypeHandler.java @@ -0,0 +1,55 @@ +package com.mingliqiye.disk.typeHandlers; + +import com.mingliqiye.disk.uuid.UUID; +import java.nio.ByteBuffer; +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import org.apache.ibatis.type.BaseTypeHandler; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.MappedJdbcTypes; +import org.apache.ibatis.type.MappedTypes; + +@MappedTypes({ UUID.class }) +@MappedJdbcTypes(JdbcType.BINARY) +public class UUIDBinaryTypeHandler extends BaseTypeHandler { + + public static byte[] UUID_TO_BIN(UUID uuid) { + ByteBuffer bb = ByteBuffer.wrap(new byte[16]); + bb.putLong(uuid.GetUUID().getMostSignificantBits()); + bb.putLong(uuid.GetUUID().getLeastSignificantBits()); + return bb.array(); + } + + public static UUID BIN_TO_UUID(byte[] bytes) { + if (bytes == null) { + return null; + } + ByteBuffer bb = ByteBuffer.wrap(bytes); + long mostSig = bb.getLong(); + long leastSig = bb.getLong(); + return new UUID(mostSig, leastSig); + } + + @Override + public void setNonNullParameter(PreparedStatement ps, int i, UUID parameter, JdbcType jdbcType) + throws SQLException { + ps.setBytes(i, UUID_TO_BIN(parameter)); + } + + @Override + public UUID getNullableResult(ResultSet rs, String columnName) throws SQLException { + return BIN_TO_UUID(rs.getBytes(columnName)); + } + + @Override + public UUID getNullableResult(ResultSet rs, int columnIndex) throws SQLException { + return BIN_TO_UUID(rs.getBytes(columnIndex)); + } + + @Override + public UUID getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { + return BIN_TO_UUID(cs.getBytes(columnIndex)); + } +} diff --git a/src/main/java/com/mingliqiye/disk/util/FileUtil.java b/src/main/java/com/mingliqiye/disk/util/FileUtil.java new file mode 100644 index 0000000..a8e30f1 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/util/FileUtil.java @@ -0,0 +1,264 @@ +package com.mingliqiye.disk.util; + +import com.mingliqiye.disk.function.P1Function; +import java.io.*; +import java.nio.channels.Channels; +import java.nio.channels.FileChannel; +import java.nio.channels.WritableByteChannel; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class FileUtil { + + public static String save(InputStream inputStream, Path filepath, P1Function callback) { + return save(inputStream, filepath.toString(), callback); + } + + public static String save(InputStream inputStream, String filepath, P1Function callback) { + Path filePath = Paths.get(filepath); + Path path1 = filePath.getParent(); + if (!path1.toFile().exists()) { + path1.toFile().mkdirs(); + } + byte[] buffer = new byte[1024]; + int len; + long total = 0; + + try { + filePath.toFile().createNewFile(); + } catch (IOException e) { + e.printStackTrace(); + throw new RuntimeException(e); + } + try (FileOutputStream fileOutputStream = new FileOutputStream(filePath.toFile())) { + while ((len = inputStream.read(buffer)) != -1) { + fileOutputStream.write(buffer, 0, len); + total += len; + if (callback != null) { + callback.call(total); + } + } + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + return filePath.toAbsolutePath().toString(); + } + + public static String save(InputStream inputStream, Path filepath) { + return save(inputStream, filepath.toString(), null); + } + + public static String save(InputStream inputStream, String filepath) { + return save(inputStream, filepath, null); + } + + public static boolean copy(String fromCopy, String toCopyed) { + return copy(Path.of(fromCopy), Path.of(toCopyed)); + } + + public static boolean copy(Path fromCopy, Path toCopyed) { + return copy(fromCopy.toFile(), toCopyed.toFile()); + } + + public static boolean copy(File fromCopy, File toCopyed) { + try (InputStream inputStream = new FileInputStream(fromCopy)) { + try (OutputStream outputStream = new FileOutputStream(toCopyed)) { + inputStream.transferTo(outputStream); + return true; + } + } catch (IOException e) { + return false; + } + } + + public static String saveTxt(String txt, String path) { + return saveTxt(txt, Paths.get(path)); + } + + public static String saveTxt(String txt, Path path) { + return saveTxt(txt, path.toFile()); + } + + public static String saveTxt(String txt, File path) { + try (OutputStream outputStream = new FileOutputStream(path)) { + outputStream.write(txt.getBytes()); + } catch (IOException e) { + return null; + } + return path.getAbsolutePath(); + } + + public static byte[] readBytes(String path) { + return readBytes(Paths.get(path)); + } + + public static byte[] readBytes(Path path) { + return readBytes(path.toFile()); + } + + public static byte[] readBytes(File f) { + try (FileInputStream fileInputStream = new FileInputStream(f)) { + return readBytes(fileInputStream); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static byte[] readBytes(InputStream inputStream) { + try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) { + inputStream.transferTo(byteArrayOutputStream); + return byteArrayOutputStream.toByteArray(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static String readString(String path) { + return readString(Paths.get(path)); + } + + public static String readString(Path path) { + return readString(path.toFile()); + } + + public static String readString(File path) { + byte[] bytes = readBytes(path); + return new String(bytes); + } + + public static String readString(InputStream path) { + byte[] bytes = readBytes(path); + return new String(bytes); + } + + public static boolean delete(Path filepath) { + try { + Files.delete(filepath); + return true; + } catch (IOException e) { + return false; + } + } + + public static void main(String[] args) { + log.info("This is a test message"); + } + + /** + * 文件范围读取工具类(包含起始和结束位置) + * 有效范围:from ∈ [0, filesize-1], to ∈ [from, filesize-1] + */ + public class FileRangeReader { + + /** + * 读取文件指定范围内容到输出流 + * + * @param filePath 文件路径 + * @param from 起始位置(包含,0-based) + * @param to 结束位置(包含) + * @param output 输出流 + * @throws IOException 如果发生I/O错误 + * @throws IllegalArgumentException 如果范围无效 + */ + public static void read(String filePath, long from, long to, OutputStream output) + throws IOException, IllegalArgumentException { + // 参数验证 + if (from < 0) { + throw new IllegalArgumentException("起始位置不能小于0"); + } + if (to < from) { + throw new IllegalArgumentException("结束位置不能小于起始位置"); + } + + Path path = Paths.get(filePath); + try (FileChannel fileChannel = FileChannel.open(path, StandardOpenOption.READ)) { + long fileSize = fileChannel.size(); + + // 自动调整超出文件范围的请求 + if (from >= fileSize) { + return; // 起始位置已超出文件范围,不读取任何内容 + } + if (to >= fileSize) { + to = fileSize - 1; // 调整结束位置为文件末尾 + } + + try (WritableByteChannel outChannel = Channels.newChannel(output)) { + long position = from; + long remaining = to - from + 1; // +1因为包含结束位置 + + // 使用零拷贝技术传输数据 + while (remaining > 0) { + long transferred = fileChannel.transferTo(position, remaining, outChannel); + if (transferred <= 0) break; + position += transferred; + remaining -= transferred; + } + } + } + } + + /** + * 读取文件全部内容到输出流 + * + * @param filePath 文件路径 + * @param output 输出流 + * @throws IOException 如果发生I/O错误 + */ + public static void readFull(String filePath, OutputStream output) throws IOException { + Path path = Paths.get(filePath); + try (FileChannel fileChannel = FileChannel.open(path, StandardOpenOption.READ)) { + long fileSize = fileChannel.size(); + if (fileSize > 0) { + read(filePath, 0, fileSize - 1, output); + } + } + } + + /** + * 读取文件指定范围内容到字节数组 + * + * @param filePath 文件路径 + * @param from 起始位置 + * @param to 结束位置(包含) + * @return 读取的字节数组 + * @throws IOException 如果发生I/O错误 + */ + public static byte[] readToByteArray(String filePath, long from, long to) throws IOException { + try (ByteArrayOutputStream output = new ByteArrayOutputStream()) { + read(filePath, from, to, output); + return output.toByteArray(); + } + } + + /** + * 读取文件全部内容到字节数组 + * + * @param filePath 文件路径 + * @return 文件内容的字节数组 + * @throws IOException 如果发生I/O错误 + */ + public static byte[] readFullToByteArray(String filePath) throws IOException { + try (ByteArrayOutputStream output = new ByteArrayOutputStream()) { + readFull(filePath, output); + return output.toByteArray(); + } + } + + /** + * 获取文件大小 + * + * @param filePath 文件路径 + * @return 文件大小(字节数) + * @throws IOException 如果发生I/O错误 + */ + public static long getFileSize(String filePath) throws IOException { + return Paths.get(filePath).toFile().length(); + } + } +} diff --git a/src/main/java/com/mingliqiye/disk/util/HashUtil.java b/src/main/java/com/mingliqiye/disk/util/HashUtil.java new file mode 100644 index 0000000..e0efa60 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/util/HashUtil.java @@ -0,0 +1,3 @@ +package com.mingliqiye.disk.util; + +public class HashUtil {} diff --git a/src/main/java/com/mingliqiye/disk/util/ListUtil.java b/src/main/java/com/mingliqiye/disk/util/ListUtil.java new file mode 100644 index 0000000..0b34583 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/util/ListUtil.java @@ -0,0 +1,17 @@ +package com.mingliqiye.disk.util; + +import java.util.ArrayList; +import java.util.List; + +public class ListUtil { + + public static List toStringList(Object[] object) { + List list = new ArrayList<>(); + for (Object obj : object) { + list.add(obj.toString()); + } + return list; + } + + public static class StringList extends ArrayList {} +} diff --git a/src/main/java/com/mingliqiye/disk/util/NullUtil.java b/src/main/java/com/mingliqiye/disk/util/NullUtil.java new file mode 100644 index 0000000..fb30120 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/util/NullUtil.java @@ -0,0 +1,17 @@ +package com.mingliqiye.disk.util; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import java.io.IOException; + +public class NullUtil { + + public static class NullJsonSerializer extends JsonSerializer { + + @Override + public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException { + gen.writeString("***"); + } + } +} diff --git a/src/main/java/com/mingliqiye/disk/util/PanStpUtil.java b/src/main/java/com/mingliqiye/disk/util/PanStpUtil.java new file mode 100644 index 0000000..a3d4822 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/util/PanStpUtil.java @@ -0,0 +1,16 @@ +package com.mingliqiye.disk.util; + +import cn.dev33.satoken.stp.StpUtil; +import com.mingliqiye.disk.uuid.UUID; + +public class PanStpUtil { + + public static UUID getLoginId() { + return UUID.ofString((String) StpUtil.getLoginId()); + } + + public static String login(UUID uuid) { + StpUtil.login(uuid.toUUIDString()); + return StpUtil.getTokenValue(); + } +} diff --git a/src/main/java/com/mingliqiye/disk/util/StringUtil.java b/src/main/java/com/mingliqiye/disk/util/StringUtil.java new file mode 100644 index 0000000..0df4fa2 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/util/StringUtil.java @@ -0,0 +1,66 @@ +package com.mingliqiye.disk.util; + +import com.mingliqiye.disk.function.P1R1Function; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.slf4j.helpers.MessageFormatter; + +public class StringUtil { + + public static String toString(Object obj) { + return obj == null ? "" : obj.toString(); + } + + public static String format(String format, Object... args) { + return MessageFormatter.arrayFormat(format, args).getMessage(); + } + + public static boolean isEmpty(String str) { + return str == null || str.isEmpty(); + } + + public static void main(String[] args) { + String d = joinOf(",", "", "", "1", "", "2", "3", "4", "5", "6", "7", "8", "9"); + StringUtil.println(d); + List dd = split(d, ","); + StringUtil.println(dd); + println(10000 / 1000); + } + + public static String joinOf(String spec, String... objects) { + return join(spec, Arrays.asList(objects)); + } + + public static void println(Object... objects) { + if (objects.length == 1) { + System.out.println(objects[0]); + } else { + System.out.println(join(" ", ListUtil.toStringList(objects))); + } + } + + public static List split(String str, String separator) { + List data = new ArrayList<>(Arrays.asList(str.split(separator))); + while (!data.isEmpty() && data.getFirst().isEmpty()) data.removeFirst(); + return data; + } + + public static

String join(String separator, List

list, P1R1Function fun) { + StringBuilder sb = StringUtil.stringBuilder(); + for (int i = 0; i < list.size(); i++) { + P item = list.get(i); + if (i == 0) sb.append(fun == null ? item.toString() : fun.call(item)); + else sb.append(separator).append(fun == null ? item.toString() : fun.call(item)); + } + return sb.toString(); + } + + public static String join(String separator, List list) { + return join(separator, list, null); + } + + public static StringBuilder stringBuilder() { + return new StringBuilder(); + } +} diff --git a/src/main/java/com/mingliqiye/disk/util/SystemUtil.java b/src/main/java/com/mingliqiye/disk/util/SystemUtil.java new file mode 100644 index 0000000..72bf40e --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/util/SystemUtil.java @@ -0,0 +1,40 @@ +package com.mingliqiye.disk.util; + +import lombok.Getter; + +public class SystemUtil { + + @Getter + private static final String osName = System.getProperties().getProperty("os.name"); + + public static boolean isWindows() { + return osName != null && osName.startsWith("Windows"); + } + + public static boolean isMac() { + return osName != null && osName.startsWith("Mac"); + } + + public static boolean isUnix() { + return ((osName != null && osName.startsWith("Linux")) || (!isWindows() && !isMac())); + } + + public static String getJdkVersion() { + return System.getProperty("java.specification.version"); + } + + public static Integer getJavaVersionFloat() { + String version = getJdkVersion(); + String uversion; + if (version.startsWith("1.")) { + uversion = version.substring(2, 3); + } else { + uversion = version.substring(0, 2); + } + return Integer.parseInt(uversion); + } + + public static boolean isjdk8plus() { + return getJavaVersionFloat() > 8; + } +} diff --git a/src/main/java/com/mingliqiye/disk/util/ThreadLocalDataHolderUtil.java b/src/main/java/com/mingliqiye/disk/util/ThreadLocalDataHolderUtil.java new file mode 100644 index 0000000..bc3c11d --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/util/ThreadLocalDataHolderUtil.java @@ -0,0 +1,82 @@ +package com.mingliqiye.disk.util; + +/** + * 线程局部变量工具类 + */ +public class ThreadLocalDataHolderUtil { + + // 静态实例,用于存储字符串类型的线程局部变量 + public static final ThreadLocalDataHolder LibrarysLocalDataHolderStatic = new ThreadLocalDataHolder<>(); + + /** + * 泛型线程局部变量持有器 + * + * @param 存储的数据类型 + */ + public static class ThreadLocalDataHolder { + + private final ThreadLocal threadLocal; + + public ThreadLocalDataHolder() { + this.threadLocal = new ThreadLocal<>(); + } + + /** + * 获取当前线程存储的值 + * + * @return 当前线程存储的值,如果没有则返回null + */ + public T get() { + return threadLocal.get(); + } + + /** + * 设置当前线程的值 + * + * @param value 要存储的值 + */ + public void set(T value) { + threadLocal.set(value); + } + + /** + * 移除当前线程存储的值 + */ + public void remove() { + threadLocal.remove(); + } + + /** + * 获取当前线程存储的值,如果不存在则返回默认值 + * + * @param defaultValue 默认值 + * @return 当前线程存储的值或默认值 + */ + public T getOrDefault(T defaultValue) { + T value = threadLocal.get(); + return value != null ? value : defaultValue; + } + + /** + * 安全获取值(避免NPE) + * + * @return 值或null + */ + public T safeGet() { + try { + return threadLocal.get(); + } catch (Exception e) { + return null; + } + } + + /** + * 检查当前线程是否有值 + * + * @return 是否有值 + */ + public boolean isPresent() { + return threadLocal.get() != null; + } + } +} diff --git a/src/main/java/com/mingliqiye/disk/uuid/UUID.java b/src/main/java/com/mingliqiye/disk/uuid/UUID.java new file mode 100644 index 0000000..055b95b --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/uuid/UUID.java @@ -0,0 +1,141 @@ +package com.mingliqiye.disk.uuid; + +import com.fasterxml.jackson.annotation.JsonView; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.github.f4b6a3.uuid.UuidCreator; +import com.mingliqiye.disk.time.DateTime; +import com.mingliqiye.disk.util.StringUtil; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; +import java.nio.ByteBuffer; +import java.util.Locale; +import java.util.Objects; +import lombok.Setter; + +@Setter +@JsonSerialize(using = UUIDJsonSerializer.class) +@JsonDeserialize(using = UUIDJsonDeserializer.class) +@JsonView(String.class) +@Schema(type = "String") +public class UUID implements Serializable { + + private java.util.UUID uuid; + + public UUID(long msb, long lsb) { + uuid = new java.util.UUID(msb, lsb); + } + + public UUID() { + uuid = UuidCreator.getTimeBased(); + } + + public UUID(java.util.UUID uuid) { + this.uuid = uuid; + } + + public UUID(String uuid) { + this.uuid = java.util.UUID.fromString(uuid); + } + + public static UUID of(byte[] bytes) { + ByteBuffer bb = ByteBuffer.wrap(bytes); + long msb = bb.getLong(); + long lsb = bb.getLong(); + return new UUID(msb, lsb); + } + + public static UUID ofString(String data) { + try { + java.util.UUID uuid1 = java.util.UUID.fromString(data); + UUID uuid = new UUID(); + uuid.setUuid(uuid1); + return uuid; + } catch (Exception e) { + throw new UUIDException(e.getMessage(), e); + } + } + + public byte[] toBytes() { + ByteBuffer bb = ByteBuffer.wrap(new byte[16]); + bb.putLong(uuid.getMostSignificantBits()); + bb.putLong(uuid.getLeastSignificantBits()); + return bb.array(); + } + + public java.util.UUID GetUUID() { + return uuid; + } + + public String toUUIDString() { + return toUUIDString(false); + } + + public String toUUIDString(boolean u) { + if (uuid == null) { + throw new UUIDException("uuid is null : NullPointerException"); + } + if (u) { + return uuid.toString().toUpperCase(Locale.ROOT); + } + return uuid.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(uuid); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UUID uuid = (UUID) o; + return Objects.equals(this.uuid, uuid.uuid); + } + + @Override + public String toString() { + if (uuid == null) return "UUID(null)"; + if (uuid.version() == 1) return StringUtil.format( + "UUID(uuid={},time={},mac={},version={})", + toUUIDString(true), + getDateTime().format(DateTime.Formats.STANDARD_DATETIME), + extractMACFromUUID(), + uuid.version() + ); + return StringUtil.format("UUID(uuid={},version={})", toUUIDString(true), uuid.version()); + } + + public DateTime getDateTime() { + if (uuid == null) { + return null; + } + return DateTime.ofCurrentTimeMillis(uuid.timestamp() / 10_000).plusDays(-141427L); + } + + public String extractMACFromUUID() { + return extractMACFromUUID(null); + } + + public String extractMACFromUUID(String spec) { + if (uuid == null) { + throw new UUIDException("uuid is null : NullPointerException"); + } + if (spec == null) { + spec = ":"; + } + long leastSigBits = uuid.getLeastSignificantBits(); + long macLong = leastSigBits & 0xFFFFFFFFFFFFL; + byte[] macBytes = new byte[6]; + for (int i = 0; i < 6; i++) { + macBytes[5 - i] = (byte) (macLong >> (8 * i)); + } + StringBuilder mac = new StringBuilder(); + for (int i = 0; i < 6; i++) { + mac.append(String.format("%02X", macBytes[i])); + if (i < 5) mac.append(spec); + } + return mac.toString(); + } +} diff --git a/src/main/java/com/mingliqiye/disk/uuid/UUIDException.java b/src/main/java/com/mingliqiye/disk/uuid/UUIDException.java new file mode 100644 index 0000000..2abad84 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/uuid/UUIDException.java @@ -0,0 +1,12 @@ +package com.mingliqiye.disk.uuid; + +public class UUIDException extends RuntimeException { + + public UUIDException(String message) { + super(message); + } + + public UUIDException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/src/main/java/com/mingliqiye/disk/uuid/UUIDJsonDeserializer.java b/src/main/java/com/mingliqiye/disk/uuid/UUIDJsonDeserializer.java new file mode 100644 index 0000000..77c20ff --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/uuid/UUIDJsonDeserializer.java @@ -0,0 +1,17 @@ +package com.mingliqiye.disk.uuid; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import java.io.IOException; + +public class UUIDJsonDeserializer extends JsonDeserializer { + + @Override + public UUID deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + if (p.isNaN()) { + return null; + } + return new UUID(p.getValueAsString()); + } +} diff --git a/src/main/java/com/mingliqiye/disk/uuid/UUIDJsonSerializer.java b/src/main/java/com/mingliqiye/disk/uuid/UUIDJsonSerializer.java new file mode 100644 index 0000000..b29d915 --- /dev/null +++ b/src/main/java/com/mingliqiye/disk/uuid/UUIDJsonSerializer.java @@ -0,0 +1,34 @@ +package com.mingliqiye.disk.uuid; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.WritableTypeId; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.jsontype.TypeSerializer; +import java.io.IOException; + +public class UUIDJsonSerializer extends JsonSerializer { + + @Override + public void serialize(UUID uuid, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) + throws UUIDException, IOException { + if (uuid == null) { + jsonGenerator.writeNull(); + return; + } + jsonGenerator.writeString(uuid.toUUIDString()); + } + + @Override + public void serializeWithType( + UUID value, + JsonGenerator gen, + SerializerProvider serializers, + TypeSerializer typeSer + ) throws IOException { + WritableTypeId typeId = typeSer.writeTypePrefix(gen, typeSer.typeId(value, JsonToken.VALUE_STRING)); + serialize(value, gen, serializers); + typeSer.writeTypeSuffix(gen, typeId); + } +} diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml new file mode 100644 index 0000000..4dfa7e7 --- /dev/null +++ b/src/main/resources/application.yaml @@ -0,0 +1,90 @@ +config: + port: 9963 + app-name: maven-repository + app-version: 1.0 + data-source: + mysql: + username: pan + password: PhXCRiCfEmiGesEm + host: 10.0.0.4 + port: 3307 + database: pan + redis: + host: 10.0.0.4 + port: 6380 + database: 0 + username: '' + password: redis_kTJpsa + + +spring: + application: + name: ${config.app-name} + version: ${config.app-version} + banner: + location: classpath:banner/banner.txt + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://${config.data-source.mysql.host}:${config.data-source.mysql.port}/${config.data-source.mysql.database}?rewriteBatchedStatements=true + username: ${config.data-source.mysql.username} + password: ${config.data-source.mysql.password} + type: com.alibaba.druid.pool.DruidDataSource + druid: + initial-size: 0 + min-idle: 0 + maxActive: 1024 + connect-timeout: 1000 + data: + redis: + host: ${config.data-source.redis.host} + port: ${config.data-source.redis.port} + database: ${config.data-source.redis.database} + password: ${config.data-source.redis.password} + username: ${config.data-source.redis.username} + connect-timeout: 5s + timeout: 5s + lettuce: + pool: + min-idle: 0 + max-idle: 16 + max-active: 16 + max-wait: 5s + mvc: + static-path-pattern: /static/** + web: + resources: + static-locations: classpath:/html/static + + +server: + port: ${config.port} + + +sa-token: + token-name: Authorization + timeout: 2592000 + active-timeout: -1 + is-concurrent: true + is-share: false + token-style: random-128 + is-log: false + jwt-secret-key: pzmqljgvdyidabacksmoaghgyikxoasckjhgyuhij + token-prefix: Bearer + is-read-body: false + is-read-cookie: false + + +mybatis-plus: + type-handlers-package: com.mingliqiye.disk.typeHandlers + configuration: + cache-enabled: true + + global-config: + db-config: + id-type: auto + +springdoc: + swagger-ui: + path: /apis/swagger + api-docs: + path: /apis/swagger/api.json diff --git a/src/main/resources/banner/banner.txt b/src/main/resources/banner/banner.txt new file mode 100644 index 0000000..10947ba --- /dev/null +++ b/src/main/resources/banner/banner.txt @@ -0,0 +1,6 @@ + __ __ _____ _ _ _____ _ _____ ____ _____ __ __ ______ +| \/ | |_ _| | \ | | / ____| | | |_ _| / __ \ |_ _| \ \ / / | ____| +| \ / | | | | \| | | | __ | | | | | | | | | | \ \_/ / | |__ +| |\/| | | | | . ` | | | |_ | | | | | | | | | | | \ / | __| +| | | | _| |_ | |\ | | |__| | | |____ _| |_ | |__| | _| |_ | | | |____ +|_| |_| |_____| |_| \_| \_____| |______| |_____| \___\_\ |_____| |_| |______| \ No newline at end of file diff --git a/src/main/resources/html/index.html b/src/main/resources/html/index.html new file mode 100644 index 0000000..b8b3898 --- /dev/null +++ b/src/main/resources/html/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite App + + + + +

+ + diff --git a/src/main/resources/html/static/css/B-HidlUH.css b/src/main/resources/html/static/css/B-HidlUH.css new file mode 100644 index 0000000..2b99663 --- /dev/null +++ b/src/main/resources/html/static/css/B-HidlUH.css @@ -0,0 +1 @@ +:root{--vt-c-white:#fff;--vt-c-white-soft:#f8f8f8;--vt-c-white-mute:#f2f2f2;--vt-c-black:#181818;--vt-c-black-soft:#222;--vt-c-black-mute:#282828;--vt-c-indigo:#2c3e50;--vt-c-divider-light-1:#3c3c3c4a;--vt-c-divider-light-2:#3c3c3c1f;--vt-c-divider-dark-1:#545454a6;--vt-c-divider-dark-2:#5454547a;--vt-c-text-light-1:var(--vt-c-indigo);--vt-c-text-light-2:#3c3c3ca8;--vt-c-text-dark-1:var(--vt-c-white);--vt-c-text-dark-2:#ebebeba3;--color-background:var(--vt-c-white);--color-background-soft:var(--vt-c-white-soft);--color-background-mute:var(--vt-c-white-mute);--color-border:var(--vt-c-divider-light-2);--color-border-hover:var(--vt-c-divider-light-1);--color-heading:var(--vt-c-text-light-1);--color-text:var(--vt-c-text-light-1);--section-gap:160px}@media (prefers-color-scheme:dark){:root{--color-background:var(--vt-c-black);--color-background-soft:var(--vt-c-black-soft);--color-background-mute:var(--vt-c-black-mute);--color-border:var(--vt-c-divider-dark-2);--color-border-hover:var(--vt-c-divider-dark-1);--color-heading:var(--vt-c-text-dark-1);--color-text:var(--vt-c-text-dark-2)}}*,:before,:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:var(--color-text);background:var(--color-background);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;line-height:1.6;transition:color .5s,background-color .5s}#app{max-width:1280px;margin:0 auto;padding:2rem;font-weight:400}a,.green{color:#00bd7e;padding:3px;text-decoration:none;transition:all .4s}@media (hover:hover){a:hover{background-color:#00bd7e33}}@media (min-width:1024px){body{place-items:center;display:flex}#app{grid-template-columns:1fr 1fr;padding:0 2rem;display:grid}}h1[data-v-bed32675]{font-size:2.6rem;font-weight:500;position:relative;top:-10px}h3[data-v-bed32675]{font-size:1.2rem}.greetings h1[data-v-bed32675],.greetings h3[data-v-bed32675]{text-align:center}@media (min-width:1024px){.greetings h1[data-v-bed32675],.greetings h3[data-v-bed32675]{text-align:left}}header[data-v-608be0ed]{max-height:100vh;line-height:1.5}.logo[data-v-608be0ed]{margin:0 auto 2rem;display:block}nav[data-v-608be0ed]{text-align:center;width:100%;margin-top:2rem;font-size:12px}nav a.router-link-exact-active[data-v-608be0ed]{color:var(--color-text)}nav a.router-link-exact-active[data-v-608be0ed]:hover{background-color:#0000}nav a[data-v-608be0ed]{border-left:1px solid var(--color-border);padding:0 1rem;display:inline-block}nav a[data-v-608be0ed]:first-of-type{border:0}@media (min-width:1024px){header[data-v-608be0ed]{padding-right:calc(var(--section-gap)/2);place-items:center;display:flex}.logo[data-v-608be0ed]{margin:0 2rem 0 0}header .wrapper[data-v-608be0ed]{flex-wrap:wrap;place-items:flex-start;display:flex}nav[data-v-608be0ed]{text-align:left;margin-top:1rem;margin-left:-1rem;padding:1rem 0;font-size:1rem}}.item[data-v-5369c01e]{margin-top:2rem;display:flex;position:relative}.details[data-v-5369c01e]{flex:1;margin-left:1rem}i[data-v-5369c01e]{width:32px;height:32px;color:var(--color-text);place-content:center;place-items:center;display:flex}h3[data-v-5369c01e]{color:var(--color-heading);margin-bottom:.4rem;font-size:1.2rem;font-weight:500}@media (min-width:1024px){.item[data-v-5369c01e]{padding:.4rem 0 1rem calc(var(--section-gap)/2);margin-top:0}i[data-v-5369c01e]{border:1px solid var(--color-border);background:var(--color-background);border-radius:8px;width:50px;height:50px;position:absolute;top:calc(50% - 25px);left:-26px}.item[data-v-5369c01e]:before{content:" ";border-left:1px solid var(--color-border);height:calc(50% - 25px);position:absolute;bottom:calc(50% + 25px);left:0}.item[data-v-5369c01e]:after{content:" ";border-left:1px solid var(--color-border);height:calc(50% - 25px);position:absolute;top:calc(50% + 25px);left:0}.item[data-v-5369c01e]:first-of-type:before,.item[data-v-5369c01e]:last-of-type:after{display:none}} diff --git a/src/main/resources/html/static/css/E68f7lAM.css b/src/main/resources/html/static/css/E68f7lAM.css new file mode 100644 index 0000000..9a64092 --- /dev/null +++ b/src/main/resources/html/static/css/E68f7lAM.css @@ -0,0 +1 @@ +@media (min-width:1024px){.about{align-items:center;min-height:100vh;display:flex}} diff --git a/src/main/resources/html/static/js/CcCh4Sgi.js b/src/main/resources/html/static/js/CcCh4Sgi.js new file mode 100644 index 0000000..1f618c7 --- /dev/null +++ b/src/main/resources/html/static/js/CcCh4Sgi.js @@ -0,0 +1,5362 @@ +const __vite__mapDeps = ( + i, + m = __vite__mapDeps, + d = m.f || (m.f = ['static/js/flDiIF0y.js', 'static/css/E68f7lAM.css']), +) => i.map((i) => d[i]); +(function () { + let e = document.createElement(`link`).relList; + if (e && e.supports && e.supports(`modulepreload`)) return; + for (let e of document.querySelectorAll(`link[rel="modulepreload"]`)) n(e); + new MutationObserver((e) => { + for (let t of e) { + if (t.type !== `childList`) continue; + for (let e of t.addedNodes) e.tagName === `LINK` && e.rel === `modulepreload` && n(e); + } + }).observe(document, { childList: !0, subtree: !0 }); + function t(e) { + let t = {}; + return ( + e.integrity && (t.integrity = e.integrity), + e.referrerPolicy && (t.referrerPolicy = e.referrerPolicy), + e.crossOrigin === `use-credentials` + ? (t.credentials = `include`) + : e.crossOrigin === `anonymous` + ? (t.credentials = `omit`) + : (t.credentials = `same-origin`), + t + ); + } + function n(e) { + if (e.ep) return; + e.ep = !0; + let n = t(e); + fetch(e.href, n); + } +})(); +/** + * @vue/shared v3.5.17 + * (c) 2018-present Yuxi (Evan) You and Vue contributors + * @license MIT + **/ +/*! #__NO_SIDE_EFFECTS__ */ +function e(e) { + let t = Object.create(null); + for (let n of e.split(`,`)) t[n] = 1; + return (e) => e in t; +} +const t = {}, + n = [], + r = () => {}, + i = () => !1, + a = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), + o = (e) => e.startsWith(`onUpdate:`), + s = Object.assign, + c = (e, t) => { + let n = e.indexOf(t); + n > -1 && e.splice(n, 1); + }, + l = Object.prototype.hasOwnProperty, + u = (e, t) => l.call(e, t), + d = Array.isArray, + f = (e) => b(e) === `[object Map]`, + p = (e) => b(e) === `[object Set]`, + m = (e) => typeof e == `function`, + h = (e) => typeof e == `string`, + g = (e) => typeof e == `symbol`, + _ = (e) => typeof e == `object` && !!e, + v = (e) => (_(e) || m(e)) && m(e.then) && m(e.catch), + y = Object.prototype.toString, + b = (e) => y.call(e), + x = (e) => b(e).slice(8, -1), + S = (e) => b(e) === `[object Object]`, + C = (e) => h(e) && e !== `NaN` && e[0] !== `-` && `` + parseInt(e, 10) === e, + w = e( + `,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`, + ), + T = (e) => { + let t = Object.create(null); + return (n) => { + let r = t[n]; + return r || (t[n] = e(n)); + }; + }, + ee = /-(\w)/g, + E = T((e) => e.replace(ee, (e, t) => (t ? t.toUpperCase() : ``))), + te = /\B([A-Z])/g, + D = T((e) => e.replace(te, `-$1`).toLowerCase()), + O = T((e) => e.charAt(0).toUpperCase() + e.slice(1)), + ne = T((e) => { + let t = e ? `on${O(e)}` : ``; + return t; + }), + k = (e, t) => !Object.is(e, t), + re = (e, ...t) => { + for (let n = 0; n < e.length; n++) e[n](...t); + }, + ie = (e, t, n, r = !1) => { + Object.defineProperty(e, t, { configurable: !0, enumerable: !1, writable: r, value: n }); + }, + ae = (e) => { + let t = parseFloat(e); + return isNaN(t) ? e : t; + }; +let A; +const oe = () => + (A ||= + typeof globalThis < `u` + ? globalThis + : typeof self < `u` + ? self + : typeof window < `u` + ? window + : typeof global < `u` + ? global + : {}); +function se(e) { + if (d(e)) { + let t = {}; + for (let n = 0; n < e.length; n++) { + let r = e[n], + i = h(r) ? de(r) : se(r); + if (i) for (let e in i) t[e] = i[e]; + } + return t; + } else if (h(e) || _(e)) return e; +} +const ce = /;(?![^(]*\))/g, + le = /:([^]+)/, + ue = /\/\*[^]*?\*\//g; +function de(e) { + let t = {}; + return ( + e + .replace(ue, ``) + .split(ce) + .forEach((e) => { + if (e) { + let n = e.split(le); + n.length > 1 && (t[n[0].trim()] = n[1].trim()); + } + }), + t + ); +} +function fe(e) { + let t = ``; + if (h(e)) t = e; + else if (d(e)) + for (let n = 0; n < e.length; n++) { + let r = fe(e[n]); + r && (t += r + ` `); + } + else if (_(e)) for (let n in e) e[n] && (t += n + ` `); + return t.trim(); +} +const pe = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`, + me = e(pe), + he = e( + pe + + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`, + ); +function ge(e) { + return !!e || e === ``; +} +const _e = (e) => !!(e && e.__v_isRef === !0), + ve = (e) => + h(e) + ? e + : e == null + ? `` + : d(e) || (_(e) && (e.toString === y || !m(e.toString))) + ? _e(e) + ? ve(e.value) + : JSON.stringify(e, ye, 2) + : String(e), + ye = (e, t) => + _e(t) + ? ye(e, t.value) + : f(t) + ? { [`Map(${t.size})`]: [...t.entries()].reduce((e, [t, n], r) => ((e[be(t, r) + ` =>`] = n), e), {}) } + : p(t) + ? { [`Set(${t.size})`]: [...t.values()].map((e) => be(e)) } + : g(t) + ? be(t) + : _(t) && !d(t) && !S(t) + ? String(t) + : t, + be = (e, t = ``) => { + var n; + return g(e) ? `Symbol(${(n = e.description) ?? t})` : e; + }; +function xe(e, ...t) { + console.warn(`[Vue warn] ${e}`, ...t); +} +let j; +var Se = class { + constructor(e = !1) { + (this.detached = e), + (this._active = !0), + (this._on = 0), + (this.effects = []), + (this.cleanups = []), + (this._isPaused = !1), + (this.parent = j), + !e && j && (this.index = (j.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; e < t; e++) this.scopes[e].pause(); + for (e = 0, t = this.effects.length; e < t; e++) this.effects[e].pause(); + } + } + resume() { + if (this._active && this._isPaused) { + this._isPaused = !1; + let e, t; + if (this.scopes) for (e = 0, t = this.scopes.length; e < t; e++) this.scopes[e].resume(); + for (e = 0, t = this.effects.length; e < t; e++) this.effects[e].resume(); + } + } + run(e) { + if (this._active) { + let t = j; + try { + return (j = this), e(); + } finally { + j = t; + } + } + } + on() { + ++this._on === 1 && ((this.prevScope = j), (j = this)); + } + off() { + this._on > 0 && --this._on === 0 && ((j = this.prevScope), (this.prevScope = void 0)); + } + stop(e) { + if (this._active) { + this._active = !1; + let t, n; + for (t = 0, n = this.effects.length; t < n; t++) this.effects[t].stop(); + for (this.effects.length = 0, t = 0, n = this.cleanups.length; t < n; t++) this.cleanups[t](); + if (((this.cleanups.length = 0), this.scopes)) { + for (t = 0, n = this.scopes.length; t < n; t++) this.scopes[t].stop(!0); + this.scopes.length = 0; + } + if (!this.detached && this.parent && !e) { + let e = this.parent.scopes.pop(); + e && e !== this && ((this.parent.scopes[this.index] = e), (e.index = this.index)); + } + this.parent = void 0; + } + } +}; +function Ce(e) { + return new Se(e); +} +function we() { + return j; +} +let M; +const Te = new WeakSet(); +var Ee = class { + constructor(e) { + (this.fn = e), + (this.deps = void 0), + (this.depsTail = void 0), + (this.flags = 5), + (this.next = void 0), + (this.cleanup = void 0), + (this.scheduler = void 0), + j && j.active && j.effects.push(this); + } + pause() { + this.flags |= 64; + } + resume() { + this.flags & 64 && ((this.flags &= -65), Te.has(this) && (Te.delete(this), this.trigger())); + } + notify() { + (this.flags & 2 && !(this.flags & 32)) || this.flags & 8 || Ae(this); + } + run() { + if (!(this.flags & 1)) return this.fn(); + (this.flags |= 2), He(this), Ne(this); + let e = M, + t = N; + (M = this), (N = !0); + try { + return this.fn(); + } finally { + Pe(this), (M = e), (N = t), (this.flags &= -3); + } + } + stop() { + if (this.flags & 1) { + for (let e = this.deps; e; e = e.nextDep) Le(e); + (this.deps = this.depsTail = void 0), He(this), this.onStop && this.onStop(), (this.flags &= -2); + } + } + trigger() { + this.flags & 64 ? Te.add(this) : this.scheduler ? this.scheduler() : this.runIfDirty(); + } + runIfDirty() { + Fe(this) && this.run(); + } + get dirty() { + return Fe(this); + } +}; +let De = 0, + Oe, + ke; +function Ae(e, t = !1) { + if (((e.flags |= 8), t)) { + (e.next = ke), (ke = e); + return; + } + (e.next = Oe), (Oe = e); +} +function je() { + De++; +} +function Me() { + if (--De > 0) return; + if (ke) { + let e = ke; + for (ke = void 0; e; ) { + let t = e.next; + (e.next = void 0), (e.flags &= -9), (e = t); + } + } + let e; + for (; Oe; ) { + let t = Oe; + for (Oe = 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 Ne(e) { + for (let t = e.deps; t; t = t.nextDep) + (t.version = -1), (t.prevActiveLink = t.dep.activeLink), (t.dep.activeLink = t); +} +function Pe(e) { + let t, + n = e.depsTail, + r = n; + for (; r; ) { + let e = r.prevDep; + r.version === -1 ? (r === n && (n = e), Le(r), Re(r)) : (t = r), + (r.dep.activeLink = r.prevActiveLink), + (r.prevActiveLink = void 0), + (r = e); + } + (e.deps = t), (e.depsTail = n); +} +function Fe(e) { + for (let t = e.deps; t; t = t.nextDep) + if (t.dep.version !== t.version || (t.dep.computed && (Ie(t.dep.computed) || t.dep.version !== t.version))) + return !0; + return !!e._dirty; +} +function Ie(e) { + if ( + (e.flags & 4 && !(e.flags & 16)) || + ((e.flags &= -17), e.globalVersion === Ue) || + ((e.globalVersion = Ue), !e.isSSR && e.flags & 128 && ((!e.deps && !e._dirty) || !Fe(e))) + ) + return; + e.flags |= 2; + let t = e.dep, + n = M, + r = N; + (M = e), (N = !0); + try { + Ne(e); + let n = e.fn(e._value); + (t.version === 0 || k(n, e._value)) && ((e.flags |= 128), (e._value = n), t.version++); + } catch (e) { + throw (t.version++, e); + } finally { + (M = n), (N = r), Pe(e), (e.flags &= -3); + } +} +function Le(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) Le(e, !0); + } + !t && !--n.sc && n.map && n.map.delete(n.key); +} +function Re(e) { + let { prevDep: t, nextDep: n } = e; + t && ((t.nextDep = n), (e.prevDep = void 0)), n && ((n.prevDep = t), (e.nextDep = void 0)); +} +let N = !0; +const ze = []; +function Be() { + ze.push(N), (N = !1); +} +function Ve() { + let e = ze.pop(); + N = e === void 0 ? !0 : e; +} +function He(e) { + let { cleanup: t } = e; + if (((e.cleanup = void 0), t)) { + let e = M; + M = void 0; + try { + t(); + } finally { + M = e; + } + } +} +let Ue = 0; +var We = class { + constructor(e, t) { + (this.sub = e), + (this.dep = t), + (this.version = t.version), + (this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0); + } + }, + Ge = class { + constructor(e) { + (this.computed = e), + (this.version = 0), + (this.activeLink = void 0), + (this.subs = void 0), + (this.map = void 0), + (this.key = void 0), + (this.sc = 0), + (this.__v_skip = !0); + } + track(e) { + if (!M || !N || M === this.computed) return; + let t = this.activeLink; + if (t === void 0 || t.sub !== M) + (t = this.activeLink = new We(M, this)), + M.deps ? ((t.prevDep = M.depsTail), (M.depsTail.nextDep = t), (M.depsTail = t)) : (M.deps = M.depsTail = t), + Ke(t); + else if (t.version === -1 && ((t.version = this.version), t.nextDep)) { + let e = t.nextDep; + (e.prevDep = t.prevDep), + t.prevDep && (t.prevDep.nextDep = e), + (t.prevDep = M.depsTail), + (t.nextDep = void 0), + (M.depsTail.nextDep = t), + (M.depsTail = t), + M.deps === t && (M.deps = e); + } + return t; + } + trigger(e) { + this.version++, Ue++, this.notify(e); + } + notify(e) { + je(); + try { + for (let e = this.subs; e; e = e.prevSub) e.sub.notify() && e.sub.dep.notify(); + } finally { + Me(); + } + } + }; +function Ke(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) Ke(e); + } + let n = e.dep.subs; + n !== e && ((e.prevSub = n), n && (n.nextSub = e)), (e.dep.subs = e); + } +} +const qe = new WeakMap(), + Je = Symbol(``), + Ye = Symbol(``), + Xe = Symbol(``); +function P(e, t, n) { + if (N && M) { + let t = qe.get(e); + t || qe.set(e, (t = new Map())); + let r = t.get(n); + r || (t.set(n, (r = new Ge())), (r.map = t), (r.key = n)), r.track(); + } +} +function Ze(e, t, n, r, i, a) { + let o = qe.get(e); + if (!o) { + Ue++; + return; + } + let s = (e) => { + e && e.trigger(); + }; + if ((je(), t === `clear`)) o.forEach(s); + else { + let i = d(e), + a = i && C(n); + if (i && n === `length`) { + let e = Number(r); + o.forEach((t, n) => { + (n === `length` || n === Xe || (!g(n) && n >= e)) && s(t); + }); + } else + switch (((n !== void 0 || o.has(void 0)) && s(o.get(n)), a && s(o.get(Xe)), t)) { + case `add`: + i ? a && s(o.get(`length`)) : (s(o.get(Je)), f(e) && s(o.get(Ye))); + break; + case `delete`: + i || (s(o.get(Je)), f(e) && s(o.get(Ye))); + break; + case `set`: + f(e) && s(o.get(Je)); + break; + } + } + Me(); +} +function Qe(e) { + let t = I(e); + return t === e ? t : (P(t, `iterate`, Xe), F(e) ? t : t.map(L)); +} +function $e(e) { + return P((e = I(e)), `iterate`, Xe), e; +} +const et = { + __proto__: null, + [Symbol.iterator]() { + return tt(this, Symbol.iterator, L); + }, + concat(...e) { + return Qe(this).concat(...e.map((e) => (d(e) ? Qe(e) : e))); + }, + entries() { + return tt(this, `entries`, (e) => ((e[1] = L(e[1])), e)); + }, + every(e, t) { + return rt(this, `every`, e, t, void 0, arguments); + }, + filter(e, t) { + return rt(this, `filter`, e, t, (e) => e.map(L), arguments); + }, + find(e, t) { + return rt(this, `find`, e, t, L, arguments); + }, + findIndex(e, t) { + return rt(this, `findIndex`, e, t, void 0, arguments); + }, + findLast(e, t) { + return rt(this, `findLast`, e, t, L, arguments); + }, + findLastIndex(e, t) { + return rt(this, `findLastIndex`, e, t, void 0, arguments); + }, + forEach(e, t) { + return rt(this, `forEach`, e, t, void 0, arguments); + }, + includes(...e) { + return at(this, `includes`, e); + }, + indexOf(...e) { + return at(this, `indexOf`, e); + }, + join(e) { + return Qe(this).join(e); + }, + lastIndexOf(...e) { + return at(this, `lastIndexOf`, e); + }, + map(e, t) { + return rt(this, `map`, e, t, void 0, arguments); + }, + pop() { + return ot(this, `pop`); + }, + push(...e) { + return ot(this, `push`, e); + }, + reduce(e, ...t) { + return it(this, `reduce`, e, t); + }, + reduceRight(e, ...t) { + return it(this, `reduceRight`, e, t); + }, + shift() { + return ot(this, `shift`); + }, + some(e, t) { + return rt(this, `some`, e, t, void 0, arguments); + }, + splice(...e) { + return ot(this, `splice`, e); + }, + toReversed() { + return Qe(this).toReversed(); + }, + toSorted(e) { + return Qe(this).toSorted(e); + }, + toSpliced(...e) { + return Qe(this).toSpliced(...e); + }, + unshift(...e) { + return ot(this, `unshift`, e); + }, + values() { + return tt(this, `values`, L); + }, +}; +function tt(e, t, n) { + let r = $e(e), + i = r[t](); + return ( + r !== e && + !F(e) && + ((i._next = i.next), + (i.next = () => { + let e = i._next(); + return (e.value &&= n(e.value)), e; + })), + i + ); +} +const nt = Array.prototype; +function rt(e, t, n, r, i, a) { + let o = $e(e), + s = o !== e && !F(e), + c = o[t]; + if (c !== nt[t]) { + let t = c.apply(e, a); + return s ? L(t) : t; + } + let l = n; + o !== e && + (s + ? (l = function (t, r) { + return n.call(this, L(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 it(e, t, n, r) { + let i = $e(e), + a = n; + return ( + i !== e && + (F(e) + ? n.length > 3 && + (a = function (t, r, i) { + return n.call(this, t, r, i, e); + }) + : (a = function (t, r, i) { + return n.call(this, t, L(r), i, e); + })), + i[t](a, ...r) + ); +} +function at(e, t, n) { + let r = I(e); + P(r, `iterate`, Xe); + let i = r[t](...n); + return (i === -1 || i === !1) && Lt(n[0]) ? ((n[0] = I(n[0])), r[t](...n)) : i; +} +function ot(e, t, n = []) { + Be(), je(); + let r = I(e)[t].apply(e, n); + return Me(), Ve(), r; +} +const st = e(`__proto__,__v_isRef,__isVue`), + ct = new Set( + Object.getOwnPropertyNames(Symbol) + .filter((e) => e !== `arguments` && e !== `caller`) + .map((e) => Symbol[e]) + .filter(g), + ); +function lt(e) { + g(e) || (e = String(e)); + let t = I(this); + return P(t, `has`, e), t.hasOwnProperty(e); +} +var ut = 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 ? Ot : Dt) : i ? Et : Tt).get(e) || Object.getPrototypeOf(e) === Object.getPrototypeOf(n) + ? e + : void 0; + let a = d(e); + if (!r) { + let e; + if (a && (e = et[t])) return e; + if (t === `hasOwnProperty`) return lt; + } + let o = Reflect.get(e, t, R(e) ? e : n); + return (g(t) ? ct.has(t) : st(t)) || (r || P(e, `get`, t), i) + ? o + : R(o) + ? a && C(t) + ? o + : o.value + : _(o) + ? r + ? Nt(o) + : jt(o) + : o; + } + }, + dt = class extends ut { + constructor(e = !1) { + super(!1, e); + } + set(e, t, n, r) { + let i = e[t]; + if (!this._isShallow) { + let t = It(i); + if ((!F(n) && !It(n) && ((i = I(i)), (n = I(n))), !d(e) && R(i) && !R(n))) return t ? !1 : ((i.value = n), !0); + } + let a = d(e) && C(t) ? Number(t) < e.length : u(e, t), + o = Reflect.set(e, t, n, R(e) ? e : r); + return e === I(r) && (a ? k(n, i) && Ze(e, `set`, t, n, i) : Ze(e, `add`, t, n)), o; + } + deleteProperty(e, t) { + let n = u(e, t), + r = e[t], + i = Reflect.deleteProperty(e, t); + return i && n && Ze(e, `delete`, t, void 0, r), i; + } + has(e, t) { + let n = Reflect.has(e, t); + return (!g(t) || !ct.has(t)) && P(e, `has`, t), n; + } + ownKeys(e) { + return P(e, `iterate`, d(e) ? `length` : Je), Reflect.ownKeys(e); + } + }, + ft = class extends ut { + constructor(e = !1) { + super(!0, e); + } + set(e, t) { + return !0; + } + deleteProperty(e, t) { + return !0; + } + }; +const pt = new dt(), + mt = new ft(), + ht = new dt(!0), + gt = (e) => e, + _t = (e) => Reflect.getPrototypeOf(e); +function vt(e, t, n) { + return function (...r) { + let i = this.__v_raw, + a = I(i), + o = f(a), + s = e === `entries` || (e === Symbol.iterator && o), + c = e === `keys` && o, + l = i[e](...r), + u = n ? gt : t ? zt : L; + return ( + !t && P(a, `iterate`, c ? Ye : Je), + { + 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 }; + }, + [Symbol.iterator]() { + return this; + }, + } + ); + }; +} +function yt(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 = I(r), + a = I(n); + e || (k(n, a) && P(i, `get`, n), P(i, `get`, a)); + let { has: o } = _t(i), + s = t ? gt : e ? zt : L; + 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 && P(I(t), `iterate`, Je), Reflect.get(t, `size`, t); + }, + has(t) { + let n = this.__v_raw, + r = I(n), + i = I(t); + return e || (k(t, i) && P(r, `has`, t), P(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 = I(a), + s = t ? gt : e ? zt : L; + return !e && P(o, `iterate`, Je), a.forEach((e, t) => n.call(r, s(e), s(t), i)); + }, + }; + s( + n, + e + ? { add: yt(`add`), set: yt(`set`), delete: yt(`delete`), clear: yt(`clear`) } + : { + add(e) { + !t && !F(e) && !It(e) && (e = I(e)); + let n = I(this), + r = _t(n), + i = r.has.call(n, e); + return i || (n.add(e), Ze(n, `add`, e, e)), this; + }, + set(e, n) { + !t && !F(n) && !It(n) && (n = I(n)); + let r = I(this), + { has: i, get: a } = _t(r), + o = i.call(r, e); + o || ((e = I(e)), (o = i.call(r, e))); + let s = a.call(r, e); + return r.set(e, n), o ? k(n, s) && Ze(r, `set`, e, n, s) : Ze(r, `add`, e, n), this; + }, + delete(e) { + let t = I(this), + { has: n, get: r } = _t(t), + i = n.call(t, e); + i || ((e = I(e)), (i = n.call(t, e))); + let a = r ? r.call(t, e) : void 0, + o = t.delete(e); + return i && Ze(t, `delete`, e, void 0, a), o; + }, + clear() { + let e = I(this), + t = e.size !== 0, + n, + r = e.clear(); + return t && Ze(e, `clear`, void 0, void 0, n), r; + }, + }, + ); + let r = [`keys`, `values`, `entries`, Symbol.iterator]; + return ( + r.forEach((r) => { + n[r] = vt(r, e, t); + }), + n + ); +} +function xt(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(u(n, r) && r in t ? n : t, r, i); +} +const St = { get: xt(!1, !1) }, + Ct = { get: xt(!1, !0) }, + wt = { get: xt(!0, !1) }, + Tt = new WeakMap(), + Et = new WeakMap(), + Dt = new WeakMap(), + Ot = new WeakMap(); +function kt(e) { + switch (e) { + case `Object`: + case `Array`: + return 1; + case `Map`: + case `Set`: + case `WeakMap`: + case `WeakSet`: + return 2; + default: + return 0; + } +} +function At(e) { + return e.__v_skip || !Object.isExtensible(e) ? 0 : kt(x(e)); +} +function jt(e) { + return It(e) ? e : Pt(e, !1, pt, St, Tt); +} +function Mt(e) { + return Pt(e, !1, ht, Ct, Et); +} +function Nt(e) { + return Pt(e, !0, mt, wt, Dt); +} +function Pt(e, t, n, r, i) { + if (!_(e) || (e.__v_raw && !(t && e.__v_isReactive))) return e; + let a = At(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 Ft(e) { + return It(e) ? Ft(e.__v_raw) : !!(e && e.__v_isReactive); +} +function It(e) { + return !!(e && e.__v_isReadonly); +} +function F(e) { + return !!(e && e.__v_isShallow); +} +function Lt(e) { + return e ? !!e.__v_raw : !1; +} +function I(e) { + let t = e && e.__v_raw; + return t ? I(t) : e; +} +function Rt(e) { + return !u(e, `__v_skip`) && Object.isExtensible(e) && ie(e, `__v_skip`, !0), e; +} +const L = (e) => (_(e) ? jt(e) : e), + zt = (e) => (_(e) ? Nt(e) : e); +function R(e) { + return e ? e.__v_isRef === !0 : !1; +} +function Bt(e) { + return Ht(e, !1); +} +function Vt(e) { + return Ht(e, !0); +} +function Ht(e, t) { + return R(e) ? e : new Ut(e, t); +} +var Ut = class { + constructor(e, t) { + (this.dep = new Ge()), + (this.__v_isRef = !0), + (this.__v_isShallow = !1), + (this._rawValue = t ? e : I(e)), + (this._value = t ? e : L(e)), + (this.__v_isShallow = t); + } + get value() { + return this.dep.track(), this._value; + } + set value(e) { + let t = this._rawValue, + n = this.__v_isShallow || F(e) || It(e); + (e = n ? e : I(e)), k(e, t) && ((this._rawValue = e), (this._value = n ? e : L(e)), this.dep.trigger()); + } +}; +function Wt(e) { + return R(e) ? e.value : e; +} +const Gt = { + get: (e, t, n) => (t === `__v_raw` ? e : Wt(Reflect.get(e, t, n))), + set: (e, t, n, r) => { + let i = e[t]; + return R(i) && !R(n) ? ((i.value = n), !0) : Reflect.set(e, t, n, r); + }, +}; +function Kt(e) { + return Ft(e) ? e : new Proxy(e, Gt); +} +var qt = class { + constructor(e, t, n) { + (this.fn = e), + (this.setter = t), + (this._value = void 0), + (this.dep = new Ge(this)), + (this.__v_isRef = !0), + (this.deps = void 0), + (this.depsTail = void 0), + (this.flags = 16), + (this.globalVersion = Ue - 1), + (this.next = void 0), + (this.effect = this), + (this.__v_isReadonly = !t), + (this.isSSR = n); + } + notify() { + if (((this.flags |= 16), !(this.flags & 8) && M !== this)) return Ae(this, !0), !0; + } + get value() { + let e = this.dep.track(); + return Ie(this), e && (e.version = this.dep.version), this._value; + } + set value(e) { + this.setter && this.setter(e); + } +}; +function Jt(e, t, n = !1) { + let r, i; + m(e) ? (r = e) : ((r = e.get), (i = e.set)); + let a = new qt(r, i, n); + return a; +} +const Yt = {}, + Xt = new WeakMap(); +let Zt; +function Qt(e, t = !1, n = Zt) { + if (n) { + let t = Xt.get(n); + t || Xt.set(n, (t = [])), t.push(e); + } +} +function $t(e, n, i = t) { + let { immediate: a, deep: o, once: s, scheduler: l, augmentJob: u, call: f } = i, + p = (e) => { + (i.onWarn || xe)( + `Invalid watch source: `, + e, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`, + ); + }, + h = (e) => (o ? e : F(e) || o === !1 || o === 0 ? en(e, 1) : en(e)), + g, + _, + v, + y, + b = !1, + x = !1; + if ( + (R(e) + ? ((_ = () => e.value), (b = F(e))) + : Ft(e) + ? ((_ = () => h(e)), (b = !0)) + : d(e) + ? ((x = !0), + (b = e.some((e) => Ft(e) || F(e))), + (_ = () => + e.map((e) => { + if (R(e)) return e.value; + if (Ft(e)) return h(e); + if (m(e)) return f ? f(e, 2) : e(); + }))) + : (_ = m(e) + ? n + ? f + ? () => f(e, 2) + : e + : () => { + if (v) { + Be(); + try { + v(); + } finally { + Ve(); + } + } + let t = Zt; + Zt = g; + try { + return f ? f(e, 3, [y]) : e(y); + } finally { + Zt = t; + } + } + : r), + n && o) + ) { + let e = _, + t = o === !0 ? 1 / 0 : o; + _ = () => en(e(), t); + } + let S = we(), + C = () => { + g.stop(), S && S.active && c(S.effects, g); + }; + if (s && n) { + let e = n; + n = (...t) => { + e(...t), C(); + }; + } + let w = x ? Array(e.length).fill(Yt) : Yt, + T = (e) => { + if (!(!(g.flags & 1) || (!g.dirty && !e))) + if (n) { + let e = g.run(); + if (o || b || (x ? e.some((e, t) => k(e, w[t])) : k(e, w))) { + v && v(); + let t = Zt; + Zt = g; + try { + let t = [e, w === Yt ? void 0 : x && w[0] === Yt ? [] : w, y]; + (w = e), f ? f(n, 3, t) : n(...t); + } finally { + Zt = t; + } + } + } else g.run(); + }; + return ( + u && u(T), + (g = new Ee(_)), + (g.scheduler = l ? () => l(T, !1) : T), + (y = (e) => Qt(e, !1, g)), + (v = g.onStop = + () => { + let e = Xt.get(g); + if (e) { + if (f) f(e, 4); + else for (let t of e) t(); + Xt.delete(g); + } + }), + n ? (a ? T(!0) : (w = g.run())) : l ? l(T.bind(null, !0), !0) : g.run(), + (C.pause = g.pause.bind(g)), + (C.resume = g.resume.bind(g)), + (C.stop = C), + C + ); +} +function en(e, t = 1 / 0, n) { + if (t <= 0 || !_(e) || e.__v_skip || ((n ||= new Set()), n.has(e))) return e; + if ((n.add(e), t--, R(e))) en(e.value, t, n); + else if (d(e)) for (let r = 0; r < e.length; r++) en(e[r], t, n); + else if (p(e) || f(e)) + e.forEach((e) => { + en(e, t, n); + }); + else if (S(e)) { + for (let r in e) en(e[r], t, n); + for (let r of Object.getOwnPropertySymbols(e)) Object.prototype.propertyIsEnumerable.call(e, r) && en(e[r], t, n); + } + return e; +} +function tn(e, t, n, r) { + try { + return r ? e(...r) : e(); + } catch (e) { + rn(e, t, n); + } +} +function nn(e, t, n, r) { + if (m(e)) { + let i = tn(e, t, n, r); + return ( + i && + v(i) && + i.catch((e) => { + rn(e, t, n); + }), + i + ); + } + if (d(e)) { + let i = []; + for (let a = 0; a < e.length; a++) i.push(nn(e[a], t, n, r)); + return i; + } +} +function rn(e, n, r, i = !0) { + let a = n ? n.vnode : null, + { errorHandler: o, throwUnhandledErrorInProduction: s } = (n && n.appContext.config) || t; + if (n) { + let t = n.parent, + i = n.proxy, + a = `https://vuejs.org/error-reference/#runtime-${r}`; + for (; t; ) { + let n = t.ec; + if (n) { + for (let t = 0; t < n.length; t++) if (n[t](e, i, a) === !1) return; + } + t = t.parent; + } + if (o) { + Be(), tn(o, null, 10, [e, i, a]), Ve(); + return; + } + } + an(e, r, a, i, s); +} +function an(e, t, n, r = !0, i = !1) { + if (i) throw e; + console.error(e); +} +const z = []; +let on = -1; +const sn = []; +let cn = null, + ln = 0; +const un = Promise.resolve(); +let dn = null; +function fn(e) { + let t = dn || un; + return e ? t.then(this ? e.bind(this) : e) : t; +} +function pn(e) { + let t = on + 1, + n = z.length; + for (; t < n; ) { + let r = (t + n) >>> 1, + i = z[r], + a = yn(i); + a < e || (a === e && i.flags & 2) ? (t = r + 1) : (n = r); + } + return t; +} +function mn(e) { + if (!(e.flags & 1)) { + let t = yn(e), + n = z[z.length - 1]; + !n || (!(e.flags & 2) && t >= yn(n)) ? z.push(e) : z.splice(pn(t), 0, e), (e.flags |= 1), hn(); + } +} +function hn() { + dn ||= un.then(bn); +} +function gn(e) { + d(e) ? sn.push(...e) : cn && e.id === -1 ? cn.splice(ln + 1, 0, e) : e.flags & 1 || (sn.push(e), (e.flags |= 1)), + hn(); +} +function _n(e, t, n = on + 1) { + for (; n < z.length; n++) { + let t = z[n]; + if (t && t.flags & 2) { + if (e && t.id !== e.uid) continue; + z.splice(n, 1), n--, t.flags & 4 && (t.flags &= -2), t(), t.flags & 4 || (t.flags &= -2); + } + } +} +function vn(e) { + if (sn.length) { + let e = [...new Set(sn)].sort((e, t) => yn(e) - yn(t)); + if (((sn.length = 0), cn)) { + cn.push(...e); + return; + } + for (cn = e, ln = 0; ln < cn.length; ln++) { + let e = cn[ln]; + e.flags & 4 && (e.flags &= -2), e.flags & 8 || e(), (e.flags &= -2); + } + (cn = null), (ln = 0); + } +} +const yn = (e) => (e.id == null ? (e.flags & 2 ? -1 : 1 / 0) : e.id); +function bn(e) { + let t = r; + try { + for (on = 0; on < z.length; on++) { + let e = z[on]; + e && + !(e.flags & 8) && + (e.flags & 4 && (e.flags &= -2), tn(e, e.i, e.i ? 15 : 14), e.flags & 4 || (e.flags &= -2)); + } + } finally { + for (; on < z.length; on++) { + let e = z[on]; + e && (e.flags &= -2); + } + (on = -1), (z.length = 0), vn(e), (dn = null), (z.length || sn.length) && bn(e); + } +} +let B = null, + xn = null; +function Sn(e) { + let t = B; + return (B = e), (xn = (e && e.type.__scopeId) || null), t; +} +function V(e, t = B, n) { + if (!t || e._n) return e; + let r = (...n) => { + r._d && wi(-1); + let i = Sn(t), + a; + try { + a = e(...n); + } finally { + Sn(i), r._d && wi(1); + } + return a; + }; + return (r._n = !0), (r._c = !0), (r._d = !0), r; +} +function Cn(e, t, n, r) { + let i = e.dirs, + a = t && t.dirs; + for (let o = 0; o < i.length; o++) { + let s = i[o]; + a && (s.oldValue = a[o].value); + let c = s.dir[r]; + c && (Be(), nn(c, n, 8, [e.el, s, e, t]), Ve()); + } +} +const wn = Symbol(`_vte`), + Tn = (e) => e.__isTeleport, + En = Symbol(`_leaveCb`), + Dn = Symbol(`_enterCb`); +function On(e, t) { + e.shapeFlag & 6 && e.component + ? ((e.transition = t), On(e.component.subTree, t)) + : e.shapeFlag & 128 + ? ((e.ssContent.transition = t.clone(e.ssContent)), (e.ssFallback.transition = t.clone(e.ssFallback))) + : (e.transition = t); +} +/*! #__NO_SIDE_EFFECTS__ */ +function kn(e, t) { + return m(e) ? (() => s({ name: e.name }, t, { setup: e }))() : e; +} +function An(e) { + e.ids = [e.ids[0] + e.ids[2]++ + `-`, 0, 0]; +} +function jn(e, n, r, i, a = !1) { + if (d(e)) { + e.forEach((e, t) => jn(e, n && (d(n) ? n[t] : n), r, i, a)); + return; + } + if (Pn(i) && !a) { + i.shapeFlag & 512 && i.type.__asyncResolved && i.component.subTree.component && jn(e, n, r, i.component.subTree); + return; + } + let o = i.shapeFlag & 4 ? na(i.component) : i.el, + s = a ? null : o, + { i: l, r: f } = e, + p = n && n.r, + g = l.refs === t ? (l.refs = {}) : l.refs, + _ = l.setupState, + v = I(_), + y = _ === t ? () => !1 : (e) => u(v, e); + if ((p != null && p !== f && (h(p) ? ((g[p] = null), y(p) && (_[p] = null)) : R(p) && (p.value = null)), m(f))) + tn(f, l, 12, [s, g]); + else { + let t = h(f), + n = R(f); + if (t || n) { + let i = () => { + if (e.f) { + let n = t ? (y(f) ? _[f] : g[f]) : f.value; + a + ? d(n) && c(n, o) + : d(n) + ? n.includes(o) || n.push(o) + : t + ? ((g[f] = [o]), y(f) && (_[f] = g[f])) + : ((f.value = [o]), e.k && (g[e.k] = f.value)); + } else t ? ((g[f] = s), y(f) && (_[f] = s)) : n && ((f.value = s), e.k && (g[e.k] = s)); + }; + s ? ((i.id = -1), U(i, r)) : i(); + } + } +} +const Mn = oe().requestIdleCallback || ((e) => setTimeout(e, 1)), + Nn = oe().cancelIdleCallback || ((e) => clearTimeout(e)), + Pn = (e) => !!e.type.__asyncLoader, + Fn = (e) => e.type.__isKeepAlive; +function In(e, t) { + Rn(e, `a`, t); +} +function Ln(e, t) { + Rn(e, `da`, t); +} +function Rn(e, t, n = Z) { + let r = (e.__wdc ||= () => { + let t = n; + for (; t; ) { + if (t.isDeactivated) return; + t = t.parent; + } + return e(); + }); + if ((Bn(t, r, n), n)) { + let e = n.parent; + for (; e && e.parent; ) Fn(e.parent.vnode) && zn(r, t, n, e), (e = e.parent); + } +} +function zn(e, t, n, r) { + let i = Bn(t, e, r, !0); + qn(() => { + c(r[t], i); + }, n); +} +function Bn(e, t, n = Z, r = !1) { + if (n) { + let i = n[e] || (n[e] = []), + a = (t.__weh ||= (...r) => { + Be(); + let i = Wi(n), + a = nn(t, n, e, r); + return i(), Ve(), a; + }); + return r ? i.unshift(a) : i.push(a), a; + } +} +const Vn = + (e) => + (t, n = Z) => { + (!qi || e === `sp`) && Bn(e, (...e) => t(...e), n); + }, + Hn = Vn(`bm`), + Un = Vn(`m`), + Wn = Vn(`bu`), + Gn = Vn(`u`), + Kn = Vn(`bum`), + qn = Vn(`um`), + Jn = Vn(`sp`), + Yn = Vn(`rtg`), + Xn = Vn(`rtc`); +function Zn(e, t = Z) { + Bn(`ec`, e, t); +} +const Qn = Symbol.for(`v-ndc`); +function $n(e, t, n = {}, r, i) { + if (B.ce || (B.parent && Pn(B.parent) && B.parent.ce)) + return t !== `default` && (n.name = t), K(), Ei(W, null, [Y(`slot`, n, r && r())], 64); + let a = e[t]; + a && a._c && (a._d = !1), K(); + let o = a && er(a(n)), + s = n.key || (o && o.key), + c = Ei( + W, + { key: (s && !g(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 er(e) { + return e.some((e) => (Di(e) ? !(e.type === yi || (e.type === W && !er(e.children))) : !0)) ? e : null; +} +const tr = (e) => (e ? (Ki(e) ? na(e) : tr(e.parent)) : null), + nr = s(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) => tr(e.parent), + $root: (e) => tr(e.root), + $host: (e) => e.ce, + $emit: (e) => e.emit, + $options: (e) => dr(e), + $forceUpdate: (e) => + (e.f ||= () => { + mn(e.update); + }), + $nextTick: (e) => (e.n ||= fn.bind(e.proxy)), + $watch: (e) => ii.bind(e), + }), + rr = (e, n) => e !== t && !e.__isScriptSetup && u(e, n), + ir = { + get({ _: e }, n) { + if (n === `__v_skip`) return !0; + let { ctx: r, setupState: i, data: a, props: o, accessCache: s, type: c, appContext: l } = e, + d; + if (n[0] !== `$`) { + let c = s[n]; + if (c !== void 0) + switch (c) { + case 1: + return i[n]; + case 2: + return a[n]; + case 4: + return r[n]; + case 3: + return o[n]; + } + else if (rr(i, n)) return (s[n] = 1), i[n]; + else if (a !== t && u(a, n)) return (s[n] = 2), a[n]; + else if ((d = e.propsOptions[0]) && u(d, n)) return (s[n] = 3), o[n]; + else if (r !== t && u(r, n)) return (s[n] = 4), r[n]; + else or && (s[n] = 0); + } + let f = nr[n], + p, + m; + if (f) return n === `$attrs` && P(e.attrs, `get`, ``), f(e); + if ((p = c.__cssModules) && (p = p[n])) return p; + if (r !== t && u(r, n)) return (s[n] = 4), r[n]; + if (((m = l.config.globalProperties), u(m, n))) return m[n]; + }, + set({ _: e }, n, r) { + let { data: i, setupState: a, ctx: o } = e; + return rr(a, n) + ? ((a[n] = r), !0) + : i !== t && u(i, n) + ? ((i[n] = r), !0) + : u(e.props, n) || (n[0] === `$` && n.slice(1) in e) + ? !1 + : ((o[n] = r), !0); + }, + has({ _: { data: e, setupState: n, accessCache: r, ctx: i, appContext: a, propsOptions: o } }, s) { + let c; + return ( + !!r[s] || + (e !== t && u(e, s)) || + rr(n, s) || + ((c = o[0]) && u(c, s)) || + u(i, s) || + u(nr, s) || + u(a.config.globalProperties, s) + ); + }, + defineProperty(e, t, n) { + return ( + n.get == null ? u(n, `value`) && this.set(e, t, n.value, null) : (e._.accessCache[t] = 0), + Reflect.defineProperty(e, t, n) + ); + }, + }; +function ar(e) { + return d(e) ? e.reduce((e, t) => ((e[t] = null), e), {}) : e; +} +let or = !0; +function sr(e) { + let t = dr(e), + n = e.proxy, + i = e.ctx; + (or = !1), t.beforeCreate && lr(t.beforeCreate, e, `bc`); + let { + data: a, + computed: o, + methods: s, + watch: c, + provide: l, + inject: u, + created: f, + beforeMount: p, + mounted: h, + beforeUpdate: g, + updated: v, + activated: y, + deactivated: b, + beforeDestroy: x, + beforeUnmount: S, + destroyed: C, + unmounted: w, + render: T, + renderTracked: ee, + renderTriggered: E, + errorCaptured: te, + serverPrefetch: D, + expose: O, + inheritAttrs: ne, + components: k, + directives: re, + filters: ie, + } = t, + ae = null; + if ((u && cr(u, i, ae), s)) + for (let e in s) { + let t = s[e]; + m(t) && (i[e] = t.bind(n)); + } + if (a) { + let t = a.call(n, n); + _(t) && (e.data = jt(t)); + } + if (((or = !0), o)) + for (let e in o) { + let t = o[e], + a = m(t) ? t.bind(n, n) : m(t.get) ? t.get.bind(n, n) : r, + s = !m(t) && m(t.set) ? t.set.bind(n) : r, + c = ia({ get: a, set: s }); + Object.defineProperty(i, e, { enumerable: !0, configurable: !0, get: () => c.value, set: (e) => (c.value = e) }); + } + if (c) for (let e in c) ur(c[e], i, n, e); + if (l) { + let e = m(l) ? l.call(n) : l; + Reflect.ownKeys(e).forEach((t) => { + wr(t, e[t]); + }); + } + f && lr(f, e, `c`); + function A(e, t) { + d(t) ? t.forEach((t) => e(t.bind(n))) : t && e(t.bind(n)); + } + if ( + (A(Hn, p), + A(Un, h), + A(Wn, g), + A(Gn, v), + A(In, y), + A(Ln, b), + A(Zn, te), + A(Xn, ee), + A(Yn, E), + A(Kn, S), + A(qn, w), + A(Jn, D), + d(O)) + ) + if (O.length) { + let t = (e.exposed ||= {}); + O.forEach((e) => { + Object.defineProperty(t, e, { get: () => n[e], set: (t) => (n[e] = t) }); + }); + } else e.exposed ||= {}; + T && e.render === r && (e.render = T), + ne != null && (e.inheritAttrs = ne), + k && (e.components = k), + re && (e.directives = re), + D && An(e); +} +function cr(e, t, n = r) { + for (let n in (d(e) && (e = gr(e)), e)) { + let r = e[n], + i; + (i = _(r) ? (`default` in r ? Tr(r.from || n, r.default, !0) : Tr(r.from || n)) : Tr(r)), + R(i) + ? Object.defineProperty(t, n, { + enumerable: !0, + configurable: !0, + get: () => i.value, + set: (e) => (i.value = e), + }) + : (t[n] = i); + } +} +function lr(e, t, n) { + nn(d(e) ? e.map((e) => e.bind(t.proxy)) : e.bind(t.proxy), t, n); +} +function ur(e, t, n, r) { + let i = r.includes(`.`) ? ai(n, r) : () => n[r]; + if (h(e)) { + let n = t[e]; + m(n) && ni(i, n); + } else if (m(e)) ni(i, e.bind(n)); + else if (_(e)) + if (d(e)) e.forEach((e) => ur(e, t, n, r)); + else { + let r = m(e.handler) ? e.handler.bind(n) : t[e.handler]; + m(r) && ni(i, r, e); + } +} +function dr(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) => fr(c, e, o, !0)), fr(c, t, o)), + _(t) && a.set(t, c), + c + ); +} +function fr(e, t, n, r = !1) { + let { mixins: i, extends: a } = t; + for (let o in (a && fr(e, a, n, !0), i && i.forEach((t) => fr(e, t, n, !0)), t)) + if (!(r && o === `expose`)) { + let r = pr[o] || (n && n[o]); + e[o] = r ? r(e[o], t[o]) : t[o]; + } + return e; +} +const pr = { + data: mr, + props: vr, + emits: vr, + methods: _r, + computed: _r, + beforeCreate: H, + created: H, + beforeMount: H, + mounted: H, + beforeUpdate: H, + updated: H, + beforeDestroy: H, + beforeUnmount: H, + destroyed: H, + unmounted: H, + activated: H, + deactivated: H, + errorCaptured: H, + serverPrefetch: H, + components: _r, + directives: _r, + watch: yr, + provide: mr, + inject: hr, +}; +function mr(e, t) { + return t + ? e + ? function () { + return s(m(e) ? e.call(this, this) : e, m(t) ? t.call(this, this) : t); + } + : t + : e; +} +function hr(e, t) { + return _r(gr(e), gr(t)); +} +function gr(e) { + if (d(e)) { + let t = {}; + for (let n = 0; n < e.length; n++) t[e[n]] = e[n]; + return t; + } + return e; +} +function H(e, t) { + return e ? [...new Set([].concat(e, t))] : t; +} +function _r(e, t) { + return e ? s(Object.create(null), e, t) : t; +} +function vr(e, t) { + return e ? (d(e) && d(t) ? [...new Set([...e, ...t])] : s(Object.create(null), ar(e), ar(t ?? {}))) : t; +} +function yr(e, t) { + if (!e) return t; + if (!t) return e; + let n = s(Object.create(null), e); + for (let r in t) n[r] = H(e[r], t[r]); + return n; +} +function br() { + return { + app: null, + config: { + isNativeTag: i, + performance: !1, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {}, + }, + mixins: [], + components: {}, + directives: {}, + provides: Object.create(null), + optionsCache: new WeakMap(), + propsCache: new WeakMap(), + emitsCache: new WeakMap(), + }; +} +let xr = 0; +function Sr(e, t) { + return function (n, r = null) { + m(n) || (n = s({}, n)), r != null && !_(r) && (r = null); + let i = br(), + a = new WeakSet(), + o = [], + c = !1, + l = (i.app = { + _uid: xr++, + _component: n, + _props: r, + _container: null, + _context: i, + _instance: null, + version: oa, + get config() { + return i.config; + }, + set config(e) {}, + use(e, ...t) { + return a.has(e) || (e && m(e.install) ? (a.add(e), e.install(l, ...t)) : m(e) && (a.add(e), e(l, ...t))), l; + }, + mixin(e) { + return i.mixins.includes(e) || i.mixins.push(e), l; + }, + component(e, t) { + return t ? ((i.components[e] = t), l) : i.components[e]; + }, + directive(e, t) { + return t ? ((i.directives[e] = t), l) : i.directives[e]; + }, + mount(a, o, s) { + if (!c) { + let u = l._ceVNode || Y(n, r); + return ( + (u.appContext = i), + s === !0 ? (s = `svg`) : s === !1 && (s = void 0), + o && t ? t(u, a) : e(u, a, s), + (c = !0), + (l._container = a), + (a.__vue_app__ = l), + na(u.component) + ); + } + }, + onUnmount(e) { + o.push(e); + }, + unmount() { + c && (nn(o, l._instance, 16), e(null, l._container), delete l._container.__vue_app__); + }, + provide(e, t) { + return (i.provides[e] = t), l; + }, + runWithContext(e) { + let t = Cr; + Cr = l; + try { + return e(); + } finally { + Cr = t; + } + }, + }); + return l; + }; +} +let Cr = null; +function wr(e, t) { + if (Z) { + let n = Z.provides, + r = Z.parent && Z.parent.provides; + r === n && (n = Z.provides = Object.create(r)), (n[e] = t); + } +} +function Tr(e, t, n = !1) { + let r = Z || B; + if (r || Cr) { + let i = Cr + ? Cr._context.provides + : r + ? r.parent == null || r.ce + ? r.vnode.appContext && r.vnode.appContext.provides + : r.parent.provides + : void 0; + if (i && e in i) return i[e]; + if (arguments.length > 1) return n && m(t) ? t.call(r && r.proxy) : t; + } +} +const Er = {}, + Dr = () => Object.create(Er), + Or = (e) => Object.getPrototypeOf(e) === Er; +function kr(e, t, n, r = !1) { + let i = {}, + a = Dr(); + for (let n in ((e.propsDefaults = Object.create(null)), jr(e, t, i, a), e.propsOptions[0])) n in i || (i[n] = void 0); + n ? (e.props = r ? i : Mt(i)) : e.type.props ? (e.props = i) : (e.props = a), (e.attrs = a); +} +function Ar(e, t, n, r) { + let { + props: i, + attrs: a, + vnode: { patchFlag: o }, + } = e, + s = I(i), + [c] = e.propsOptions, + l = !1; + if ((r || o > 0) && !(o & 16)) { + if (o & 8) { + let n = e.vnode.dynamicProps; + for (let r = 0; r < n.length; r++) { + let o = n[r]; + if (li(e.emitsOptions, o)) continue; + let d = t[o]; + if (c) + if (u(a, o)) d !== a[o] && ((a[o] = d), (l = !0)); + else { + let t = E(o); + i[t] = Mr(c, s, t, d, e, !1); + } + else d !== a[o] && ((a[o] = d), (l = !0)); + } + } + } else { + jr(e, t, i, a) && (l = !0); + let r; + for (let a in s) + (!t || (!u(t, a) && ((r = D(a)) === a || !u(t, r)))) && + (c ? n && (n[a] !== void 0 || n[r] !== void 0) && (i[a] = Mr(c, s, a, void 0, e, !0)) : delete i[a]); + if (a !== s) for (let e in a) (!t || !u(t, e)) && (delete a[e], (l = !0)); + } + l && Ze(e.attrs, `set`, ``); +} +function jr(e, n, r, i) { + let [a, o] = e.propsOptions, + s = !1, + c; + if (n) + for (let t in n) { + if (w(t)) continue; + let l = n[t], + d; + a && u(a, (d = E(t))) + ? !o || !o.includes(d) + ? (r[d] = l) + : ((c ||= {})[d] = l) + : li(e.emitsOptions, t) || ((!(t in i) || l !== i[t]) && ((i[t] = l), (s = !0))); + } + if (o) { + let n = I(r), + i = c || t; + for (let t = 0; t < o.length; t++) { + let s = o[t]; + r[s] = Mr(a, n, s, i[s], e, !u(i, s)); + } + } + return s; +} +function Mr(e, t, n, r, i, a) { + let o = e[n]; + if (o != null) { + let e = u(o, `default`); + if (e && r === void 0) { + let e = o.default; + if (o.type !== Function && !o.skipFactory && m(e)) { + let { propsDefaults: a } = i; + if (n in a) r = a[n]; + else { + let o = Wi(i); + (r = a[n] = e.call(null, t)), o(); + } + } else r = e; + i.ce && i.ce._setProp(n, r); + } + o[0] && (a && !e ? (r = !1) : o[1] && (r === `` || r === D(n)) && (r = !0)); + } + return r; +} +const Nr = new WeakMap(); +function Pr(e, r, i = !1) { + let a = i ? Nr : r.propsCache, + o = a.get(e); + if (o) return o; + let c = e.props, + l = {}, + f = [], + p = !1; + if (!m(e)) { + let t = (e) => { + p = !0; + let [t, n] = Pr(e, r, !0); + s(l, t), n && f.push(...n); + }; + !i && r.mixins.length && r.mixins.forEach(t), e.extends && t(e.extends), e.mixins && e.mixins.forEach(t); + } + if (!c && !p) return _(e) && a.set(e, n), n; + if (d(c)) + for (let e = 0; e < c.length; e++) { + let n = E(c[e]); + Fr(n) && (l[n] = t); + } + else if (c) + for (let e in c) { + let t = E(e); + if (Fr(t)) { + let n = c[e], + r = (l[t] = d(n) || m(n) ? { type: n } : s({}, n)), + i = r.type, + a = !1, + o = !0; + if (d(i)) + for (let e = 0; e < i.length; ++e) { + let t = i[e], + n = m(t) && t.name; + if (n === `Boolean`) { + a = !0; + break; + } else n === `String` && (o = !1); + } + else a = m(i) && i.name === `Boolean`; + (r[0] = a), (r[1] = o), (a || u(r, `default`)) && f.push(t); + } + } + let h = [l, f]; + return _(e) && a.set(e, h), h; +} +function Fr(e) { + return e[0] !== `$` && !w(e); +} +const Ir = (e) => e[0] === `_` || e === `$stable`, + Lr = (e) => (d(e) ? e.map(Pi) : [Pi(e)]), + Rr = (e, t, n) => { + if (t._n) return t; + let r = V((...e) => Lr(t(...e)), n); + return (r._c = !1), r; + }, + zr = (e, t, n) => { + let r = e._ctx; + for (let n in e) { + if (Ir(n)) continue; + let i = e[n]; + if (m(i)) t[n] = Rr(n, i, r); + else if (i != null) { + let e = Lr(i); + t[n] = () => e; + } + } + }, + Br = (e, t) => { + let n = Lr(t); + e.slots.default = () => n; + }, + Vr = (e, t, n) => { + for (let r in t) (n || !Ir(r)) && (e[r] = t[r]); + }, + Hr = (e, t, n) => { + let r = (e.slots = Dr()); + if (e.vnode.shapeFlag & 32) { + let e = t.__; + e && ie(r, `__`, e, !0); + let i = t._; + i ? (Vr(r, t, n), n && ie(r, `_`, i, !0)) : zr(t, r); + } else t && Br(e, t); + }, + Ur = (e, n, r) => { + let { vnode: i, slots: a } = e, + o = !0, + s = t; + if (i.shapeFlag & 32) { + let e = n._; + e ? (r && e === 1 ? (o = !1) : Vr(a, n, r)) : ((o = !n.$stable), zr(n, a)), (s = n); + } else n && (Br(e, n), (s = { default: 1 })); + if (o) for (let e in a) !Ir(e) && s[e] == null && delete a[e]; + }; +function Wr() { + let e = []; +} +const U = _i; +function Gr(e) { + return Kr(e); +} +function Kr(e, i) { + Wr(); + let a = oe(); + a.__VUE__ = !0; + let { + insert: o, + remove: s, + patchProp: c, + createElement: l, + createText: u, + createComment: f, + setText: p, + setElementText: m, + parentNode: h, + nextSibling: g, + setScopeId: _ = r, + insertStaticContent: v, + } = e, + y = (e, t, n, r = null, i = null, a = null, o = void 0, s = null, c = !!t.dynamicChildren) => { + if (e === t) return; + e && !Oi(e, t) && ((r = be(e)), he(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 vi: + b(e, t, n, r); + break; + case yi: + x(e, t, n, r); + break; + case bi: + e ?? S(t, n, r, o); + break; + case W: + ae(e, t, n, r, i, a, o, s, c); + break; + default: + d & 1 + ? E(e, t, n, r, i, a, o, s, c) + : d & 6 + ? A(e, t, n, r, i, a, o, s, c) + : (d & 64 || d & 128) && l.process(e, t, n, r, i, a, o, s, c, Se); + } + u != null && i ? jn(u, e && e.ref, a, t || e, !t) : u == null && e && e.ref != null && jn(e.ref, null, a, e, !0); + }, + b = (e, t, n, r) => { + if (e == null) o((t.el = u(t.children)), n, r); + else { + let n = (t.el = e.el); + t.children !== e.children && p(n, t.children); + } + }, + x = (e, t, n, r) => { + e == null ? o((t.el = f(t.children || ``)), n, r) : (t.el = e.el); + }, + S = (e, t, n, r) => { + [e.el, e.anchor] = v(e.children, t, n, r, e.el, e.anchor); + }, + C = (e, t, n, r) => { + if (t.children !== e.children) { + let i = g(e.anchor); + ee(e), ([t.el, t.anchor] = v(t.children, n, i, r)); + } else (t.el = e.el), (t.anchor = e.anchor); + }, + T = ({ el: e, anchor: t }, n, r) => { + let i; + for (; e && e !== t; ) (i = g(e)), o(e, n, r), (e = i); + o(t, n, r); + }, + ee = ({ el: e, anchor: t }) => { + let n; + for (; e && e !== t; ) (n = g(e)), s(e), (e = n); + s(t); + }, + E = (e, t, n, r, i, a, o, s, c) => { + t.type === `svg` ? (o = `svg`) : t.type === `math` && (o = `mathml`), + e == null ? te(t, n, r, i, a, o, s, c) : ne(e, t, i, a, o, s, c); + }, + te = (e, t, n, r, i, a, s, u) => { + let d, + f, + { props: p, shapeFlag: h, transition: g, dirs: _ } = e; + if ( + ((d = e.el = l(e.type, a, p && p.is, p)), + h & 8 ? m(d, e.children) : h & 16 && O(e.children, d, null, r, i, qr(e, a), s, u), + _ && Cn(e, null, r, `created`), + D(d, e, e.scopeId, s, r), + p) + ) { + for (let e in p) e !== `value` && !w(e) && c(d, e, null, p[e], a, r); + `value` in p && c(d, `value`, null, p.value, a), (f = p.onVnodeBeforeMount) && Ri(f, r, e); + } + _ && Cn(e, null, r, `beforeMount`); + let v = Yr(i, g); + v && g.beforeEnter(d), + o(d, t, n), + ((f = p && p.onVnodeMounted) || v || _) && + U(() => { + f && Ri(f, r, e), v && g.enter(d), _ && Cn(e, null, r, `mounted`); + }, i); + }, + D = (e, t, n, r, i) => { + if ((n && _(e, n), r)) for (let t = 0; t < r.length; t++) _(e, r[t]); + if (i) { + let n = i.subTree; + if (t === n || (gi(n.type) && (n.ssContent === t || n.ssFallback === t))) { + let t = i.vnode; + D(e, t, t.scopeId, t.slotScopeIds, i.parent); + } + } + }, + O = (e, t, n, r, i, a, o, s, c = 0) => { + for (let l = c; l < e.length; l++) { + let c = (e[l] = s ? Fi(e[l]) : Pi(e[l])); + y(null, c, t, n, r, i, a, o, s); + } + }, + ne = (e, n, r, i, a, o, s) => { + let l = (n.el = e.el), + { patchFlag: u, dynamicChildren: d, dirs: f } = n; + u |= e.patchFlag & 16; + let p = e.props || t, + h = n.props || t, + g; + if ( + (r && Jr(r, !1), + (g = h.onVnodeBeforeUpdate) && Ri(g, r, n, e), + f && Cn(n, e, r, `beforeUpdate`), + r && Jr(r, !0), + ((p.innerHTML && h.innerHTML == null) || (p.textContent && h.textContent == null)) && m(l, ``), + d ? k(e.dynamicChildren, d, l, r, i, qr(n, a), o) : s || de(e, n, l, null, r, i, qr(n, a), o, !1), + u > 0) + ) { + if (u & 16) ie(l, p, h, r, a); + else if ( + (u & 2 && p.class !== h.class && c(l, `class`, null, h.class, a), + u & 4 && c(l, `style`, p.style, h.style, a), + u & 8) + ) { + let e = n.dynamicProps; + for (let t = 0; t < e.length; t++) { + let n = e[t], + i = p[n], + o = h[n]; + (o !== i || n === `value`) && c(l, n, i, o, a, r); + } + } + u & 1 && e.children !== n.children && m(l, n.children); + } else !s && d == null && ie(l, p, h, r, a); + ((g = h.onVnodeUpdated) || f) && + U(() => { + g && Ri(g, r, n, e), f && Cn(n, e, r, `updated`); + }, i); + }, + k = (e, t, n, r, i, a, o) => { + for (let s = 0; s < t.length; s++) { + let c = e[s], + l = t[s], + u = c.el && (c.type === W || !Oi(c, l) || c.shapeFlag & 198) ? h(c.el) : n; + y(c, l, u, null, r, i, a, o, !0); + } + }, + ie = (e, n, r, i, a) => { + if (n !== r) { + if (n !== t) for (let t in n) !w(t) && !(t in r) && c(e, t, n[t], null, a, i); + for (let t in r) { + if (w(t)) continue; + let o = r[t], + s = n[t]; + o !== s && t !== `value` && c(e, t, s, o, a, i); + } + `value` in r && c(e, `value`, n.value, r.value, a); + } + }, + ae = (e, t, n, r, i, a, s, c, l) => { + let d = (t.el = e ? e.el : u(``)), + f = (t.anchor = e ? e.anchor : u(``)), + { patchFlag: p, dynamicChildren: m, slotScopeIds: h } = t; + h && (c = c ? c.concat(h) : h), + e == null + ? (o(d, n, r), o(f, n, r), O(t.children || [], n, f, i, a, s, c, l)) + : p > 0 && p & 64 && m && e.dynamicChildren + ? (k(e.dynamicChildren, m, n, i, a, s, c), (t.key != null || (i && t === i.subTree)) && Xr(e, t, !0)) + : de(e, t, n, f, i, a, s, c, l); + }, + A = (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) : se(t, n, r, i, a, o, c)) : ce(e, t, c); + }, + se = (e, t, n, r, i, a, o) => { + let s = (e.component = Vi(e, r, i)); + if ((Fn(e) && (s.ctx.renderer = Se), Ji(s, !1, o), s.asyncDep)) { + if ((i && i.registerDep(s, le, o), !e.el)) { + let e = (s.subTree = Y(yi)); + x(null, e, t, n); + } + } else le(s, e, t, n, i, a, o); + }, + ce = (e, t, n) => { + let r = (t.component = e.component); + if (pi(e, t, n)) + if (r.asyncDep && !r.asyncResolved) { + ue(r, t, n); + return; + } else (r.next = t), r.update(); + else (t.el = e.el), (r.vnode = t); + }, + le = (e, t, n, r, i, a, o) => { + let s = () => { + if (e.isMounted) { + let { next: t, bu: n, u: r, parent: c, vnode: l } = e; + { + let n = Qr(e); + if (n) { + t && ((t.el = l.el), ue(e, t, o)), + n.asyncDep.then(() => { + e.isUnmounted || s(); + }); + return; + } + } + let u = t, + d; + Jr(e, !1), + t ? ((t.el = l.el), ue(e, t, o)) : (t = l), + n && re(n), + (d = t.props && t.props.onVnodeBeforeUpdate) && Ri(d, c, t, l), + Jr(e, !0); + let f = ui(e), + p = e.subTree; + (e.subTree = f), + y(p, f, h(p.el), be(p), e, i, a), + (t.el = f.el), + u === null && hi(e, f.el), + r && U(r, i), + (d = t.props && t.props.onVnodeUpdated) && U(() => Ri(d, c, t, l), i); + } else { + let o, + { el: s, props: c } = t, + { bm: l, m: u, parent: d, root: f, type: p } = e, + m = Pn(t); + if ((Jr(e, !1), l && re(l), !m && (o = c && c.onVnodeBeforeMount) && Ri(o, d, t), Jr(e, !0), s && we)) { + let t = () => { + (e.subTree = ui(e)), we(s, e.subTree, e, i, null); + }; + m && p.__asyncHydrate ? p.__asyncHydrate(s, e, t) : t(); + } else { + f.ce && f.ce._def.shadowRoot !== !1 && f.ce._injectChildStyle(p); + let o = (e.subTree = ui(e)); + y(null, o, n, r, e, i, a), (t.el = o.el); + } + if ((u && U(u, i), !m && (o = c && c.onVnodeMounted))) { + let e = t; + U(() => Ri(o, d, e), i); + } + (t.shapeFlag & 256 || (d && Pn(d.vnode) && d.vnode.shapeFlag & 256)) && e.a && U(e.a, i), + (e.isMounted = !0), + (t = n = r = null); + } + }; + e.scope.on(); + let c = (e.effect = new Ee(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 = () => mn(u)), Jr(e, !0), l(); + }, + ue = (e, t, n) => { + t.component = e; + let r = e.vnode.props; + (e.vnode = t), (e.next = null), Ar(e, t.props, r, n), Ur(e, t.children, n), Be(), _n(e), Ve(); + }, + de = (e, t, n, r, i, a, o, s, c = !1) => { + let l = e && e.children, + u = e ? e.shapeFlag : 0, + d = t.children, + { patchFlag: f, shapeFlag: p } = t; + if (f > 0) { + if (f & 128) { + pe(l, d, n, r, i, a, o, s, c); + return; + } else if (f & 256) { + fe(l, d, n, r, i, a, o, s, c); + return; + } + } + p & 8 + ? (u & 16 && ye(l, i, a), d !== l && m(n, d)) + : u & 16 + ? p & 16 + ? pe(l, d, n, r, i, a, o, s, c) + : ye(l, i, a, !0) + : (u & 8 && m(n, ``), p & 16 && O(d, n, r, i, a, o, s, c)); + }, + fe = (e, t, r, i, a, o, s, c, l) => { + (e ||= n), (t ||= n); + let u = e.length, + d = t.length, + f = Math.min(u, d), + p; + for (p = 0; p < f; p++) { + let n = (t[p] = l ? Fi(t[p]) : Pi(t[p])); + y(e[p], n, r, null, a, o, s, c, l); + } + u > d ? ye(e, a, o, !0, !1, f) : O(t, r, i, a, o, s, c, l, f); + }, + pe = (e, t, r, i, a, o, s, c, l) => { + let u = 0, + d = t.length, + f = e.length - 1, + p = d - 1; + for (; u <= f && u <= p; ) { + let n = e[u], + i = (t[u] = l ? Fi(t[u]) : Pi(t[u])); + if (Oi(n, i)) y(n, i, r, null, a, o, s, c, l); + else break; + u++; + } + for (; u <= f && u <= p; ) { + let n = e[f], + i = (t[p] = l ? Fi(t[p]) : Pi(t[p])); + if (Oi(n, i)) y(n, i, r, null, a, o, s, c, l); + else break; + f--, p--; + } + if (u > f) { + if (u <= p) { + let e = p + 1, + n = e < d ? t[e].el : i; + for (; u <= p; ) y(null, (t[u] = l ? Fi(t[u]) : Pi(t[u])), r, n, a, o, s, c, l), u++; + } + } else if (u > p) for (; u <= f; ) he(e[u], a, o, !0), u++; + else { + let m = u, + h = u, + g = new Map(); + for (u = h; u <= p; u++) { + let e = (t[u] = l ? Fi(t[u]) : Pi(t[u])); + e.key != null && g.set(e.key, u); + } + let _, + v = 0, + b = p - h + 1, + x = !1, + S = 0, + C = Array(b); + for (u = 0; u < b; u++) C[u] = 0; + for (u = m; u <= f; u++) { + let n = e[u]; + if (v >= b) { + he(n, a, o, !0); + continue; + } + let i; + if (n.key != null) i = g.get(n.key); + else + for (_ = h; _ <= p; _++) + if (C[_ - h] === 0 && Oi(n, t[_])) { + i = _; + break; + } + i === void 0 + ? he(n, a, o, !0) + : ((C[i - h] = u + 1), i >= S ? (S = i) : (x = !0), y(n, t[i], r, null, a, o, s, c, l), v++); + } + let w = x ? Zr(C) : n; + for (_ = w.length - 1, u = b - 1; u >= 0; u--) { + let e = h + u, + n = t[e], + f = e + 1 < d ? t[e + 1].el : i; + C[u] === 0 ? y(null, n, r, f, a, o, s, c, l) : x && (_ < 0 || u !== w[_] ? me(n, r, f, 2) : _--); + } + } + }, + me = (e, t, n, r, i = null) => { + let { el: a, type: c, transition: l, children: u, shapeFlag: d } = e; + if (d & 6) { + me(e.component.subTree, t, n, r); + return; + } + if (d & 128) { + e.suspense.move(t, n, r); + return; + } + if (d & 64) { + c.move(e, t, n, Se); + return; + } + if (c === W) { + o(a, t, n); + for (let e = 0; e < u.length; e++) me(u[e], t, n, r); + o(e.anchor, t, n); + return; + } + if (c === bi) { + T(e, t, n); + return; + } + let f = r !== 2 && d & 1 && l; + if (f) + if (r === 0) l.beforeEnter(a), o(a, t, n), U(() => l.enter(a), i); + else { + let { leave: r, delayLeave: i, afterLeave: c } = l, + u = () => { + e.ctx.isUnmounted ? s(a) : o(a, t, n); + }, + d = () => { + r(a, () => { + u(), c && c(); + }); + }; + i ? i(a, u, d) : d(); + } + else o(a, t, n); + }, + he = (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 && (Be(), jn(s, null, n, e, !0), Ve()), + p != null && (t.renderCache[p] = void 0), + u & 256) + ) { + t.ctx.deactivate(e); + return; + } + let m = u & 1 && f, + h = !Pn(e), + g; + if ((h && (g = o && o.onVnodeBeforeUnmount) && Ri(g, t, e), u & 6)) ve(e.component, n, r); + else { + if (u & 128) { + e.suspense.unmount(n, r); + return; + } + m && Cn(e, null, t, `beforeUnmount`), + u & 64 + ? e.type.remove(e, t, n, Se, r) + : l && !l.hasOnce && (a !== W || (d > 0 && d & 64)) + ? ye(l, t, n, !1, !0) + : ((a === W && d & 384) || (!i && u & 16)) && ye(c, t, n), + r && ge(e); + } + ((h && (g = o && o.onVnodeUnmounted)) || m) && + U(() => { + g && Ri(g, t, e), m && Cn(e, null, t, `unmounted`); + }, n); + }, + ge = (e) => { + let { type: t, el: n, anchor: r, transition: i } = e; + if (t === W) { + _e(n, r); + return; + } + if (t === bi) { + ee(e); + return; + } + let a = () => { + s(n), i && !i.persisted && i.afterLeave && i.afterLeave(); + }; + if (e.shapeFlag & 1 && i && !i.persisted) { + let { leave: t, delayLeave: r } = i, + o = () => t(n, a); + r ? r(e.el, a, o) : o(); + } else a(); + }, + _e = (e, t) => { + let n; + for (; e !== t; ) (n = g(e)), s(e), (e = n); + s(t); + }, + ve = (e, t, n) => { + let { + bum: r, + scope: i, + job: a, + subTree: o, + um: s, + m: c, + a: l, + parent: u, + slots: { __: f }, + } = e; + $r(c), + $r(l), + r && re(r), + u && + d(f) && + f.forEach((e) => { + u.renderCache[e] = void 0; + }), + i.stop(), + a && ((a.flags |= 8), he(o, e, t, n)), + s && U(s, t), + U(() => { + e.isUnmounted = !0; + }, t), + t && + t.pendingBranch && + !t.isUnmounted && + e.asyncDep && + !e.asyncResolved && + e.suspenseId === t.pendingId && + (t.deps--, t.deps === 0 && t.resolve()); + }, + ye = (e, t, n, r = !1, i = !1, a = 0) => { + for (let o = a; o < e.length; o++) he(e[o], t, n, r, i); + }, + be = (e) => { + if (e.shapeFlag & 6) return be(e.component.subTree); + if (e.shapeFlag & 128) return e.suspense.next(); + let t = g(e.anchor || e.el), + n = t && t[wn]; + return n ? g(n) : t; + }, + xe = !1, + j = (e, t, n) => { + e == null ? t._vnode && he(t._vnode, null, null, !0) : y(t._vnode || null, e, t, null, null, null, n), + (t._vnode = e), + xe || ((xe = !0), _n(), vn(), (xe = !1)); + }, + Se = { p: y, um: he, m: me, r: ge, mt: se, mc: O, pc: de, pbc: k, n: be, o: e }, + Ce, + we; + return i && ([Ce, we] = i(Se)), { render: j, hydrate: Ce, createApp: Sr(j, Ce) }; +} +function qr({ 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 Jr({ effect: e, job: t }, n) { + n ? ((e.flags |= 32), (t.flags |= 4)) : ((e.flags &= -33), (t.flags &= -5)); +} +function Yr(e, t) { + return (!e || (e && !e.pendingBranch)) && t && !t.persisted; +} +function Xr(e, t, n = !1) { + let r = e.children, + i = t.children; + if (d(r) && d(i)) + for (let e = 0; e < r.length; e++) { + let t = r[e], + a = i[e]; + a.shapeFlag & 1 && + !a.dynamicChildren && + ((a.patchFlag <= 0 || a.patchFlag === 32) && ((a = i[e] = Fi(i[e])), (a.el = t.el)), + !n && a.patchFlag !== -2 && Xr(t, a)), + a.type === vi && (a.el = t.el), + a.type === yi && !a.el && (a.el = t.el); + } +} +function Zr(e) { + let t = e.slice(), + n = [0], + r, + i, + a, + o, + s, + c = e.length; + for (r = 0; r < c; r++) { + let c = e[r]; + if (c !== 0) { + if (((i = n[n.length - 1]), e[i] < c)) { + (t[r] = i), n.push(r); + continue; + } + for (a = 0, o = n.length - 1; a < o; ) (s = (a + o) >> 1), e[n[s]] < c ? (a = s + 1) : (o = s); + c < e[n[a]] && (a > 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 Qr(e) { + let t = e.subTree.component; + if (t) return t.asyncDep && !t.asyncResolved ? t : Qr(t); +} +function $r(e) { + if (e) for (let t = 0; t < e.length; t++) e[t].flags |= 8; +} +const ei = Symbol.for(`v-scx`), + ti = () => { + { + let e = Tr(ei); + return e; + } + }; +function ni(e, t, n) { + return ri(e, t, n); +} +function ri(e, n, i = t) { + let { immediate: a, deep: o, flush: c, once: l } = i, + u = s({}, i), + d = (n && a) || (!n && c !== `post`), + f; + if (qi) { + if (c === `sync`) { + let e = ti(); + f = e.__watcherHandles ||= []; + } else if (!d) { + let e = () => {}; + return (e.stop = r), (e.resume = r), (e.pause = r), e; + } + } + let p = Z; + u.call = (e, t, n) => nn(e, p, t, n); + let m = !1; + c === `post` + ? (u.scheduler = (e) => { + U(e, p && p.suspense); + }) + : c !== `sync` && + ((m = !0), + (u.scheduler = (e, t) => { + t ? e() : mn(e); + })), + (u.augmentJob = (e) => { + n && (e.flags |= 4), m && ((e.flags |= 2), p && ((e.id = p.uid), (e.i = p))); + }); + let h = $t(e, n, u); + return qi && (f ? f.push(h) : d && h()), h; +} +function ii(e, t, n) { + let r = this.proxy, + i = h(e) ? (e.includes(`.`) ? ai(r, e) : () => r[e]) : e.bind(r, r), + a; + m(t) ? (a = t) : ((a = t.handler), (n = t)); + let o = Wi(this), + s = ri(i, a.bind(r), n); + return o(), s; +} +function ai(e, t) { + let n = t.split(`.`); + return () => { + let t = e; + for (let e = 0; e < n.length && t; e++) t = t[n[e]]; + return t; + }; +} +const oi = (e, t) => + t === `modelValue` || t === `model-value` + ? e.modelModifiers + : e[`${t}Modifiers`] || e[`${E(t)}Modifiers`] || e[`${D(t)}Modifiers`]; +function si(e, n, ...r) { + if (e.isUnmounted) return; + let i = e.vnode.props || t, + a = r, + o = n.startsWith(`update:`), + s = o && oi(i, n.slice(7)); + s && (s.trim && (a = r.map((e) => (h(e) ? e.trim() : e))), s.number && (a = r.map(ae))); + let c, + l = i[(c = ne(n))] || i[(c = ne(E(n)))]; + !l && o && (l = i[(c = ne(D(n)))]), l && nn(l, e, 6, a); + let u = i[c + `Once`]; + if (u) { + if (!e.emitted) e.emitted = {}; + else if (e.emitted[c]) return; + (e.emitted[c] = !0), nn(u, e, 6, a); + } +} +function ci(e, t, n = !1) { + let r = t.emitsCache, + i = r.get(e); + if (i !== void 0) return i; + let a = e.emits, + o = {}, + c = !1; + if (!m(e)) { + let r = (e) => { + let n = ci(e, t, !0); + n && ((c = !0), s(o, n)); + }; + !n && t.mixins.length && t.mixins.forEach(r), e.extends && r(e.extends), e.mixins && e.mixins.forEach(r); + } + return !a && !c + ? (_(e) && r.set(e, null), null) + : (d(a) ? a.forEach((e) => (o[e] = null)) : s(o, a), _(e) && r.set(e, o), o); +} +function li(e, t) { + return !e || !a(t) + ? !1 + : ((t = t.slice(2).replace(/Once$/, ``)), u(e, t[0].toLowerCase() + t.slice(1)) || u(e, D(t)) || u(e, t)); +} +function ui(e) { + let { + type: t, + vnode: n, + proxy: r, + withProxy: i, + propsOptions: [a], + slots: s, + attrs: c, + emit: l, + render: u, + renderCache: d, + props: f, + data: p, + setupState: m, + ctx: h, + inheritAttrs: g, + } = e, + _ = Sn(e), + v, + y; + try { + if (n.shapeFlag & 4) { + let e = i || r, + t = e; + (v = Pi(u.call(t, e, d, f, m, p, h))), (y = c); + } else { + let e = t; + (v = Pi(e.length > 1 ? e(f, { attrs: c, slots: s, emit: l }) : e(f, null))), (y = t.props ? c : di(c)); + } + } catch (t) { + (xi.length = 0), rn(t, e, 1), (v = Y(yi)); + } + let b = v, + x; + if (y && g !== !1) { + let e = Object.keys(y), + { shapeFlag: t } = b; + e.length && t & 7 && (a && e.some(o) && (y = fi(y, a)), (b = Ni(b, y, !1, !0))); + } + return ( + n.dirs && ((b = Ni(b, null, !1, !0)), (b.dirs = b.dirs ? b.dirs.concat(n.dirs) : n.dirs)), + n.transition && On(b, n.transition), + (v = b), + Sn(_), + v + ); +} +const di = (e) => { + let t; + for (let n in e) (n === `class` || n === `style` || a(n)) && ((t ||= {})[n] = e[n]); + return t; + }, + fi = (e, t) => { + let n = {}; + for (let r in e) (!o(r) || !(r.slice(9) in t)) && (n[r] = e[r]); + return n; + }; +function pi(e, t, n) { + let { props: r, children: i, component: a } = e, + { props: o, children: s, patchFlag: c } = t, + l = a.emitsOptions; + if (t.dirs || t.transition) return !0; + if (n && c >= 0) { + if (c & 1024) return !0; + if (c & 16) return r ? mi(r, o, l) : !!o; + if (c & 8) { + let e = t.dynamicProps; + for (let t = 0; t < e.length; t++) { + let n = e[t]; + if (o[n] !== r[n] && !li(l, n)) return !0; + } + } + } else return (i || s) && (!s || !s.$stable) ? !0 : r === o ? !1 : r ? (o ? mi(r, o, l) : !0) : !!o; + return !1; +} +function mi(e, t, n) { + let r = Object.keys(t); + if (r.length !== Object.keys(e).length) return !0; + for (let i = 0; i < r.length; i++) { + let a = r[i]; + if (t[a] !== e[a] && !li(n, a)) return !0; + } + return !1; +} +function hi({ vnode: e, parent: t }, n) { + for (; t; ) { + let r = t.subTree; + if ((r.suspense && r.suspense.activeBranch === e && (r.el = e.el), r === e)) ((e = t.vnode).el = n), (t = t.parent); + else break; + } +} +const gi = (e) => e.__isSuspense; +function _i(e, t) { + t && t.pendingBranch ? (d(e) ? t.effects.push(...e) : t.effects.push(e)) : gn(e); +} +const W = Symbol.for(`v-fgt`), + vi = Symbol.for(`v-txt`), + yi = Symbol.for(`v-cmt`), + bi = Symbol.for(`v-stc`), + xi = []; +let G = null; +function K(e = !1) { + xi.push((G = e ? null : [])); +} +function Si() { + xi.pop(), (G = xi[xi.length - 1] || null); +} +let Ci = 1; +function wi(e, t = !1) { + (Ci += e), e < 0 && G && t && (G.hasOnce = !0); +} +function Ti(e) { + return (e.dynamicChildren = Ci > 0 ? G || n : null), Si(), Ci > 0 && G && G.push(e), e; +} +function q(e, t, n, r, i, a) { + return Ti(J(e, t, n, r, i, a, !0)); +} +function Ei(e, t, n, r, i) { + return Ti(Y(e, t, n, r, i, !0)); +} +function Di(e) { + return e ? e.__v_isVNode === !0 : !1; +} +function Oi(e, t) { + return e.type === t.type && e.key === t.key; +} +const ki = ({ key: e }) => e ?? null, + Ai = ({ ref: e, ref_key: t, ref_for: n }) => ( + typeof e == `number` && (e = `` + e), e == null ? null : h(e) || R(e) || m(e) ? { i: B, r: e, k: t, f: !!n } : e + ); +function J(e, t = null, n = null, r = 0, i = null, a = e === W ? 0 : 1, o = !1, s = !1) { + let c = { + __v_isVNode: !0, + __v_skip: !0, + type: e, + props: t, + key: t && ki(t), + ref: t && Ai(t), + scopeId: xn, + 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: B, + }; + return ( + s ? (Ii(c, n), a & 128 && e.normalize(c)) : n && (c.shapeFlag |= h(n) ? 8 : 16), + Ci > 0 && !o && G && (c.patchFlag > 0 || a & 6) && c.patchFlag !== 32 && G.push(c), + c + ); +} +const Y = ji; +function ji(e, t = null, n = null, r = 0, i = null, a = !1) { + if (((!e || e === Qn) && (e = yi), Di(e))) { + let r = Ni(e, t, !0); + return ( + n && Ii(r, n), Ci > 0 && !a && G && (r.shapeFlag & 6 ? (G[G.indexOf(e)] = r) : G.push(r)), (r.patchFlag = -2), r + ); + } + if ((ra(e) && (e = e.__vccOpts), t)) { + t = Mi(t); + let { class: e, style: n } = t; + e && !h(e) && (t.class = fe(e)), _(n) && (Lt(n) && !d(n) && (n = s({}, n)), (t.style = se(n))); + } + let o = h(e) ? 1 : gi(e) ? 128 : Tn(e) ? 64 : _(e) ? 4 : m(e) ? 2 : 0; + return J(e, t, n, r, i, o, a, !0); +} +function Mi(e) { + return e ? (Lt(e) || Or(e) ? s({}, e) : e) : null; +} +function Ni(e, t, n = !1, r = !1) { + let { props: i, ref: a, patchFlag: o, children: s, transition: c } = e, + l = t ? Li(i || {}, t) : i, + u = { + __v_isVNode: !0, + __v_skip: !0, + type: e.type, + props: l, + key: l && ki(l), + ref: t && t.ref ? (n && a ? (d(a) ? a.concat(Ai(t)) : [a, Ai(t)]) : Ai(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 !== W ? (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 && Ni(e.ssContent), + ssFallback: e.ssFallback && Ni(e.ssFallback), + el: e.el, + anchor: e.anchor, + ctx: e.ctx, + ce: e.ce, + }; + return c && r && On(u, c.clone(u)), u; +} +function X(e = ` `, t = 0) { + return Y(vi, null, e, t); +} +function Pi(e) { + return e == null || typeof e == `boolean` + ? Y(yi) + : d(e) + ? Y(W, null, e.slice()) + : Di(e) + ? Fi(e) + : Y(vi, null, String(e)); +} +function Fi(e) { + return (e.el === null && e.patchFlag !== -1) || e.memo ? e : Ni(e); +} +function Ii(e, t) { + let n = 0, + { shapeFlag: r } = e; + if (t == null) t = null; + else if (d(t)) n = 16; + else if (typeof t == `object`) + if (r & 65) { + let n = t.default; + n && (n._c && (n._d = !1), Ii(e, n()), n._c && (n._d = !0)); + return; + } else { + n = 32; + let r = t._; + !r && !Or(t) ? (t._ctx = B) : r === 3 && B && (B.slots._ === 1 ? (t._ = 1) : ((t._ = 2), (e.patchFlag |= 1024))); + } + else + m(t) ? ((t = { default: t, _ctx: B }), (n = 32)) : ((t = String(t)), r & 64 ? ((n = 16), (t = [X(t)])) : (n = 8)); + (e.children = t), (e.shapeFlag |= n); +} +function Li(...e) { + let t = {}; + for (let n = 0; n < e.length; n++) { + let r = e[n]; + for (let e in r) + if (e === `class`) t.class !== r.class && (t.class = fe([t.class, r.class])); + else if (e === `style`) t.style = se([t.style, r.style]); + else if (a(e)) { + let n = t[e], + i = r[e]; + i && n !== i && !(d(n) && n.includes(i)) && (t[e] = n ? [].concat(n, i) : i); + } else e !== `` && (t[e] = r[e]); + } + return t; +} +function Ri(e, t, n, r = null) { + nn(e, t, 7, [n, r]); +} +const zi = br(); +let Bi = 0; +function Vi(e, n, r) { + let i = e.type, + a = (n ? n.appContext : e.appContext) || zi, + o = { + uid: Bi++, + vnode: e, + type: i, + parent: n, + appContext: a, + root: null, + next: null, + subTree: null, + effect: null, + update: null, + job: null, + scope: new Se(!0), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: n ? n.provides : Object.create(a.provides), + ids: n ? n.ids : [``, 0, 0], + accessCache: null, + renderCache: [], + components: null, + directives: null, + propsOptions: Pr(i, a), + emitsOptions: ci(i, a), + emit: null, + emitted: null, + propsDefaults: t, + inheritAttrs: i.inheritAttrs, + ctx: t, + data: t, + props: t, + attrs: t, + slots: t, + refs: t, + setupState: t, + setupContext: null, + suspense: r, + suspenseId: r ? r.pendingId : 0, + asyncDep: null, + asyncResolved: !1, + isMounted: !1, + isUnmounted: !1, + isDeactivated: !1, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null, + }; + return (o.ctx = { _: o }), (o.root = n ? n.root : o), (o.emit = si.bind(null, o)), e.ce && e.ce(o), o; +} +let Z = null, + Hi, + Ui; +{ + let e = oe(), + 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); + } + ); + }; + (Hi = t(`__VUE_INSTANCE_SETTERS__`, (e) => (Z = e))), (Ui = t(`__VUE_SSR_SETTERS__`, (e) => (qi = e))); +} +const Wi = (e) => { + let t = Z; + return ( + Hi(e), + e.scope.on(), + () => { + e.scope.off(), Hi(t); + } + ); + }, + Gi = () => { + Z && Z.scope.off(), Hi(null); + }; +function Ki(e) { + return e.vnode.shapeFlag & 4; +} +let qi = !1; +function Ji(e, t = !1, n = !1) { + t && Ui(t); + let { props: r, children: i } = e.vnode, + a = Ki(e); + kr(e, r, a, t), Hr(e, i, n || t); + let o = a ? Yi(e, t) : void 0; + return t && Ui(!1), o; +} +function Yi(e, t) { + var n; + let r = e.type; + (e.accessCache = Object.create(null)), (e.proxy = new Proxy(e.ctx, ir)); + let { setup: i } = r; + if (i) { + Be(); + let n = (e.setupContext = i.length > 1 ? ta(e) : null), + r = Wi(e), + a = tn(i, e, 0, [e.props, n]), + o = v(a); + if ((Ve(), r(), (o || e.sp) && !Pn(e) && An(e), o)) { + if ((a.then(Gi, Gi), t)) + return a + .then((n) => { + Xi(e, n, t); + }) + .catch((t) => { + rn(t, e, 0); + }); + e.asyncDep = a; + } else Xi(e, a, t); + } else $i(e, t); +} +function Xi(e, t, n) { + m(t) ? (e.type.__ssrInlineRender ? (e.ssrRender = t) : (e.render = t)) : _(t) && (e.setupState = Kt(t)), $i(e, n); +} +let Zi, Qi; +function $i(e, t, n) { + let i = e.type; + if (!e.render) { + if (!t && Zi && !i.render) { + let t = i.template || dr(e).template; + if (t) { + let { isCustomElement: n, compilerOptions: r } = e.appContext.config, + { delimiters: a, compilerOptions: o } = i, + c = s(s({ isCustomElement: n, delimiters: a }, r), o); + i.render = Zi(t, c); + } + } + (e.render = i.render || r), Qi && Qi(e); + } + { + let t = Wi(e); + Be(); + try { + sr(e); + } finally { + Ve(), t(); + } + } +} +const ea = { + get(e, t) { + return P(e, `get`, ``), e[t]; + }, +}; +function ta(e) { + let t = (t) => { + e.exposed = t || {}; + }; + return { attrs: new Proxy(e.attrs, ea), slots: e.slots, emit: e.emit, expose: t }; +} +function na(e) { + return e.exposed + ? (e.exposeProxy ||= new Proxy(Kt(Rt(e.exposed)), { + get(t, n) { + if (n in t) return t[n]; + if (n in nr) return nr[n](e); + }, + has(e, t) { + return t in e || t in nr; + }, + })) + : e.proxy; +} +function ra(e) { + return m(e) && `__vccOpts` in e; +} +const ia = (e, t) => { + let n = Jt(e, t, qi); + return n; +}; +function aa(e, t, n) { + let r = arguments.length; + return r === 2 + ? _(t) && !d(t) + ? Di(t) + ? Y(e, null, [t]) + : Y(e, t) + : Y(e, null, t) + : (r > 3 ? (n = Array.prototype.slice.call(arguments, 2)) : r === 3 && Di(n) && (n = [n]), Y(e, t, n)); +} +const oa = `3.5.17`; +let sa; +const ca = typeof window < `u` && window.trustedTypes; +if (ca) + try { + sa = ca.createPolicy(`vue`, { createHTML: (e) => e }); + } catch {} +const la = sa ? (e) => sa.createHTML(e) : (e) => e, + ua = `http://www.w3.org/2000/svg`, + da = `http://www.w3.org/1998/Math/MathML`, + fa = typeof document < `u` ? document : null, + pa = fa && fa.createElement(`template`), + ma = { + 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` + ? fa.createElementNS(ua, e) + : t === `mathml` + ? fa.createElementNS(da, e) + : n + ? fa.createElement(e, { is: n }) + : fa.createElement(e); + return e === `select` && r && r.multiple != null && i.setAttribute(`multiple`, r.multiple), i; + }, + createText: (e) => fa.createTextNode(e), + createComment: (e) => fa.createComment(e), + setText: (e, t) => { + e.nodeValue = t; + }, + setElementText: (e, t) => { + e.textContent = t; + }, + parentNode: (e) => e.parentNode, + nextSibling: (e) => e.nextSibling, + querySelector: (e) => fa.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 { + pa.innerHTML = la(r === `svg` ? `${e}` : r === `mathml` ? `${e}` : e); + let i = pa.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]; + }, + }, + ha = Symbol(`_vtc`); +function ga(e, t, n) { + let r = e[ha]; + r && (t = (t ? [t, ...r] : [...r]).join(` `)), + t == null ? e.removeAttribute(`class`) : n ? e.setAttribute(`class`, t) : (e.className = t); +} +const _a = Symbol(`_vod`), + va = Symbol(`_vsh`), + ya = Symbol(``), + ba = /(^|;)\s*display\s*:/; +function xa(e, t, n) { + let r = e.style, + i = h(n), + a = !1; + if (n && !i) { + if (t) + if (h(t)) + for (let e of t.split(`;`)) { + let t = e.slice(0, e.indexOf(`:`)).trim(); + n[t] ?? Ca(r, t, ``); + } + else for (let e in t) n[e] ?? Ca(r, e, ``); + for (let e in n) e === `display` && (a = !0), Ca(r, e, n[e]); + } else if (i) { + if (t !== n) { + let e = r[ya]; + e && (n += `;` + e), (r.cssText = n), (a = ba.test(n)); + } + } else t && e.removeAttribute(`style`); + _a in e && ((e[_a] = a ? r.display : ``), e[va] && (r.display = `none`)); +} +const Sa = /\s*!important$/; +function Ca(e, t, n) { + if (d(n)) n.forEach((n) => Ca(e, t, n)); + else if (((n ??= ``), t.startsWith(`--`))) e.setProperty(t, n); + else { + let r = Ea(e, t); + Sa.test(n) ? e.setProperty(D(r), n.replace(Sa, ``), `important`) : (e[r] = n); + } +} +const wa = [`Webkit`, `Moz`, `ms`], + Ta = {}; +function Ea(e, t) { + let n = Ta[t]; + if (n) return n; + let r = E(t); + if (r !== `filter` && r in e) return (Ta[t] = r); + r = O(r); + for (let n = 0; n < wa.length; n++) { + let i = wa[n] + r; + if (i in e) return (Ta[t] = i); + } + return t; +} +const Da = `http://www.w3.org/1999/xlink`; +function Oa(e, t, n, r, i, a = me(t)) { + r && t.startsWith(`xlink:`) + ? n == null + ? e.removeAttributeNS(Da, t.slice(6, t.length)) + : e.setAttributeNS(Da, t, n) + : n == null || (a && !ge(n)) + ? e.removeAttribute(t) + : e.setAttribute(t, a ? `` : g(n) ? String(n) : n); +} +function ka(e, t, n, r, i) { + if (t === `innerHTML` || t === `textContent`) { + n != null && (e[t] = t === `innerHTML` ? la(n) : n); + return; + } + let a = e.tagName; + if (t === `value` && a !== `PROGRESS` && !a.includes(`-`)) { + let r = a === `OPTION` ? e.getAttribute(`value`) || `` : e.value, + i = n == null ? (e.type === `checkbox` ? `on` : ``) : String(n); + (r !== i || !(`_value` in e)) && (e.value = i), n ?? e.removeAttribute(t), (e._value = n); + return; + } + let o = !1; + if (n === `` || n == null) { + let r = typeof e[t]; + r === `boolean` + ? (n = ge(n)) + : n == null && r === `string` + ? ((n = ``), (o = !0)) + : r === `number` && ((n = 0), (o = !0)); + } + try { + e[t] = n; + } catch {} + o && e.removeAttribute(i || t); +} +function Aa(e, t, n, r) { + e.addEventListener(t, n, r); +} +function ja(e, t, n, r) { + e.removeEventListener(t, n, r); +} +const Ma = Symbol(`_vei`); +function Na(e, t, n, r, i = null) { + let a = e[Ma] || (e[Ma] = {}), + o = a[t]; + if (r && o) o.value = r; + else { + let [n, s] = Fa(t); + if (r) { + let o = (a[t] = za(r, i)); + Aa(e, n, o, s); + } else o && (ja(e, n, o, s), (a[t] = void 0)); + } +} +const Pa = /(?:Once|Passive|Capture)$/; +function Fa(e) { + let t; + if (Pa.test(e)) { + t = {}; + let n; + for (; (n = e.match(Pa)); ) (e = e.slice(0, e.length - n[0].length)), (t[n[0].toLowerCase()] = !0); + } + let n = e[2] === `:` ? e.slice(3) : D(e.slice(2)); + return [n, t]; +} +let Ia = 0; +const La = Promise.resolve(), + Ra = () => Ia || (La.then(() => (Ia = 0)), (Ia = Date.now())); +function za(e, t) { + let n = (e) => { + if (!e._vts) e._vts = Date.now(); + else if (e._vts <= n.attached) return; + nn(Ba(e, n.value), t, 5, [e]); + }; + return (n.value = e), (n.attached = Ra()), n; +} +function Ba(e, t) { + if (d(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; +} +const Va = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, + Ha = (e, t, n, r, i, s) => { + let c = i === `svg`; + t === `class` + ? ga(e, r, c) + : t === `style` + ? xa(e, n, r) + : a(t) + ? o(t) || Na(e, t, n, r, s) + : (t[0] === `.` ? ((t = t.slice(1)), !0) : t[0] === `^` ? ((t = t.slice(1)), !1) : Ua(e, t, r, c)) + ? (ka(e, t, r), + !e.tagName.includes(`-`) && + (t === `value` || t === `checked` || t === `selected`) && + Oa(e, t, r, c, s, t !== `value`)) + : e._isVueCE && (/[A-Z]/.test(t) || !h(r)) + ? ka(e, E(t), r, s, t) + : (t === `true-value` ? (e._trueValue = r) : t === `false-value` && (e._falseValue = r), Oa(e, t, r, c)); + }; +function Ua(e, t, n, r) { + if (r) return !!(t === `innerHTML` || t === `textContent` || (t in e && Va(t) && m(n))); + if ( + t === `spellcheck` || + t === `draggable` || + t === `translate` || + t === `autocorrect` || + 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 Va(t) && h(n) ? !1 : t in e; +} +const Wa = Symbol(`_moveCb`), + Ga = Symbol(`_enterCb`), + Ka = Symbol(`_assign`), + qa = s({ patchProp: Ha }, ma); +let Ja; +function Ya() { + return (Ja ||= Gr(qa)); +} +const Xa = (...e) => { + let t = Ya().createApp(...e), + { mount: n } = t; + return ( + (t.mount = (e) => { + let r = Qa(e); + if (!r) return; + let i = t._component; + !m(i) && !i.render && !i.template && (i.template = r.innerHTML), r.nodeType === 1 && (r.textContent = ``); + let a = n(r, !1, Za(r)); + return r instanceof Element && (r.removeAttribute(`v-cloak`), r.setAttribute(`data-v-app`, ``)), a; + }), + t + ); +}; +function Za(e) { + if (e instanceof SVGElement) return `svg`; + if (typeof MathMLElement == `function` && e instanceof MathMLElement) return `mathml`; +} +function Qa(e) { + if (h(e)) { + let t = document.querySelector(e); + return t; + } + return e; +} +let $a; +const eo = (e) => ($a = e), + to = Symbol(); +var no; +(function (e) { + (e.direct = `direct`), (e.patchObject = `patch object`), (e.patchFunction = `patch function`); +})((no ||= {})); +const ro = typeof window < `u`, + io = (() => + typeof window == `object` && window.window === window + ? window + : typeof self == `object` && self.self === self + ? self + : typeof global == `object` && global.global === global + ? global + : typeof globalThis == `object` + ? globalThis + : { HTMLElement: null })(); +function ao(e, { autoBom: t = !1 } = {}) { + return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) + ? new Blob([``, e], { type: e.type }) + : e; +} +function oo(e, t, n) { + let r = new XMLHttpRequest(); + r.open(`GET`, e), + (r.responseType = `blob`), + (r.onload = function () { + fo(r.response, t, n); + }), + (r.onerror = function () { + console.error(`could not download file`); + }), + r.send(); +} +function so(e) { + let t = new XMLHttpRequest(); + t.open(`HEAD`, e, !1); + try { + t.send(); + } catch {} + return t.status >= 200 && t.status <= 299; +} +function co(e) { + try { + e.dispatchEvent(new MouseEvent(`click`)); + } catch { + let t = new MouseEvent(`click`, { + bubbles: !0, + cancelable: !0, + view: window, + detail: 0, + screenX: 80, + screenY: 20, + clientX: 80, + clientY: 20, + ctrlKey: !1, + altKey: !1, + shiftKey: !1, + metaKey: !1, + button: 0, + relatedTarget: null, + }); + e.dispatchEvent(t); + } +} +const lo = typeof navigator == `object` ? navigator : { userAgent: `` }, + uo = (() => /Macintosh/.test(lo.userAgent) && /AppleWebKit/.test(lo.userAgent) && !/Safari/.test(lo.userAgent))(), + fo = ro + ? typeof HTMLAnchorElement < `u` && `download` in HTMLAnchorElement.prototype && !uo + ? po + : `msSaveOrOpenBlob` in lo + ? mo + : ho + : () => {}; +function po(e, t = `download`, n) { + let r = document.createElement(`a`); + (r.download = t), + (r.rel = `noopener`), + typeof e == `string` + ? ((r.href = e), r.origin === location.origin ? co(r) : so(r.href) ? oo(e, t, n) : ((r.target = `_blank`), co(r))) + : ((r.href = URL.createObjectURL(e)), + setTimeout(function () { + URL.revokeObjectURL(r.href); + }, 4e4), + setTimeout(function () { + co(r); + }, 0)); +} +function mo(e, t = `download`, n) { + if (typeof e == `string`) + if (so(e)) oo(e, t, n); + else { + let t = document.createElement(`a`); + (t.href = e), + (t.target = `_blank`), + setTimeout(function () { + co(t); + }); + } + else navigator.msSaveOrOpenBlob(ao(e, n), t); +} +function ho(e, t, n, r) { + if ( + ((r ||= open(``, `_blank`)), + r && (r.document.title = r.document.body.innerText = `downloading...`), + typeof e == `string`) + ) + return oo(e, t, n); + let i = e.type === `application/octet-stream`, + a = /constructor/i.test(String(io.HTMLElement)) || `safari` in io, + o = /CriOS\/[\d]+/.test(navigator.userAgent); + if ((o || (i && a) || uo) && typeof FileReader < `u`) { + let t = new FileReader(); + (t.onloadend = function () { + let e = t.result; + if (typeof e != `string`) throw ((r = null), Error(`Wrong reader.result type`)); + (e = o ? e : e.replace(/^data:[^;]*;/, `data:attachment/file;`)), + r ? (r.location.href = e) : location.assign(e), + (r = null); + }), + t.readAsDataURL(e); + } else { + let t = URL.createObjectURL(e); + r ? r.location.assign(t) : (location.href = t), + (r = null), + setTimeout(function () { + URL.revokeObjectURL(t); + }, 4e4); + } +} +const { assign: go } = Object; +function _o() { + let e = Ce(!0), + t = e.run(() => Bt({})), + n = [], + r = [], + i = Rt({ + install(e) { + eo(i), + (i._a = e), + e.provide(to, i), + (e.config.globalProperties.$pinia = i), + r.forEach((e) => n.push(e)), + (r = []); + }, + use(e) { + return this._a ? n.push(e) : r.push(e), this; + }, + _p: n, + _a: null, + _e: e, + _s: new Map(), + state: t, + }); + return i; +} +const vo = Symbol(), + yo = Symbol(), + bo = Symbol(), + { assign: xo } = Object; +var So = `data:image/svg+xml,%3csvg%20viewBox='0%200%201650%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20data-spm-anchor-id='a313x.search_index.0.i10.3b363a81fRIAyG'%20width='256'%20height='256'%3e%3cpath%20d='M1368.639733%20314.94553a283.692506%20283.692506%200%200%200-45.17515%203.532214%20436.693118%20436.693118%200%200%200-282.577071-295.032771%20448.219288%20448.219288%200%200%200-407.691787%2063.022123%2038.854347%2038.854347%200%200%200-7.993956%2055.771791%2040.713407%2040.713407%200%200%200%2055.77179%207.80805%20366.792474%20366.792474%200%200%201%20350.618655-46.290586%20356.009928%20356.009928%200%200%201%20222.343537%20269.563653%2039.412065%2039.412065%200%200%200%2018.590597%2027.142272%2040.713407%2040.713407%200%200%200%2033.277168%203.718119%20201.707975%20201.707975%200%200%201%20254.877081%20122.697938%20196.130796%20196.130796%200%200%201-123.813374%20249.671715%2039.226159%2039.226159%200%200%200-24.539588%2050.194611%2040.341595%2040.341595%200%200%200%2051.124141%2023.98187%20275.140832%20275.140832%200%200%200%20183.303284-306.558941%20278.858951%20278.858951%200%200%200-276.999891-229.036152z'%20fill='%239aed7f'/%3e%3cpath%20d='M1368.639733%20787.704406a238.703262%20238.703262%200%200%201-240.748228%20236.286485H240.934134a236.379438%20236.379438%200%201%201%200-472.758876%20151.69927%20151.69927%200%200%201%2022.494622%201.115436%20402.858232%20402.858232%200%200%201%20788.984926%2010.782546%20244.652253%20244.652253%200%200%201%20217.13817%2033.277168%20234.985143%20234.985143%200%200%201%2099.831505%20191.483147z'%20fill='%239aed7f'/%3e%3cpath%20d='M1100.377422%20632.472923a156.532825%20156.532825%200%200%200-23.05234%205.763085l-43.873809%2013.942948a40.713407%2040.713407%200%200%201-33.277168-3.71812%2039.412065%2039.412065%200%200%201-18.590596-27.142271L973.589552%20576.329321a322.175042%20322.175042%200%200%200-632.08029-8.737581l-7.064426%2034.764416a39.969783%2039.969783%200%200%201-42.386561%2031.232203l-35.879852-3.346308h-12.827512a157.64826%20157.64826%200%201%200-2.974495%20315.110615h3.346307l81.61272-1.301341v1.301341h799.395661a161.552286%20161.552286%200%200%200%20163.411345-151.141551%20156.161013%20156.161013%200%200%200-54.470448-125.114716%20162.667722%20162.667722%200%200%200-133.480485-37.181194z'%20fill='%23cdf8bf'/%3e%3c/svg%3e`; +const Co = typeof document < `u`; +function wo(e) { + return typeof e == `object` || `displayName` in e || `props` in e || `__vccOpts` in e; +} +function To(e) { + return e.__esModule || e[Symbol.toStringTag] === `Module` || (e.default && wo(e.default)); +} +const Q = Object.assign; +function Eo(e, t) { + let n = {}; + for (let r in t) { + let i = t[r]; + n[r] = $(i) ? i.map(e) : e(i); + } + return n; +} +const Do = () => {}, + $ = Array.isArray, + Oo = /#/g, + ko = /&/g, + Ao = /\//g, + jo = /=/g, + Mo = /\?/g, + No = /\+/g, + Po = /%5B/g, + Fo = /%5D/g, + Io = /%5E/g, + Lo = /%60/g, + Ro = /%7B/g, + zo = /%7C/g, + Bo = /%7D/g, + Vo = /%20/g; +function Ho(e) { + return encodeURI(`` + e) + .replace(zo, `|`) + .replace(Po, `[`) + .replace(Fo, `]`); +} +function Uo(e) { + return Ho(e).replace(Ro, `{`).replace(Bo, `}`).replace(Io, `^`); +} +function Wo(e) { + return Ho(e) + .replace(No, `%2B`) + .replace(Vo, `+`) + .replace(Oo, `%23`) + .replace(ko, `%26`) + .replace(Lo, '`') + .replace(Ro, `{`) + .replace(Bo, `}`) + .replace(Io, `^`); +} +function Go(e) { + return Wo(e).replace(jo, `%3D`); +} +function Ko(e) { + return Ho(e).replace(Oo, `%23`).replace(Mo, `%3F`); +} +function qo(e) { + return e == null ? `` : Ko(e).replace(Ao, `%2F`); +} +function Jo(e) { + try { + return decodeURIComponent(`` + e); + } catch {} + return `` + e; +} +const Yo = /\/$/, + Xo = (e) => e.replace(Yo, ``); +function Zo(e, t, n = `/`) { + let r, + i = {}, + a = ``, + o = ``, + s = t.indexOf(`#`), + c = t.indexOf(`?`); + return ( + s < c && s >= 0 && (c = -1), + c > -1 && ((r = t.slice(0, c)), (a = t.slice(c + 1, s > -1 ? s : t.length)), (i = e(a))), + s > -1 && ((r ||= t.slice(0, s)), (o = t.slice(s, t.length))), + (r = ss(r ?? t, n)), + { fullPath: r + (a && `?`) + a + o, path: r, query: i, hash: Jo(o) } + ); +} +function Qo(e, t) { + let n = t.query ? e(t.query) : ``; + return t.path + (n && `?`) + n + (t.hash || ``); +} +function $o(e, t) { + return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || `/`; +} +function es(e, t, n) { + let r = t.matched.length - 1, + i = n.matched.length - 1; + return ( + r > -1 && + r === i && + ts(t.matched[r], n.matched[i]) && + ns(t.params, n.params) && + e(t.query) === e(n.query) && + t.hash === n.hash + ); +} +function ts(e, t) { + return (e.aliasOf || e) === (t.aliasOf || t); +} +function ns(e, t) { + if (Object.keys(e).length !== Object.keys(t).length) return !1; + for (let n in e) if (!rs(e[n], t[n])) return !1; + return !0; +} +function rs(e, t) { + return $(e) ? os(e, t) : $(t) ? os(t, e) : e === t; +} +function os(e, t) { + return $(t) ? e.length === t.length && e.every((e, n) => e === t[n]) : e.length === 1 && e[0] === t; +} +function ss(e, t) { + if (e.startsWith(`/`)) return e; + if (!e) return t; + let n = t.split(`/`), + r = e.split(`/`), + i = r[r.length - 1]; + (i === `..` || i === `.`) && r.push(``); + let a = n.length - 1, + o, + s; + for (o = 0; o < r.length; o++) + if (((s = r[o]), s !== `.`)) + if (s === `..`) a > 1 && a--; + else break; + return n.slice(0, a).join(`/`) + `/` + r.slice(o).join(`/`); +} +const cs = { + path: `/`, + name: void 0, + params: {}, + query: {}, + hash: ``, + fullPath: `/`, + matched: [], + meta: {}, + redirectedFrom: void 0, +}; +var ls; +(function (e) { + (e.pop = `pop`), (e.push = `push`); +})((ls ||= {})); +var us; +(function (e) { + (e.back = `back`), (e.forward = `forward`), (e.unknown = ``); +})((us ||= {})); +function ds(e) { + if (!e) + if (Co) { + let t = document.querySelector(`base`); + (e = (t && t.getAttribute(`href`)) || `/`), (e = e.replace(/^\w+:\/\/[^\/]+/, ``)); + } else e = `/`; + return e[0] !== `/` && e[0] !== `#` && (e = `/` + e), Xo(e); +} +const fs = /^[^#]+#/; +function ps(e, t) { + return e.replace(fs, `#`) + t; +} +function ms(e, t) { + let n = document.documentElement.getBoundingClientRect(), + r = e.getBoundingClientRect(); + return { behavior: t.behavior, left: r.left - n.left - (t.left || 0), top: r.top - n.top - (t.top || 0) }; +} +const hs = () => ({ left: window.scrollX, top: window.scrollY }); +function gs(e) { + let t; + if (`el` in e) { + let n = e.el, + r = typeof n == `string` && n.startsWith(`#`), + i = typeof n == `string` ? (r ? document.getElementById(n.slice(1)) : document.querySelector(n)) : n; + if (!i) return; + t = ms(i, e); + } else t = e; + `scrollBehavior` in document.documentElement.style + ? window.scrollTo(t) + : window.scrollTo(t.left == null ? window.scrollX : t.left, t.top == null ? window.scrollY : t.top); +} +function _s(e, t) { + let n = history.state ? history.state.position - t : -1; + return n + e; +} +const vs = new Map(); +function ys(e, t) { + vs.set(e, t); +} +function bs(e) { + let t = vs.get(e); + return vs.delete(e), t; +} +let xs = () => location.protocol + `//` + location.host; +function Ss(e, t) { + let { pathname: n, search: r, hash: i } = t, + a = e.indexOf(`#`); + if (a > -1) { + let t = i.includes(e.slice(a)) ? e.slice(a).length : 1, + n = i.slice(t); + return n[0] !== `/` && (n = `/` + n), $o(n, ``); + } + let o = $o(n, e); + return o + r + i; +} +function Cs(e, t, n, r) { + let i = [], + a = [], + o = null, + s = ({ state: a }) => { + let s = Ss(e, location), + c = n.value, + l = t.value, + u = 0; + if (a) { + if (((n.value = s), (t.value = a), o && o === c)) { + o = null; + return; + } + u = l ? a.position - l.position : 0; + } else r(s); + i.forEach((e) => { + e(n.value, c, { delta: u, type: ls.pop, direction: u ? (u > 0 ? us.forward : us.back) : us.unknown }); + }); + }; + function c() { + o = n.value; + } + function l(e) { + i.push(e); + let t = () => { + let t = i.indexOf(e); + t > -1 && i.splice(t, 1); + }; + return a.push(t), t; + } + function u() { + let { history: e } = window; + e.state && e.replaceState(Q({}, e.state, { scroll: hs() }), ``); + } + function d() { + for (let e of a) e(); + (a = []), window.removeEventListener(`popstate`, s), window.removeEventListener(`beforeunload`, u); + } + return ( + window.addEventListener(`popstate`, s), + window.addEventListener(`beforeunload`, u, { passive: !0 }), + { pauseListeners: c, listen: l, destroy: d } + ); +} +function ws(e, t, n, r = !1, i = !1) { + return { back: e, current: t, forward: n, replaced: r, position: window.history.length, scroll: i ? hs() : null }; +} +function Ts(e) { + let { history: t, location: n } = window, + r = { value: Ss(e, n) }, + i = { value: t.state }; + i.value || + a(r.value, { back: null, current: r.value, forward: null, position: t.length - 1, replaced: !0, scroll: null }, !0); + function a(r, a, o) { + let s = e.indexOf(`#`), + c = s > -1 ? (n.host && document.querySelector(`base`) ? e : e.slice(s)) + r : xs() + e + r; + try { + t[o ? `replaceState` : `pushState`](a, ``, c), (i.value = a); + } catch (e) { + console.error(e), n[o ? `replace` : `assign`](c); + } + } + function o(e, n) { + let o = Q({}, t.state, ws(i.value.back, e, i.value.forward, !0), n, { position: i.value.position }); + a(e, o, !0), (r.value = e); + } + function s(e, n) { + let o = Q({}, i.value, t.state, { forward: e, scroll: hs() }); + a(o.current, o, !0); + let s = Q({}, ws(r.value, e, null), { position: o.position + 1 }, n); + a(e, s, !1), (r.value = e); + } + return { location: r, state: i, push: s, replace: o }; +} +function Es(e) { + e = ds(e); + let t = Ts(e), + n = Cs(e, t.state, t.location, t.replace); + function r(e, t = !0) { + t || n.pauseListeners(), history.go(e); + } + let i = Q({ location: ``, base: e, go: r, createHref: ps.bind(null, e) }, t, n); + return ( + Object.defineProperty(i, `location`, { enumerable: !0, get: () => t.location.value }), + Object.defineProperty(i, `state`, { enumerable: !0, get: () => t.state.value }), + i + ); +} +function Ds(e) { + return typeof e == `string` || (e && typeof e == `object`); +} +function Os(e) { + return typeof e == `string` || typeof e == `symbol`; +} +const ks = Symbol(``); +var As; +(function (e) { + (e[(e.aborted = 4)] = `aborted`), (e[(e.cancelled = 8)] = `cancelled`), (e[(e.duplicated = 16)] = `duplicated`); +})((As ||= {})); +function js(e, t) { + return Q(Error(), { type: e, [ks]: !0 }, t); +} +function Ms(e, t) { + return e instanceof Error && ks in e && (t == null || !!(e.type & t)); +} +const Ns = `[^/]+?`, + Ps = { sensitive: !1, strict: !1, start: !0, end: !0 }, + Fs = /[.+*?^${}()[\]/\\]/g; +function Is(e, t) { + let n = Q({}, Ps, t), + r = [], + i = n.start ? `^` : ``, + a = []; + for (let t of e) { + let e = t.length ? [] : [90]; + n.strict && !t.length && (i += `/`); + for (let r = 0; r < t.length; r++) { + let o = t[r], + s = 40 + (n.sensitive ? 0.25 : 0); + if (o.type === 0) r || (i += `/`), (i += o.value.replace(Fs, `\\$&`)), (s += 40); + else if (o.type === 1) { + let { value: e, repeatable: n, optional: c, regexp: l } = o; + a.push({ name: e, repeatable: n, optional: c }); + let u = l || Ns; + if (u !== Ns) { + s += 10; + try { + `${u}`; + } catch (t) { + throw Error(`Invalid custom RegExp for param "${e}" (${u}): ` + t.message); + } + } + let d = n ? `((?:${u})(?:/(?:${u}))*)` : `(${u})`; + r || (d = c && t.length < 2 ? `(?:/${d})` : `/` + d), + c && (d += `?`), + (i += d), + (s += 20), + c && (s += -8), + n && (s += -20), + u === `.*` && (s += -50); + } + e.push(s); + } + r.push(e); + } + if (n.strict && n.end) { + let e = r.length - 1; + r[e][r[e].length - 1] += 0.7000000000000001; + } + n.strict || (i += `/?`), n.end ? (i += `$`) : n.strict && !i.endsWith(`/`) && (i += `(?:/|$)`); + let o = new RegExp(i, n.sensitive ? `` : `i`); + function s(e) { + let t = e.match(o), + n = {}; + if (!t) return null; + for (let e = 1; e < t.length; e++) { + let r = t[e] || ``, + i = a[e - 1]; + n[i.name] = r && i.repeatable ? r.split(`/`) : r; + } + return n; + } + function c(t) { + let n = ``, + r = !1; + for (let i of e) { + (!r || !n.endsWith(`/`)) && (n += `/`), (r = !1); + for (let e of i) + if (e.type === 0) n += e.value; + else if (e.type === 1) { + let { value: a, repeatable: o, optional: s } = e, + c = a in t ? t[a] : ``; + if ($(c) && !o) throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`); + let l = $(c) ? c.join(`/`) : c; + if (!l) + if (s) i.length < 2 && (n.endsWith(`/`) ? (n = n.slice(0, -1)) : (r = !0)); + else throw Error(`Missing required param "${a}"`); + n += l; + } + } + return n || `/`; + } + return { re: o, score: r, keys: a, parse: s, stringify: c }; +} +function Ls(e, t) { + let n = 0; + for (; n < e.length && n < t.length; ) { + let r = t[n] - e[n]; + if (r) return r; + n++; + } + return e.length < t.length + ? e.length === 1 && e[0] === 80 + ? -1 + : 1 + : e.length > t.length + ? t.length === 1 && t[0] === 80 + ? 1 + : -1 + : 0; +} +function Rs(e, t) { + let n = 0, + r = e.score, + i = t.score; + for (; n < r.length && n < i.length; ) { + let e = Ls(r[n], i[n]); + if (e) return e; + n++; + } + if (Math.abs(i.length - r.length) === 1) { + if (zs(r)) return 1; + if (zs(i)) return -1; + } + return i.length - r.length; +} +function zs(e) { + let t = e[e.length - 1]; + return e.length > 0 && t[t.length - 1] < 0; +} +const Bs = { type: 0, value: `` }, + Vs = /[a-zA-Z0-9_]/; +function Hs(e) { + if (!e) return [[]]; + if (e === `/`) return [[Bs]]; + if (!e.startsWith(`/`)) throw Error(`Invalid path "${e}"`); + function t(e) { + throw Error(`ERR (${n})/"${l}": ${e}`); + } + let n = 0, + r = n, + i = [], + a; + function o() { + a && i.push(a), (a = []); + } + let s = 0, + c, + l = ``, + u = ``; + function d() { + l && + (n === 0 + ? a.push({ type: 0, value: l }) + : n === 1 || n === 2 || n === 3 + ? (a.length > 1 && + (c === `*` || c === `+`) && + t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`), + a.push({ + type: 1, + value: l, + regexp: u, + repeatable: c === `*` || c === `+`, + optional: c === `*` || c === `?`, + })) + : t(`Invalid state to consume buffer`), + (l = ``)); + } + function f() { + l += c; + } + for (; s < e.length; ) { + if (((c = e[s++]), c === `\\` && n !== 2)) { + (r = n), (n = 4); + continue; + } + switch (n) { + case 0: + c === `/` ? (l && d(), o()) : c === `:` ? (d(), (n = 1)) : f(); + break; + case 4: + f(), (n = r); + break; + case 1: + c === `(` ? (n = 2) : Vs.test(c) ? f() : (d(), (n = 0), c !== `*` && c !== `?` && c !== `+` && s--); + break; + case 2: + c === `)` ? (u[u.length - 1] == `\\` ? (u = u.slice(0, -1) + c) : (n = 3)) : (u += c); + break; + case 3: + d(), (n = 0), c !== `*` && c !== `?` && c !== `+` && s--, (u = ``); + break; + default: + t(`Unknown state`); + break; + } + } + return n === 2 && t(`Unfinished custom RegExp for param "${l}"`), d(), o(), i; +} +function Us(e, t, n) { + let r = Is(Hs(e.path), n), + i = Q(r, { record: e, parent: t, children: [], alias: [] }); + return t && !i.record.aliasOf == !t.record.aliasOf && t.children.push(i), i; +} +function Ws(e, t) { + let n = [], + r = new Map(); + t = Xs({ strict: !1, end: !0, sensitive: !1 }, t); + function i(e) { + return r.get(e); + } + function a(e, n, r) { + let i = !r, + s = Ks(e); + s.aliasOf = r && r.record; + let l = Xs(t, e), + u = [s]; + if (`alias` in e) { + let t = typeof e.alias == `string` ? [e.alias] : e.alias; + for (let e of t) + u.push( + Ks(Q({}, s, { components: r ? r.record.components : s.components, path: e, aliasOf: r ? r.record : s })), + ); + } + let d, f; + for (let t of u) { + let { path: u } = t; + if (n && u[0] !== `/`) { + let e = n.record.path, + r = e[e.length - 1] === `/` ? `` : `/`; + t.path = n.record.path + (u && r + u); + } + if ( + ((d = Us(t, n, l)), + r ? r.alias.push(d) : ((f ||= d), f !== d && f.alias.push(d), i && e.name && !Js(d) && o(e.name)), + $s(d) && c(d), + s.children) + ) { + let e = s.children; + for (let t = 0; t < e.length; t++) a(e[t], d, r && r.children[t]); + } + r ||= d; + } + return f + ? () => { + o(f); + } + : Do; + } + function o(e) { + if (Os(e)) { + let t = r.get(e); + t && (r.delete(e), n.splice(n.indexOf(t), 1), t.children.forEach(o), t.alias.forEach(o)); + } else { + let t = n.indexOf(e); + t > -1 && (n.splice(t, 1), e.record.name && r.delete(e.record.name), e.children.forEach(o), e.alias.forEach(o)); + } + } + function s() { + return n; + } + function c(e) { + let t = Zs(e, n); + n.splice(t, 0, e), e.record.name && !Js(e) && r.set(e.record.name, e); + } + function l(e, t) { + let i, + a = {}, + o, + s; + if (`name` in e && e.name) { + if (((i = r.get(e.name)), !i)) throw js(1, { location: e }); + (s = i.record.name), + (a = Q( + Gs( + t.params, + i.keys + .filter((e) => !e.optional) + .concat(i.parent ? i.parent.keys.filter((e) => e.optional) : []) + .map((e) => e.name), + ), + e.params && + Gs( + e.params, + i.keys.map((e) => e.name), + ), + )), + (o = i.stringify(a)); + } else if (e.path != null) + (o = e.path), (i = n.find((e) => e.re.test(o))), i && ((a = i.parse(o)), (s = i.record.name)); + else { + if (((i = t.name ? r.get(t.name) : n.find((e) => e.re.test(t.path))), !i)) + throw js(1, { location: e, currentLocation: t }); + (s = i.record.name), (a = Q({}, t.params, e.params)), (o = i.stringify(a)); + } + let c = [], + l = i; + for (; l; ) c.unshift(l.record), (l = l.parent); + return { name: s, path: o, params: a, matched: c, meta: Ys(c) }; + } + e.forEach((e) => a(e)); + function u() { + (n.length = 0), r.clear(); + } + return { addRoute: a, resolve: l, removeRoute: o, clearRoutes: u, getRoutes: s, getRecordMatcher: i }; +} +function Gs(e, t) { + let n = {}; + for (let r of t) r in e && (n[r] = e[r]); + return n; +} +function Ks(e) { + let t = { + path: e.path, + redirect: e.redirect, + name: e.name, + meta: e.meta || {}, + aliasOf: e.aliasOf, + beforeEnter: e.beforeEnter, + props: qs(e), + children: e.children || [], + instances: {}, + leaveGuards: new Set(), + updateGuards: new Set(), + enterCallbacks: {}, + components: `components` in e ? e.components || null : e.component && { default: e.component }, + }; + return Object.defineProperty(t, `mods`, { value: {} }), t; +} +function qs(e) { + let t = {}, + n = e.props || !1; + if (`component` in e) t.default = n; + else for (let r in e.components) t[r] = typeof n == `object` ? n[r] : n; + return t; +} +function Js(e) { + for (; e; ) { + if (e.record.aliasOf) return !0; + e = e.parent; + } + return !1; +} +function Ys(e) { + return e.reduce((e, t) => Q(e, t.meta), {}); +} +function Xs(e, t) { + let n = {}; + for (let r in e) n[r] = r in t ? t[r] : e[r]; + return n; +} +function Zs(e, t) { + let n = 0, + r = t.length; + for (; n !== r; ) { + let i = (n + r) >> 1, + a = Rs(e, t[i]); + a < 0 ? (r = i) : (n = i + 1); + } + let i = Qs(e); + return i && (r = t.lastIndexOf(i, r - 1)), r; +} +function Qs(e) { + let t = e; + for (; (t = t.parent); ) if ($s(t) && Rs(e, t) === 0) return t; +} +function $s({ record: e }) { + return !!(e.name || (e.components && Object.keys(e.components).length) || e.redirect); +} +function ec(e) { + let t = {}; + if (e === `` || e === `?`) return t; + let n = e[0] === `?`, + r = (n ? e.slice(1) : e).split(`&`); + for (let e = 0; e < r.length; ++e) { + let n = r[e].replace(No, ` `), + i = n.indexOf(`=`), + a = Jo(i < 0 ? n : n.slice(0, i)), + o = i < 0 ? null : Jo(n.slice(i + 1)); + if (a in t) { + let e = t[a]; + $(e) || (e = t[a] = [e]), e.push(o); + } else t[a] = o; + } + return t; +} +function tc(e) { + let t = ``; + for (let n in e) { + let r = e[n]; + if (((n = Go(n)), r == null)) { + r !== void 0 && (t += (t.length ? `&` : ``) + n); + continue; + } + let i = $(r) ? r.map((e) => e && Wo(e)) : [r && Wo(r)]; + i.forEach((e) => { + e !== void 0 && ((t += (t.length ? `&` : ``) + n), e != null && (t += `=` + e)); + }); + } + return t; +} +function nc(e) { + let t = {}; + for (let n in e) { + let r = e[n]; + r !== void 0 && (t[n] = $(r) ? r.map((e) => (e == null ? null : `` + e)) : r == null ? r : `` + r); + } + return t; +} +const rc = Symbol(``), + ic = Symbol(``), + ac = Symbol(``), + oc = Symbol(``), + sc = Symbol(``); +function cc() { + let e = []; + function t(t) { + return ( + e.push(t), + () => { + let n = e.indexOf(t); + n > -1 && e.splice(n, 1); + } + ); + } + function n() { + e = []; + } + return { add: t, list: () => e.slice(), reset: n }; +} +function lc(e, t, n, r, i, a = (e) => e()) { + let o = r && (r.enterCallbacks[i] = r.enterCallbacks[i] || []); + return () => + new Promise((s, c) => { + let l = (e) => { + e === !1 + ? c(js(4, { from: n, to: t })) + : e instanceof Error + ? c(e) + : Ds(e) + ? c(js(2, { from: t, to: e })) + : (o && r.enterCallbacks[i] === o && typeof e == `function` && o.push(e), s()); + }, + u = a(() => e.call(r && r.instances[i], t, n, l)), + d = Promise.resolve(u); + e.length < 3 && (d = d.then(l)), d.catch((e) => c(e)); + }); +} +function uc(e, t, n, r, i = (e) => e()) { + let a = []; + for (let o of e) + for (let e in o.components) { + let s = o.components[e]; + if (t !== `beforeRouteEnter` && !o.instances[e]) continue; + if (wo(s)) { + let c = s.__vccOpts || s, + l = c[t]; + l && a.push(lc(l, n, r, o, e, i)); + } else { + let c = s(); + a.push(() => + c.then((a) => { + if (!a) throw Error(`Couldn't resolve component "${e}" at "${o.path}"`); + let s = To(a) ? a.default : a; + (o.mods[e] = a), (o.components[e] = s); + let c = s.__vccOpts || s, + l = c[t]; + return l && lc(l, n, r, o, e, i)(); + }), + ); + } + } + return a; +} +function dc(e) { + let t = Tr(ac), + n = Tr(oc), + r = !1, + i = null, + a = ia(() => { + let n = Wt(e.to); + return t.resolve(n); + }), + o = ia(() => { + let { matched: e } = a.value, + { length: t } = e, + r = e[t - 1], + i = n.matched; + if (!r || !i.length) return -1; + let o = i.findIndex(ts.bind(null, r)); + if (o > -1) return o; + let s = _c(e[t - 2]); + return t > 1 && _c(r) === s && i[i.length - 1].path !== s ? i.findIndex(ts.bind(null, e[t - 2])) : o; + }), + s = ia(() => o.value > -1 && gc(n.params, a.value.params)), + c = ia(() => o.value > -1 && o.value === n.matched.length - 1 && ns(n.params, a.value.params)); + function l(n = {}) { + if (hc(n)) { + let n = t[Wt(e.replace) ? `replace` : `push`](Wt(e.to)).catch(Do); + return ( + e.viewTransition && + typeof document < `u` && + `startViewTransition` in document && + document.startViewTransition(() => n), + n + ); + } + return Promise.resolve(); + } + return { route: a, href: ia(() => a.value.href), isActive: s, isExactActive: c, navigate: l }; +} +function fc(e) { + return e.length === 1 ? e[0] : e; +} +const pc = kn({ + name: `RouterLink`, + compatConfig: { MODE: 3 }, + props: { + to: { type: [String, Object], required: !0 }, + replace: Boolean, + activeClass: String, + exactActiveClass: String, + custom: Boolean, + ariaCurrentValue: { type: String, default: `page` }, + viewTransition: Boolean, + }, + useLink: dc, + setup(e, { slots: t }) { + let n = jt(dc(e)), + { options: r } = Tr(ac), + i = ia(() => ({ + [vc(e.activeClass, r.linkActiveClass, `router-link-active`)]: n.isActive, + [vc(e.exactActiveClass, r.linkExactActiveClass, `router-link-exact-active`)]: n.isExactActive, + })); + return () => { + let r = t.default && fc(t.default(n)); + return e.custom + ? r + : aa( + `a`, + { + 'aria-current': n.isExactActive ? e.ariaCurrentValue : null, + href: n.href, + onClick: n.navigate, + class: i.value, + }, + r, + ); + }; + }, + }), + mc = pc; +function hc(e) { + if ( + !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && + !e.defaultPrevented && + !(e.button !== void 0 && e.button !== 0) + ) { + if (e.currentTarget && e.currentTarget.getAttribute) { + let t = e.currentTarget.getAttribute(`target`); + if (/\b_blank\b/i.test(t)) return; + } + return e.preventDefault && e.preventDefault(), !0; + } +} +function gc(e, t) { + for (let n in t) { + let r = t[n], + i = e[n]; + if (typeof r == `string`) { + if (r !== i) return !1; + } else if (!$(i) || i.length !== r.length || r.some((e, t) => e !== i[t])) return !1; + } + return !0; +} +function _c(e) { + return e ? (e.aliasOf ? e.aliasOf.path : e.path) : ``; +} +const vc = (e, t, n) => e ?? t ?? n, + yc = kn({ + name: `RouterView`, + inheritAttrs: !1, + props: { name: { type: String, default: `default` }, route: Object }, + compatConfig: { MODE: 3 }, + setup(e, { attrs: t, slots: n }) { + let r = Tr(sc), + i = ia(() => e.route || r.value), + a = Tr(ic, 0), + o = ia(() => { + let e = Wt(a), + { matched: t } = i.value, + n; + for (; (n = t[e]) && !n.components; ) e++; + return e; + }), + s = ia(() => i.value.matched[o.value]); + wr( + ic, + ia(() => o.value + 1), + ), + wr(rc, s), + wr(sc, i); + let c = Bt(); + return ( + ni( + () => [c.value, s.value, e.name], + ([e, t, n], [r, i, a]) => { + t && + ((t.instances[n] = e), + i && + i !== t && + e && + e === r && + (t.leaveGuards.size || (t.leaveGuards = i.leaveGuards), + t.updateGuards.size || (t.updateGuards = i.updateGuards))), + e && t && (!i || !ts(t, i) || !r) && (t.enterCallbacks[n] || []).forEach((t) => t(e)); + }, + { flush: `post` }, + ), + () => { + let r = i.value, + a = e.name, + o = s.value, + l = o && o.components[a]; + if (!l) return bc(n.default, { Component: l, route: r }); + let u = o.props[a], + d = u ? (u === !0 ? r.params : typeof u == `function` ? u(r) : u) : null, + f = (e) => { + e.component.isUnmounted && (o.instances[a] = null); + }, + p = aa(l, Q({}, d, t, { onVnodeUnmounted: f, ref: c })); + return bc(n.default, { Component: p, route: r }) || p; + } + ); + }, + }); +function bc(e, t) { + if (!e) return null; + let n = e(t); + return n.length === 1 ? n[0] : n; +} +const xc = yc; +function Sc(e) { + let t = Ws(e.routes, e), + n = e.parseQuery || ec, + r = e.stringifyQuery || tc, + i = e.history, + a = cc(), + o = cc(), + s = cc(), + c = Vt(cs), + l = cs; + Co && e.scrollBehavior && `scrollRestoration` in history && (history.scrollRestoration = `manual`); + let u = Eo.bind(null, (e) => `` + e), + d = Eo.bind(null, qo), + f = Eo.bind(null, Jo); + function p(e, n) { + let r, i; + return Os(e) ? ((r = t.getRecordMatcher(e)), (i = n)) : (i = e), t.addRoute(i, r); + } + function m(e) { + let n = t.getRecordMatcher(e); + n && t.removeRoute(n); + } + function h() { + return t.getRoutes().map((e) => e.record); + } + function g(e) { + return !!t.getRecordMatcher(e); + } + function _(e, a) { + if (((a = Q({}, a || c.value)), typeof e == `string`)) { + let r = Zo(n, e, a.path), + o = t.resolve({ path: r.path }, a), + s = i.createHref(r.fullPath); + return Q(r, o, { params: f(o.params), hash: Jo(r.hash), redirectedFrom: void 0, href: s }); + } + let o; + if (e.path != null) o = Q({}, e, { path: Zo(n, e.path, a.path).path }); + else { + let t = Q({}, e.params); + for (let e in t) t[e] ?? delete t[e]; + (o = Q({}, e, { params: d(t) })), (a.params = d(a.params)); + } + let s = t.resolve(o, a), + l = e.hash || ``; + s.params = u(f(s.params)); + let p = Qo(r, Q({}, e, { hash: Uo(l), path: s.path })), + m = i.createHref(p); + return Q({ fullPath: p, hash: l, query: r === tc ? nc(e.query) : e.query || {} }, s, { + redirectedFrom: void 0, + href: m, + }); + } + function v(e) { + return typeof e == `string` ? Zo(n, e, c.value.path) : Q({}, e); + } + function y(e, t) { + if (l !== e) return js(8, { from: t, to: e }); + } + function b(e) { + return C(e); + } + function x(e) { + return b(Q(v(e), { replace: !0 })); + } + function S(e) { + let t = e.matched[e.matched.length - 1]; + if (t && t.redirect) { + let { redirect: n } = t, + r = typeof n == `function` ? n(e) : n; + return ( + typeof r == `string` && ((r = r.includes(`?`) || r.includes(`#`) ? (r = v(r)) : { path: r }), (r.params = {})), + Q({ query: e.query, hash: e.hash, params: r.path == null ? e.params : {} }, r) + ); + } + } + function C(e, t) { + let n = (l = _(e)), + i = c.value, + a = e.state, + o = e.force, + s = e.replace === !0, + u = S(n); + if (u) return C(Q(v(u), { state: typeof u == `object` ? Q({}, a, u.state) : a, force: o, replace: s }), t || n); + let d = n; + d.redirectedFrom = t; + let f; + return ( + !o && es(r, i, n) && ((f = js(16, { to: d, from: i })), oe(i, i, !0, !1)), + (f ? Promise.resolve(f) : ee(d, i)) + .catch((e) => (Ms(e) ? (Ms(e, 2) ? e : A(e)) : ie(e, d, i))) + .then((e) => { + if (e) { + if (Ms(e, 2)) + return C( + Q({ replace: s }, v(e.to), { state: typeof e.to == `object` ? Q({}, a, e.to.state) : a, force: o }), + t || d, + ); + } else e = te(d, i, !0, s, a); + return E(d, i, e), e; + }) + ); + } + function w(e, t) { + let n = y(e, t); + return n ? Promise.reject(n) : Promise.resolve(); + } + function T(e) { + let t = le.values().next().value; + return t && typeof t.runWithContext == `function` ? t.runWithContext(e) : e(); + } + function ee(e, t) { + let n, + [r, i, s] = Cc(e, t); + n = uc(r.reverse(), `beforeRouteLeave`, e, t); + for (let i of r) + i.leaveGuards.forEach((r) => { + n.push(lc(r, e, t)); + }); + let c = w.bind(null, e, t); + return ( + n.push(c), + de(n) + .then(() => { + n = []; + for (let r of a.list()) n.push(lc(r, e, t)); + return n.push(c), de(n); + }) + .then(() => { + n = uc(i, `beforeRouteUpdate`, e, t); + for (let r of i) + r.updateGuards.forEach((r) => { + n.push(lc(r, e, t)); + }); + return n.push(c), de(n); + }) + .then(() => { + n = []; + for (let r of s) + if (r.beforeEnter) + if ($(r.beforeEnter)) for (let i of r.beforeEnter) n.push(lc(i, e, t)); + else n.push(lc(r.beforeEnter, e, t)); + return n.push(c), de(n); + }) + .then( + () => ( + e.matched.forEach((e) => (e.enterCallbacks = {})), + (n = uc(s, `beforeRouteEnter`, e, t, T)), + n.push(c), + de(n) + ), + ) + .then(() => { + n = []; + for (let r of o.list()) n.push(lc(r, e, t)); + return n.push(c), de(n); + }) + .catch((e) => (Ms(e, 8) ? e : Promise.reject(e))) + ); + } + function E(e, t, n) { + s.list().forEach((r) => T(() => r(e, t, n))); + } + function te(e, t, n, r, a) { + let o = y(e, t); + if (o) return o; + let s = t === cs, + l = Co ? history.state : {}; + n && (r || s ? i.replace(e.fullPath, Q({ scroll: s && l && l.scroll }, a)) : i.push(e.fullPath, a)), + (c.value = e), + oe(e, t, n, s), + A(); + } + let D; + function O() { + D ||= i.listen((e, t, n) => { + if (!ue.listening) return; + let r = _(e), + a = S(r); + if (a) { + C(Q(a, { replace: !0, force: !0 }), r).catch(Do); + return; + } + l = r; + let o = c.value; + Co && ys(_s(o.fullPath, n.delta), hs()), + ee(r, o) + .catch((e) => + Ms(e, 12) + ? e + : Ms(e, 2) + ? (C(Q(v(e.to), { force: !0 }), r) + .then((e) => { + Ms(e, 20) && !n.delta && n.type === ls.pop && i.go(-1, !1); + }) + .catch(Do), + Promise.reject()) + : (n.delta && i.go(-n.delta, !1), ie(e, r, o)), + ) + .then((e) => { + (e ||= te(r, o, !1)), + e && (n.delta && !Ms(e, 8) ? i.go(-n.delta, !1) : n.type === ls.pop && Ms(e, 20) && i.go(-1, !1)), + E(r, o, e); + }) + .catch(Do); + }); + } + let ne = cc(), + k = cc(), + re; + function ie(e, t, n) { + A(e); + let r = k.list(); + return r.length ? r.forEach((r) => r(e, t, n)) : console.error(e), Promise.reject(e); + } + function ae() { + return re && c.value !== cs + ? Promise.resolve() + : new Promise((e, t) => { + ne.add([e, t]); + }); + } + function A(e) { + return re || ((re = !e), O(), ne.list().forEach(([t, n]) => (e ? n(e) : t())), ne.reset()), e; + } + function oe(t, n, r, i) { + let { scrollBehavior: a } = e; + if (!Co || !a) return Promise.resolve(); + let o = (!r && bs(_s(t.fullPath, 0))) || ((i || !r) && history.state && history.state.scroll) || null; + return fn() + .then(() => a(t, n, o)) + .then((e) => e && gs(e)) + .catch((e) => ie(e, t, n)); + } + let se = (e) => i.go(e), + ce, + le = new Set(), + ue = { + currentRoute: c, + listening: !0, + addRoute: p, + removeRoute: m, + clearRoutes: t.clearRoutes, + hasRoute: g, + getRoutes: h, + resolve: _, + options: e, + push: b, + replace: x, + go: se, + back: () => se(-1), + forward: () => se(1), + beforeEach: a.add, + beforeResolve: o.add, + afterEach: s.add, + onError: k.add, + isReady: ae, + install(e) { + let t = this; + e.component(`RouterLink`, mc), + e.component(`RouterView`, xc), + (e.config.globalProperties.$router = t), + Object.defineProperty(e.config.globalProperties, `$route`, { enumerable: !0, get: () => Wt(c) }), + Co && !ce && c.value === cs && ((ce = !0), b(i.location).catch((e) => {})); + let n = {}; + for (let e in cs) Object.defineProperty(n, e, { get: () => c.value[e], enumerable: !0 }); + e.provide(ac, t), e.provide(oc, Mt(n)), e.provide(sc, c); + let r = e.unmount; + le.add(e), + (e.unmount = function () { + le.delete(e), le.size < 1 && ((l = cs), D && D(), (D = null), (c.value = cs), (ce = !1), (re = !1)), r(); + }); + }, + }; + function de(e) { + return e.reduce((e, t) => e.then(() => T(t)), Promise.resolve()); + } + return ue; +} +function Cc(e, t) { + let n = [], + r = [], + i = [], + a = Math.max(t.matched.length, e.matched.length); + for (let o = 0; o < a; o++) { + let a = t.matched[o]; + a && (e.matched.find((e) => ts(e, a)) ? r.push(a) : n.push(a)); + let s = e.matched[o]; + s && (t.matched.find((e) => ts(e, s)) || i.push(s)); + } + return [n, r, i]; +} +const wc = { class: `greetings` }, + Tc = { class: `green` }; +var Ec = kn({ + __name: `HelloWorld`, + props: { msg: {} }, + setup(e) { + return (e, t) => ( + K(), + q(`div`, wc, [ + J(`h1`, Tc, ve(e.msg), 1), + (t[0] ||= J( + `h3`, + null, + [ + X(` You’ve successfully created a project with `), + J(`a`, { href: `https://vite.dev/`, target: `_blank`, rel: `noopener` }, `Vite`), + X(` + `), + J(`a`, { href: `https://vuejs.org/`, target: `_blank`, rel: `noopener` }, `Vue 3`), + X(` . What's next? `), + ], + -1, + )), + ]) + ); + }, + }), + Dc = (e, t) => { + let n = e.__vccOpts || e; + for (let [e, r] of t) n[e] = r; + return n; + }, + Oc = Dc(Ec, [[`__scopeId`, `data-v-bed32675`]]); +const kc = { class: `wrapper` }; +var Ac = kn({ + __name: `App`, + setup(e) { + return (e, t) => ( + K(), + q( + W, + null, + [ + J(`header`, null, [ + (t[2] ||= J(`img`, { alt: `Vue logo`, class: `logo`, height: `125`, src: So, width: `125` }, null, -1)), + J(`div`, kc, [ + Y(Oc, { msg: `You did it!` }), + J(`nav`, null, [ + Y(Wt(mc), { to: `/` }, { default: V(() => (t[0] ||= [X(`Home`)])), _: 1, __: [0] }), + Y(Wt(mc), { to: `/about` }, { default: V(() => (t[1] ||= [X(`About`)])), _: 1, __: [1] }), + ]), + ]), + ]), + Y(Wt(xc)), + ], + 64, + ) + ); + }, + }), + jc = Dc(Ac, [[`__scopeId`, `data-v-608be0ed`]]); +const Mc = `modulepreload`, + Nc = function (e) { + return `/` + e; + }, + Pc = {}, + Fc = function (e, t, n) { + let r = Promise.resolve(); + if (t && t.length > 0) { + let e = document.getElementsByTagName(`link`), + i = document.querySelector(`meta[property=csp-nonce]`), + a = i?.nonce || i?.getAttribute(`nonce`); + function o(e) { + return Promise.all( + e.map((e) => + Promise.resolve(e).then( + (e) => ({ status: `fulfilled`, value: e }), + (e) => ({ status: `rejected`, reason: e }), + ), + ), + ); + } + r = o( + t.map((t) => { + if (((t = Nc(t, n)), t in Pc)) return; + Pc[t] = !0; + let r = t.endsWith(`.css`), + i = r ? `[rel="stylesheet"]` : ``, + o = !!n; + if (o) + for (let n = e.length - 1; n >= 0; n--) { + let i = e[n]; + if (i.href === t && (!r || i.rel === `stylesheet`)) return; + } + else if (document.querySelector(`link[href="${t}"]${i}`)) return; + let s = document.createElement(`link`); + if ( + ((s.rel = r ? `stylesheet` : Mc), + r || (s.as = `script`), + (s.crossOrigin = ``), + (s.href = t), + a && s.setAttribute(`nonce`, a), + document.head.appendChild(s), + r) + ) + return new Promise((e, n) => { + s.addEventListener(`load`, e), + s.addEventListener(`error`, () => n(Error(`Unable to preload CSS for ${t}`))); + }); + }), + ); + } + function i(e) { + let t = new Event(`vite:preloadError`, { cancelable: !0 }); + if (((t.payload = e), window.dispatchEvent(t), !t.defaultPrevented)) throw e; + } + return r.then((t) => { + for (let e of t || []) { + if (e.status !== `rejected`) continue; + i(e.reason); + } + return e().catch(i); + }); + }, + Ic = {}, + Lc = { class: `item` }, + Rc = { class: `details` }; +function zc(e, t) { + return ( + K(), + q(`div`, Lc, [ + J(`i`, null, [$n(e.$slots, `icon`, {}, void 0, !0)]), + J(`div`, Rc, [J(`h3`, null, [$n(e.$slots, `heading`, {}, void 0, !0)]), $n(e.$slots, `default`, {}, void 0, !0)]), + ]) + ); +} +var Bc = Dc(Ic, [ + [`render`, zc], + [`__scopeId`, `data-v-5369c01e`], +]); +const Vc = {}, + Hc = { xmlns: `http://www.w3.org/2000/svg`, width: `20`, height: `17`, fill: `currentColor` }; +function Uc(e, t) { + return ( + K(), + q( + `svg`, + Hc, + (t[0] ||= [ + J( + `path`, + { + d: `M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z`, + }, + null, + -1, + ), + ]), + ) + ); +} +var Wc = Dc(Vc, [[`render`, Uc]]); +const Gc = {}, + Kc = { + xmlns: `http://www.w3.org/2000/svg`, + 'xmlns:xlink': `http://www.w3.org/1999/xlink`, + 'aria-hidden': `true`, + role: `img`, + class: `iconify iconify--mdi`, + width: `24`, + height: `24`, + preserveAspectRatio: `xMidYMid meet`, + viewBox: `0 0 24 24`, + }; +function qc(e, t) { + return ( + K(), + q( + `svg`, + Kc, + (t[0] ||= [ + J( + `path`, + { + d: `M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z`, + fill: `currentColor`, + }, + null, + -1, + ), + ]), + ) + ); +} +var Jc = Dc(Gc, [[`render`, qc]]); +const Yc = {}, + Xc = { xmlns: `http://www.w3.org/2000/svg`, width: `18`, height: `20`, fill: `currentColor` }; +function Zc(e, t) { + return ( + K(), + q( + `svg`, + Xc, + (t[0] ||= [ + J( + `path`, + { + d: `M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z`, + }, + null, + -1, + ), + ]), + ) + ); +} +var Qc = Dc(Yc, [[`render`, Zc]]); +const $c = {}, + el = { xmlns: `http://www.w3.org/2000/svg`, width: `20`, height: `20`, fill: `currentColor` }; +function tl(e, t) { + return ( + K(), + q( + `svg`, + el, + (t[0] ||= [ + J( + `path`, + { + d: `M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z`, + }, + null, + -1, + ), + ]), + ) + ); +} +var nl = Dc($c, [[`render`, tl]]); +const rl = {}, + il = { xmlns: `http://www.w3.org/2000/svg`, width: `20`, height: `20`, fill: `currentColor` }; +function al(e, t) { + return ( + K(), + q( + `svg`, + il, + (t[0] ||= [ + J( + `path`, + { + d: `M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z`, + }, + null, + -1, + ), + ]), + ) + ); +} +var ol = Dc(rl, [[`render`, al]]), + sl = kn({ + __name: `TheWelcome`, + setup(e) { + let t = () => fetch(`/__open-in-editor?file=README.md`); + return (e, n) => ( + K(), + q( + W, + null, + [ + Y(Bc, null, { + icon: V(() => [Y(Wc)]), + heading: V(() => (n[0] ||= [X(`Documentation`)])), + default: V(() => [ + (n[1] ||= X(` Vue’s `)), + (n[2] ||= J( + `a`, + { href: `https://vuejs.org/`, target: `_blank`, rel: `noopener` }, + `official documentation`, + -1, + )), + (n[3] ||= X(` provides you with all information you need to get started. `)), + ]), + _: 1, + __: [1, 2, 3], + }), + Y(Bc, null, { + icon: V(() => [Y(Jc)]), + heading: V(() => (n[4] ||= [X(`Tooling`)])), + default: V(() => [ + (n[6] ||= X(` This project is served and bundled with `)), + (n[7] ||= J( + `a`, + { href: `https://vite.dev/guide/features.html`, target: `_blank`, rel: `noopener` }, + `Vite`, + -1, + )), + (n[8] ||= X(` . The recommended IDE setup is `)), + (n[9] ||= J( + `a`, + { href: `https://code.visualstudio.com/`, target: `_blank`, rel: `noopener` }, + `VSCode`, + -1, + )), + (n[10] ||= X(` + `)), + (n[11] ||= J( + `a`, + { href: `https://github.com/vuejs/language-tools`, target: `_blank`, rel: `noopener` }, + `Vue - Official`, + -1, + )), + (n[12] ||= X(` . If you need to test your components and web pages, check out `)), + (n[13] ||= J(`a`, { href: `https://vitest.dev/`, target: `_blank`, rel: `noopener` }, `Vitest`, -1)), + (n[14] ||= X(` and `)), + (n[15] ||= J( + `a`, + { href: `https://www.cypress.io/`, target: `_blank`, rel: `noopener` }, + `Cypress`, + -1, + )), + (n[16] ||= X(` / `)), + (n[17] ||= J( + `a`, + { href: `https://playwright.dev/`, target: `_blank`, rel: `noopener` }, + `Playwright`, + -1, + )), + (n[18] ||= X(` . `)), + (n[19] ||= J(`br`, null, null, -1)), + (n[20] ||= X(` More instructions are available in `)), + J(`a`, { href: `javascript:void(0)`, onClick: t }, (n[5] ||= [J(`code`, null, `README.md`, -1)])), + (n[21] ||= X(` . `)), + ]), + _: 1, + __: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21], + }), + Y(Bc, null, { + icon: V(() => [Y(Qc)]), + heading: V(() => (n[22] ||= [X(`Ecosystem`)])), + default: V(() => [ + (n[23] ||= X(` Get official tools and libraries for your project: `)), + (n[24] ||= J( + `a`, + { href: `https://pinia.vuejs.org/`, target: `_blank`, rel: `noopener` }, + `Pinia`, + -1, + )), + (n[25] ||= X(` , `)), + (n[26] ||= J( + `a`, + { href: `https://router.vuejs.org/`, target: `_blank`, rel: `noopener` }, + `Vue Router`, + -1, + )), + (n[27] ||= X(` , `)), + (n[28] ||= J( + `a`, + { href: `https://test-utils.vuejs.org/`, target: `_blank`, rel: `noopener` }, + `Vue Test Utils`, + -1, + )), + (n[29] ||= X(` , and `)), + (n[30] ||= J( + `a`, + { href: `https://github.com/vuejs/devtools`, target: `_blank`, rel: `noopener` }, + `Vue Dev Tools`, + -1, + )), + (n[31] ||= X(` . If you need more resources, we suggest paying `)), + (n[32] ||= J( + `a`, + { href: `https://github.com/vuejs/awesome-vue`, target: `_blank`, rel: `noopener` }, + `Awesome Vue`, + -1, + )), + (n[33] ||= X(` a visit. `)), + ]), + _: 1, + __: [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33], + }), + Y(Bc, null, { + icon: V(() => [Y(nl)]), + heading: V(() => (n[34] ||= [X(`Community`)])), + default: V(() => [ + (n[35] ||= X(` Got stuck? Ask your question on `)), + (n[36] ||= J( + `a`, + { href: `https://chat.vuejs.org`, target: `_blank`, rel: `noopener` }, + `Vue Land`, + -1, + )), + (n[37] ||= X(` (our official Discord server), or `)), + (n[38] ||= J( + `a`, + { href: `https://stackoverflow.com/questions/tagged/vue.js`, target: `_blank`, rel: `noopener` }, + `StackOverflow`, + -1, + )), + (n[39] ||= X(` . You should also follow the official `)), + (n[40] ||= J( + `a`, + { href: `https://bsky.app/profile/vuejs.org`, target: `_blank`, rel: `noopener` }, + `@vuejs.org`, + -1, + )), + (n[41] ||= X(` Bluesky account or the `)), + (n[42] ||= J(`a`, { href: `https://x.com/vuejs`, target: `_blank`, rel: `noopener` }, `@vuejs`, -1)), + (n[43] ||= X(` X account for latest news in the Vue world. `)), + ]), + _: 1, + __: [35, 36, 37, 38, 39, 40, 41, 42, 43], + }), + Y(Bc, null, { + icon: V(() => [Y(ol)]), + heading: V(() => (n[44] ||= [X(`Support Vue`)])), + default: V(() => [ + (n[45] ||= X( + ` As an independent project, Vue relies on community backing for its sustainability. You can help us by `, + )), + (n[46] ||= J( + `a`, + { href: `https://vuejs.org/sponsor/`, target: `_blank`, rel: `noopener` }, + `becoming a sponsor`, + -1, + )), + (n[47] ||= X(` . `)), + ]), + _: 1, + __: [45, 46, 47], + }), + ], + 64, + ) + ); + }, + }), + cl = sl, + ll = kn({ + __name: `HomeView`, + setup(e) { + return (e, t) => (K(), q(`main`, null, [Y(cl)])); + }, + }), + ul = ll; +const dl = Sc({ + history: Es(`/`), + routes: [ + { path: `/`, name: `home`, component: ul }, + { path: `/about`, name: `about`, component: () => Fc(() => import(`./flDiIF0y.js`), __vite__mapDeps([0, 1])) }, + ], +}); +var fl = dl; +const pl = Xa(jc); +pl.use(_o()), pl.use(fl), pl.mount(`#app`); +export { Dc as __plugin_vue_export_helper_default, J as createBaseVNode, q as createElementBlock, K as openBlock }; diff --git a/src/main/resources/html/static/js/flDiIF0y.js b/src/main/resources/html/static/js/flDiIF0y.js new file mode 100644 index 0000000..454c7e2 --- /dev/null +++ b/src/main/resources/html/static/js/flDiIF0y.js @@ -0,0 +1,13 @@ +import { + __plugin_vue_export_helper_default as e, + createBaseVNode as t, + createElementBlock as n, + openBlock as r, +} from './CcCh4Sgi.js'; +const i = {}, + a = { class: `about` }; +function o(e, i) { + return r(), n(`div`, a, (i[0] ||= [t(`h1`, null, `This is an about page`, -1)])); +} +var s = e(i, [[`render`, o]]); +export { s as default }; diff --git a/src/main/resources/html/static/svg/BIklAcGo.svg b/src/main/resources/html/static/svg/BIklAcGo.svg new file mode 100644 index 0000000..ec2b792 --- /dev/null +++ b/src/main/resources/html/static/svg/BIklAcGo.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/src/main/resources/log4j2.yaml b/src/main/resources/log4j2.yaml new file mode 100644 index 0000000..65b1131 --- /dev/null +++ b/src/main/resources/log4j2.yaml @@ -0,0 +1,29 @@ + +Appenders: + Console: #输出到控制台 + name: CONSOLE #Appender命名 + target: SYSTEM_OUT + PatternLayout: + pattern: "%style{%d{yyyy-MM-dd HH:mm:ss,SSS}}{bright,magenta} [%highlight{%p}{FATAL=white, ERROR=bright_red, WARN=bright_yellow, INFO=bright_green, DEBUG=bright_cyan, TRACE=bright_blue}] [%style{%t}{bright,yellow}/%style{%c{1}}{bright,cyan}] -- %style{%m}{#EEDFCC}%n" #输出日志的格式 + disableAnsi: "${env:DISABLECOLOR:-false}" + RollingFile: + - name: FILE + fileName: 'log/info.log' + filePattern: "log/$${date:yyyy-MM-dd}/%d{yyyy-MM-dd}-%i.log" + PatternLayout: + pattern: "%d{yyyy-MM-dd HH:mm:ss,SSS} [%p] [%t/%F:%L/%M/%c] -- %m%n" #输出日志的格式 + Policies: + SizeBasedTriggeringPolicy: + size: "10 KB" + TimeBasedTriggeringPolicy: + modulate: true + interval: 1 + DefaultRolloverStrategy: # 单目录下,文件最多20个,超过会删除最早之前的 + max: 1000 +Loggers: + Root: + level: INFO + additivity: true + AppenderRef: + - ref: CONSOLE + - ref: FILE diff --git a/src/main/resources/sql/database.sql b/src/main/resources/sql/database.sql new file mode 100644 index 0000000..3a21b7b --- /dev/null +++ b/src/main/resources/sql/database.sql @@ -0,0 +1,3 @@ +create database meven_repository collate utf8mb4_unicode_ci; +create user 'meven_repository_admin'@'%' IDENTIFIED BY 'meven_repository_admin_password'; +GRANT ALL ON meven_repository.* TO 'meven_repository_admin'@'%' \ No newline at end of file diff --git a/src/main/resources/sql/users.sql b/src/main/resources/sql/users.sql new file mode 100644 index 0000000..bb316f9 --- /dev/null +++ b/src/main/resources/sql/users.sql @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS `users`; +create table `users` +( + id binary(16) default (uuid_to_bin( + uuid(), + 1)) primary key, + username varchar(256) unique not null, + password varchar(128) not null, + nickname varchar(256) not null, + prermissions json, + roles json, + icon mediumblob, + admin bool default false, + creation_time timestamp(6) default current_timestamp(6) not null, + update_time timestamp(6) null +); +INSERT INTO users (id, username, password, nickname, prermissions, roles, icon, admin) +VALUES (0x689EFC204D1F11F08134DB0063E177A7, 'admin', 'admin', '管理员', '[]', '[]', null, 1); diff --git a/src/test/java/com/mingliqiye/disk/DiskApplicationTests.java b/src/test/java/com/mingliqiye/disk/DiskApplicationTests.java index 2d79e93..85d59b3 100644 --- a/src/test/java/com/mingliqiye/disk/DiskApplicationTests.java +++ b/src/test/java/com/mingliqiye/disk/DiskApplicationTests.java @@ -1,11 +1,26 @@ package com.mingliqiye.disk; +import com.mingliqiye.disk.mappers.UserMapper; +import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; +import org.mindrot.jbcrypt.BCrypt; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +@Slf4j @SpringBootTest class DiskApplicationTests { + @Autowired + UserMapper userMapper; + @Test - void contextLoads() {} + void contextLoads() { + log.info("{}", userMapper.selectList(null)); + } + + @Test + void getBCryptPdw() { + log.info("{}", BCrypt.hashpw("admin", BCrypt.gensalt())); + } } diff --git a/vite.config.ts b/vite.config.ts index 4ec2da7..6c6a4ab 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -13,13 +13,13 @@ export default defineConfig({ }, }, build: { - outDir: path.resolve(__dirname, 'src/main/resources/static'), + outDir: path.resolve(__dirname, 'src/main/resources/html'), emptyOutDir: true, rollupOptions: { output: { - chunkFileNames: 'js/[hash].js', - entryFileNames: 'js/[hash].js', - assetFileNames: '[ext]/[hash].[ext]', + chunkFileNames: 'static/js/[hash].js', + entryFileNames: 'static/js/[hash].js', + assetFileNames: 'static/[ext]/[hash].[ext]', }, }, }, diff --git a/web-src/App.vue b/web-src/App.vue index 7c67d70..ad73374 100644 --- a/web-src/App.vue +++ b/web-src/App.vue @@ -1,11 +1,11 @@ -