Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
387f023372 | ||
|
|
e51380003c | ||
|
|
e41b3e1688 | ||
|
|
7be3b27415 | ||
|
|
bdab5bb375 | ||
|
|
c0984bfb1f | ||
|
|
62d1a23695 | ||
|
|
9a80d7a9e0 | ||
|
|
eeb70c7f44 | ||
|
|
136ea5830f | ||
|
|
c430af3d82 | ||
|
|
6fcf26fcbe | ||
|
|
f6649ecc81 | ||
|
|
3005ed1298 | ||
|
|
a23409f0af | ||
|
|
f7876c6e48 | ||
|
|
7c6aedb96e | ||
|
|
7ed09e2455 | ||
|
|
9f8e6d401f | ||
|
|
c4304d3525 | ||
|
|
e92ff30d8c | ||
|
|
fd913ababc | ||
|
|
45be97a258 | ||
|
|
fbd741ebcf | ||
|
|
e341e1afae | ||
|
|
4037ddb3b1 | ||
|
|
72190331b9 | ||
|
|
566dc3b94f | ||
|
|
cf96071167 | ||
|
|
ffe89060f4 | ||
|
|
79c1e0f949 | ||
|
|
df6722ac26 | ||
|
|
e897dbfe97 | ||
|
|
168ca8383f | ||
|
|
4d1cd4cbfc | ||
|
|
c61c2ee7fe | ||
|
|
548d625827 | ||
|
|
792f7a8a12 | ||
|
|
a65cf32214 | ||
|
|
4a50908455 | ||
|
|
c4e398bd31 | ||
|
|
39264cc32e | ||
|
|
7a15b6a44d | ||
|
|
591441e9a7 | ||
|
|
60756749b7 | ||
|
|
fdada809d9 | ||
|
|
17331112b4 | ||
|
|
94c9c30f98 | ||
|
|
69fc66e926 | ||
|
|
4d7c9deabf | ||
|
|
731b6319d0 | ||
|
|
d178ab04a2 | ||
|
|
7ea1fe2e90 | ||
|
|
13b5306a02 | ||
|
|
799b49b81d | ||
|
|
6eeb1c50a5 | ||
|
|
1ff1d6c695 | ||
|
|
19b289d62b | ||
|
|
46a4fb70e0 | ||
|
|
2d3dcad3ad | ||
|
|
93b005bf5a | ||
|
|
96f68f457c | ||
|
|
94da526e23 | ||
|
|
36fe69e2a7 | ||
|
|
fa85521cfb | ||
|
|
d1f10a33fb | ||
|
|
4f0df03691 | ||
|
|
dbfe98ec4a | ||
|
|
aef7879612 | ||
|
|
6913132074 | ||
|
|
802d2551ff | ||
|
|
78c612c660 | ||
|
|
d35c84cc43 | ||
|
|
0d1aa81d70 | ||
|
|
cbc356ae91 | ||
|
|
ede0e62f32 | ||
|
|
f2f301f515 | ||
|
|
8973abdf2f | ||
|
|
0783f47555 | ||
|
|
037949b715 | ||
|
|
913acff5c5 | ||
|
|
0add20e722 | ||
|
|
964d091d0b | ||
|
|
7ca840cfa1 | ||
|
|
340db7fba3 | ||
|
|
1cb7d2c91c | ||
|
|
0786eb9e44 | ||
|
|
6157f0a8b2 | ||
|
|
191ac220ce | ||
|
|
3145302771 | ||
|
|
541647696d | ||
|
|
e6913960e2 | ||
|
|
828368a9e2 | ||
|
|
0c393a9890 | ||
|
|
8da960b6ca | ||
|
|
c0c1438f11 | ||
|
|
3592db09ab | ||
|
|
63b5be31e8 | ||
|
|
5238975484 | ||
|
|
59f9b119b5 | ||
|
|
651e9c5936 | ||
|
|
ae2d9f0847 | ||
|
|
efbfec2471 | ||
|
|
c40aca30b2 | ||
|
|
9348a7bcea | ||
|
|
7a4fc100c5 | ||
|
|
a884bf19b0 | ||
|
|
bf758ea3f3 | ||
|
|
b72c621dcd | ||
|
|
72ad733355 | ||
|
|
f0aca7da16 | ||
|
|
c93c5b0924 | ||
|
|
799b89dada | ||
|
|
4a48f6d5e3 | ||
|
|
529f314856 | ||
|
|
abe7581803 | ||
|
|
019684787a | ||
|
|
a50753e070 | ||
|
|
f0e7304bb2 | ||
|
|
9ba7d37796 | ||
|
|
3abe660d48 | ||
|
|
2093f19638 | ||
|
|
5ba9eba8eb | ||
|
|
e4aaafb2ad | ||
|
|
7c98046355 | ||
|
|
cc3a521d31 | ||
|
|
fd1eea7779 | ||
|
|
38c78ced14 | ||
|
|
dcd30caf26 | ||
|
|
18cf3f9a48 | ||
|
|
5051184a4d | ||
|
|
2bef407373 | ||
|
|
6c2f2caee0 | ||
|
|
d988d5bc98 | ||
|
|
83598956a1 | ||
|
|
0dca661508 | ||
|
|
3312ed72e6 | ||
|
|
f430243b27 | ||
|
|
a8a230c9f7 | ||
|
|
8d62f6ec33 | ||
|
|
6e910a6a16 | ||
|
|
a36198e1a1 | ||
|
|
fafc56bc32 | ||
|
|
8136c85c2a | ||
|
|
3edc8c959d | ||
|
|
e421ab93bc | ||
|
|
8afae1f567 | ||
|
|
b3004a305a | ||
|
|
af83340bc0 | ||
|
|
13009782b3 | ||
|
|
51b5d5e78f | ||
|
|
9ffad404d1 | ||
|
|
282f44e257 | ||
|
|
7804e36b0d | ||
|
|
cc028a4def | ||
|
|
c993077033 | ||
|
|
322e8a183a | ||
|
|
fe3bc5959f | ||
|
|
8bbdd0a734 | ||
|
|
277b98b7cb | ||
|
|
174ecb3fa2 | ||
|
|
174fb1c3f5 | ||
|
|
eab9f59008 | ||
|
|
454a4ac314 | ||
|
|
7632402b6f | ||
|
|
73f1e5af50 | ||
|
|
57e5084ae1 | ||
|
|
5086f13581 | ||
|
|
8b7327f548 | ||
|
|
2add291366 | ||
|
|
5202a6df2b | ||
|
|
3ca77ac8bf | ||
|
|
271a38fc96 | ||
|
|
eebbb9ae2e | ||
|
|
9ea264df46 | ||
|
|
06d1e4ff78 | ||
|
|
dac9a769c5 | ||
|
|
ea05fe1317 | ||
|
|
40e2335976 |
No files matched your search
@@ -1,2 +0,0 @@
|
||||
custom: ["http://afdian.net/a/filecodebox"]
|
||||
|
||||
|
After Width: | Height: | Size: 205 KiB |
|
After Width: | Height: | Size: 679 KiB |
|
After Width: | Height: | Size: 684 KiB |
|
After Width: | Height: | Size: 411 KiB |
|
After Width: | Height: | Size: 431 KiB |
|
After Width: | Height: | Size: 674 KiB |
|
After Width: | Height: | Size: 678 KiB |
|
After Width: | Height: | Size: 219 KiB |
@@ -5,47 +5,50 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
buildx:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ secrets.DOCKER_USERNAME }}/filecodebox
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=raw,value=beta,enable={{is_default_branch}}
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/filecodebox:beta
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -0,0 +1,69 @@
|
||||
# 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程
|
||||
#
|
||||
name: Deploy VitePress site to Pages
|
||||
|
||||
on:
|
||||
# 在针对 `main` 分支的推送上运行。如果你
|
||||
# 使用 `master` 分支作为默认分支,请将其更改为 `master`
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
# 允许你从 Actions 选项卡手动运行此工作流程
|
||||
workflow_dispatch:
|
||||
|
||||
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
|
||||
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# 构建工作
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
|
||||
- uses: pnpm/action-setup@v3
|
||||
with:
|
||||
version: 9
|
||||
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: 'docs/pnpm-lock.yaml'
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
- name: Install dependencies
|
||||
working-directory: docs
|
||||
run: pnpm install
|
||||
- name: Build with VitePress
|
||||
working-directory: docs
|
||||
run: pnpm run docs:build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: docs/.vitepress/dist
|
||||
|
||||
# 部署工作
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
name: Deploy
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -154,3 +154,6 @@ for_test.py
|
||||
data/.env
|
||||
.backup/
|
||||
/cloc-1.64.exe
|
||||
|
||||
# Ignore node_modules
|
||||
node_modules/
|
||||
@@ -1,11 +1,24 @@
|
||||
FROM python:3.9.5-slim-buster
|
||||
LABEL author="Lan"
|
||||
LABEL email="vast@tom.com"
|
||||
LABEL email="xzu@live.com"
|
||||
|
||||
# 将当前目录下的文件复制到容器的 /app 目录
|
||||
COPY . /app
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
RUN echo 'Asia/Shanghai' >/etc/timezone
|
||||
|
||||
# 设置时区为亚洲/上海
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 删除不必要的目录,减少镜像体积
|
||||
RUN rm -rf docs fcb-fronted
|
||||
|
||||
# 安装依赖
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 12345
|
||||
CMD ["python","main.py"]
|
||||
|
||||
# 启动应用
|
||||
CMD ["python", "main.py"]
|
||||
@@ -0,0 +1,140 @@
|
||||
# @Time : 2023/8/15 17:43
|
||||
# @Author : Lan
|
||||
# @File : depends.py
|
||||
# @Software: PyCharm
|
||||
from fastapi import Header, HTTPException, Depends
|
||||
from fastapi.requests import Request
|
||||
import base64
|
||||
import hmac
|
||||
import json
|
||||
import time
|
||||
from core.settings import settings
|
||||
from apps.admin.services import FileService, ConfigService, LocalFileService
|
||||
|
||||
|
||||
def create_token(data: dict, expires_in: int = 3600 * 24) -> str:
|
||||
"""
|
||||
创建JWT token
|
||||
:param data: 数据负载
|
||||
:param expires_in: 过期时间(秒)
|
||||
"""
|
||||
header = base64.b64encode(
|
||||
json.dumps({"alg": "HS256", "typ": "JWT"}).encode()
|
||||
).decode()
|
||||
payload = base64.b64encode(
|
||||
json.dumps({**data, "exp": int(time.time()) + expires_in}).encode()
|
||||
).decode()
|
||||
|
||||
signature = hmac.new(
|
||||
settings.admin_token.encode(), f"{header}.{payload}".encode(), "sha256"
|
||||
).digest()
|
||||
signature = base64.b64encode(signature).decode()
|
||||
|
||||
return f"{header}.{payload}.{signature}"
|
||||
|
||||
|
||||
def verify_token(token: str) -> dict:
|
||||
"""
|
||||
验证JWT token
|
||||
:param token: JWT token
|
||||
:return: 解码后的数据
|
||||
"""
|
||||
try:
|
||||
header_b64, payload_b64, signature_b64 = token.split(".")
|
||||
|
||||
# 验证签名
|
||||
expected_signature = hmac.new(
|
||||
settings.admin_token.encode(),
|
||||
f"{header_b64}.{payload_b64}".encode(),
|
||||
"sha256",
|
||||
).digest()
|
||||
expected_signature_b64 = base64.b64encode(expected_signature).decode()
|
||||
|
||||
if signature_b64 != expected_signature_b64:
|
||||
raise ValueError("无效的签名")
|
||||
|
||||
# 解码payload
|
||||
payload = json.loads(base64.b64decode(payload_b64))
|
||||
|
||||
# 检查是否过期
|
||||
if payload.get("exp", 0) < time.time():
|
||||
raise ValueError("token已过期")
|
||||
|
||||
return payload
|
||||
except Exception as e:
|
||||
raise ValueError(f"token验证失败: {str(e)}")
|
||||
|
||||
|
||||
async def admin_required(
|
||||
authorization: str = Header(default=None), request: Request = None
|
||||
):
|
||||
"""
|
||||
验证管理员权限
|
||||
"""
|
||||
try:
|
||||
if not authorization or not authorization.startswith("Bearer "):
|
||||
is_admin = False
|
||||
else:
|
||||
try:
|
||||
token = authorization.split(" ")[1]
|
||||
payload = verify_token(token)
|
||||
is_admin = payload.get("is_admin", False)
|
||||
except ValueError as e:
|
||||
is_admin = False
|
||||
|
||||
if request.url.path.startswith("/share/"):
|
||||
if not settings.openUpload and not is_admin:
|
||||
raise HTTPException(
|
||||
status_code=403, detail="本站未开启游客上传,如需上传请先登录后台"
|
||||
)
|
||||
else:
|
||||
if not is_admin:
|
||||
raise HTTPException(status_code=401, detail="未授权或授权校验失败")
|
||||
return is_admin
|
||||
except ValueError as e:
|
||||
raise HTTPException(status_code=401, detail=str(e))
|
||||
|
||||
|
||||
async def share_required_login(
|
||||
authorization: str = Header(default=None), request: Request = None
|
||||
):
|
||||
"""
|
||||
验证分享上传权限
|
||||
|
||||
当settings.openUpload为False时,要求用户必须登录并具有管理员权限
|
||||
当settings.openUpload为True时,允许游客上传
|
||||
|
||||
:param authorization: 认证头信息
|
||||
:param request: 请求对象
|
||||
:return: 验证结果
|
||||
"""
|
||||
if not settings.openUpload:
|
||||
try:
|
||||
if not authorization or not authorization.startswith("Bearer "):
|
||||
raise HTTPException(
|
||||
status_code=403, detail="本站未开启游客上传,如需上传请先登录后台"
|
||||
)
|
||||
|
||||
token = authorization.split(" ")[1]
|
||||
try:
|
||||
payload = verify_token(token)
|
||||
if not payload.get("is_admin", False):
|
||||
raise HTTPException(status_code=401, detail="未授权或授权校验失败")
|
||||
except ValueError as e:
|
||||
raise HTTPException(status_code=401, detail=str(e))
|
||||
except Exception as e:
|
||||
raise HTTPException(status_code=401, detail="认证失败:" + str(e))
|
||||
|
||||
return True
|
||||
|
||||
|
||||
async def get_file_service():
|
||||
return FileService()
|
||||
|
||||
|
||||
async def get_config_service():
|
||||
return ConfigService()
|
||||
|
||||
|
||||
async def get_local_file_service():
|
||||
return LocalFileService()
|
||||
@@ -1,19 +0,0 @@
|
||||
# @Time : 2023/8/15 17:43
|
||||
# @Author : Lan
|
||||
# @File : depends.py
|
||||
# @Software: PyCharm
|
||||
from typing import Union
|
||||
|
||||
from fastapi import Header, HTTPException
|
||||
from fastapi.requests import Request
|
||||
from core.settings import settings
|
||||
|
||||
|
||||
async def admin_required(authorization: Union[str, None] = Header(default=None), request: Request = None):
|
||||
is_admin = authorization == str(settings.admin_token)
|
||||
if request.url.path.startswith('/share/'):
|
||||
if not settings.openUpload and not is_admin:
|
||||
raise HTTPException(status_code=403, detail='本站未开启游客上传,如需上传请先登录后台')
|
||||
else:
|
||||
if not is_admin:
|
||||
raise HTTPException(status_code=401, detail='未授权或授权校验失败')
|
||||
@@ -1,5 +0,0 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class IDData(BaseModel):
|
||||
id: int
|
||||
@@ -0,0 +1,30 @@
|
||||
import datetime
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class IDData(BaseModel):
|
||||
id: int
|
||||
|
||||
|
||||
class ShareItem(BaseModel):
|
||||
expire_value: int
|
||||
expire_style: str = "day"
|
||||
filename: str
|
||||
|
||||
|
||||
class DeleteItem(BaseModel):
|
||||
filename: str
|
||||
|
||||
|
||||
class LoginData(BaseModel):
|
||||
password: str
|
||||
|
||||
|
||||
class UpdateFileData(BaseModel):
|
||||
id: int
|
||||
code: Optional[str] = None
|
||||
prefix: Optional[str] = None
|
||||
suffix: Optional[str] = None
|
||||
expired_at: Optional[datetime.datetime] = None
|
||||
expired_count: Optional[int] = None
|
||||
@@ -0,0 +1,142 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
from core.response import APIResponse
|
||||
from core.storage import FileStorageInterface, storages
|
||||
from core.settings import settings
|
||||
from apps.base.models import FileCodes, KeyValue
|
||||
from apps.base.utils import get_expire_info, get_file_path_name
|
||||
from fastapi import HTTPException
|
||||
from core.settings import data_root
|
||||
|
||||
|
||||
class FileService:
|
||||
def __init__(self):
|
||||
self.file_storage: FileStorageInterface = storages[settings.file_storage]()
|
||||
|
||||
async def delete_file(self, file_id: int):
|
||||
file_code = await FileCodes.get(id=file_id)
|
||||
await self.file_storage.delete_file(file_code)
|
||||
await file_code.delete()
|
||||
|
||||
async def list_files(self, page: int, size: int, keyword: str = ""):
|
||||
offset = (page - 1) * size
|
||||
files = (
|
||||
await FileCodes.filter(prefix__icontains=keyword).limit(size).offset(offset)
|
||||
)
|
||||
total = await FileCodes.filter(prefix__icontains=keyword).count()
|
||||
return files, total
|
||||
|
||||
async def download_file(self, file_id: int):
|
||||
file_code = await FileCodes.filter(id=file_id).first()
|
||||
if not file_code:
|
||||
raise HTTPException(status_code=404, detail="文件不存在")
|
||||
if file_code.text:
|
||||
return APIResponse(detail=file_code.text)
|
||||
else:
|
||||
return await self.file_storage.get_file_response(file_code)
|
||||
|
||||
async def share_local_file(self, item):
|
||||
local_file = LocalFileClass(item.filename)
|
||||
if not await local_file.exists():
|
||||
raise HTTPException(status_code=404, detail="文件不存在")
|
||||
|
||||
text = await local_file.read()
|
||||
expired_at, expired_count, used_count, code = await get_expire_info(
|
||||
item.expire_value, item.expire_style
|
||||
)
|
||||
path, suffix, prefix, uuid_file_name, save_path = await get_file_path_name(item)
|
||||
|
||||
await self.file_storage.save_file(text, save_path)
|
||||
|
||||
await FileCodes.create(
|
||||
code=code,
|
||||
prefix=prefix,
|
||||
suffix=suffix,
|
||||
uuid_file_name=uuid_file_name,
|
||||
file_path=path,
|
||||
size=local_file.size,
|
||||
expired_at=expired_at,
|
||||
expired_count=expired_count,
|
||||
used_count=used_count,
|
||||
)
|
||||
|
||||
return {
|
||||
"code": code,
|
||||
"name": local_file.file,
|
||||
}
|
||||
|
||||
|
||||
class ConfigService:
|
||||
def get_config(self):
|
||||
return settings.items()
|
||||
|
||||
async def update_config(self, data: dict):
|
||||
admin_token = data.get("admin_token")
|
||||
if admin_token is None or admin_token == "":
|
||||
raise HTTPException(status_code=400, detail="管理员密码不能为空")
|
||||
|
||||
for key, value in data.items():
|
||||
if key not in settings.default_config:
|
||||
continue
|
||||
if key in [
|
||||
"errorCount",
|
||||
"errorMinute",
|
||||
"max_save_seconds",
|
||||
"onedrive_proxy",
|
||||
"openUpload",
|
||||
"port",
|
||||
"s3_proxy",
|
||||
"uploadCount",
|
||||
"uploadMinute",
|
||||
"uploadSize",
|
||||
]:
|
||||
data[key] = int(value)
|
||||
elif key in ["opacity"]:
|
||||
data[key] = float(value)
|
||||
else:
|
||||
data[key] = value
|
||||
|
||||
await KeyValue.filter(key="settings").update(value=data)
|
||||
for k, v in data.items():
|
||||
settings.__setattr__(k, v)
|
||||
|
||||
|
||||
class LocalFileService:
|
||||
async def list_files(self):
|
||||
files = []
|
||||
if not os.path.exists(data_root / "local"):
|
||||
os.makedirs(data_root / "local")
|
||||
for file in os.listdir(data_root / "local"):
|
||||
files.append(LocalFileClass(file))
|
||||
return files
|
||||
|
||||
async def delete_file(self, filename: str):
|
||||
file = LocalFileClass(filename)
|
||||
if await file.exists():
|
||||
await file.delete()
|
||||
return "删除成功"
|
||||
raise HTTPException(status_code=404, detail="文件不存在")
|
||||
|
||||
|
||||
class LocalFileClass:
|
||||
def __init__(self, file):
|
||||
self.file = file
|
||||
self.path = data_root / "local" / file
|
||||
self.ctime = time.strftime(
|
||||
"%Y-%m-%d %H:%M:%S", time.localtime(os.path.getctime(self.path))
|
||||
)
|
||||
self.size = os.path.getsize(self.path)
|
||||
|
||||
async def read(self):
|
||||
return open(self.path, "rb")
|
||||
|
||||
async def write(self, data):
|
||||
with open(self.path, "w") as f:
|
||||
f.write(data)
|
||||
|
||||
async def delete(self):
|
||||
os.remove(self.path)
|
||||
|
||||
async def exists(self):
|
||||
return os.path.exists(self.path)
|
||||
@@ -2,81 +2,175 @@
|
||||
# @Author : Lan
|
||||
# @File : views.py
|
||||
# @Software: PyCharm
|
||||
import math
|
||||
import datetime
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from apps.admin.depends import admin_required
|
||||
from apps.admin.pydantics import IDData
|
||||
from apps.base.models import FileCodes, KeyValue
|
||||
from core.response import APIResponse
|
||||
from core.settings import settings
|
||||
from core.storage import file_storage
|
||||
|
||||
admin_api = APIRouter(
|
||||
prefix='/admin',
|
||||
tags=['管理'],
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from apps.admin.services import FileService, ConfigService, LocalFileService
|
||||
from apps.admin.dependencies import (
|
||||
admin_required,
|
||||
get_file_service,
|
||||
get_config_service,
|
||||
get_local_file_service,
|
||||
)
|
||||
from apps.admin.schemas import IDData, ShareItem, DeleteItem, LoginData, UpdateFileData
|
||||
from core.response import APIResponse
|
||||
from apps.base.models import FileCodes, KeyValue
|
||||
from apps.admin.dependencies import create_token
|
||||
from core.settings import settings
|
||||
|
||||
admin_api = APIRouter(prefix="/admin", tags=["管理"])
|
||||
|
||||
|
||||
@admin_api.post('/login', dependencies=[Depends(admin_required)])
|
||||
async def login():
|
||||
@admin_api.post("/login")
|
||||
async def login(data: LoginData):
|
||||
# 验证管理员密码
|
||||
if data.password != settings.admin_token:
|
||||
raise HTTPException(status_code=401, detail="密码错误")
|
||||
|
||||
# 生成包含管理员身份的token
|
||||
token = create_token({"is_admin": True})
|
||||
return APIResponse(detail={"token": token, "token_type": "Bearer"})
|
||||
|
||||
|
||||
@admin_api.get("/dashboard")
|
||||
async def dashboard(admin: bool = Depends(admin_required)):
|
||||
all_codes = await FileCodes.all()
|
||||
all_size = str(sum([code.size for code in all_codes]))
|
||||
sys_start = await KeyValue.filter(key="sys_start").first()
|
||||
# 获取当前日期时间
|
||||
now = datetime.datetime.now()
|
||||
today_start = now.replace(hour=0, minute=0, second=0, microsecond=0)
|
||||
yesterday_start = today_start - datetime.timedelta(days=1)
|
||||
yesterday_end = today_start - datetime.timedelta(microseconds=1)
|
||||
# 统计昨天一整天的记录数(从昨天0点到23:59:59)
|
||||
yesterday_codes = FileCodes.filter(
|
||||
created_at__gte=yesterday_start, created_at__lte=yesterday_end
|
||||
)
|
||||
# 统计今天到现在的记录数(从今天0点到现在)
|
||||
today_codes = FileCodes.filter(created_at__gte=today_start)
|
||||
return APIResponse(
|
||||
detail={
|
||||
"totalFiles": len(all_codes),
|
||||
"storageUsed": all_size,
|
||||
"sysUptime": sys_start.value,
|
||||
"yesterdayCount": await yesterday_codes.count(),
|
||||
"yesterdaySize": str(sum([code.size for code in await yesterday_codes])),
|
||||
"todayCount": await today_codes.count(),
|
||||
"todaySize": str(sum([code.size for code in await today_codes])),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@admin_api.delete("/file/delete")
|
||||
async def file_delete(
|
||||
data: IDData,
|
||||
file_service: FileService = Depends(get_file_service),
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
await file_service.delete_file(data.id)
|
||||
return APIResponse()
|
||||
|
||||
|
||||
@admin_api.delete('/file/delete', dependencies=[Depends(admin_required)])
|
||||
async def file_delete(data: IDData):
|
||||
file_code = await FileCodes.get(id=data.id)
|
||||
await file_storage.delete_file(file_code)
|
||||
await file_code.delete()
|
||||
@admin_api.get("/file/list")
|
||||
async def file_list(
|
||||
page: int = 1,
|
||||
size: int = 10,
|
||||
keyword: str = "",
|
||||
file_service: FileService = Depends(get_file_service),
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
files, total = await file_service.list_files(page, size, keyword)
|
||||
return APIResponse(
|
||||
detail={
|
||||
"page": page,
|
||||
"size": size,
|
||||
"data": files,
|
||||
"total": total,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@admin_api.get("/config/get")
|
||||
async def get_config(
|
||||
config_service: ConfigService = Depends(get_config_service),
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
return APIResponse(detail=config_service.get_config())
|
||||
|
||||
|
||||
@admin_api.patch("/config/update")
|
||||
async def update_config(
|
||||
data: dict,
|
||||
config_service: ConfigService = Depends(get_config_service),
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
data.pop("themesChoices")
|
||||
await config_service.update_config(data)
|
||||
return APIResponse()
|
||||
|
||||
|
||||
@admin_api.get('/file/list', dependencies=[Depends(admin_required)])
|
||||
async def file_list(page: float = 1, size: int = 10):
|
||||
return APIResponse(detail={
|
||||
'page': page,
|
||||
'size': size,
|
||||
'data': await FileCodes.all().limit(size).offset((math.ceil(page) - 1) * size),
|
||||
'total': await FileCodes.all().count(),
|
||||
})
|
||||
@admin_api.get("/file/download")
|
||||
async def file_download(
|
||||
id: int,
|
||||
file_service: FileService = Depends(get_file_service),
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
file_content = await file_service.download_file(id)
|
||||
return file_content
|
||||
|
||||
|
||||
@admin_api.get('/config/get', dependencies=[Depends(admin_required)])
|
||||
async def get_config():
|
||||
return APIResponse(detail=settings.items())
|
||||
@admin_api.get("/local/lists")
|
||||
async def get_local_lists(
|
||||
local_file_service: LocalFileService = Depends(get_local_file_service),
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
files = await local_file_service.list_files()
|
||||
return APIResponse(detail=files)
|
||||
|
||||
|
||||
@admin_api.patch('/config/update', dependencies=[Depends(admin_required)])
|
||||
async def update_config(data: dict):
|
||||
admin_token = data.get('admin_token')
|
||||
if admin_token is None or admin_token == '':
|
||||
return APIResponse(code=400, detail='管理员密码不能为空')
|
||||
await KeyValue.filter(key='settings').update(value=data)
|
||||
for k, v in data.items():
|
||||
settings.__setattr__(k, v)
|
||||
return APIResponse()
|
||||
@admin_api.delete("/local/delete")
|
||||
async def delete_local_file(
|
||||
item: DeleteItem,
|
||||
local_file_service: LocalFileService = Depends(get_local_file_service),
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
result = await local_file_service.delete_file(item.filename)
|
||||
return APIResponse(detail=result)
|
||||
|
||||
|
||||
# 根据code获取文件
|
||||
async def get_file_by_id(id):
|
||||
# 查询文件
|
||||
file_code = await FileCodes.filter(id=id).first()
|
||||
# 检查文件是否存在
|
||||
@admin_api.post("/local/share")
|
||||
async def share_local_file(
|
||||
item: ShareItem,
|
||||
file_service: FileService = Depends(get_file_service),
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
share_info = await file_service.share_local_file(item)
|
||||
return APIResponse(detail=share_info)
|
||||
|
||||
|
||||
@admin_api.patch("/file/update")
|
||||
async def update_file(
|
||||
data: UpdateFileData,
|
||||
admin: bool = Depends(admin_required),
|
||||
):
|
||||
file_code = await FileCodes.filter(id=data.id).first()
|
||||
if not file_code:
|
||||
return False, '文件不存在'
|
||||
return True, file_code
|
||||
raise HTTPException(status_code=404, detail="文件不存在")
|
||||
update_data = {}
|
||||
|
||||
if data.code is not None and data.code != file_code.code:
|
||||
# 判断code是否存在
|
||||
if await FileCodes.filter(code=data.code).first():
|
||||
raise HTTPException(status_code=400, detail="code已存在")
|
||||
update_data["code"] = data.code
|
||||
if data.prefix is not None and data.prefix != file_code.prefix:
|
||||
update_data["prefix"] = data.prefix
|
||||
if data.suffix is not None and data.suffix != file_code.suffix:
|
||||
update_data["suffix"] = data.suffix
|
||||
if data.expired_at is not None and data.expired_at != file_code.expired_at:
|
||||
update_data["expired_at"] = data.expired_at
|
||||
if data.expired_count is not None and data.expired_count != file_code.expired_count:
|
||||
update_data["expired_count"] = data.expired_count
|
||||
|
||||
@admin_api.get('/file/download', dependencies=[Depends(admin_required)])
|
||||
async def file_download(id: int):
|
||||
has, file_code = await get_file_by_id(id)
|
||||
# 检查文件是否存在
|
||||
if not has:
|
||||
# 返回API响应
|
||||
return APIResponse(code=404, detail='文件不存在')
|
||||
# 如果文件是文本,返回文本内容,否则返回文件响应
|
||||
if file_code.text:
|
||||
return APIResponse(detail=file_code.text)
|
||||
else:
|
||||
return await file_storage.get_file_response(file_code)
|
||||
await file_code.update_from_dict(update_data).save()
|
||||
return APIResponse(detail="更新成功")
|
||||
@@ -0,0 +1,45 @@
|
||||
from typing import Dict, Union
|
||||
from datetime import datetime, timedelta
|
||||
from fastapi import HTTPException, Request
|
||||
|
||||
|
||||
class IPRateLimit:
|
||||
def __init__(self, count: int, minutes: int):
|
||||
self.ips: Dict[str, Dict[str, Union[int, datetime]]] = {}
|
||||
self.count = count
|
||||
self.minutes = minutes
|
||||
|
||||
def check_ip(self, ip: str) -> bool:
|
||||
if ip in self.ips:
|
||||
ip_info = self.ips[ip]
|
||||
if ip_info["count"] >= self.count:
|
||||
if ip_info["time"] + timedelta(minutes=self.minutes) > datetime.now():
|
||||
return False
|
||||
self.ips.pop(ip)
|
||||
return True
|
||||
|
||||
def add_ip(self, ip: str) -> int:
|
||||
ip_info = self.ips.get(ip, {"count": 0, "time": datetime.now()})
|
||||
ip_info["count"] += 1
|
||||
ip_info["time"] = datetime.now()
|
||||
self.ips[ip] = ip_info
|
||||
return ip_info["count"]
|
||||
|
||||
async def remove_expired_ip(self) -> None:
|
||||
now = datetime.now()
|
||||
expiration = timedelta(minutes=self.minutes)
|
||||
self.ips = {
|
||||
ip: info
|
||||
for ip, info in self.ips.items()
|
||||
if info["time"] + expiration >= now
|
||||
}
|
||||
|
||||
def __call__(self, request: Request) -> str:
|
||||
ip = (
|
||||
request.headers.get("X-Real-IP")
|
||||
or request.headers.get("X-Forwarded-For")
|
||||
or request.client.host
|
||||
)
|
||||
if not self.check_ip(ip):
|
||||
raise HTTPException(status_code=423, detail="请求次数过多,请稍后再试")
|
||||
return ip
|
||||
@@ -1,45 +0,0 @@
|
||||
# @Time : 2023/8/14 12:20
|
||||
# @Author : Lan
|
||||
# @File : depends.py
|
||||
# @Software: PyCharm
|
||||
from typing import Union
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from fastapi import Header, HTTPException, Request
|
||||
|
||||
from core.response import APIResponse
|
||||
|
||||
|
||||
class IPRateLimit:
|
||||
def __init__(self, count, minutes):
|
||||
self.ips = {}
|
||||
self.count = count
|
||||
self.minutes = minutes
|
||||
|
||||
def check_ip(self, ip):
|
||||
# 检查ip是否被禁止
|
||||
if ip in self.ips:
|
||||
if self.ips[ip]['count'] >= self.count:
|
||||
if self.ips[ip]['time'] + timedelta(minutes=self.minutes) > datetime.now():
|
||||
return False
|
||||
else:
|
||||
self.ips.pop(ip)
|
||||
return True
|
||||
|
||||
def add_ip(self, ip):
|
||||
ip_info = self.ips.get(ip, {'count': 0, 'time': datetime.now()})
|
||||
ip_info['count'] += 1
|
||||
ip_info['time'] = datetime.now()
|
||||
self.ips[ip] = ip_info
|
||||
return ip_info['count']
|
||||
|
||||
async def remove_expired_ip(self):
|
||||
for ip in list(self.ips.keys()):
|
||||
if self.ips[ip]['time'] + timedelta(minutes=self.minutes) < datetime.now():
|
||||
self.ips.pop(ip)
|
||||
|
||||
def __call__(self, request: Request):
|
||||
ip = request.headers.get('X-Real-IP', request.headers.get('X-Forwarded-For', request.client.host))
|
||||
if not self.check_ip(ip):
|
||||
raise HTTPException(status_code=423, detail=f"请求次数过多,请稍后再试")
|
||||
return ip
|
||||
@@ -0,0 +1,52 @@
|
||||
from tortoise import connections
|
||||
|
||||
|
||||
async def create_file_codes_table():
|
||||
conn = connections.get("default")
|
||||
await conn.execute_script(
|
||||
"""
|
||||
CREATE TABLE IF NOT EXISTS filecodes
|
||||
(
|
||||
id INTEGER not null
|
||||
primary key autoincrement,
|
||||
code VARCHAR(255) not null
|
||||
unique,
|
||||
prefix VARCHAR(255) default '' not null,
|
||||
suffix VARCHAR(255) default '' not null,
|
||||
uuid_file_name VARCHAR(255),
|
||||
file_path VARCHAR(255),
|
||||
size INT default 0 not null,
|
||||
text TEXT,
|
||||
expired_at TIMESTAMP,
|
||||
expired_count INT default 0 not null,
|
||||
used_count INT default 0 not null,
|
||||
created_at TIMESTAMP default CURRENT_TIMESTAMP not null
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_filecodes_code_1c7ee7
|
||||
on filecodes (code);
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
async def create_key_value_table():
|
||||
conn = connections.get("default")
|
||||
await conn.execute_script(
|
||||
"""
|
||||
CREATE TABLE IF NOT EXISTS keyvalue
|
||||
(
|
||||
id INTEGER not null
|
||||
primary key autoincrement,
|
||||
key VARCHAR(255) not null
|
||||
unique,
|
||||
value JSON,
|
||||
created_at TIMESTAMP default CURRENT_TIMESTAMP not null
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_keyvalue_key_eab890
|
||||
on keyvalue (key);
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
async def migrate():
|
||||
await create_file_codes_table()
|
||||
await create_key_value_table()
|
||||
@@ -0,0 +1,28 @@
|
||||
from tortoise import connections
|
||||
|
||||
|
||||
async def create_upload_chunk_and_update_file_codes_table():
|
||||
conn = connections.get("default")
|
||||
await conn.execute_script(
|
||||
"""
|
||||
ALTER TABLE "filecodes" ADD "file_hash" VARCHAR(128);
|
||||
ALTER TABLE "filecodes" ADD "is_chunked" BOOL NOT NULL DEFAULT False;
|
||||
ALTER TABLE "filecodes" ADD "upload_id" VARCHAR(128);
|
||||
CREATE TABLE "uploadchunk" (
|
||||
id INTEGER not null primary key autoincrement,
|
||||
"upload_id" VARCHAR(36) NOT NULL,
|
||||
"chunk_index" INT NOT NULL,
|
||||
"chunk_hash" VARCHAR(128) NOT NULL,
|
||||
"total_chunks" INT NOT NULL,
|
||||
"file_size" BIGINT NOT NULL,
|
||||
"chunk_size" INT NOT NULL,
|
||||
"created_at" TIMESTAMPTZ NOT NULL,
|
||||
"file_name" VARCHAR(255) NOT NULL,
|
||||
"completed" BOOL NOT NULL
|
||||
);
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
async def migrate():
|
||||
await create_upload_chunk_and_update_file_codes_table()
|
||||
@@ -2,49 +2,68 @@
|
||||
# @Author : Lan
|
||||
# @File : models.py
|
||||
# @Software: PyCharm
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from tortoise import fields
|
||||
from tortoise.models import Model
|
||||
from tortoise.contrib.pydantic import pydantic_model_creator
|
||||
|
||||
from tortoise import fields, models
|
||||
from datetime import datetime
|
||||
from core.utils import get_now
|
||||
|
||||
|
||||
class FileCodes(Model):
|
||||
id: Optional[int] = fields.IntField(pk=True)
|
||||
code: Optional[int] = fields.CharField(description='分享码', max_length=255, index=True, unique=True)
|
||||
prefix: Optional[str] = fields.CharField(max_length=255, description='前缀', default='')
|
||||
suffix: Optional[str] = fields.CharField(max_length=255, description='后缀', default='')
|
||||
uuid_file_name: Optional[str] = fields.CharField(max_length=255, description='uuid文件名', null=True)
|
||||
file_path: Optional[str] = fields.CharField(max_length=255, description='文件路径', null=True)
|
||||
size: Optional[int] = fields.IntField(description='文件大小', default=0)
|
||||
text: Optional[str] = fields.TextField(description='文本内容', null=True)
|
||||
expired_at: Optional[datetime] = fields.DatetimeField(null=True, description='过期时间')
|
||||
expired_count: Optional[int] = fields.IntField(description='可用次数', default=0)
|
||||
used_count: Optional[int] = fields.IntField(description='已用次数', default=0)
|
||||
created_at: Optional[datetime] = fields.DatetimeField(auto_now_add=True, description='创建时间')
|
||||
class FileCodes(models.Model):
|
||||
id = fields.IntField(pk=True)
|
||||
code = fields.CharField(max_length=255, unique=True, index=True)
|
||||
prefix = fields.CharField(max_length=255, default="")
|
||||
suffix = fields.CharField(max_length=255, default="")
|
||||
uuid_file_name = fields.CharField(max_length=255, null=True)
|
||||
file_path = fields.CharField(max_length=255, null=True)
|
||||
size = fields.IntField(default=0)
|
||||
text = fields.TextField(null=True)
|
||||
expired_at = fields.DatetimeField(null=True)
|
||||
expired_count = fields.IntField(default=0)
|
||||
used_count = fields.IntField(default=0)
|
||||
created_at = fields.DatetimeField(auto_now_add=True)
|
||||
file_hash = fields.CharField(max_length=64, null=True)
|
||||
is_chunked = fields.BooleanField(default=False)
|
||||
upload_id = fields.CharField(max_length=36, null=True)
|
||||
|
||||
async def is_expired(self):
|
||||
# 按时间
|
||||
if self.expired_at is None:
|
||||
return False
|
||||
if self.expired_at and self.expired_count < 0:
|
||||
return self.expired_at < await get_now()
|
||||
# 按次数
|
||||
else:
|
||||
return self.expired_count <= 0
|
||||
return self.expired_count <= 0
|
||||
|
||||
async def get_file_path(self):
|
||||
return f"{self.file_path}/{self.uuid_file_name}"
|
||||
|
||||
|
||||
class UploadChunk(models.Model):
|
||||
id = fields.IntField(pk=True)
|
||||
upload_id = fields.CharField(max_length=36, index=True)
|
||||
chunk_index = fields.IntField()
|
||||
chunk_hash = fields.CharField(max_length=64)
|
||||
total_chunks = fields.IntField()
|
||||
file_size = fields.BigIntField()
|
||||
chunk_size = fields.IntField()
|
||||
file_name = fields.CharField(max_length=255)
|
||||
created_at = fields.DatetimeField(auto_now_add=True)
|
||||
completed = fields.BooleanField(default=False)
|
||||
|
||||
|
||||
class KeyValue(Model):
|
||||
id: Optional[int] = fields.IntField(pk=True)
|
||||
key: Optional[str] = fields.CharField(max_length=255, description='键', index=True, unique=True)
|
||||
value: Optional[str] = fields.JSONField(description='值', null=True)
|
||||
created_at: Optional[datetime] = fields.DatetimeField(auto_now_add=True, description='创建时间')
|
||||
key: Optional[str] = fields.CharField(
|
||||
max_length=255, description="键", index=True, unique=True
|
||||
)
|
||||
value: Optional[str] = fields.JSONField(description="值", null=True)
|
||||
created_at: Optional[datetime] = fields.DatetimeField(
|
||||
auto_now_add=True, description="创建时间"
|
||||
)
|
||||
|
||||
|
||||
file_codes_pydantic = pydantic_model_creator(FileCodes, name='FileCodes')
|
||||
file_codes_pydantic = pydantic_model_creator(FileCodes, name="FileCodes")
|
||||
upload_chunk_pydantic = pydantic_model_creator(UploadChunk, name="UploadChunk")
|
||||
key_value_pydantic = pydantic_model_creator(KeyValue, name="KeyValue")
|
||||
@@ -1,5 +0,0 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class SelectFileModel(BaseModel):
|
||||
code: str
|
||||
@@ -0,0 +1,17 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class SelectFileModel(BaseModel):
|
||||
code: str
|
||||
|
||||
|
||||
class InitChunkUploadModel(BaseModel):
|
||||
file_name: str
|
||||
chunk_size: int = 5 * 1024 * 1024
|
||||
file_size: int
|
||||
file_hash: str
|
||||
|
||||
|
||||
class CompleteUploadModel(BaseModel):
|
||||
expire_value: int
|
||||
expire_style: str
|
||||
@@ -1,92 +1,114 @@
|
||||
# @Time : 2023/8/14 01:10
|
||||
# @Author : Lan
|
||||
# @File : utils.py
|
||||
# @Software: PyCharm
|
||||
import datetime
|
||||
import uuid
|
||||
import hashlib
|
||||
import os
|
||||
from fastapi import UploadFile, HTTPException
|
||||
import uuid
|
||||
from urllib.parse import unquote
|
||||
|
||||
from apps.base.depends import IPRateLimit
|
||||
from fastapi import UploadFile, HTTPException
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from apps.base.dependencies import IPRateLimit
|
||||
from apps.base.models import FileCodes
|
||||
from core.settings import settings
|
||||
from core.utils import get_random_num, get_random_string, max_save_times_desc
|
||||
from core.utils import get_random_num, get_random_string, max_save_times_desc, sanitize_filename
|
||||
|
||||
|
||||
async def get_file_path_name(file: UploadFile):
|
||||
"""
|
||||
获取文件路径和文件名
|
||||
:param file:
|
||||
:return: {
|
||||
'path': 'share/data/2021/08/13',
|
||||
'suffix': '.jpg',
|
||||
'prefix': 'test',
|
||||
'file_uuid': '44a83bbd70e04c8aa7fd93bfd8c88249',
|
||||
'uuid_file_name': '44a83bbd70e04c8aa7fd93bfd8c88249.jpg',
|
||||
'save_path': 'share/data/2021/08/13/44a83bbd70e04c8aa7fd93bfd8c88249.jpg'
|
||||
}
|
||||
"""
|
||||
async def get_file_path_name(file: UploadFile) -> Tuple[str, str, str, str, str]:
|
||||
"""获取文件路径和文件名"""
|
||||
today = datetime.datetime.now()
|
||||
path = f"share/data/{today.strftime('%Y/%m/%d')}"
|
||||
prefix, suffix = os.path.splitext(file.filename)
|
||||
file_uuid = f"{uuid.uuid4().hex}"
|
||||
uuid_file_name = f"{file_uuid}{suffix}"
|
||||
save_path = f"{path}/{uuid_file_name}"
|
||||
return path, suffix, prefix, uuid_file_name, save_path
|
||||
storage_path = settings.storage_path.strip("/") # 移除开头和结尾的斜杠
|
||||
file_uuid = uuid.uuid4().hex
|
||||
# 一些客户端对非ASCII字符会进行编码,需要解码
|
||||
filename = await sanitize_filename(unquote(file.filename))
|
||||
# 使用 UUID 作为子目录名
|
||||
base_path = f"share/data/{today.strftime('%Y/%m/%d')}/{file_uuid}"
|
||||
# 如果设置了存储路径,将其添加到基础路径中
|
||||
path = f"{storage_path}/{base_path}" if storage_path else base_path
|
||||
prefix, suffix = os.path.splitext(filename)
|
||||
# 保持原始文件名
|
||||
save_path = f"{path}/{filename}"
|
||||
return path, suffix, prefix, filename, save_path
|
||||
|
||||
|
||||
async def get_expire_info(expire_value: int, expire_style: str):
|
||||
"""
|
||||
获取过期信息
|
||||
:param expire_value:
|
||||
:param expire_style:
|
||||
:return: expired_at 过期时间, expired_count 可用次数, used_count 已用次数, code 随机码
|
||||
"""
|
||||
expired_count, used_count, now, code = -1, 0, datetime.datetime.now(), None
|
||||
if settings.max_save_seconds > 0:
|
||||
max_timedelta = datetime.timedelta(seconds=settings.max_save_seconds)
|
||||
detail = await max_save_times_desc(settings.max_save_seconds)
|
||||
detail = f'保存时间超过限制,{detail[0]}'
|
||||
else:
|
||||
max_timedelta = datetime.timedelta(days=7)
|
||||
detail = '保存时间超过限制,最长保存时间:7天'
|
||||
if expire_style == 'day':
|
||||
if datetime.timedelta(days=expire_value) > max_timedelta:
|
||||
async def get_chunk_file_path_name(file_name: str, upload_id: str) -> Tuple[str, str, str, str, str]:
|
||||
"""获取切片文件的路径和文件名"""
|
||||
today = datetime.datetime.now()
|
||||
storage_path = settings.storage_path.strip("/") # 移除开头和结尾的斜杠
|
||||
base_path = f"share/data/{today.strftime('%Y/%m/%d')}/{upload_id}"
|
||||
path = f"{storage_path}/{base_path}" if storage_path else base_path
|
||||
prefix, suffix = os.path.splitext(file_name)
|
||||
save_path = f"{path}/{prefix}{suffix}"
|
||||
return path, suffix, prefix, file_name, save_path
|
||||
|
||||
|
||||
async def get_expire_info(expire_value: int, expire_style: str) -> Tuple[Optional[datetime.datetime], int, int, str]:
|
||||
"""获取过期信息"""
|
||||
expired_count, used_count = -1, 0
|
||||
now = datetime.datetime.now()
|
||||
code = None
|
||||
|
||||
max_timedelta = (
|
||||
datetime.timedelta(seconds=settings.max_save_seconds)
|
||||
if settings.max_save_seconds > 0
|
||||
else datetime.timedelta(days=7)
|
||||
)
|
||||
detail = (
|
||||
await max_save_times_desc(settings.max_save_seconds)
|
||||
if settings.max_save_seconds > 0
|
||||
else "7天"
|
||||
)
|
||||
detail = f"限制最长时间为 {detail[0]},可换用其他方式"
|
||||
|
||||
expire_styles = {
|
||||
"day": lambda: now + datetime.timedelta(days=expire_value),
|
||||
"hour": lambda: now + datetime.timedelta(hours=expire_value),
|
||||
"minute": lambda: now + datetime.timedelta(minutes=expire_value),
|
||||
"count": lambda: (now + datetime.timedelta(days=1), expire_value),
|
||||
"forever": lambda: (None, None), # 修改这里
|
||||
}
|
||||
|
||||
if expire_style in expire_styles:
|
||||
result = expire_styles[expire_style]()
|
||||
if isinstance(result, tuple):
|
||||
expired_at, extra = result
|
||||
if expire_style == "count":
|
||||
expired_count = extra
|
||||
elif expire_style == "forever":
|
||||
code = await get_random_code(style="string") # 移动到这里
|
||||
else:
|
||||
expired_at = result
|
||||
if expired_at and expired_at - now > max_timedelta:
|
||||
raise HTTPException(status_code=403, detail=detail)
|
||||
expired_at = now + datetime.timedelta(days=expire_value)
|
||||
elif expire_style == 'hour':
|
||||
if datetime.timedelta(hours=expire_value) > max_timedelta:
|
||||
raise HTTPException(status_code=403, detail=detail)
|
||||
expired_at = now + datetime.timedelta(hours=expire_value)
|
||||
elif expire_style == 'minute':
|
||||
if datetime.timedelta(minutes=expire_value) > max_timedelta:
|
||||
raise HTTPException(status_code=403, detail=detail)
|
||||
expired_at = now + datetime.timedelta(minutes=expire_value)
|
||||
elif expire_style == 'count':
|
||||
expired_at = now + datetime.timedelta(days=1)
|
||||
expired_count = expire_value
|
||||
elif expire_style == 'forever':
|
||||
expired_at = None
|
||||
code = await get_random_code(style='string')
|
||||
else:
|
||||
expired_at = now + datetime.timedelta(days=1)
|
||||
|
||||
if not code:
|
||||
code = await get_random_code()
|
||||
|
||||
return expired_at, expired_count, used_count, code
|
||||
|
||||
|
||||
async def get_random_code(style='num'):
|
||||
"""
|
||||
获取随机字符串
|
||||
:return:
|
||||
"""
|
||||
async def get_random_code(style="num") -> str:
|
||||
"""获取随机字符串"""
|
||||
while True:
|
||||
code = await get_random_num() if style == 'num' else await get_random_string()
|
||||
code = await get_random_num() if style == "num" else await get_random_string()
|
||||
if not await FileCodes.filter(code=code).exists():
|
||||
return code
|
||||
|
||||
|
||||
# 错误IP限制器
|
||||
error_ip_limit = IPRateLimit(count=settings.errorCount, minutes=settings.errorMinute)
|
||||
# 上传文件限制器
|
||||
upload_ip_limit = IPRateLimit(count=settings.uploadCount, minutes=settings.errorMinute)
|
||||
async def calculate_file_hash(file: UploadFile, chunk_size=1024 * 1024) -> str:
|
||||
sha = hashlib.sha256()
|
||||
await file.seek(0)
|
||||
while True:
|
||||
chunk = await file.read(chunk_size)
|
||||
if not chunk:
|
||||
break
|
||||
sha.update(chunk)
|
||||
await file.seek(0)
|
||||
return sha.hexdigest()
|
||||
|
||||
|
||||
ip_limit = {
|
||||
"error": IPRateLimit(count=settings.uploadCount, minutes=settings.errorMinute),
|
||||
"upload": IPRateLimit(count=settings.errorCount, minutes=settings.errorMinute),
|
||||
}
|
||||
@@ -1,64 +1,76 @@
|
||||
# @Time : 2023/8/14 03:59
|
||||
# @Author : Lan
|
||||
# @File : views.py
|
||||
# @Software: PyCharm
|
||||
# 导入所需的库和模块
|
||||
import hashlib
|
||||
import uuid
|
||||
|
||||
from fastapi import APIRouter, Form, UploadFile, File, Depends, HTTPException
|
||||
from apps.admin.depends import admin_required
|
||||
from apps.base.models import FileCodes
|
||||
from apps.base.pydantics import SelectFileModel
|
||||
from apps.base.utils import get_expire_info, get_file_path_name, error_ip_limit, upload_ip_limit
|
||||
from starlette import status
|
||||
|
||||
from apps.admin.dependencies import share_required_login
|
||||
from apps.base.models import FileCodes, UploadChunk
|
||||
from apps.base.schemas import SelectFileModel, InitChunkUploadModel, CompleteUploadModel
|
||||
from apps.base.utils import get_expire_info, get_file_path_name, ip_limit, get_chunk_file_path_name
|
||||
from core.response import APIResponse
|
||||
from core.settings import settings
|
||||
from core.storage import file_storage
|
||||
from core.storage import storages, FileStorageInterface
|
||||
from core.utils import get_select_token
|
||||
|
||||
# 创建一个API路由
|
||||
share_api = APIRouter(
|
||||
prefix='/share', # 路由前缀
|
||||
tags=['分享'], # 标签
|
||||
)
|
||||
share_api = APIRouter(prefix="/share", tags=["分享"])
|
||||
|
||||
|
||||
# 分享文本的API
|
||||
@share_api.post('/text/', dependencies=[Depends(admin_required)])
|
||||
async def share_text(text: str = Form(...), expire_value: int = Form(default=1, gt=0), expire_style: str = Form(default='day'), ip: str = Depends(upload_ip_limit)):
|
||||
# 获取过期信息
|
||||
expired_at, expired_count, used_count, code = await get_expire_info(expire_value, expire_style)
|
||||
# 创建一个新的FileCodes实例
|
||||
await FileCodes.create(
|
||||
async def validate_file_size(file: UploadFile, max_size: int):
|
||||
if file.size > max_size:
|
||||
max_size_mb = max_size / (1024 * 1024)
|
||||
raise HTTPException(
|
||||
status_code=403, detail=f"大小超过限制,最大为{max_size_mb:.2f} MB"
|
||||
)
|
||||
|
||||
|
||||
async def create_file_code(code, **kwargs):
|
||||
return await FileCodes.create(code=code, **kwargs)
|
||||
|
||||
|
||||
@share_api.post("/text/", dependencies=[Depends(share_required_login)])
|
||||
async def share_text(
|
||||
text: str = Form(...),
|
||||
expire_value: int = Form(default=1, gt=0),
|
||||
expire_style: str = Form(default="day"),
|
||||
ip: str = Depends(ip_limit["upload"]),
|
||||
):
|
||||
text_size = len(text.encode("utf-8"))
|
||||
max_txt_size = 222 * 1024
|
||||
if text_size > max_txt_size:
|
||||
raise HTTPException(status_code=403, detail="内容过多,建议采用文件形式")
|
||||
|
||||
expired_at, expired_count, used_count, code = await get_expire_info(
|
||||
expire_value, expire_style
|
||||
)
|
||||
await create_file_code(
|
||||
code=code,
|
||||
text=text,
|
||||
expired_at=expired_at,
|
||||
expired_count=expired_count,
|
||||
used_count=used_count,
|
||||
size=len(text),
|
||||
prefix='文本分享'
|
||||
prefix="Text",
|
||||
)
|
||||
# 添加IP到限制列表
|
||||
upload_ip_limit.add_ip(ip)
|
||||
# 返回API响应
|
||||
return APIResponse(detail={
|
||||
'code': code,
|
||||
})
|
||||
ip_limit["upload"].add_ip(ip)
|
||||
return APIResponse(detail={"code": code})
|
||||
|
||||
|
||||
# 分享文件的API
|
||||
@share_api.post('/file/', dependencies=[Depends(admin_required)])
|
||||
async def share_file(expire_value: int = Form(default=1, gt=0), expire_style: str = Form(default='day'), file: UploadFile = File(...), ip: str = Depends(upload_ip_limit)):
|
||||
# 检查文件大小是否超过限制
|
||||
if file.size > settings.uploadSize:
|
||||
raise HTTPException(status_code=403, detail=f'文件大小超过限制,最大为{settings.uploadSize}字节')
|
||||
# 获取过期信息
|
||||
@share_api.post("/file/", dependencies=[Depends(share_required_login)])
|
||||
async def share_file(
|
||||
expire_value: int = Form(default=1, gt=0),
|
||||
expire_style: str = Form(default="day"),
|
||||
file: UploadFile = File(...),
|
||||
ip: str = Depends(ip_limit["upload"]),
|
||||
):
|
||||
await validate_file_size(file, settings.uploadSize)
|
||||
if expire_style not in settings.expireStyle:
|
||||
raise HTTPException(status_code=400, detail='过期时间类型错误')
|
||||
raise HTTPException(status_code=400, detail="过期时间类型错误")
|
||||
expired_at, expired_count, used_count, code = await get_expire_info(expire_value, expire_style)
|
||||
# 获取文件路径和名称
|
||||
path, suffix, prefix, uuid_file_name, save_path = await get_file_path_name(file)
|
||||
# 保存文件
|
||||
file_storage: FileStorageInterface = storages[settings.file_storage]()
|
||||
await file_storage.save_file(file, save_path)
|
||||
# 创建一个新的FileCodes实例
|
||||
await FileCodes.create(
|
||||
await create_file_code(
|
||||
code=code,
|
||||
prefix=prefix,
|
||||
suffix=suffix,
|
||||
@@ -69,91 +81,197 @@ async def share_file(expire_value: int = Form(default=1, gt=0), expire_style: st
|
||||
expired_count=expired_count,
|
||||
used_count=used_count,
|
||||
)
|
||||
# 添加IP到限制列表
|
||||
upload_ip_limit.add_ip(ip)
|
||||
# 返回API响应
|
||||
return APIResponse(detail={
|
||||
'code': code,
|
||||
'name': file.filename,
|
||||
})
|
||||
ip_limit["upload"].add_ip(ip)
|
||||
return APIResponse(detail={"code": code, "name": file.filename})
|
||||
|
||||
|
||||
# 根据code获取文件
|
||||
async def get_code_file_by_code(code, check=True):
|
||||
# 查询文件
|
||||
file_code = await FileCodes.filter(code=code).first()
|
||||
# 检查文件是否存在
|
||||
if not file_code:
|
||||
return False, '文件不存在'
|
||||
# 检查文件是否过期
|
||||
return False, "文件不存在"
|
||||
if await file_code.is_expired() and check:
|
||||
return False, '文件已过期',
|
||||
return False, "文件已过期"
|
||||
return True, file_code
|
||||
|
||||
|
||||
# 获取文件的API
|
||||
@share_api.get('/select/')
|
||||
async def get_code_file(code: str, ip: str = Depends(error_ip_limit)):
|
||||
# 获取文件
|
||||
has, file_code = await get_code_file_by_code(code)
|
||||
# 检查文件是否存在
|
||||
if not has:
|
||||
# 添加IP到限制列表
|
||||
error_ip_limit.add_ip(ip)
|
||||
# 返回API响应
|
||||
return APIResponse(code=404, detail=file_code)
|
||||
# 更新文件的使用次数和过期次数
|
||||
async def update_file_usage(file_code):
|
||||
file_code.used_count += 1
|
||||
if file_code.expired_count > 0:
|
||||
file_code.expired_count -= 1
|
||||
# 保存文件
|
||||
await file_code.save()
|
||||
# 返回文件响应
|
||||
|
||||
|
||||
@share_api.get("/select/")
|
||||
async def get_code_file(code: str, ip: str = Depends(ip_limit["error"])):
|
||||
file_storage: FileStorageInterface = storages[settings.file_storage]()
|
||||
has, file_code = await get_code_file_by_code(code)
|
||||
if not has:
|
||||
ip_limit["error"].add_ip(ip)
|
||||
return APIResponse(code=404, detail=file_code)
|
||||
|
||||
await update_file_usage(file_code)
|
||||
return await file_storage.get_file_response(file_code)
|
||||
|
||||
|
||||
# 选择文件的API
|
||||
@share_api.post('/select/')
|
||||
async def select_file(data: SelectFileModel, ip: str = Depends(error_ip_limit)):
|
||||
# 获取文件
|
||||
@share_api.post("/select/")
|
||||
async def select_file(data: SelectFileModel, ip: str = Depends(ip_limit["error"])):
|
||||
file_storage: FileStorageInterface = storages[settings.file_storage]()
|
||||
has, file_code = await get_code_file_by_code(data.code)
|
||||
# 检查文件是否存在
|
||||
if not has:
|
||||
# 添加IP到限制列表
|
||||
error_ip_limit.add_ip(ip)
|
||||
# 返回API响应
|
||||
ip_limit["error"].add_ip(ip)
|
||||
return APIResponse(code=404, detail=file_code)
|
||||
# 更新文件的使用次数和过期次数
|
||||
file_code.used_count += 1
|
||||
if file_code.expired_count > 0:
|
||||
file_code.expired_count -= 1
|
||||
# 保存文件
|
||||
await file_code.save()
|
||||
# 返回API响应
|
||||
|
||||
await update_file_usage(file_code)
|
||||
return APIResponse(
|
||||
detail={
|
||||
"code": file_code.code,
|
||||
"name": file_code.prefix + file_code.suffix,
|
||||
"size": file_code.size,
|
||||
"text": (
|
||||
file_code.text
|
||||
if file_code.text is not None
|
||||
else await file_storage.get_file_url(file_code)
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@share_api.get("/download")
|
||||
async def download_file(key: str, code: str, ip: str = Depends(ip_limit["error"])):
|
||||
file_storage: FileStorageInterface = storages[settings.file_storage]()
|
||||
if await get_select_token(code) != key:
|
||||
ip_limit["error"].add_ip(ip)
|
||||
has, file_code = await get_code_file_by_code(code, False)
|
||||
if not has:
|
||||
return APIResponse(code=404, detail="文件不存在")
|
||||
return (
|
||||
APIResponse(detail=file_code.text)
|
||||
if file_code.text
|
||||
else await file_storage.get_file_response(file_code)
|
||||
)
|
||||
|
||||
|
||||
chunk_api = APIRouter(prefix="/chunk", tags=["切片"])
|
||||
|
||||
|
||||
@chunk_api.post("/upload/init/", dependencies=[Depends(share_required_login)])
|
||||
async def init_chunk_upload(data: InitChunkUploadModel):
|
||||
# # 秒传检查
|
||||
# existing = await FileCodes.filter(file_hash=data.file_hash).first()
|
||||
# if existing:
|
||||
# if await existing.is_expired():
|
||||
# file_storage: FileStorageInterface = storages[settings.file_storage](
|
||||
# )
|
||||
# await file_storage.delete_file(existing)
|
||||
# await existing.delete()
|
||||
# else:
|
||||
# return APIResponse(detail={
|
||||
# "code": existing.code,
|
||||
# "existed": True,
|
||||
# "name": f'{existing.prefix}{existing.suffix}'
|
||||
# })
|
||||
|
||||
# 创建上传会话
|
||||
upload_id = uuid.uuid4().hex
|
||||
total_chunks = (data.file_size + data.chunk_size - 1) // data.chunk_size
|
||||
await UploadChunk.create(
|
||||
upload_id=upload_id,
|
||||
chunk_index=-1,
|
||||
total_chunks=total_chunks,
|
||||
file_size=data.file_size,
|
||||
chunk_size=data.chunk_size,
|
||||
chunk_hash=data.file_hash,
|
||||
file_name=data.file_name,
|
||||
)
|
||||
# 获取已上传的分片列表
|
||||
uploaded_chunks = await UploadChunk.filter(
|
||||
upload_id=upload_id,
|
||||
completed=True
|
||||
).values_list('chunk_index', flat=True)
|
||||
return APIResponse(detail={
|
||||
'code': file_code.code,
|
||||
'name': file_code.prefix + file_code.suffix,
|
||||
'size': file_code.size,
|
||||
'text': file_code.text if file_code.text is not None else await file_storage.get_file_url(file_code),
|
||||
"existed": False,
|
||||
"upload_id": upload_id,
|
||||
"chunk_size": data.chunk_size,
|
||||
"total_chunks": total_chunks,
|
||||
"uploaded_chunks": uploaded_chunks
|
||||
})
|
||||
|
||||
|
||||
# 下载文件的API
|
||||
@share_api.get('/download')
|
||||
async def download_file(key: str, code: str, ip: str = Depends(error_ip_limit)):
|
||||
# 检查token是否有效
|
||||
is_valid = await get_select_token(code) == key
|
||||
if not is_valid:
|
||||
# 添加IP到限制列表
|
||||
error_ip_limit.add_ip(ip)
|
||||
# 获取文件
|
||||
has, file_code = await get_code_file_by_code(code, False)
|
||||
# 检查文件是否存在
|
||||
if not has:
|
||||
# 返回API响应
|
||||
return APIResponse(code=404, detail='文件不存在')
|
||||
# 如果文件是文本,返回文本内容,否则返回文件响应
|
||||
if file_code.text:
|
||||
return APIResponse(detail=file_code.text)
|
||||
else:
|
||||
return await file_storage.get_file_response(file_code)
|
||||
@chunk_api.post("/upload/chunk/{upload_id}/{chunk_index}", dependencies=[Depends(share_required_login)])
|
||||
async def upload_chunk(
|
||||
upload_id: str,
|
||||
chunk_index: int,
|
||||
chunk: UploadFile = File(...),
|
||||
):
|
||||
# 获取上传会话信息
|
||||
chunk_info = await UploadChunk.filter(upload_id=upload_id, chunk_index=-1).first()
|
||||
if not chunk_info:
|
||||
raise HTTPException(status.HTTP_404_NOT_FOUND, detail="上传会话不存在")
|
||||
|
||||
# 检查分片索引有效性
|
||||
if chunk_index < 0 or chunk_index >= chunk_info.total_chunks:
|
||||
raise HTTPException(status.HTTP_400_BAD_REQUEST, detail="无效的分片索引")
|
||||
|
||||
# 读取分片数据并计算哈希
|
||||
chunk_data = await chunk.read()
|
||||
chunk_hash = hashlib.sha256(chunk_data).hexdigest()
|
||||
|
||||
# 更新或创建分片记录
|
||||
await UploadChunk.update_or_create(
|
||||
upload_id=upload_id,
|
||||
chunk_index=chunk_index,
|
||||
defaults={
|
||||
'chunk_hash': chunk_hash,
|
||||
'completed': True,
|
||||
'file_size': chunk_info.file_size,
|
||||
'total_chunks': chunk_info.total_chunks,
|
||||
'chunk_size': chunk_info.chunk_size,
|
||||
'file_name': chunk_info.file_name
|
||||
}
|
||||
)
|
||||
# 获取文件路径
|
||||
_, _, _, _, save_path = await get_chunk_file_path_name(chunk_info.file_name, upload_id)
|
||||
# 保存分片到存储
|
||||
storage = storages[settings.file_storage]()
|
||||
await storage.save_chunk(upload_id, chunk_index, chunk_data, chunk_hash, save_path)
|
||||
return APIResponse(detail={"chunk_hash": chunk_hash})
|
||||
|
||||
|
||||
@chunk_api.post("/upload/complete/{upload_id}", dependencies=[Depends(share_required_login)])
|
||||
async def complete_upload(upload_id: str, data: CompleteUploadModel, ip: str = Depends(ip_limit["upload"])):
|
||||
# 获取上传基本信息
|
||||
chunk_info = await UploadChunk.filter(upload_id=upload_id, chunk_index=-1).first()
|
||||
if not chunk_info:
|
||||
raise HTTPException(status.HTTP_404_NOT_FOUND, detail="上传会话不存在")
|
||||
|
||||
storage = storages[settings.file_storage]()
|
||||
# 验证所有分片
|
||||
completed_chunks = await UploadChunk.filter(
|
||||
upload_id=upload_id,
|
||||
completed=True
|
||||
).count()
|
||||
if completed_chunks != chunk_info.total_chunks:
|
||||
raise HTTPException(status.HTTP_400_BAD_REQUEST, detail="分片不完整")
|
||||
# 获取文件路径
|
||||
path, suffix, prefix, _, save_path = await get_chunk_file_path_name(chunk_info.file_name, upload_id)
|
||||
# 合并文件并计算哈希
|
||||
await storage.merge_chunks(upload_id, chunk_info, save_path)
|
||||
# 创建文件记录
|
||||
expired_at, expired_count, used_count, code = await get_expire_info(data.expire_value, data.expire_style)
|
||||
await FileCodes.create(
|
||||
code=code,
|
||||
file_hash=chunk_info.chunk_hash,
|
||||
is_chunked=True,
|
||||
upload_id=upload_id,
|
||||
size=chunk_info.file_size,
|
||||
expired_at=expired_at,
|
||||
expired_count=expired_count,
|
||||
used_count=used_count,
|
||||
file_path=path,
|
||||
uuid_file_name=f"{prefix}{suffix}",
|
||||
prefix=prefix,
|
||||
suffix=suffix
|
||||
)
|
||||
# 清理临时文件
|
||||
await storage.clean_chunks(upload_id, save_path)
|
||||
return APIResponse(detail={"code": code, "name": chunk_info.file_name})
|
||||
@@ -0,0 +1,81 @@
|
||||
import glob
|
||||
import importlib
|
||||
import os
|
||||
|
||||
from tortoise import Tortoise
|
||||
|
||||
from core.logger import logger
|
||||
from core.settings import data_root
|
||||
|
||||
|
||||
async def init_db():
|
||||
try:
|
||||
# 使用正确的Tortoise初始化配置格式
|
||||
db_config = {
|
||||
"db_url": f"sqlite://{data_root}/filecodebox.db",
|
||||
"modules": {"models": ["apps.base.models"]},
|
||||
"use_tz": False,
|
||||
"timezone": "Asia/Shanghai"
|
||||
}
|
||||
|
||||
await Tortoise.init(**db_config)
|
||||
|
||||
# 创建migrations表
|
||||
await Tortoise.get_connection("default").execute_script("""
|
||||
CREATE TABLE IF NOT EXISTS migrates (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
migration_file VARCHAR(255) NOT NULL UNIQUE,
|
||||
executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)
|
||||
""")
|
||||
|
||||
# 执行迁移
|
||||
await execute_migrations()
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"数据库初始化失败: {str(e)}")
|
||||
raise
|
||||
|
||||
|
||||
async def execute_migrations():
|
||||
"""执行数据库迁移"""
|
||||
try:
|
||||
# 收集迁移文件
|
||||
migration_files = []
|
||||
for root, dirs, files in os.walk("apps"):
|
||||
if "migrations" in dirs:
|
||||
migration_path = os.path.join(root, "migrations")
|
||||
migration_files.extend(glob.glob(os.path.join(migration_path, "migrations_*.py")))
|
||||
|
||||
# 按文件名排序
|
||||
migration_files.sort()
|
||||
|
||||
for migration_file in migration_files:
|
||||
file_name = os.path.basename(migration_file)
|
||||
|
||||
# 检查是否已执行
|
||||
executed = await Tortoise.get_connection("default").execute_query(
|
||||
"SELECT id FROM migrates WHERE migration_file = ?", [file_name]
|
||||
)
|
||||
|
||||
if not executed[1]:
|
||||
logger.info(f"执行迁移: {file_name}")
|
||||
# 导入并执行migration
|
||||
module_path = migration_file.replace("/", ".").replace("\\", ".").replace(".py", "")
|
||||
try:
|
||||
migration_module = importlib.import_module(module_path)
|
||||
if hasattr(migration_module, "migrate"):
|
||||
await migration_module.migrate()
|
||||
# 记录执行
|
||||
await Tortoise.get_connection("default").execute_query(
|
||||
"INSERT INTO migrates (migration_file) VALUES (?)",
|
||||
[file_name]
|
||||
)
|
||||
logger.info(f"迁移完成: {file_name}")
|
||||
except Exception as e:
|
||||
logger.error(f"迁移 {file_name} 执行失败: {str(e)}")
|
||||
raise
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"迁移过程发生错误: {str(e)}")
|
||||
raise
|
||||
@@ -0,0 +1,28 @@
|
||||
import logging
|
||||
import sys
|
||||
|
||||
|
||||
def setup_logger():
|
||||
# 创建logger对象
|
||||
_logger = logging.getLogger('FileCodeBox')
|
||||
_logger.setLevel(logging.INFO)
|
||||
|
||||
# 创建控制台处理器
|
||||
console_handler = logging.StreamHandler(sys.stdout)
|
||||
console_handler.setLevel(logging.INFO)
|
||||
|
||||
# 设置日志格式
|
||||
formatter = logging.Formatter(
|
||||
'%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||
datefmt='%Y-%m-%d %H:%M:%S'
|
||||
)
|
||||
console_handler.setFormatter(formatter)
|
||||
|
||||
# 添加处理器到logger
|
||||
_logger.addHandler(console_handler)
|
||||
|
||||
return _logger
|
||||
|
||||
|
||||
# 创建全局logger实例
|
||||
logger = setup_logger()
|
||||
@@ -6,10 +6,10 @@ from typing import Generic, TypeVar
|
||||
|
||||
from pydantic.v1.generics import GenericModel
|
||||
|
||||
T = TypeVar('T')
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
class APIResponse(GenericModel, Generic[T]):
|
||||
code: int = 200
|
||||
message: str = 'ok'
|
||||
message: str = "ok"
|
||||
detail: T
|
||||
@@ -2,50 +2,74 @@
|
||||
# @Author : Lan
|
||||
# @File : settings.py
|
||||
# @Software: PyCharm
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
data_root = BASE_DIR / 'data'
|
||||
data_root = BASE_DIR / "data"
|
||||
|
||||
if not data_root.exists():
|
||||
data_root.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
DEFAULT_CONFIG = {
|
||||
'file_storage': 'local',
|
||||
'name': '文件快递柜-FileCodeBox',
|
||||
'description': '开箱即用的文件快传系统',
|
||||
'notify_title': '系统通知',
|
||||
'notify_content': '欢迎使用FileCodeBox,本程序开源于 <a href="https://github.com/vastsa/FileCodeBox" target="_blank">Github</a> ,欢迎Star和Fork。',
|
||||
'page_explain': '根据《中华人民共和国网络安全法》、《中华人民共和国刑法》、《中华人民共和国治安管理处罚法》等相关规定。 传播或存储违法、违规内容,会受到相关处罚,严重者将承担刑事责任。请勿上传非法文件,本站坚决配合相关部门,确保网络内容的安全,和谐,打造绿色网络环境。',
|
||||
'keywords': 'FileCodeBox, 文件快递柜, 口令传送箱, 匿名口令分享文本, 文件',
|
||||
's3_access_key_id': '',
|
||||
's3_secret_access_key': '',
|
||||
's3_bucket_name': '',
|
||||
's3_endpoint_url': '',
|
||||
's3_region_name': 'auto',
|
||||
's3_signature_version': 's3v2',
|
||||
's3_hostname': '',
|
||||
's3_proxy': 0,
|
||||
'max_save_seconds': 0,
|
||||
'aws_session_token': '',
|
||||
'onedrive_domain': '',
|
||||
'onedrive_client_id': '',
|
||||
'onedrive_username': '',
|
||||
'onedrive_password': '',
|
||||
'onedrive_root_path': 'filebox_storage',
|
||||
'onedrive_proxy': 0,
|
||||
'admin_token': 'FileCodeBox2023',
|
||||
'openUpload': 1,
|
||||
'uploadSize': 1024 * 1024 * 10,
|
||||
'expireStyle': ['day', 'hour', 'minute', 'forever', 'count'],
|
||||
'uploadMinute': 1,
|
||||
'opacity': 0.9,
|
||||
'background': '',
|
||||
'uploadCount': 10,
|
||||
'errorMinute': 1,
|
||||
'errorCount': 1,
|
||||
'port': 12345,
|
||||
"file_storage": "local",
|
||||
"storage_path": "",
|
||||
"name": "文件快递柜 - FileCodeBox",
|
||||
"description": "开箱即用的文件快传系统",
|
||||
"notify_title": "系统通知",
|
||||
"notify_content": '欢迎使用 FileCodeBox,本程序开源于 <a href="https://github.com/vastsa/FileCodeBox" target="_blank">Github</a> ,欢迎Star和Fork。',
|
||||
"page_explain": "请勿上传或分享违法内容。根据《中华人民共和国网络安全法》、《中华人民共和国刑法》、《中华人民共和国治安管理处罚法》等相关规定。 传播或存储违法、违规内容,会受到相关处罚,严重者将承担刑事责任。本站坚决配合相关部门,确保网络内容的安全,和谐,打造绿色网络环境。",
|
||||
"keywords": "FileCodeBox, 文件快递柜, 口令传送箱, 匿名口令分享文本, 文件",
|
||||
"s3_access_key_id": "",
|
||||
"s3_secret_access_key": "",
|
||||
"s3_bucket_name": "",
|
||||
"s3_endpoint_url": "",
|
||||
"s3_region_name": "auto",
|
||||
"s3_signature_version": "s3v2",
|
||||
"s3_hostname": "",
|
||||
"s3_proxy": 0,
|
||||
"max_save_seconds": 0,
|
||||
"aws_session_token": "",
|
||||
"onedrive_domain": "",
|
||||
"onedrive_client_id": "",
|
||||
"onedrive_username": "",
|
||||
"onedrive_password": "",
|
||||
"onedrive_root_path": "filebox_storage",
|
||||
"onedrive_proxy": 0,
|
||||
"webdav_hostname": "",
|
||||
"webdav_root_path": "filebox_storage",
|
||||
"webdav_proxy": 0,
|
||||
"admin_token": "FileCodeBox2023",
|
||||
"openUpload": 1,
|
||||
"uploadSize": 1024 * 1024 * 10,
|
||||
"expireStyle": ["day", "hour", "minute", "forever", "count"],
|
||||
"uploadMinute": 1,
|
||||
"enableChunk": 0,
|
||||
"webdav_url": "",
|
||||
"webdav_password": "",
|
||||
"webdav_username": "",
|
||||
"opacity": 0.9,
|
||||
"background": "",
|
||||
"uploadCount": 10,
|
||||
"themesChoices": [
|
||||
{
|
||||
"name": "2023",
|
||||
"key": "themes/2023",
|
||||
"author": "Lan",
|
||||
"version": "1.0",
|
||||
},
|
||||
{
|
||||
"name": "2024",
|
||||
"key": "themes/2024",
|
||||
"author": "Lan",
|
||||
"version": "1.0",
|
||||
},
|
||||
],
|
||||
"themesSelect": "themes/2024",
|
||||
"errorMinute": 1,
|
||||
"errorCount": 1,
|
||||
"port": 12345,
|
||||
"showAdminAddr": 0,
|
||||
"robotsText": "User-agent: *\nDisallow: /",
|
||||
}
|
||||
|
||||
|
||||
@@ -59,10 +83,12 @@ class Settings:
|
||||
return self.user_config[attr]
|
||||
if attr in self.default_config:
|
||||
return self.default_config[attr]
|
||||
raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{attr}'")
|
||||
raise AttributeError(
|
||||
f"'{self.__class__.__name__}' object has no attribute '{attr}'"
|
||||
)
|
||||
|
||||
def __setattr__(self, key, value):
|
||||
if key in ['default_config', 'user_config']:
|
||||
if key in ["default_config", "user_config"]:
|
||||
super().__setattr__(key, value)
|
||||
else:
|
||||
self.user_config[key] = value
|
||||
|
||||
@@ -2,24 +2,39 @@
|
||||
# @Author : Lan
|
||||
# @File : storage.py
|
||||
# @Software: PyCharm
|
||||
import base64
|
||||
import hashlib
|
||||
from core.logger import logger
|
||||
import shutil
|
||||
from typing import Optional
|
||||
from urllib.parse import quote, unquote
|
||||
|
||||
import aiofiles
|
||||
import aiohttp
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
import datetime
|
||||
import io
|
||||
import re
|
||||
import sys
|
||||
import aioboto3
|
||||
from botocore.config import Config
|
||||
from fastapi import HTTPException, Response, UploadFile
|
||||
from core.response import APIResponse
|
||||
from core.settings import data_root, settings
|
||||
from apps.base.models import FileCodes
|
||||
from core.utils import get_file_url
|
||||
from apps.base.models import FileCodes, UploadChunk
|
||||
from core.utils import get_file_url, sanitize_filename
|
||||
from fastapi.responses import FileResponse
|
||||
|
||||
|
||||
class FileStorageInterface:
|
||||
_instance: Optional["FileStorageInterface"] = None
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
if cls._instance is None:
|
||||
cls._instance = super(FileStorageInterface, cls).__new__(
|
||||
cls, *args, **kwargs
|
||||
)
|
||||
return cls._instance
|
||||
|
||||
async def save_file(self, file: UploadFile, save_path: str):
|
||||
"""
|
||||
@@ -51,6 +66,35 @@ class FileStorageInterface:
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str):
|
||||
"""
|
||||
保存分片文件
|
||||
:param upload_id: 上传会话ID
|
||||
:param chunk_index: 分片索引
|
||||
:param chunk_data: 分片数据
|
||||
:param chunk_hash: 分片哈希值
|
||||
:param save_path: 文件保存路径
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
async def merge_chunks(self, upload_id: str, chunk_info: UploadChunk, save_path: str) -> tuple[str, str]:
|
||||
"""
|
||||
合并分片文件并返回文件路径和完整哈希值
|
||||
:param upload_id: 上传会话ID
|
||||
:param chunk_info: 分片信息
|
||||
:param save_path: 文件保存路径
|
||||
:return: (文件路径, 文件哈希值)
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
async def clean_chunks(self, upload_id: str, save_path: str):
|
||||
"""
|
||||
清理临时分片文件
|
||||
:param upload_id: 上传会话ID
|
||||
:param save_path: 文件保存路径
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class SystemFileStorage(FileStorageInterface):
|
||||
def __init__(self):
|
||||
@@ -58,17 +102,23 @@ class SystemFileStorage(FileStorageInterface):
|
||||
self.root_path = data_root
|
||||
|
||||
def _save(self, file, save_path):
|
||||
with open(save_path, 'wb') as f:
|
||||
with open(save_path, "wb") as f:
|
||||
chunk = file.read(self.chunk_size)
|
||||
while chunk:
|
||||
f.write(chunk)
|
||||
chunk = file.read(self.chunk_size)
|
||||
|
||||
async def save_file(self, file: UploadFile, save_path: str):
|
||||
save_path = self.root_path / save_path
|
||||
if not save_path.parent.exists():
|
||||
save_path.parent.mkdir(parents=True)
|
||||
await asyncio.to_thread(self._save, file.file, save_path)
|
||||
path_obj = Path(save_path)
|
||||
directory = str(path_obj.parent)
|
||||
# 提取原始文件名并进行清理
|
||||
filename = await sanitize_filename(path_obj.name)
|
||||
# 构建安全的完整保存路径
|
||||
safe_save_path = self.root_path / directory / filename
|
||||
# 确保目录存在
|
||||
if not safe_save_path.parent.exists():
|
||||
safe_save_path.parent.mkdir(parents=True)
|
||||
await asyncio.to_thread(self._save, file.file, safe_save_path)
|
||||
|
||||
async def delete_file(self, file_code: FileCodes):
|
||||
save_path = self.root_path / await file_code.get_file_path()
|
||||
@@ -79,10 +129,69 @@ class SystemFileStorage(FileStorageInterface):
|
||||
return await get_file_url(file_code.code)
|
||||
|
||||
async def get_file_response(self, file_code: FileCodes):
|
||||
file_path = file_storage.root_path / await file_code.get_file_path()
|
||||
file_path = self.root_path / await file_code.get_file_path()
|
||||
if not file_path.exists():
|
||||
return APIResponse(code=404, detail='文件已过期删除')
|
||||
return FileResponse(file_path, filename=file_code.prefix + file_code.suffix)
|
||||
return APIResponse(code=404, detail="文件已过期删除")
|
||||
filename = f"{file_code.prefix}{file_code.suffix}"
|
||||
encoded_filename = quote(filename, safe='')
|
||||
content_disposition = f"attachment; filename*=UTF-8''{encoded_filename}"
|
||||
return FileResponse(
|
||||
file_path,
|
||||
media_type="application/octet-stream",
|
||||
headers={"Content-Disposition": content_disposition},
|
||||
filename=filename # 保留原始文件名以备某些场景使用
|
||||
)
|
||||
|
||||
async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str):
|
||||
"""
|
||||
保存分片文件到本地文件系统
|
||||
:param upload_id: 上传会话ID
|
||||
:param chunk_index: 分片索引
|
||||
:param chunk_data: 分片数据
|
||||
:param chunk_hash: 分片哈希值
|
||||
:param save_path: 文件保存路径
|
||||
"""
|
||||
chunk_dir = self.root_path / save_path
|
||||
chunk_path = chunk_dir.parent / 'chunks' / f"{chunk_index}.part"
|
||||
if not chunk_path.parent.exists():
|
||||
chunk_path.parent.mkdir(parents=True)
|
||||
async with aiofiles.open(chunk_path, "wb") as f:
|
||||
await f.write(chunk_data)
|
||||
|
||||
async def merge_chunks(self, upload_id: str, chunk_info: UploadChunk, save_path: str) -> tuple[str, str]:
|
||||
"""
|
||||
合并本地文件系统的分片文件并返回文件路径和完整哈希值
|
||||
:param upload_id: 上传会话ID
|
||||
:param chunk_info: 分片信息
|
||||
:param save_path: 文件保存路径
|
||||
:return: (文件路径, 文件哈希值)
|
||||
"""
|
||||
output_dir = self.root_path / save_path
|
||||
output_dir.parent.mkdir(parents=True, exist_ok=True)
|
||||
file_sha256 = hashlib.sha256()
|
||||
async with aiofiles.open(output_dir, "wb") as out_file:
|
||||
for i in range(chunk_info.total_chunks):
|
||||
# 获取分片记录
|
||||
chunk_record = await UploadChunk.get(upload_id=upload_id, chunk_index=i)
|
||||
chunk_path = output_dir.parent / 'chunks' / f"{i}.part"
|
||||
async with aiofiles.open(chunk_path, "rb") as in_file:
|
||||
chunk_data = await in_file.read()
|
||||
current_hash = hashlib.sha256(chunk_data).hexdigest()
|
||||
if current_hash != chunk_record.chunk_hash:
|
||||
raise ValueError(f"分片{i}哈希不匹配")
|
||||
file_sha256.update(chunk_data)
|
||||
await out_file.write(chunk_data)
|
||||
return output_dir, file_sha256.hexdigest()
|
||||
|
||||
async def clean_chunks(self, upload_id: str, save_path: str):
|
||||
"""
|
||||
清理本地文件系统的临时分片文件
|
||||
:param upload_id: 上传会话ID
|
||||
:param save_path: 文件保存路径
|
||||
"""
|
||||
chunk_dir = (self.root_path / save_path).parent / 'chunks'
|
||||
if chunk_dir.exists():
|
||||
shutil.rmtree(chunk_dir)
|
||||
|
||||
|
||||
class S3FileStorage(FileStorageInterface):
|
||||
@@ -93,30 +202,62 @@ class S3FileStorage(FileStorageInterface):
|
||||
self.s3_hostname = settings.s3_hostname
|
||||
self.region_name = settings.s3_region_name
|
||||
self.signature_version = settings.s3_signature_version
|
||||
self.endpoint_url = settings.s3_endpoint_url or f'https://{self.s3_hostname}'
|
||||
self.endpoint_url = settings.s3_endpoint_url or f"https://{self.s3_hostname}"
|
||||
self.aws_session_token = settings.aws_session_token
|
||||
self.proxy = settings.s3_proxy
|
||||
self.session = aioboto3.Session(aws_access_key_id=self.access_key_id, aws_secret_access_key=self.secret_access_key)
|
||||
self.session = aioboto3.Session(
|
||||
aws_access_key_id=self.access_key_id,
|
||||
aws_secret_access_key=self.secret_access_key,
|
||||
)
|
||||
if not settings.s3_endpoint_url:
|
||||
self.endpoint_url = f'https://{self.s3_hostname}'
|
||||
self.endpoint_url = f"https://{self.s3_hostname}"
|
||||
else:
|
||||
# 如果提供了 s3_endpoint_url,则优先使用它
|
||||
self.endpoint_url = settings.s3_endpoint_url
|
||||
|
||||
async def save_file(self, file: UploadFile, save_path: str):
|
||||
async with self.session.client("s3", endpoint_url=self.endpoint_url, aws_session_token=self.aws_session_token, region_name=self.region_name,
|
||||
config=Config(signature_version=self.signature_version)) as s3:
|
||||
await s3.put_object(Bucket=self.bucket_name, Key=save_path, Body=await file.read(), ContentType=file.content_type)
|
||||
async with self.session.client(
|
||||
"s3",
|
||||
endpoint_url=self.endpoint_url,
|
||||
aws_session_token=self.aws_session_token,
|
||||
region_name=self.region_name,
|
||||
config=Config(signature_version=self.signature_version),
|
||||
) as s3:
|
||||
await s3.put_object(
|
||||
Bucket=self.bucket_name,
|
||||
Key=save_path,
|
||||
Body=await file.read(),
|
||||
ContentType=file.content_type,
|
||||
)
|
||||
|
||||
async def delete_file(self, file_code: FileCodes):
|
||||
async with self.session.client("s3", endpoint_url=self.endpoint_url, region_name=self.region_name, config=Config(signature_version=self.signature_version)) as s3:
|
||||
await s3.delete_object(Bucket=self.bucket_name, Key=await file_code.get_file_path())
|
||||
async with self.session.client(
|
||||
"s3",
|
||||
endpoint_url=self.endpoint_url,
|
||||
region_name=self.region_name,
|
||||
config=Config(signature_version=self.signature_version),
|
||||
) as s3:
|
||||
await s3.delete_object(
|
||||
Bucket=self.bucket_name, Key=await file_code.get_file_path()
|
||||
)
|
||||
|
||||
async def get_file_response(self, file_code: FileCodes):
|
||||
try:
|
||||
filename = file_code.prefix + file_code.suffix
|
||||
async with self.session.client("s3", endpoint_url=self.endpoint_url, region_name=self.region_name, config=Config(signature_version=self.signature_version)) as s3:
|
||||
link = await s3.generate_presigned_url('get_object', Params={'Bucket': self.bucket_name, 'Key': await file_code.get_file_path()}, ExpiresIn=3600)
|
||||
async with self.session.client(
|
||||
"s3",
|
||||
endpoint_url=self.endpoint_url,
|
||||
region_name=self.region_name,
|
||||
config=Config(signature_version=self.signature_version),
|
||||
) as s3:
|
||||
link = await s3.generate_presigned_url(
|
||||
"get_object",
|
||||
Params={
|
||||
"Bucket": self.bucket_name,
|
||||
"Key": await file_code.get_file_path(),
|
||||
},
|
||||
ExpiresIn=3600,
|
||||
)
|
||||
tmp = io.BytesIO()
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(link) as resp:
|
||||
@@ -124,29 +265,142 @@ class S3FileStorage(FileStorageInterface):
|
||||
tmp.seek(0)
|
||||
content = tmp.read()
|
||||
tmp.close()
|
||||
return Response(content, media_type="application/octet-stream", headers={"Content-Disposition": f'attachment; filename="{filename.encode("utf-8").decode("latin-1")}"'})
|
||||
return Response(
|
||||
content,
|
||||
media_type="application/octet-stream",
|
||||
headers={
|
||||
"Content-Disposition": f'attachment; filename="{filename.encode("utf-8").decode("latin-1")}"'
|
||||
},
|
||||
)
|
||||
except Exception:
|
||||
raise HTTPException(status_code=503, detail='服务代理下载异常,请稍后再试')
|
||||
raise HTTPException(status_code=503, detail="服务代理下载异常,请稍后再试")
|
||||
|
||||
async def get_file_url(self, file_code: FileCodes):
|
||||
if file_code.prefix == '文本分享':
|
||||
if file_code.prefix == "文本分享":
|
||||
return file_code.text
|
||||
if self.proxy:
|
||||
return await get_file_url(file_code.code)
|
||||
else:
|
||||
async with self.session.client("s3", endpoint_url=self.endpoint_url, region_name=self.region_name, config=Config(signature_version=self.signature_version)) as s3:
|
||||
result = await s3.generate_presigned_url('get_object', Params={'Bucket': self.bucket_name, 'Key': await file_code.get_file_path()}, ExpiresIn=3600)
|
||||
async with self.session.client(
|
||||
"s3",
|
||||
endpoint_url=self.endpoint_url,
|
||||
region_name=self.region_name,
|
||||
config=Config(signature_version=self.signature_version),
|
||||
) as s3:
|
||||
result = await s3.generate_presigned_url(
|
||||
"get_object",
|
||||
Params={
|
||||
"Bucket": self.bucket_name,
|
||||
"Key": await file_code.get_file_path(),
|
||||
},
|
||||
ExpiresIn=3600,
|
||||
)
|
||||
return result
|
||||
|
||||
async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str):
|
||||
chunk_key = str(Path(save_path).parent / "chunks" /
|
||||
upload_id / f"{chunk_index}.part")
|
||||
async with self.session.client('s3') as s3:
|
||||
response = await s3.upload_part(
|
||||
Bucket=self.bucket_name,
|
||||
Key=chunk_key,
|
||||
PartNumber=chunk_index + 1,
|
||||
UploadId=upload_id,
|
||||
Body=chunk_data
|
||||
)
|
||||
await s3.put_object_tagging(
|
||||
Bucket=self.bucket_name,
|
||||
Key=chunk_key,
|
||||
Tagging={
|
||||
'TagSet': [
|
||||
{'Key': 'ChunkHash', 'Value': chunk_hash},
|
||||
{'Key': 'ETag', 'Value': response['ETag']}
|
||||
]
|
||||
}
|
||||
)
|
||||
|
||||
async def merge_chunks(self, upload_id: str, chunk_info: UploadChunk, save_path: str) -> tuple[str, str]:
|
||||
file_sha256 = hashlib.sha256()
|
||||
chunk_dir = str(Path(save_path).parent / "chunks" / upload_id)
|
||||
async with self.session.client('s3') as s3:
|
||||
# 获取所有分片
|
||||
parts = await s3.list_parts(
|
||||
Bucket=self.bucket_name,
|
||||
Key=chunk_dir,
|
||||
UploadId=upload_id
|
||||
)
|
||||
part_list = []
|
||||
for part in parts['Parts']:
|
||||
part_number = part['PartNumber']
|
||||
chunk_index = part_number - 1
|
||||
chunk_record = await UploadChunk.get(upload_id=upload_id, chunk_index=chunk_index)
|
||||
response = await s3.get_object(
|
||||
Bucket=self.bucket_name,
|
||||
Key=f"{chunk_dir}/{chunk_index}.part",
|
||||
PartNumber=part_number
|
||||
)
|
||||
chunk_data = await response['Body'].read()
|
||||
current_hash = hashlib.sha256(chunk_data).hexdigest()
|
||||
if current_hash != chunk_record.chunk_hash:
|
||||
raise Exception(f"分片{chunk_index}哈希不匹配")
|
||||
file_sha256.update(chunk_data)
|
||||
part_list.append(
|
||||
{'PartNumber': part_number, 'ETag': part['ETag']})
|
||||
# 完成合并
|
||||
await s3.complete_multipart_upload(
|
||||
Bucket=self.bucket_name,
|
||||
Key=save_path,
|
||||
UploadId=upload_id,
|
||||
MultipartUpload={'Parts': part_list}
|
||||
)
|
||||
return save_path, file_sha256.hexdigest()
|
||||
|
||||
async def clean_chunks(self, upload_id: str, save_path: str):
|
||||
"""
|
||||
清理 S3 上的临时分片文件
|
||||
:param upload_id: 上传会话ID
|
||||
:param save_path: 文件保存路径
|
||||
"""
|
||||
chunk_dir = str(Path(save_path).parent / "chunks" / upload_id)
|
||||
async with self.session.client('s3') as s3:
|
||||
try:
|
||||
# 终止未完成的分片上传会话
|
||||
await s3.abort_multipart_upload(
|
||||
Bucket=self.bucket_name,
|
||||
Key=chunk_dir,
|
||||
UploadId=upload_id
|
||||
)
|
||||
except Exception as e:
|
||||
# 如果上传会话不存在或其他错误,忽略
|
||||
logger.info(f"清理 S3 分片时出错: {e}")
|
||||
|
||||
try:
|
||||
# 清理已上传的分片数据
|
||||
parts = await s3.list_parts(
|
||||
Bucket=self.bucket_name,
|
||||
Key=chunk_dir,
|
||||
UploadId=upload_id
|
||||
)
|
||||
for part in parts.get('Parts', []):
|
||||
await s3.delete_object(
|
||||
Bucket=self.bucket_name,
|
||||
Key=f"{chunk_dir}/{part['PartNumber'] - 1}.part"
|
||||
)
|
||||
except Exception as e:
|
||||
# 如果分片数据不存在或其他错误,忽略
|
||||
logger.info(f"清理 S3 分片数据时出错: {e}")
|
||||
|
||||
|
||||
class OneDriveFileStorage(FileStorageInterface):
|
||||
def __init__(self):
|
||||
try:
|
||||
import msal
|
||||
from office365.graph_client import GraphClient
|
||||
from office365.runtime.client_request_exception import ClientRequestException
|
||||
from office365.runtime.client_request_exception import (
|
||||
ClientRequestException,
|
||||
)
|
||||
except ImportError:
|
||||
raise ImportError('请先安装`msal`和`Office365-REST-Python-Client`')
|
||||
raise ImportError("请先安装`msal`和`Office365-REST-Python-Client`")
|
||||
self.msal = msal
|
||||
self.domain = settings.onedrive_domain
|
||||
self.client_id = settings.onedrive_client_id
|
||||
@@ -157,40 +411,50 @@ class OneDriveFileStorage(FileStorageInterface):
|
||||
|
||||
try:
|
||||
client = GraphClient(self.acquire_token_pwd)
|
||||
self.root_path = client.me.drive.root.get_by_path(settings.onedrive_root_path).get().execute_query()
|
||||
self.root_path = (
|
||||
client.me.drive.root.get_by_path(settings.onedrive_root_path)
|
||||
.get()
|
||||
.execute_query()
|
||||
)
|
||||
except ClientRequestException as e:
|
||||
if e.code == 'itemNotFound':
|
||||
if e.code == "itemNotFound":
|
||||
client.me.drive.root.create_folder(settings.onedrive_root_path)
|
||||
self.root_path = client.me.drive.root.get_by_path(settings.onedrive_root_path).get().execute_query()
|
||||
self.root_path = (
|
||||
client.me.drive.root.get_by_path(
|
||||
settings.onedrive_root_path)
|
||||
.get()
|
||||
.execute_query()
|
||||
)
|
||||
else:
|
||||
raise e
|
||||
except Exception as e:
|
||||
raise Exception('OneDrive验证失败,请检查配置是否正确\n' + str(e))
|
||||
raise Exception("OneDrive验证失败,请检查配置是否正确\n" + str(e))
|
||||
|
||||
def acquire_token_pwd(self):
|
||||
authority_url = f'https://login.microsoftonline.com/{self.domain}'
|
||||
authority_url = f"https://login.microsoftonline.com/{self.domain}"
|
||||
app = self.msal.PublicClientApplication(
|
||||
authority=authority_url,
|
||||
client_id=self.client_id
|
||||
authority=authority_url, client_id=self.client_id
|
||||
)
|
||||
result = app.acquire_token_by_username_password(
|
||||
username=self.username,
|
||||
password=self.password,
|
||||
scopes=["https://graph.microsoft.com/.default"],
|
||||
)
|
||||
result = app.acquire_token_by_username_password(username=self.username,
|
||||
password=self.password,
|
||||
scopes=['https://graph.microsoft.com/.default'])
|
||||
return result
|
||||
|
||||
def _get_path_str(self, path):
|
||||
if isinstance(path, str):
|
||||
path = path.replace('\\', '/').replace('//', '/').split('/')
|
||||
path = path.replace("\\", "/").replace("//", "/").split("/")
|
||||
elif isinstance(path, Path):
|
||||
path = str(path).replace('\\', '/').replace('//', '/').split('/')
|
||||
path = str(path).replace("\\", "/").replace("//", "/").split("/")
|
||||
else:
|
||||
raise TypeError('path must be str or Path')
|
||||
path[-1] = path[-1].split('.')[0]
|
||||
return '/'.join(path)
|
||||
raise TypeError("path must be str or Path")
|
||||
path[-1] = path[-1].split(".")[0]
|
||||
return "/".join(path)
|
||||
|
||||
def _save(self, file, save_path):
|
||||
content = file.file.read()
|
||||
name = file.filename
|
||||
name = save_path(file.filename)
|
||||
path = self._get_path_str(save_path)
|
||||
self.root_path.get_by_path(path).upload(name, content).execute_query()
|
||||
|
||||
@@ -202,7 +466,7 @@ class OneDriveFileStorage(FileStorageInterface):
|
||||
try:
|
||||
self.root_path.get_by_path(path).delete_object().execute_query()
|
||||
except self._ClientRequestException as e:
|
||||
if e.code == 'itemNotFound':
|
||||
if e.code == "itemNotFound":
|
||||
pass
|
||||
else:
|
||||
raise e
|
||||
@@ -211,23 +475,30 @@ class OneDriveFileStorage(FileStorageInterface):
|
||||
await asyncio.to_thread(self._delete, await file_code.get_file_path())
|
||||
|
||||
def _convert_link_to_download_link(self, link):
|
||||
p1 = re.search(r'https:\/\/(.+)\.sharepoint\.com', link).group(1)
|
||||
p2 = re.search(r'personal\/(.+)\/', link).group(1)
|
||||
p3 = re.search(rf'{p2}\/(.+)', link).group(1)
|
||||
return f'https://{p1}.sharepoint.com/personal/{p2}/_layouts/52/download.aspx?share={p3}'
|
||||
p1 = re.search(r"https://(.+)\.sharepoint\.com", link).group(1)
|
||||
p2 = re.search(r"personal/(.+)/", link).group(1)
|
||||
p3 = re.search(rf"{p2}/(.+)", link).group(1)
|
||||
return f"https://{p1}.sharepoint.com/personal/{p2}/_layouts/52/download.aspx?share={p3}"
|
||||
|
||||
def _get_file_url(self, save_path, name):
|
||||
path = self._get_path_str(save_path)
|
||||
remote_file = self.root_path.get_by_path(path + '/' + name)
|
||||
expiration_datetime = datetime.datetime.now(tz=datetime.timezone.utc) + datetime.timedelta(hours=1)
|
||||
expiration_datetime = expiration_datetime.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
premission = remote_file.create_link("view", "anonymous", expiration_datetime=expiration_datetime).execute_query()
|
||||
return self._convert_link_to_download_link(premission.link.webUrl)
|
||||
remote_file = self.root_path.get_by_path(path + "/" + name)
|
||||
expiration_datetime = datetime.datetime.now(
|
||||
tz=datetime.timezone.utc
|
||||
) + datetime.timedelta(hours=1)
|
||||
expiration_datetime = expiration_datetime.strftime(
|
||||
"%Y-%m-%dT%H:%M:%SZ")
|
||||
permission = remote_file.create_link(
|
||||
"view", "anonymous", expiration_datetime=expiration_datetime
|
||||
).execute_query()
|
||||
return self._convert_link_to_download_link(permission.link.webUrl)
|
||||
|
||||
async def get_file_response(self, file_code: FileCodes):
|
||||
try:
|
||||
filename = file_code.prefix + file_code.suffix
|
||||
link = await asyncio.to_thread(self._get_file_url, await file_code.get_file_path(), filename)
|
||||
link = await asyncio.to_thread(
|
||||
self._get_file_url, await file_code.get_file_path(), filename
|
||||
)
|
||||
tmp = io.BytesIO()
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(link) as resp:
|
||||
@@ -235,15 +506,25 @@ class OneDriveFileStorage(FileStorageInterface):
|
||||
tmp.seek(0)
|
||||
content = tmp.read()
|
||||
tmp.close()
|
||||
return Response(content, media_type="application/octet-stream", headers={"Content-Disposition": f'attachment; filename="{filename.encode("utf-8").decode("latin-1")}"'})
|
||||
return Response(
|
||||
content,
|
||||
media_type="application/octet-stream",
|
||||
headers={
|
||||
"Content-Disposition": f'attachment; filename="{filename.encode("utf-8").decode("latin-1")}"'
|
||||
},
|
||||
)
|
||||
except Exception:
|
||||
raise HTTPException(status_code=503, detail='服务代理下载异常,请稍后再试')
|
||||
raise HTTPException(status_code=503, detail="服务代理下载异常,请稍后再试")
|
||||
|
||||
async def get_file_url(self, file_code: FileCodes):
|
||||
if self.proxy:
|
||||
return await get_file_url(file_code.code)
|
||||
else:
|
||||
return await asyncio.to_thread(self._get_file_url, await file_code.get_file_path(), f'{file_code.prefix}{file_code.suffix}')
|
||||
return await asyncio.to_thread(
|
||||
self._get_file_url,
|
||||
await file_code.get_file_path(),
|
||||
f"{file_code.prefix}{file_code.suffix}",
|
||||
)
|
||||
|
||||
|
||||
class OpenDALFileStorage(FileStorageInterface):
|
||||
@@ -255,10 +536,12 @@ class OpenDALFileStorage(FileStorageInterface):
|
||||
self.service = settings.opendal_scheme
|
||||
service_settings = {}
|
||||
for key, value in settings.items():
|
||||
if key.startswith('opendal_' + self.service):
|
||||
setting_name = key.split('_', 2)[2]
|
||||
if key.startswith("opendal_" + self.service):
|
||||
setting_name = key.split("_", 2)[2]
|
||||
service_settings[setting_name] = value
|
||||
self.operator = opendal.AsyncOperator(settings.opendal_scheme, **service_settings)
|
||||
self.operator = opendal.AsyncOperator(
|
||||
settings.opendal_scheme, **service_settings
|
||||
)
|
||||
|
||||
async def save_file(self, file: UploadFile, save_path: str):
|
||||
await self.operator.write(save_path, file.file.read())
|
||||
@@ -274,19 +557,256 @@ class OpenDALFileStorage(FileStorageInterface):
|
||||
filename = file_code.prefix + file_code.suffix
|
||||
content = await self.operator.read(await file_code.get_file_path())
|
||||
headers = {
|
||||
"Content-Disposition": f'attachment; filename="{filename}"'
|
||||
}
|
||||
return Response(content, headers=headers, media_type="application/octet-stream")
|
||||
"Content-Disposition": f'attachment; filename="{filename}"'}
|
||||
return Response(
|
||||
content, headers=headers, media_type="application/octet-stream"
|
||||
)
|
||||
except Exception as e:
|
||||
print(e, file=sys.stderr)
|
||||
logger.info(e)
|
||||
raise HTTPException(status_code=404, detail="文件已过期删除")
|
||||
|
||||
|
||||
storages = {
|
||||
'local': SystemFileStorage,
|
||||
's3': S3FileStorage,
|
||||
'onedrive': OneDriveFileStorage,
|
||||
'opendal': OpenDALFileStorage,
|
||||
}
|
||||
class WebDAVFileStorage(FileStorageInterface):
|
||||
_instance: Optional["WebDAVFileStorage"] = None
|
||||
|
||||
file_storage: FileStorageInterface = storages[settings.file_storage]()
|
||||
def __init__(self):
|
||||
if not hasattr(self, "_initialized"):
|
||||
self.base_url = settings.webdav_url.rstrip("/") + "/"
|
||||
self.auth = aiohttp.BasicAuth(
|
||||
login=settings.webdav_username, password=settings.webdav_password
|
||||
)
|
||||
self._initialized = True
|
||||
|
||||
def _build_url(self, path: str) -> str:
|
||||
encoded_path = quote(str(path.replace("\\", "/").lstrip("/")).lstrip("/"))
|
||||
return f"{self.base_url}{encoded_path}"
|
||||
|
||||
async def _mkdir_p(self, directory_path: str):
|
||||
"""递归创建目录(类似mkdir -p)"""
|
||||
path_obj = Path(unquote(directory_path))
|
||||
current_path = ""
|
||||
|
||||
async with aiohttp.ClientSession(auth=self.auth) as session:
|
||||
# 逐级检查目录是否存在
|
||||
for part in path_obj.parts:
|
||||
current_path = str(Path(current_path) / part)
|
||||
url = self._build_url(current_path)
|
||||
|
||||
# 检查目录是否存在
|
||||
async with session.head(url) as resp:
|
||||
if resp.status == 404:
|
||||
# 创建目录
|
||||
async with session.request("MKCOL", url) as mkcol_resp:
|
||||
if mkcol_resp.status not in (200, 201, 409):
|
||||
content = await mkcol_resp.text()
|
||||
raise HTTPException(
|
||||
status_code=mkcol_resp.status,
|
||||
detail=f"目录创建失败: {content[:200]}",
|
||||
)
|
||||
|
||||
async def _is_dir_empty(self, dir_path: str) -> bool:
|
||||
"""检查目录是否为空"""
|
||||
url = self._build_url(dir_path)
|
||||
|
||||
async with aiohttp.ClientSession(auth=self.auth) as session:
|
||||
async with session.request("PROPFIND", url, headers={"Depth": "1"}) as resp:
|
||||
if resp.status != 207: # 207 是 Multi-Status 响应
|
||||
return False
|
||||
content = await resp.text()
|
||||
# 如果只有一个 response(当前目录),说明目录为空
|
||||
return content.count("<D:response>") <= 1
|
||||
|
||||
async def _delete_empty_dirs(self, file_path: str, session: aiohttp.ClientSession):
|
||||
"""递归删除空目录"""
|
||||
path_obj = Path(file_path)
|
||||
current_path = path_obj.parent
|
||||
|
||||
while str(current_path) != ".":
|
||||
if not await self._is_dir_empty(str(current_path)):
|
||||
break
|
||||
|
||||
url = self._build_url(str(current_path))
|
||||
async with session.delete(url) as resp:
|
||||
if resp.status not in (200, 204, 404):
|
||||
break
|
||||
|
||||
current_path = current_path.parent
|
||||
|
||||
async def save_file(self, file: UploadFile, save_path: str):
|
||||
"""保存文件(自动创建目录)"""
|
||||
path_obj = Path(save_path)
|
||||
directory_path = str(path_obj.parent)
|
||||
# 提取原始文件名并进行清理
|
||||
filename = await sanitize_filename(path_obj.name)
|
||||
# 构建安全的保存路径
|
||||
safe_save_path = str(Path(directory_path) / filename)
|
||||
|
||||
try:
|
||||
# 先创建目录结构
|
||||
await self._mkdir_p(directory_path)
|
||||
# 上传文件
|
||||
url = self._build_url(safe_save_path)
|
||||
async with aiohttp.ClientSession(auth=self.auth) as session:
|
||||
content = await file.read()
|
||||
async with session.put(
|
||||
url, data=content, headers={
|
||||
"Content-Type": file.content_type}
|
||||
) as resp:
|
||||
if resp.status not in (200, 201, 204):
|
||||
content = await resp.text()
|
||||
raise HTTPException(
|
||||
status_code=resp.status,
|
||||
detail=f"文件上传失败: {content[:200]}",
|
||||
)
|
||||
except aiohttp.ClientError as e:
|
||||
raise HTTPException(
|
||||
status_code=503, detail=f"WebDAV连接异常: {str(e)}")
|
||||
|
||||
async def delete_file(self, file_code: FileCodes):
|
||||
"""删除WebDAV文件及空目录"""
|
||||
file_path = await file_code.get_file_path()
|
||||
url = self._build_url(file_path)
|
||||
try:
|
||||
async with aiohttp.ClientSession(auth=self.auth) as session:
|
||||
# 删除文件
|
||||
async with session.delete(url) as resp:
|
||||
if resp.status not in (200, 204, 404):
|
||||
content = await resp.text()
|
||||
raise HTTPException(
|
||||
status_code=resp.status,
|
||||
detail=f"WebDAV删除失败: {content[:200]}",
|
||||
)
|
||||
|
||||
# 使用同一个 session 删除空目录
|
||||
await self._delete_empty_dirs(file_path, session)
|
||||
|
||||
except aiohttp.ClientError as e:
|
||||
raise HTTPException(
|
||||
status_code=503, detail=f"WebDAV连接异常: {str(e)}")
|
||||
|
||||
async def get_file_url(self, file_code: FileCodes):
|
||||
return await get_file_url(file_code.code)
|
||||
|
||||
async def get_file_response(self, file_code: FileCodes):
|
||||
"""获取文件响应(代理模式)"""
|
||||
try:
|
||||
filename = file_code.prefix + file_code.suffix
|
||||
url = self._build_url(await file_code.get_file_path())
|
||||
async with aiohttp.ClientSession(headers={
|
||||
"Authorization": f"Basic {base64.b64encode(f'{settings.webdav_username}:{settings.webdav_password}'.encode()).decode()}"
|
||||
}) as session:
|
||||
async with session.get(url) as resp:
|
||||
if resp.status != 200:
|
||||
raise HTTPException(
|
||||
status_code=resp.status,
|
||||
detail=f"文件获取失败{resp.status}: {await resp.text()}",
|
||||
)
|
||||
# 读取内容到内存
|
||||
content = await resp.read()
|
||||
return Response(
|
||||
content=content,
|
||||
media_type=resp.headers.get(
|
||||
"Content-Type", "application/octet-stream"
|
||||
),
|
||||
headers={
|
||||
"Content-Disposition": f'attachment; filename="{filename.encode("utf-8").decode()}"'
|
||||
},
|
||||
)
|
||||
except aiohttp.ClientError as e:
|
||||
raise HTTPException(
|
||||
status_code=503, detail=f"WebDAV连接异常: {str(e)}")
|
||||
|
||||
async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str):
|
||||
chunk_path = str(Path(save_path).parent / "chunks" / upload_id / f"{chunk_index}.part")
|
||||
chunk_url = self._build_url(chunk_path)
|
||||
async with aiohttp.ClientSession(auth=self.auth) as session:
|
||||
await session.put(chunk_url, data=chunk_data)
|
||||
propfind_url = self._build_url(chunk_path)
|
||||
headers = {
|
||||
'Content-Type': 'application/xml; charset=utf-8', 'Depth': '0'}
|
||||
body = f"""
|
||||
<D:propertyupdate xmlns:D="DAV:">
|
||||
<D:set>
|
||||
<D:prop>
|
||||
<ChunkHash xmlns="urn:filecodebox">{chunk_hash}</ChunkHash>
|
||||
</D:prop>
|
||||
</D:set>
|
||||
</D:propertyupdate>
|
||||
"""
|
||||
await session.request('PROPPATCH', propfind_url, headers=headers, data=body)
|
||||
|
||||
async def merge_chunks(self, upload_id: str, chunk_info: UploadChunk, save_path: str) -> tuple[str, str]:
|
||||
file_sha256 = hashlib.sha256()
|
||||
output_url = self._build_url(save_path)
|
||||
chunk_dir = str(Path(save_path).parent / "chunks" / upload_id)
|
||||
async with aiohttp.ClientSession(auth=self.auth) as session:
|
||||
await session.put(output_url, headers={'Content-Length': '0'})
|
||||
for i in range(chunk_info.total_chunks):
|
||||
chunk_path = f"{chunk_dir}/{i}.part"
|
||||
chunk_url = self._build_url(chunk_path)
|
||||
propfind_url = self._build_url(chunk_path)
|
||||
headers = {
|
||||
'Content-Type': 'application/xml; charset=utf-8', 'Depth': '0'}
|
||||
body = """
|
||||
<D:propfind xmlns:D="DAV:">
|
||||
<D:prop>
|
||||
<ChunkHash xmlns="urn:filecodebox"/>
|
||||
</D:prop>
|
||||
</D:propfind>
|
||||
"""
|
||||
async with session.request('PROPFIND', propfind_url, headers=headers, data=body) as resp:
|
||||
xml_data = await resp.text()
|
||||
chunk_hash = re.search(
|
||||
r'<ChunkHash[^>]*>([^<]+)</ChunkHash>', xml_data).group(1)
|
||||
file_sha256.update(bytes.fromhex(chunk_hash))
|
||||
async with session.get(chunk_url) as resp:
|
||||
chunk_data = await resp.read()
|
||||
await session.request('PATCH', output_url, headers={
|
||||
'Content-Type': 'application/octet-stream',
|
||||
'Content-Length': str(len(chunk_data)),
|
||||
'Content-Range': f'bytes */{chunk_info.file_size}'
|
||||
}, data=chunk_data)
|
||||
return save_path, file_sha256.hexdigest()
|
||||
|
||||
async def clean_chunks(self, upload_id: str, save_path: str):
|
||||
"""
|
||||
清理 WebDAV 上的临时分片文件
|
||||
:param upload_id: 上传会话ID
|
||||
:param save_path: 文件保存路径
|
||||
"""
|
||||
chunk_dir = str(Path(save_path).parent / "chunks" / upload_id)
|
||||
chunk_dir_url = self._build_url(chunk_dir)
|
||||
async with aiohttp.ClientSession(auth=self.auth) as session:
|
||||
try:
|
||||
# 检查分片目录是否存在
|
||||
async with session.request("PROPFIND", chunk_dir_url, headers={"Depth": "1"}) as resp:
|
||||
if resp.status == 207: # 207 表示 Multi-Status
|
||||
# 获取目录下的所有分片文件
|
||||
xml_data = await resp.text()
|
||||
file_paths = re.findall(
|
||||
r'<D:href>(.*?)</D:href>', xml_data)
|
||||
for file_path in file_paths:
|
||||
if file_path.endswith(".part"):
|
||||
# 删除分片文件
|
||||
file_url = self._build_url(file_path)
|
||||
async with session.delete(file_url) as delete_resp:
|
||||
if delete_resp.status not in (200, 204, 404):
|
||||
logger.info(f"删除分片文件失败: {file_path}")
|
||||
|
||||
# 删除分片目录
|
||||
async with session.delete(chunk_dir_url) as delete_resp:
|
||||
if delete_resp.status not in (200, 204, 404):
|
||||
logger.info(f"删除分片目录失败: {chunk_dir_url}")
|
||||
else:
|
||||
logger.info(f"分片目录不存在: {chunk_dir_url}")
|
||||
except Exception as e:
|
||||
logger.info(f"清理 WebDAV 分片时出错: {e}")
|
||||
|
||||
|
||||
storages = {
|
||||
"local": SystemFileStorage,
|
||||
"s3": S3FileStorage,
|
||||
"onedrive": OneDriveFileStorage,
|
||||
"opendal": OpenDALFileStorage,
|
||||
"webdav": WebDAVFileStorage,
|
||||
}
|
||||
@@ -3,25 +3,36 @@
|
||||
# @File : tasks.py
|
||||
# @Software: PyCharm
|
||||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
|
||||
from tortoise.expressions import Q
|
||||
|
||||
from apps.base.models import FileCodes
|
||||
from apps.base.utils import error_ip_limit, upload_ip_limit
|
||||
from core.storage import file_storage
|
||||
from apps.base.utils import ip_limit
|
||||
from core.settings import settings, data_root
|
||||
from core.storage import FileStorageInterface, storages
|
||||
from core.utils import get_now
|
||||
|
||||
|
||||
async def delete_expire_files():
|
||||
file_storage: FileStorageInterface = storages[settings.file_storage]()
|
||||
while True:
|
||||
try:
|
||||
await error_ip_limit.remove_expired_ip()
|
||||
await upload_ip_limit.remove_expired_ip()
|
||||
expire_data = await FileCodes.filter(Q(expired_at__lt=await get_now()) | Q(expired_count=0)).all()
|
||||
# 遍历 share目录下的所有文件夹,删除空的文件夹,并判断父目录是否为空,如果为空也删除
|
||||
if settings.file_storage == "local":
|
||||
for root, dirs, files in os.walk(f"{data_root}/share/data"):
|
||||
if not dirs and not files:
|
||||
os.rmdir(root)
|
||||
await ip_limit["error"].remove_expired_ip()
|
||||
await ip_limit["upload"].remove_expired_ip()
|
||||
expire_data = await FileCodes.filter(
|
||||
Q(expired_at__lt=await get_now()) | Q(expired_count=0)
|
||||
).all()
|
||||
for exp in expire_data:
|
||||
await file_storage.delete_file(exp)
|
||||
await exp.delete()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
logging.error(e)
|
||||
finally:
|
||||
await asyncio.sleep(600)
|
||||
@@ -4,11 +4,12 @@
|
||||
# @Software: PyCharm
|
||||
import datetime
|
||||
import hashlib
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
import time
|
||||
|
||||
from apps.base.depends import IPRateLimit
|
||||
from core.settings import settings
|
||||
|
||||
|
||||
async def get_random_num():
|
||||
@@ -27,7 +28,7 @@ async def get_random_string():
|
||||
获取随机字符串
|
||||
:return:
|
||||
"""
|
||||
return ''.join(random.choice(r_s) for _ in range(5))
|
||||
return "".join(random.choice(r_s) for _ in range(5))
|
||||
|
||||
|
||||
async def get_now():
|
||||
@@ -35,9 +36,7 @@ async def get_now():
|
||||
获取当前时间
|
||||
:return:
|
||||
"""
|
||||
return datetime.datetime.now(
|
||||
datetime.timezone(datetime.timedelta(hours=8))
|
||||
)
|
||||
return datetime.datetime.now(datetime.timezone(datetime.timedelta(hours=8)))
|
||||
|
||||
|
||||
async def get_select_token(code: str):
|
||||
@@ -46,8 +45,10 @@ async def get_select_token(code: str):
|
||||
:param code:
|
||||
:return:
|
||||
"""
|
||||
token = "123456"
|
||||
return hashlib.sha256(f"{code}{int(time.time() / 1000)}000{token}".encode()).hexdigest()
|
||||
token = settings.admin_token
|
||||
return hashlib.sha256(
|
||||
f"{code}{int(time.time() / 1000)}000{token}".encode()
|
||||
).hexdigest()
|
||||
|
||||
|
||||
async def get_file_url(code: str):
|
||||
@@ -56,7 +57,7 @@ async def get_file_url(code: str):
|
||||
:param code:
|
||||
:return:
|
||||
"""
|
||||
return f'/share/download?key={await get_select_token(code)}&code={code}'
|
||||
return f"/share/download?key={await get_select_token(code)}&code={code}"
|
||||
|
||||
|
||||
async def max_save_times_desc(max_save_seconds: int):
|
||||
@@ -68,28 +69,52 @@ async def max_save_times_desc(max_save_seconds: int):
|
||||
|
||||
def gen_desc_zh(value: int, desc: str):
|
||||
if value > 0:
|
||||
return f'{value}{desc}'
|
||||
return f"{value}{desc}"
|
||||
else:
|
||||
return ''
|
||||
return ""
|
||||
|
||||
def gen_desc_en(value: int, desc: str):
|
||||
if value > 0:
|
||||
ret = f'{value} {desc}'
|
||||
ret = f"{value} {desc}"
|
||||
if value > 1:
|
||||
ret += 's'
|
||||
ret += ' '
|
||||
ret += "s"
|
||||
ret += " "
|
||||
return ret
|
||||
else:
|
||||
return ''
|
||||
return ""
|
||||
|
||||
max_timedelta = datetime.timedelta(seconds=max_save_seconds)
|
||||
desc_zh, desc_en = '最长保存时间:', 'Max save time: '
|
||||
desc_zh += gen_desc_zh(max_timedelta.days, '天')
|
||||
desc_en += gen_desc_en(max_timedelta.days, 'day')
|
||||
desc_zh += gen_desc_zh(max_timedelta.seconds // 3600, '小时')
|
||||
desc_en += gen_desc_en(max_timedelta.seconds // 3600, 'hour')
|
||||
desc_zh += gen_desc_zh(max_timedelta.seconds % 3600 // 60, '分钟')
|
||||
desc_en += gen_desc_en(max_timedelta.seconds % 3600 // 60, 'minute')
|
||||
desc_zh += gen_desc_zh(max_timedelta.seconds % 60, '秒')
|
||||
desc_en += gen_desc_en(max_timedelta.seconds % 60, 'second')
|
||||
desc_zh, desc_en = "最长保存时间:", "Max save time: "
|
||||
desc_zh += gen_desc_zh(max_timedelta.days, "天")
|
||||
desc_en += gen_desc_en(max_timedelta.days, "day")
|
||||
desc_zh += gen_desc_zh(max_timedelta.seconds // 3600, "小时")
|
||||
desc_en += gen_desc_en(max_timedelta.seconds // 3600, "hour")
|
||||
desc_zh += gen_desc_zh(max_timedelta.seconds % 3600 // 60, "分钟")
|
||||
desc_en += gen_desc_en(max_timedelta.seconds % 3600 // 60, "minute")
|
||||
desc_zh += gen_desc_zh(max_timedelta.seconds % 60, "秒")
|
||||
desc_en += gen_desc_en(max_timedelta.seconds % 60, "second")
|
||||
return desc_zh, desc_en
|
||||
|
||||
|
||||
async def sanitize_filename(filename: str) -> str:
|
||||
"""
|
||||
安全处理文件名:
|
||||
1. 剥离路径只保留文件名
|
||||
2. 替换非法字符
|
||||
3. 处理空文件名情况
|
||||
"""
|
||||
filename = os.path.basename(filename)
|
||||
illegal_chars = r'[\\/*?:"<>|\x00-\x1F]' # 包含控制字符
|
||||
# 替换非法字符为下划线
|
||||
cleaned = re.sub(illegal_chars, '_', filename)
|
||||
# 处理空格(可选替换为_)
|
||||
cleaned = cleaned.replace(' ', '_')
|
||||
# 处理连续下划线
|
||||
cleaned = re.sub(r'_+', '_', cleaned)
|
||||
# 处理首尾特殊字符
|
||||
cleaned = cleaned.strip('._')
|
||||
# 处理空文件名情况
|
||||
if not cleaned:
|
||||
cleaned = 'unnamed_file'
|
||||
# 长度限制(按需调整)
|
||||
return cleaned[:255]
|
||||
@@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
services:
|
||||
file-code-box:
|
||||
image: lanol/filecodebox:latest
|
||||
volumes:
|
||||
- fcb-data:/app/data:rw
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "12345:12345"
|
||||
volumes:
|
||||
fcb-data:
|
||||
external: false
|
||||
@@ -0,0 +1,275 @@
|
||||
import {
|
||||
useMediaQuery
|
||||
} from "./chunk-KT7LHMJ2.js";
|
||||
import {
|
||||
computed,
|
||||
ref,
|
||||
shallowRef,
|
||||
watch
|
||||
} from "./chunk-CQOUZRMK.js";
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/index.js
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/fonts.css";
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/without-fonts.js
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/vars.css";
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/base.css";
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/icons.css";
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/utils.css";
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css";
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css";
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css";
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css";
|
||||
import "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css";
|
||||
import VPBadge from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
|
||||
import Layout from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/Layout.vue";
|
||||
import { default as default2 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
|
||||
import { default as default3 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPButton.vue";
|
||||
import { default as default4 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue";
|
||||
import { default as default5 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPFeatures.vue";
|
||||
import { default as default6 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeContent.vue";
|
||||
import { default as default7 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue";
|
||||
import { default as default8 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue";
|
||||
import { default as default9 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue";
|
||||
import { default as default10 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPImage.vue";
|
||||
import { default as default11 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPLink.vue";
|
||||
import { default as default12 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue";
|
||||
import { default as default13 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPSocialLink.vue";
|
||||
import { default as default14 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPSocialLinks.vue";
|
||||
import { default as default15 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue";
|
||||
import { default as default16 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue";
|
||||
import { default as default17 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue";
|
||||
import { default as default18 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue";
|
||||
import { default as default19 } from "/Users/lan/Project/Python/FileCodeBox/docs/node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue";
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
|
||||
import { onContentUpdated } from "vitepress";
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/outline.js
|
||||
import { getScrollOffset } from "vitepress";
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/support/utils.js
|
||||
import { withBase } from "vitepress";
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/data.js
|
||||
import { useData as useData$ } from "vitepress";
|
||||
var useData = useData$;
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/support/utils.js
|
||||
function ensureStartingSlash(path) {
|
||||
return path.startsWith("/") ? path : `/${path}`;
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/support/sidebar.js
|
||||
function getSidebar(_sidebar, path) {
|
||||
if (Array.isArray(_sidebar))
|
||||
return addBase(_sidebar);
|
||||
if (_sidebar == null)
|
||||
return [];
|
||||
path = ensureStartingSlash(path);
|
||||
const dir = Object.keys(_sidebar).sort((a, b) => {
|
||||
return b.split("/").length - a.split("/").length;
|
||||
}).find((dir2) => {
|
||||
return path.startsWith(ensureStartingSlash(dir2));
|
||||
});
|
||||
const sidebar = dir ? _sidebar[dir] : [];
|
||||
return Array.isArray(sidebar) ? addBase(sidebar) : addBase(sidebar.items, sidebar.base);
|
||||
}
|
||||
function getSidebarGroups(sidebar) {
|
||||
const groups = [];
|
||||
let lastGroupIndex = 0;
|
||||
for (const index in sidebar) {
|
||||
const item = sidebar[index];
|
||||
if (item.items) {
|
||||
lastGroupIndex = groups.push(item);
|
||||
continue;
|
||||
}
|
||||
if (!groups[lastGroupIndex]) {
|
||||
groups.push({ items: [] });
|
||||
}
|
||||
groups[lastGroupIndex].items.push(item);
|
||||
}
|
||||
return groups;
|
||||
}
|
||||
function addBase(items, _base) {
|
||||
return [...items].map((_item) => {
|
||||
const item = { ..._item };
|
||||
const base = item.base || _base;
|
||||
if (base && item.link)
|
||||
item.link = base + item.link;
|
||||
if (item.items)
|
||||
item.items = addBase(item.items, base);
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/sidebar.js
|
||||
function useSidebar() {
|
||||
const { frontmatter, page, theme: theme2 } = useData();
|
||||
const is960 = useMediaQuery("(min-width: 960px)");
|
||||
const isOpen = ref(false);
|
||||
const _sidebar = computed(() => {
|
||||
const sidebarConfig = theme2.value.sidebar;
|
||||
const relativePath = page.value.relativePath;
|
||||
return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];
|
||||
});
|
||||
const sidebar = ref(_sidebar.value);
|
||||
watch(_sidebar, (next, prev) => {
|
||||
if (JSON.stringify(next) !== JSON.stringify(prev))
|
||||
sidebar.value = _sidebar.value;
|
||||
});
|
||||
const hasSidebar = computed(() => {
|
||||
return frontmatter.value.sidebar !== false && sidebar.value.length > 0 && frontmatter.value.layout !== "home";
|
||||
});
|
||||
const leftAside = computed(() => {
|
||||
if (hasAside)
|
||||
return frontmatter.value.aside == null ? theme2.value.aside === "left" : frontmatter.value.aside === "left";
|
||||
return false;
|
||||
});
|
||||
const hasAside = computed(() => {
|
||||
if (frontmatter.value.layout === "home")
|
||||
return false;
|
||||
if (frontmatter.value.aside != null)
|
||||
return !!frontmatter.value.aside;
|
||||
return theme2.value.aside !== false;
|
||||
});
|
||||
const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);
|
||||
const sidebarGroups = computed(() => {
|
||||
return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];
|
||||
});
|
||||
function open() {
|
||||
isOpen.value = true;
|
||||
}
|
||||
function close() {
|
||||
isOpen.value = false;
|
||||
}
|
||||
function toggle() {
|
||||
isOpen.value ? close() : open();
|
||||
}
|
||||
return {
|
||||
isOpen,
|
||||
sidebar,
|
||||
sidebarGroups,
|
||||
hasSidebar,
|
||||
hasAside,
|
||||
leftAside,
|
||||
isSidebarEnabled,
|
||||
open,
|
||||
close,
|
||||
toggle
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/outline.js
|
||||
var ignoreRE = /\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/;
|
||||
var resolvedHeaders = [];
|
||||
function getHeaders(range) {
|
||||
const headers = [
|
||||
...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")
|
||||
].filter((el) => el.id && el.hasChildNodes()).map((el) => {
|
||||
const level = Number(el.tagName[1]);
|
||||
return {
|
||||
element: el,
|
||||
title: serializeHeader(el),
|
||||
link: "#" + el.id,
|
||||
level
|
||||
};
|
||||
});
|
||||
return resolveHeaders(headers, range);
|
||||
}
|
||||
function serializeHeader(h) {
|
||||
let ret = "";
|
||||
for (const node of h.childNodes) {
|
||||
if (node.nodeType === 1) {
|
||||
if (ignoreRE.test(node.className))
|
||||
continue;
|
||||
ret += node.textContent;
|
||||
} else if (node.nodeType === 3) {
|
||||
ret += node.textContent;
|
||||
}
|
||||
}
|
||||
return ret.trim();
|
||||
}
|
||||
function resolveHeaders(headers, range) {
|
||||
if (range === false) {
|
||||
return [];
|
||||
}
|
||||
const levelsRange = (typeof range === "object" && !Array.isArray(range) ? range.level : range) || 2;
|
||||
const [high, low] = typeof levelsRange === "number" ? [levelsRange, levelsRange] : levelsRange === "deep" ? [2, 6] : levelsRange;
|
||||
return buildTree(headers, high, low);
|
||||
}
|
||||
function buildTree(data, min, max) {
|
||||
resolvedHeaders.length = 0;
|
||||
const result = [];
|
||||
const stack = [];
|
||||
data.forEach((item) => {
|
||||
const node = { ...item, children: [] };
|
||||
let parent = stack[stack.length - 1];
|
||||
while (parent && parent.level >= node.level) {
|
||||
stack.pop();
|
||||
parent = stack[stack.length - 1];
|
||||
}
|
||||
if (node.element.classList.contains("ignore-header") || parent && "shouldIgnore" in parent) {
|
||||
stack.push({ level: node.level, shouldIgnore: true });
|
||||
return;
|
||||
}
|
||||
if (node.level > max || node.level < min)
|
||||
return;
|
||||
resolvedHeaders.push({ element: node.element, link: node.link });
|
||||
if (parent)
|
||||
parent.children.push(node);
|
||||
else
|
||||
result.push(node);
|
||||
stack.push(node);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
|
||||
function useLocalNav() {
|
||||
const { theme: theme2, frontmatter } = useData();
|
||||
const headers = shallowRef([]);
|
||||
const hasLocalNav = computed(() => {
|
||||
return headers.value.length > 0;
|
||||
});
|
||||
onContentUpdated(() => {
|
||||
headers.value = getHeaders(frontmatter.value.outline ?? theme2.value.outline);
|
||||
});
|
||||
return {
|
||||
headers,
|
||||
hasLocalNav
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/without-fonts.js
|
||||
var theme = {
|
||||
Layout,
|
||||
enhanceApp: ({ app }) => {
|
||||
app.component("Badge", VPBadge);
|
||||
}
|
||||
};
|
||||
var without_fonts_default = theme;
|
||||
export {
|
||||
default2 as VPBadge,
|
||||
default3 as VPButton,
|
||||
default4 as VPDocAsideSponsors,
|
||||
default5 as VPFeatures,
|
||||
default6 as VPHomeContent,
|
||||
default7 as VPHomeFeatures,
|
||||
default8 as VPHomeHero,
|
||||
default9 as VPHomeSponsors,
|
||||
default10 as VPImage,
|
||||
default11 as VPLink,
|
||||
default12 as VPNavBarSearch,
|
||||
default13 as VPSocialLink,
|
||||
default14 as VPSocialLinks,
|
||||
default15 as VPSponsors,
|
||||
default16 as VPTeamMembers,
|
||||
default17 as VPTeamPage,
|
||||
default18 as VPTeamPageSection,
|
||||
default19 as VPTeamPageTitle,
|
||||
without_fonts_default as default,
|
||||
useLocalNav,
|
||||
useSidebar
|
||||
};
|
||||
//# sourceMappingURL=@theme_index.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/index.js", "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/without-fonts.js", "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/local-nav.js", "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/outline.js", "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/support/utils.js", "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/data.js", "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/support/sidebar.js", "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/composables/sidebar.js"],
|
||||
"sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/icons.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\nexport { default as VPBadge } from './components/VPBadge.vue';\nexport { default as VPButton } from './components/VPButton.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPFeatures } from './components/VPFeatures.vue';\nexport { default as VPHomeContent } from './components/VPHomeContent.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPImage } from './components/VPImage.vue';\nexport { default as VPLink } from './components/VPLink.vue';\nexport { default as VPNavBarSearch } from './components/VPNavBarSearch.vue';\nexport { default as VPSocialLink } from './components/VPSocialLink.vue';\nexport { default as VPSocialLinks } from './components/VPSocialLinks.vue';\nexport { default as VPSponsors } from './components/VPSponsors.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { useLocalNav } from './composables/local-nav';\nexport { useSidebar } from './composables/sidebar';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n", "import { onContentUpdated } from 'vitepress';\nimport { computed, shallowRef } from 'vue';\nimport { getHeaders } from '../composables/outline';\nimport { useData } from './data';\nexport function useLocalNav() {\n const { theme, frontmatter } = useData();\n const headers = shallowRef([]);\n const hasLocalNav = computed(() => {\n return headers.value.length > 0;\n });\n onContentUpdated(() => {\n headers.value = getHeaders(frontmatter.value.outline ?? theme.value.outline);\n });\n return {\n headers,\n hasLocalNav\n };\n}\n", "import { getScrollOffset } from 'vitepress';\nimport { onMounted, onUnmounted, onUpdated } from 'vue';\nimport { throttleAndDebounce } from '../support/utils';\nimport { useAside } from './aside';\nconst ignoreRE = /\\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\\b/;\n// cached list of anchor elements from resolveHeaders\nconst resolvedHeaders = [];\nexport function resolveTitle(theme) {\n return ((typeof theme.outline === 'object' &&\n !Array.isArray(theme.outline) &&\n theme.outline.label) ||\n theme.outlineTitle ||\n 'On this page');\n}\nexport function getHeaders(range) {\n const headers = [\n ...document.querySelectorAll('.VPDoc :where(h1,h2,h3,h4,h5,h6)')\n ]\n .filter((el) => el.id && el.hasChildNodes())\n .map((el) => {\n const level = Number(el.tagName[1]);\n return {\n element: el,\n title: serializeHeader(el),\n link: '#' + el.id,\n level\n };\n });\n return resolveHeaders(headers, range);\n}\nfunction serializeHeader(h) {\n let ret = '';\n for (const node of h.childNodes) {\n if (node.nodeType === 1) {\n if (ignoreRE.test(node.className))\n continue;\n ret += node.textContent;\n }\n else if (node.nodeType === 3) {\n ret += node.textContent;\n }\n }\n return ret.trim();\n}\nexport function resolveHeaders(headers, range) {\n if (range === false) {\n return [];\n }\n const levelsRange = (typeof range === 'object' && !Array.isArray(range)\n ? range.level\n : range) || 2;\n const [high, low] = typeof levelsRange === 'number'\n ? [levelsRange, levelsRange]\n : levelsRange === 'deep'\n ? [2, 6]\n : levelsRange;\n return buildTree(headers, high, low);\n}\nexport function useActiveAnchor(container, marker) {\n const { isAsideEnabled } = useAside();\n const onScroll = throttleAndDebounce(setActiveLink, 100);\n let prevActiveLink = null;\n onMounted(() => {\n requestAnimationFrame(setActiveLink);\n window.addEventListener('scroll', onScroll);\n });\n onUpdated(() => {\n // sidebar update means Line truncated
|
||||
"mappings": ";;;;;;;;;;;AAAA,OAAO;;;ACAP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,SAAoB,WAAXA,gBAA0B;AACnC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAAq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AAC;AAC/D,QAAI;AACA,aAAO,SAAS,KAAK,IAAI;AAAA;AAEzB,aAAO,KAAK,IAAI;AACpB,UAAM,KAAK,IAAI;AAAA,EACnB,CAAC;AACD,SAAO;AACX;;;AD7KO,SAAS,cAAc;AAC1B,QAAM,EAAE,OAAAC,QAAO,YAAY,IAAI,QAAQ;AACvC,QAAM,UAAU,WAAW,CAAC,CAAC;AAC7B,QAAM,cAAc,SAAS,MAAM;AAC/B,WAAO,QAAQ,MAAM,SAAS;AAAA,EAClC,CAAC;AACD,mBAAiB,MAAM;AACnB,YAAQ,QAAQ,WAAW,YAAY,MAAM,WAAWA,OAAM,MAAM,OAAO;AAAA,EAC/E,CAAC;AACD,SAAO;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AACJ;;;ADcA,IAAM,QAAQ;AAAA,EACV;AAAA,EACA,YAAY,CAAC,EAAE,IAAI,MAAM;AACrB,QAAI,UAAU,SAAS,OAAO;AAAA,EAClC;AACJ;AACA,IAAO,wBAAQ;",
|
||||
"names": ["default", "dir", "theme", "theme"]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"hash": "d07f6dee",
|
||||
"configHash": "dee2d3bc",
|
||||
"lockfileHash": "bd28b2c2",
|
||||
"browserHash": "b96651ac",
|
||||
"optimized": {
|
||||
"vue": {
|
||||
"src": "../../../node_modules/.pnpm/vue@3.5.13/node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "bc5c7f34",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vue/devtools-api": {
|
||||
"src": "../../../node_modules/.pnpm/@vue+devtools-api@7.7.1/node_modules/@vue/devtools-api/dist/index.js",
|
||||
"file": "vitepress___@vue_devtools-api.js",
|
||||
"fileHash": "00859881",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/core": {
|
||||
"src": "../../../node_modules/.pnpm/@vueuse+core@12.5.0/node_modules/@vueuse/core/index.mjs",
|
||||
"file": "vitepress___@vueuse_core.js",
|
||||
"fileHash": "1c6da938",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/integrations/useFocusTrap": {
|
||||
"src": "../../../node_modules/.pnpm/@vueuse+integrations@12.5.0_focus-trap@7.6.4/node_modules/@vueuse/integrations/useFocusTrap.mjs",
|
||||
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
|
||||
"fileHash": "11c08fcf",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > mark.js/src/vanilla.js": {
|
||||
"src": "../../../node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js",
|
||||
"file": "vitepress___mark__js_src_vanilla__js.js",
|
||||
"fileHash": "b93dbfe7",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > minisearch": {
|
||||
"src": "../../../node_modules/.pnpm/minisearch@7.1.1/node_modules/minisearch/dist/es/index.js",
|
||||
"file": "vitepress___minisearch.js",
|
||||
"fileHash": "bfb6c3ac",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@theme/index": {
|
||||
"src": "../../../node_modules/.pnpm/vitepress@1.6.3_@algolia+client-search@5.20.2_postcss@8.5.2_search-insights@2.17.3/node_modules/vitepress/dist/client/theme-default/index.js",
|
||||
"file": "@theme_index.js",
|
||||
"fileHash": "07512287",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-KT7LHMJ2": {
|
||||
"file": "chunk-KT7LHMJ2.js"
|
||||
},
|
||||
"chunk-CQOUZRMK": {
|
||||
"file": "chunk-CQOUZRMK.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../node_modules/.pnpm/@vue+shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.js", "../../../node_modules/.pnpm/@vue+reactivity@3.5.13/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js", "../../../node_modules/.pnpm/@vue+runtime-core@3.5.13/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js", "../../../node_modules/.pnpm/@vue+runtime-dom@3.5.13/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js", "../../../node_modules/.pnpm/vue@3.5.13/node_modules/vue/dist/vue.runtime.esm-bundler.js"],
|
||||
"sourcesContent": ["/**\n* @vue/shared v3.5.13\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str) {\n const map = /* @__PURE__ */ Object.create(null);\n for (const key of str.split(\",\")) map[key] = 1;\n return (val) => val in map;\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction(\n (str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n }\n);\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction(\n (str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n }\n);\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](...arg);\n }\n};\nconst def = (obj, key, value, writable = false) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n writable,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\nfunction genCacheKey(source, options) {\n return source + JSON.stringify(\n options,\n (_, val) => typeof val === \"function\" ? val.toString() : val\n );\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLine truncated
|
||||
"mappings": ";AAOA,SAAS,QAAQ,KAAK;AACpB,QAAMA,OAAsB,uBAAO,OAAO,IAAI;AAC9C,aAAW,OAAO,IAAI,MAAM,GAAG,EAAG,CAAAA,KAAI,GAAG,IAAI;AAC7C,SAAO,CAAC,QAAQ,OAAOA;AACzB;AAEA,IAAM,YAAY,OAA4C,OAAO,OAAO,CAAC,CAAC,IAAI,CAAC;AACnF,IAAM,YAAY,OAA4C,OAAO,OAAO,CAAC,CAAC,IAAI,CAAC;AACnF,IAAM,OAAO,MAAM;AACnB;AACA,IAAM,KAAK,MAAM;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ACnD,IAAM,WAA2B,QAAQ,QAAQ;AACjD,IAAM,cAA8B,QAAQ,SAAS;AACrD,IAAM,YAA4B,QAAQ,SAAS;AAEnD,IAAM,sBAAsB;AAC5B,IAAM,uBAAuC,QAAQ,mBAAmB;AACxE,IAAM,gBAAgC;AAAA,EACpC,sBAAsB;AACxB;AACA,SAAS,mBAAmB,OAAO;AACjC,SAAO,CAAC,CAAC,SAAS,UAAU;AAC9B;AAmBA,IAAM,kBAAkC;AAAA,EACtC;AACF;AACA,IAAM,iBAAiC;AAAA,EACrC;AACF;AACA,IAAM,oBAAoC;AAAA,EACxC;AACF;AACA,SAAS,sBAAsB,OAAO;AACpC,MAAI,SAAS,MAAM;AACjB,WAAO;AAAA,EACT;AACA,QAAM,OAAO,OAAO;AACpB,SAAO,SAAS,YAAY,SAAS,YAAY,SAAS;AAC5D;AA6CA,IAAM,4BAA4B;AAClC,SAAS,qBAAqB,KAAK,cAAc;AAC/C,SAAO,ILine truncated
|
||||
"names": ["map", "computed", "computed", "self", "hasOwnProperty", "isRef", "readonly", "effect", "isRef", "isRef", "p", "version", "callHook", "remove", "ref", "patchProp", "hydrate", "hasWarned", "resolve", "watch", "render", "computed", "h", "createApp", "effect", "remove2", "track", "trigger", "isModelListener", "emit", "render2", "warn", "warn", "callHook", "resolve", "watch", "isBoolean", "def", "enterCbKey", "compile", "warn"]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../node_modules/.pnpm/@vueuse+shared@12.5.0/node_modules/@vueuse/shared/index.mjs", "../../../node_modules/.pnpm/@vueuse+core@12.5.0/node_modules/@vueuse/core/index.mjs"],
|
||||
"sourcesContent": ["import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, hasInjectionContext, inject, provide, isRef, unref, toValue as toValue$1, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? undefined : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = undefined;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? undefined : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get(v);\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? undefined : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const clear = () => {\n fns.clear();\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger,\n clear\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? undefined : _a.proxy;\n if (instance == null && !hasInjectionContext())\n throw new Error(\"injectLocal must be called in setup\");\n if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? undefined : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? undefined : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n const defaultValue = options == null ? undefined : options.defaultValue;\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key, defaultValue);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = undefined;\n scope = undefined;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!scope) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[kLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,cAAc,IAAI,SAAS;AAClC,MAAI;AACJ,QAAM,SAAS,WAAW;AAC1B,cAAY,MAAM;AAChB,WAAO,QAAQ,GAAG;AAAA,EACpB,GAAG;AAAA,IACD,GA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AI,CAAC,QAAQ;AAChB,YAAM,QAAQ,IAAI,GAAG;AACrB,aAAO;AAAA,QACL;AAAA,QACA,OAAO,UAAU,aAAa,SAAS,MAAM,KAAK,GAAG,GAAG,OAAO,IAAI;AAAA,MACrE;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEA,SAAS,WAAW,WAAW;AAC7B,MAAI,CAAC,MAAM,SAAS;AAClB,WAAO,SAAS,SAAS;AAC3B,QAAM,QAAQ,IAAI,MAAM,CAAC,GAAG;AAAA,IAC1B,IAAI,GAAG,GAAG,UAAU;AAClB,aAAO,MAAM,QAAQ,IAAI,UAAU,OAAO,GAAG,QAAQ,CAAC;AAAA,IACxD;AAAA,IACA,IAAI,GAAG,GAAG,OAAO;AACf,UAAI,MAAM,UAAU,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK;AAC3C,kBAAU,MAAM,CAAC,EAAE,QAAQ;AAAA;AAE3B,kBAAU,MAAM,CAAC,IAAI;AACvB,aAAO;AAAA,IACT;AAAA,IACA,eAAe,GAAG,GAAG;AACnB,aAAO,QAAQ,eAAe,UAAU,OAAO,CAAC;AAAA,IAClD;AAAA,IACA,IAAI,GAAG,GAAG;AALine truncated
|
||||
"names": ["get", "set", "ref", "keys", "invoke", "toRef", "toRefs", "toValue", "window", "document", "timestamp", "navigator", "events", "getValue", "defaults", "toRef", "set", "onUpdated", "preventDefault", "toRefs", "now", "keys", "get", "isReadonly"]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../node_modules/.pnpm/@vue+devtools-shared@7.7.1/node_modules/@vue/devtools-shared/dist/index.js", "../../../node_modules/.pnpm/perfect-debounce@1.0.0/node_modules/perfect-debounce/dist/index.mjs", "../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs", "../../../node_modules/.pnpm/birpc@0.2.19/node_modules/birpc/dist/index.mjs", "../../../node_modules/.pnpm/@vue+devtools-kit@7.7.1/node_modules/@vue/devtools-kit/dist/index.js"],
|
||||
"sourcesContent": ["var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target2, \"default\", { value: mod, enumerable: true }) : target2,\n mod\n));\n\n// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@22.10.5__jiti@2.4.2_postcss@8.4.49_tsx_s7k37zks4wtn7x2grzma6lrsfa/node_modules/tsup/assets/esm_shims.js\nvar init_esm_shims = __esm({\n \"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@22.10.5__jiti@2.4.2_postcss@8.4.49_tsx_s7k37zks4wtn7x2grzma6lrsfa/node_modules/tsup/assets/esm_shims.js\"() {\n \"use strict\";\n }\n});\n\n// ../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js\nvar require_rfdc = __commonJS({\n \"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js\"(exports, module) {\n \"use strict\";\n init_esm_shims();\n module.exports = rfdc2;\n function copyBuffer(cur) {\n if (cur instanceof Buffer) {\n return Buffer.from(cur);\n }\n return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);\n }\n function rfdc2(opts) {\n opts = opts || {};\n if (opts.circles) return rfdcCircles(opts);\n const constructorHandlers = /* @__PURE__ */ new Map();\n constructorHandlers.set(Date, (o) => new Date(o));\n constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));\n constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));\n if (opts.constructorHandlers) {\n for (const handler2 of opts.constructorHandlers) {\n constructorHandlers.set(handler2[0], handler2[1]);\n }\n }\n let handler = null;\n return opts.proto ? cloneProto : clone;\n function cloneArray(a, fn) {\n const keys = Object.keys(a);\n const a2 = new Array(keys.length);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n const cur = a[k];\n if (typeof cur !== \"object\" || cur === null) {\n a2[k] = cur;\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n a2[k] = handler(cur, fn);\n } else if (ArrayBuffer.isView(cur)) {\n a2[k] = copyBuffer(cur);\n } else {\n a2[k] = fn(cur);\n }\n }\n return a2;\n }\n function clone(o) {\n if (typeof o !== \"object\" || o === null) return o;\n if (Array.isArray(o)) return cloneArray(o, clone);\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, clone);\n }\n const o2 = {};\n for (const k in o) {\n if (Object.hasOwnProperty.call(o, k) === false) continue;\n const cur = o[k];\n if (typeof cur !== \"object\" || cur === null) {\n o2[k] = cur;\n } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {\n o2[k] = handler(cur, clone);\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur);\n } else {\n o2[k] = clone(cur);\n }\n }\n return o2;\n }\n function cloneProto(o) {\n if (typeof o !== \"object\" || o === null) return o;\n if (Array.isArray(o)) return cloneArray(o, cloneProto);\n if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {\n return handler(o, cloneProto);\n }\n const o2 = {};\n for (const k in o) {\n const cur = o[k];\n if (tLine truncated
|
||||
"mappings": ";AAAA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,QAAQ,CAAC,IAAI,QAAQ,SAAS,SAAS;AACzC,SAAO,OAAO,OAAO,GAAG,GAAG,kBAAkB,EAAE,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI;AAClE;AACA,IAAI,aAAa,CAAC,IAAI,QAAQ,SAAS,YAAY;AACjD,SAAO,QAAQ,GAAG,GAAG,kBAAkB,EAAE,EAAE,CAAC,CAAC,IAAI,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,GAAG,IAAI;AAC7F;AACA,IAAI,cAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;AAClE,aAAS,OAAO,kBAAkB,IAAI;AACpC,UAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ;AACzC,kBAAU,IAAI,KAAK,EAAE,KAAK,MAAM,KAAK,GAAG,GAAG,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK,WAAW,CAAC;AAAA,EACvH;AACA,SAAO;AACT;AACA,IAAI,UAAU,CAAC,KAAK,YAAY,aAAa,UAAU,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG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AW,IAAI,gBAAgB,WLine truncated
|
||||
"names": ["hooks", "hooks", "hook", "hook", "hooks", "clearTimeout", "setTimeout", "__create", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__getProtoOf", "__hasOwnProp", "__esm", "__commonJS", "__copyProps", "__toESM", "init_esm_shims", "init_esm_shims", "init_esm_shims", "_a", "init_esm_shims", "init_esm_shims", "init_esm_shims", "_a2", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "__toESM", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "_a22", "init_esm_shims", "init_esm_shims"]
|
||||
}
|
||||
@@ -0,0 +1,581 @@
|
||||
import {
|
||||
DefaultMagicKeysAliasMap,
|
||||
StorageSerializers,
|
||||
TransitionPresets,
|
||||
assert,
|
||||
breakpointsAntDesign,
|
||||
breakpointsBootstrapV5,
|
||||
breakpointsElement,
|
||||
breakpointsMasterCss,
|
||||
breakpointsPrimeFlex,
|
||||
breakpointsQuasar,
|
||||
breakpointsSematic,
|
||||
breakpointsTailwind,
|
||||
breakpointsVuetify,
|
||||
breakpointsVuetifyV2,
|
||||
breakpointsVuetifyV3,
|
||||
bypassFilter,
|
||||
camelize,
|
||||
clamp,
|
||||
cloneFnJSON,
|
||||
computedAsync,
|
||||
computedEager,
|
||||
computedInject,
|
||||
computedWithControl,
|
||||
containsProp,
|
||||
controlledRef,
|
||||
createEventHook,
|
||||
createFetch,
|
||||
createFilterWrapper,
|
||||
createGlobalState,
|
||||
createInjectionState,
|
||||
createReusableTemplate,
|
||||
createSharedComposable,
|
||||
createSingletonPromise,
|
||||
createTemplatePromise,
|
||||
createUnrefFn,
|
||||
customStorageEventName,
|
||||
debounceFilter,
|
||||
defaultDocument,
|
||||
defaultLocation,
|
||||
defaultNavigator,
|
||||
defaultWindow,
|
||||
executeTransition,
|
||||
extendRef,
|
||||
formatDate,
|
||||
formatTimeAgo,
|
||||
get,
|
||||
getLifeCycleTarget,
|
||||
getSSRHandler,
|
||||
hasOwn,
|
||||
hyphenate,
|
||||
identity,
|
||||
increaseWithUnit,
|
||||
injectLocal,
|
||||
invoke,
|
||||
isClient,
|
||||
isDef,
|
||||
isDefined,
|
||||
isIOS,
|
||||
isObject,
|
||||
isWorker,
|
||||
makeDestructurable,
|
||||
mapGamepadToXbox360Controller,
|
||||
noop,
|
||||
normalizeDate,
|
||||
notNullish,
|
||||
now,
|
||||
objectEntries,
|
||||
objectOmit,
|
||||
objectPick,
|
||||
onClickOutside,
|
||||
onElementRemoval,
|
||||
onKeyDown,
|
||||
onKeyPressed,
|
||||
onKeyStroke,
|
||||
onKeyUp,
|
||||
onLongPress,
|
||||
onStartTyping,
|
||||
pausableFilter,
|
||||
promiseTimeout,
|
||||
provideLocal,
|
||||
provideSSRWidth,
|
||||
pxValue,
|
||||
rand,
|
||||
reactify,
|
||||
reactifyObject,
|
||||
reactiveComputed,
|
||||
reactiveOmit,
|
||||
reactivePick,
|
||||
refAutoReset,
|
||||
refDebounced,
|
||||
refDefault,
|
||||
refThrottled,
|
||||
refWithControl,
|
||||
resolveRef,
|
||||
resolveUnref,
|
||||
set,
|
||||
setSSRHandler,
|
||||
syncRef,
|
||||
syncRefs,
|
||||
templateRef,
|
||||
throttleFilter,
|
||||
timestamp,
|
||||
toArray,
|
||||
toReactive,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
tryOnBeforeMount,
|
||||
tryOnBeforeUnmount,
|
||||
tryOnMounted,
|
||||
tryOnScopeDispose,
|
||||
tryOnUnmounted,
|
||||
unrefElement,
|
||||
until,
|
||||
useActiveElement,
|
||||
useAnimate,
|
||||
useArrayDifference,
|
||||
useArrayEvery,
|
||||
useArrayFilter,
|
||||
useArrayFind,
|
||||
useArrayFindIndex,
|
||||
useArrayFindLast,
|
||||
useArrayIncludes,
|
||||
useArrayJoin,
|
||||
useArrayMap,
|
||||
useArrayReduce,
|
||||
useArraySome,
|
||||
useArrayUnique,
|
||||
useAsyncQueue,
|
||||
useAsyncState,
|
||||
useBase64,
|
||||
useBattery,
|
||||
useBluetooth,
|
||||
useBreakpoints,
|
||||
useBroadcastChannel,
|
||||
useBrowserLocation,
|
||||
useCached,
|
||||
useClipboard,
|
||||
useClipboardItems,
|
||||
useCloned,
|
||||
useColorMode,
|
||||
useConfirmDialog,
|
||||
useCountdown,
|
||||
useCounter,
|
||||
useCssVar,
|
||||
useCurrentElement,
|
||||
useCycleList,
|
||||
useDark,
|
||||
useDateFormat,
|
||||
useDebounceFn,
|
||||
useDebouncedRefHistory,
|
||||
useDeviceMotion,
|
||||
useDeviceOrientation,
|
||||
useDevicePixelRatio,
|
||||
useDevicesList,
|
||||
useDisplayMedia,
|
||||
useDocumentVisibility,
|
||||
useDraggable,
|
||||
useDropZone,
|
||||
useElementBounding,
|
||||
useElementByPoint,
|
||||
useElementHover,
|
||||
useElementSize,
|
||||
useElementVisibility,
|
||||
useEventBus,
|
||||
useEventListener,
|
||||
useEventSource,
|
||||
useEyeDropper,
|
||||
useFavicon,
|
||||
useFetch,
|
||||
useFileDialog,
|
||||
useFileSystemAccess,
|
||||
useFocus,
|
||||
useFocusWithin,
|
||||
useFps,
|
||||
useFullscreen,
|
||||
useGamepad,
|
||||
useGeolocation,
|
||||
useIdle,
|
||||
useImage,
|
||||
useInfiniteScroll,
|
||||
useIntersectionObserver,
|
||||
useInterval,
|
||||
useIntervalFn,
|
||||
useKeyModifier,
|
||||
useLastChanged,
|
||||
useLocalStorage,
|
||||
useMagicKeys,
|
||||
useManualRefHistory,
|
||||
useMediaControls,
|
||||
useMediaQuery,
|
||||
useMemoize,
|
||||
useMemory,
|
||||
useMounted,
|
||||
useMouse,
|
||||
useMouseInElement,
|
||||
useMousePressed,
|
||||
useMutationObserver,
|
||||
useNavigatorLanguage,
|
||||
useNetwork,
|
||||
useNow,
|
||||
useObjectUrl,
|
||||
useOffsetPagination,
|
||||
useOnline,
|
||||
usePageLeave,
|
||||
useParallax,
|
||||
useParentElement,
|
||||
usePerformanceObserver,
|
||||
usePermission,
|
||||
usePointer,
|
||||
usePointerLock,
|
||||
usePointerSwipe,
|
||||
usePreferredColorScheme,
|
||||
usePreferredContrast,
|
||||
usePreferredDark,
|
||||
usePreferredLanguages,
|
||||
usePreferredReducedMotion,
|
||||
usePreferredReducedTransparency,
|
||||
usePrevious,
|
||||
useRafFn,
|
||||
useRefHistory,
|
||||
useResizeObserver,
|
||||
useSSRWidth,
|
||||
useScreenOrientation,
|
||||
useScreenSafeArea,
|
||||
useScriptTag,
|
||||
useScroll,
|
||||
useScrollLock,
|
||||
useSessionStorage,
|
||||
useShare,
|
||||
useSorted,
|
||||
useSpeechRecognition,
|
||||
useSpeechSynthesis,
|
||||
useStepper,
|
||||
useStorage,
|
||||
useStorageAsync,
|
||||
useStyleTag,
|
||||
useSupported,
|
||||
useSwipe,
|
||||
useTemplateRefsList,
|
||||
useTextDirection,
|
||||
useTextSelection,
|
||||
useTextareaAutosize,
|
||||
useThrottleFn,
|
||||
useThrottledRefHistory,
|
||||
useTimeAgo,
|
||||
useTimeout,
|
||||
useTimeoutFn,
|
||||
useTimeoutPoll,
|
||||
useTimestamp,
|
||||
useTitle,
|
||||
useToNumber,
|
||||
useToString,
|
||||
useToggle,
|
||||
useTransition,
|
||||
useUrlSearchParams,
|
||||
useUserMedia,
|
||||
useVModel,
|
||||
useVModels,
|
||||
useVibrate,
|
||||
useVirtualList,
|
||||
useWakeLock,
|
||||
useWebNotification,
|
||||
useWebSocket,
|
||||
useWebWorker,
|
||||
useWebWorkerFn,
|
||||
useWindowFocus,
|
||||
useWindowScroll,
|
||||
useWindowSize,
|
||||
watchArray,
|
||||
watchAtMost,
|
||||
watchDebounced,
|
||||
watchDeep,
|
||||
watchIgnorable,
|
||||
watchImmediate,
|
||||
watchOnce,
|
||||
watchPausable,
|
||||
watchThrottled,
|
||||
watchTriggerable,
|
||||
watchWithFilter,
|
||||
whenever
|
||||
} from "./chunk-KT7LHMJ2.js";
|
||||
import "./chunk-CQOUZRMK.js";
|
||||
export {
|
||||
DefaultMagicKeysAliasMap,
|
||||
StorageSerializers,
|
||||
TransitionPresets,
|
||||
assert,
|
||||
computedAsync as asyncComputed,
|
||||
refAutoReset as autoResetRef,
|
||||
breakpointsAntDesign,
|
||||
breakpointsBootstrapV5,
|
||||
breakpointsElement,
|
||||
breakpointsMasterCss,
|
||||
breakpointsPrimeFlex,
|
||||
breakpointsQuasar,
|
||||
breakpointsSematic,
|
||||
breakpointsTailwind,
|
||||
breakpointsVuetify,
|
||||
breakpointsVuetifyV2,
|
||||
breakpointsVuetifyV3,
|
||||
bypassFilter,
|
||||
camelize,
|
||||
clamp,
|
||||
cloneFnJSON,
|
||||
computedAsync,
|
||||
computedEager,
|
||||
computedInject,
|
||||
computedWithControl,
|
||||
containsProp,
|
||||
computedWithControl as controlledComputed,
|
||||
controlledRef,
|
||||
createEventHook,
|
||||
createFetch,
|
||||
createFilterWrapper,
|
||||
createGlobalState,
|
||||
createInjectionState,
|
||||
reactify as createReactiveFn,
|
||||
createReusableTemplate,
|
||||
createSharedComposable,
|
||||
createSingletonPromise,
|
||||
createTemplatePromise,
|
||||
createUnrefFn,
|
||||
customStorageEventName,
|
||||
debounceFilter,
|
||||
refDebounced as debouncedRef,
|
||||
watchDebounced as debouncedWatch,
|
||||
defaultDocument,
|
||||
defaultLocation,
|
||||
defaultNavigator,
|
||||
defaultWindow,
|
||||
computedEager as eagerComputed,
|
||||
executeTransition,
|
||||
extendRef,
|
||||
formatDate,
|
||||
formatTimeAgo,
|
||||
get,
|
||||
getLifeCycleTarget,
|
||||
getSSRHandler,
|
||||
hasOwn,
|
||||
hyphenate,
|
||||
identity,
|
||||
watchIgnorable as ignorableWatch,
|
||||
increaseWithUnit,
|
||||
injectLocal,
|
||||
invoke,
|
||||
isClient,
|
||||
isDef,
|
||||
isDefined,
|
||||
isIOS,
|
||||
isObject,
|
||||
isWorker,
|
||||
makeDestructurable,
|
||||
mapGamepadToXbox360Controller,
|
||||
noop,
|
||||
normalizeDate,
|
||||
notNullish,
|
||||
now,
|
||||
objectEntries,
|
||||
objectOmit,
|
||||
objectPick,
|
||||
onClickOutside,
|
||||
onElementRemoval,
|
||||
onKeyDown,
|
||||
onKeyPressed,
|
||||
onKeyStroke,
|
||||
onKeyUp,
|
||||
onLongPress,
|
||||
onStartTyping,
|
||||
pausableFilter,
|
||||
watchPausable as pausableWatch,
|
||||
promiseTimeout,
|
||||
provideLocal,
|
||||
provideSSRWidth,
|
||||
pxValue,
|
||||
rand,
|
||||
reactify,
|
||||
reactifyObject,
|
||||
reactiveComputed,
|
||||
reactiveOmit,
|
||||
reactivePick,
|
||||
refAutoReset,
|
||||
refDebounced,
|
||||
refDefault,
|
||||
refThrottled,
|
||||
refWithControl,
|
||||
resolveRef,
|
||||
resolveUnref,
|
||||
set,
|
||||
setSSRHandler,
|
||||
syncRef,
|
||||
syncRefs,
|
||||
templateRef,
|
||||
throttleFilter,
|
||||
refThrottled as throttledRef,
|
||||
watchThrottled as throttledWatch,
|
||||
timestamp,
|
||||
toArray,
|
||||
toReactive,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
tryOnBeforeMount,
|
||||
tryOnBeforeUnmount,
|
||||
tryOnMounted,
|
||||
tryOnScopeDispose,
|
||||
tryOnUnmounted,
|
||||
unrefElement,
|
||||
until,
|
||||
useActiveElement,
|
||||
useAnimate,
|
||||
useArrayDifference,
|
||||
useArrayEvery,
|
||||
useArrayFilter,
|
||||
useArrayFind,
|
||||
useArrayFindIndex,
|
||||
useArrayFindLast,
|
||||
useArrayIncludes,
|
||||
useArrayJoin,
|
||||
useArrayMap,
|
||||
useArrayReduce,
|
||||
useArraySome,
|
||||
useArrayUnique,
|
||||
useAsyncQueue,
|
||||
useAsyncState,
|
||||
useBase64,
|
||||
useBattery,
|
||||
useBluetooth,
|
||||
useBreakpoints,
|
||||
useBroadcastChannel,
|
||||
useBrowserLocation,
|
||||
useCached,
|
||||
useClipboard,
|
||||
useClipboardItems,
|
||||
useCloned,
|
||||
useColorMode,
|
||||
useConfirmDialog,
|
||||
useCountdown,
|
||||
useCounter,
|
||||
useCssVar,
|
||||
useCurrentElement,
|
||||
useCycleList,
|
||||
useDark,
|
||||
useDateFormat,
|
||||
refDebounced as useDebounce,
|
||||
useDebounceFn,
|
||||
useDebouncedRefHistory,
|
||||
useDeviceMotion,
|
||||
useDeviceOrientation,
|
||||
useDevicePixelRatio,
|
||||
useDevicesList,
|
||||
useDisplayMedia,
|
||||
useDocumentVisibility,
|
||||
useDraggable,
|
||||
useDropZone,
|
||||
useElementBounding,
|
||||
useElementByPoint,
|
||||
useElementHover,
|
||||
useElementSize,
|
||||
useElementVisibility,
|
||||
useEventBus,
|
||||
useEventListener,
|
||||
useEventSource,
|
||||
useEyeDropper,
|
||||
useFavicon,
|
||||
useFetch,
|
||||
useFileDialog,
|
||||
useFileSystemAccess,
|
||||
useFocus,
|
||||
useFocusWithin,
|
||||
useFps,
|
||||
useFullscreen,
|
||||
useGamepad,
|
||||
useGeolocation,
|
||||
useIdle,
|
||||
useImage,
|
||||
useInfiniteScroll,
|
||||
useIntersectionObserver,
|
||||
useInterval,
|
||||
useIntervalFn,
|
||||
useKeyModifier,
|
||||
useLastChanged,
|
||||
useLocalStorage,
|
||||
useMagicKeys,
|
||||
useManualRefHistory,
|
||||
useMediaControls,
|
||||
useMediaQuery,
|
||||
useMemoize,
|
||||
useMemory,
|
||||
useMounted,
|
||||
useMouse,
|
||||
useMouseInElement,
|
||||
useMousePressed,
|
||||
useMutationObserver,
|
||||
useNavigatorLanguage,
|
||||
useNetwork,
|
||||
useNow,
|
||||
useObjectUrl,
|
||||
useOffsetPagination,
|
||||
useOnline,
|
||||
usePageLeave,
|
||||
useParallax,
|
||||
useParentElement,
|
||||
usePerformanceObserver,
|
||||
usePermission,
|
||||
usePointer,
|
||||
usePointerLock,
|
||||
usePointerSwipe,
|
||||
usePreferredColorScheme,
|
||||
usePreferredContrast,
|
||||
usePreferredDark,
|
||||
usePreferredLanguages,
|
||||
usePreferredReducedMotion,
|
||||
usePreferredReducedTransparency,
|
||||
usePrevious,
|
||||
useRafFn,
|
||||
useRefHistory,
|
||||
useResizeObserver,
|
||||
useSSRWidth,
|
||||
useScreenOrientation,
|
||||
useScreenSafeArea,
|
||||
useScriptTag,
|
||||
useScroll,
|
||||
useScrollLock,
|
||||
useSessionStorage,
|
||||
useShare,
|
||||
useSorted,
|
||||
useSpeechRecognition,
|
||||
useSpeechSynthesis,
|
||||
useStepper,
|
||||
useStorage,
|
||||
useStorageAsync,
|
||||
useStyleTag,
|
||||
useSupported,
|
||||
useSwipe,
|
||||
useTemplateRefsList,
|
||||
useTextDirection,
|
||||
useTextSelection,
|
||||
useTextareaAutosize,
|
||||
refThrottled as useThrottle,
|
||||
useThrottleFn,
|
||||
useThrottledRefHistory,
|
||||
useTimeAgo,
|
||||
useTimeout,
|
||||
useTimeoutFn,
|
||||
useTimeoutPoll,
|
||||
useTimestamp,
|
||||
useTitle,
|
||||
useToNumber,
|
||||
useToString,
|
||||
useToggle,
|
||||
useTransition,
|
||||
useUrlSearchParams,
|
||||
useUserMedia,
|
||||
useVModel,
|
||||
useVModels,
|
||||
useVibrate,
|
||||
useVirtualList,
|
||||
useWakeLock,
|
||||
useWebNotification,
|
||||
useWebSocket,
|
||||
useWebWorker,
|
||||
useWebWorkerFn,
|
||||
useWindowFocus,
|
||||
useWindowScroll,
|
||||
useWindowSize,
|
||||
watchArray,
|
||||
watchAtMost,
|
||||
watchDebounced,
|
||||
watchDeep,
|
||||
watchIgnorable,
|
||||
watchImmediate,
|
||||
watchOnce,
|
||||
watchPausable,
|
||||
watchThrottled,
|
||||
watchTriggerable,
|
||||
watchWithFilter,
|
||||
whenever
|
||||
};
|
||||
//# sourceMappingURL=vitepress___@vueuse_core.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/src/index.js", "../../../node_modules/.pnpm/focus-trap@7.6.4/node_modules/focus-trap/index.js", "../../../node_modules/.pnpm/@vueuse+integrations@12.5.0_focus-trap@7.6.4/node_modules/@vueuse/integrations/useFocusTrap.mjs"],
|
||||
"sourcesContent": ["// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nconst candidateSelectors = [\n 'input:not([inert])',\n 'select:not([inert])',\n 'textarea:not([inert])',\n 'a[href]:not([inert])',\n 'button:not([inert])',\n '[tabindex]:not(slot):not([inert])',\n 'audio[controls]:not([inert])',\n 'video[controls]:not([inert])',\n '[contenteditable]:not([contenteditable=\"false\"]):not([inert])',\n 'details>summary:first-of-type:not([inert])',\n 'details:not([inert])',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n ? function () {}\n : Element.prototype.matches ||\n Element.prototype.msMatchesSelector ||\n Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n !NoElement && Element.prototype.getRootNode\n ? (element) => element?.getRootNode?.()\n : (element) => element?.ownerDocument;\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nconst isInert = function (node, lookUp = true) {\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n const inertAtt = node?.getAttribute?.('inert');\n const inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n const result = inert || (lookUp && node && isInert(node.parentNode)); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nconst isContentEditable = function (node) {\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n const attValue = node?.getAttribute?.('contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n\n let candidates = Array.prototype.slice.apply(\n el.querySelectorAll(candidateSelector)\n );\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {Line truncated
|
||||
"mappings": ";;;;;;;;;;;;;;AAKA,IAAMA,qBAAqB,CACzB,sBACA,uBACA,yBACA,wBACA,uBACA,qCACA,gCACA,gCACA,iEACA,8CACA,sBAAsB;AAExB,IAAMC,oBAAoCD,mBAAmBE,KAAK,GAAG;AAErE,IAAMC,YAAY,OAAOC,YAAY;AAErC,IAAMC,UAAUF,YACZ,WAAY;AAAA,IACZC,QAAQE,UAAUD,WAClBD,QAAQE,UAAUC,qBAClBH,QAAQE,UAAUE;AAEtB,IAAMC,cACJ,CAACN,aAAaC,QAAQE,UAAUG,cAC5B,SAACC,SAAO;AAAA,MAAAC;AAAA,SAAKD,YAAAA,QAAAA,YAAOC,SAAAA,UAAAA,uBAAPD,QAASD,iBAAW,QAAAE,yBAApBA,SAAAA,SAAAA,qBAAAC,KAAAF,OAAuB;AAAC,IACrC,SAACA,SAAO;AAAA,SAAKA,YAAAA,QAAAA,YAAAA,SAAAA,SAAAA,QAASG;AAAa;AAUzC,IAAMC,UAAU,SAAVA,SAAoBC,MAAMC,QAAe;AAAA,MAAAC;AAAA,MAAfD,WAAM,QAAA;AAANA,aAAS;EAAI;AAI3C,MAAME,WAAWH,SAAI,QAAJA,SAAIE,SAAAA,UAAAA,qBAAJF,KAAMI,kBAAYF,QAAAA,uBAAA,SAAA,SAAlBA,mBAAAL,KAAAG,MAAqB,OAAO;AAC7C,MAAMK,QAAQF,aAAa,MAAMA,aAAa;AAO9C,MAAMG,SAASD,SAAUJ,UAAUD,QAAQD,SAAQC,KAAKO,UAAU;AAElE,SAAOD;AACT;AAOA,IAA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OC,IAAIC,OAAO3E,KAAKqE,IAAI,CAAC;EACrD,OAAO;AACL,QAAI;AACFG,iBAAWD,YAAYvE,KAAKqE,IAAI;aACzBO,KAAK;AAEZC,cAAQC,MACN,4IACAF,IAAIG,OACN;AACA,aAAO;IACT;EACF;AAEA,MAAMZ,UAAUJ,gBAAgBS,UAAUxE,KAAKiE,IAAI;AACnD,SAAO,CAACE,WAAWA,YAAYnE;AACjC;AAEA,IAAMgF,UAAU,SAAVA,SAAoBhF,MAAM;AAC9B,SAAOwD,QAAQxD,IAAI,KAAKA,KAAK0D,SAAS;AACxC;AAEA,IAAMuB,qBAAqB,SAArBA,oBAA+BjF,MAAM;AACzC,SAAOgF,QAAQhF,IAAI,KAAK,CAACoE,gBAAgBpE,IAAI;AAC/C;AAGA,IAAMkF,iBAAiB,SAAjBA,gBAA2BlF,MAAM;AAAA,MAAAmF;AAwBrC,MAAIC,WAAWpF,QAAQN,YAAYM,IAAI;AACvC,MAAIqF,gBAAYF,YAAGC,cAAQ,QAAAD,cAAA,SAAA,SAARA,UAAUG;AAI7B,MAAIC,WAAW;AACf,MAAIH,YAAYA,aAAapF,MAAM;AAAA,QAAAwF,eAAAC,uBAAAC;AACjCH,eAAW,CAAC,GACVC,gBAAAH,kBAAYG,QAAAA,kBAAA,WAAAC,wBAAZD,cAAc1F,mBAAa,QAAA2F,0BAAA,UAA3BA,sBAA6BE,SAASN,YAAY,KAClDrF,SAAI,QAAJA,SAAI0F,WAAAA,sBAAJ1F,KAAMF,mBAAa4F,QAAAA,wBAAA,UAAnBA,oBAAqBC,SAAS3F,IAAI;AAGpC,WAAO,CAACuF,YAAYF,cAAc;AAAA,UAAAO,YAAAC,gBAAAC;AAIhCV,iBAAW1F,YAAY2F,YAAY;AACnCA,sBAAYO,aAAGR,cAAQ,QAAAQ,eAAA,SAAA,SAARA,WAAUN;AACzBC,iLine truncated
|
||||
"names": ["candidateSelectors", "candidateSelector", "join", "NoElement", "Element", "matches", "prototype", "msMatchesSelector", "webkitMatchesSelector", "getRootNode", "element", "_element$getRootNode", "call", "ownerDocument", "isInert", "node", "lookUp", "_node$getAttribute", "inertAtt", "getAttribute", "inert", "result", "parentNode", "isContentEditable", "_node$getAttribute2", "attValue", "getCandidates", "el", "includeContainer", "filter", "candidates", "Array", "slice", "apply", "querySelectorAll", "unshift", "getCandidatesIteratively", "elements", "options", "elementsToCheck", "from", "length", "shift", "tagName", "assigned", "assignedElements", "content", "children", "nestedCandidates", "flatten", "push", "scopeParent", "validCandidate", "includes", "shadowRoot", "getShadowRoot", "validShadowRoot", "shadowRootFilter", "hasTabIndex", "isNaN", "parseInt", "getTabIndex", "Error", "tabIndex", "test", "getSortOrderTabIndex", "isScope", "sortOrderedTabbables", "a", "b", "documentOrder", "isInput", "isHiddenInput", "type", "isDetailsWithSummary", "r", "some", "child", "getCheckedRadio", "nodes", "form", "i", "checked", "isTabbableRadio", "name", "radioScope", "queryRadios", "radioSet", "window", "CSS", "escape", "err", "console", "error", "message", "isRadio", "isNonTabbableRadio", "isNodeAttached", "_nodeRoot", "nodeRoot", "nodeRootHost", "host", "attached", "_nodeRootHost", "_nodeRootHost$ownerDo", "_node$ownerDocument", "contains", "_nodeRoot2", "_nodeRootHost2", "_nodeRootHost2$ownerD", "isZeroArea", "_node$getBoundingClie", "getBoundingClientRect", "width", "height", "isHidden", "_ref", "displayCheck", "getComputedStyle", "visibility", "isDirectSummary", "nodeUnderDetails", "parentElement", "originalNode", "rootNode", "assignedSlot", "getClientRects", "isDisabledFromFieldset", "disabled", "item", "isNodeMatchingSelectorFocusable", "isNodeMatchingSelectorTabbable", "isValidShadowRootTabbable", "shadowHostNode", "sortByOrder", "regularTabbables", "orderedTabbables", "forEach", "candidateTabindex", "sort", "reduce", "acc", "sortable", "concat", "tabbable", "container", "bind", "focusable", "isTabbable", "focusableCandidateSelector", "isFocusable", "activeFocusTraps", "activateTrap", "trapStack", "trap", "length", "activeTrap", "_setPausedState", "trapIndex", "indexOf", "push", "splice", "deactivateTrap", "_isManuallyPaused", "isSelectableInput", "node", "tagName", "toLowerCase", "select", "isEscapeEvent", "e", "key", "keyCode", "isTabEvent", "isKeyForward", "shiftKey", "isKeyBackward", "delay", "fn", "setTimeout", "valueOrHandler", "value", "_len", "arguments", "params", "Array", "_key", "apply", "getActualTarget", "event", "target", "shadowRoot", "composedPath", "internalTrapStack", "createFocusTrap", "elements", "userOptions", "doc", "document", "config", "_objectSpread", "returnFocusOnDeactivate", "escapeDeactivates", "delayInitialFocus", "state", "containers", "containerGroups", "tabbableGroups", "nodeFocusedBeforeActivation", "mostRecentlyFocusedNode", "active", "paused", "manuallyPaused", "delayInitialFocusTimer", "undefined", "recentNavEvent", "getOption", "configOverrideOptions", "optionName", "configOptionName", "findContainerIndex", "element", "findIndex", "_ref", "container", "tabbableNodes", "contains", "includes", "find", "getNodeForOption", "_ref2", "_ref2$hasFallback", "hasFallback", "_ref2$params", "optionValue", "_toConsumableArray", "Error", "concat", "querySelector", "err", "message", "getInitialFocusNode", "isFocusable", "tabbableOptions", "activeElement", "firstTabbableGroup", "firstTabbableNode", "updateTabbableNodes", "map", "tabbable", "focusableNodes", "focusable", "lastTabbableNode", "firstDomTabbableNode", "isTabbable", "lastDomTabbableNode", "slice", "reverse", "posTabIndexesFound", "getTabIndex", "nextTabbableNode", "forward", "nodeIdx", "el", "filter", "group", "g", "getActiveElement", "tryFocus", "focus", "preventScroll", "getReturnFocusNode", "previousActiveElement", "findNextNavNode", "_ref3", "_ref3$isBackward", "isBackward", "destinationNode", "containerIndex", "containerGroup", "startOfGroupIndex", "_ref4", "destinationGroupIndex", "destinationGroup", "lastOfGroupIndex", "_ref5", "checkPointerDown", "clickOutsideDeactivates", "deactivate", "returnFocus", "allowOutsideClick", "preventDefault", "checkFocusIn", "targetContained", "Document", "stopImmediatePropagation", "nextNode", "navAcrossContainers", "mruContainerIdx", "mruTabIdx", "some", "n", "checkKeyNav", "checkTabKey", "checkEscapeKey", "checkClick", "addListeners", "addEventListener", "capture", "passive", "removeListeners", "removeEventListener", "checkDomRemoval", "mutations", "isFocusedNodeRemoved", "mutation", "removedNodes", "from", "mutationObserver", "window", "MutationObserver", "updateObservedNodes", "disconnect", "observe", "subtree", "childList", "activate", "activateOptions", "onActivate", "onPostActivate", "checkCanFocusTrap", "finishActivation", "then", "deactivateOptions", "options", "onDeactiLine truncated
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/lib/domiterator.js", "../../../node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/lib/mark.js", "../../../node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js"],
|
||||
"sourcesContent": ["/**\n * A NodeIterator with iframes support and a method to check if an element is\n * matching a specified selector\n * @example\n * const iterator = new DOMIterator(\n * document.querySelector(\"#context\"), true\n * );\n * iterator.forEachNode(NodeFilter.SHOW_TEXT, node => {\n * console.log(node);\n * }, node => {\n * if(DOMIterator.matches(node.parentNode, \".ignore\")){\n * return NodeFilter.FILTER_REJECT;\n * } else {\n * return NodeFilter.FILTER_ACCEPT;\n * }\n * }, () => {\n * console.log(\"DONE\");\n * });\n * @todo Outsource into separate repository\n */\nexport default class DOMIterator {\n\n /**\n * @param {HTMLElement|HTMLElement[]|NodeList|string} ctx - The context DOM\n * element, an array of DOM elements, a NodeList or a selector\n * @param {boolean} [iframes=true] - A boolean indicating if iframes should\n * be handled\n * @param {string[]} [exclude=[]] - An array containing exclusion selectors\n * for iframes\n * @param {number} [iframesTimeout=5000] - A number indicating the ms to\n * wait before an iframe should be skipped, in case the load event isn't\n * fired. This also applies if the user is offline and the resource of the\n * iframe is online (either by the browsers \"offline\" mode or because\n * there's no internet connection)\n */\n constructor(ctx, iframes = true, exclude = [], iframesTimeout = 5000) {\n /**\n * The context of the instance. Either a DOM element, an array of DOM\n * elements, a NodeList or a selector\n * @type {HTMLElement|HTMLElement[]|NodeList|string}\n * @access protected\n */\n this.ctx = ctx;\n /**\n * Boolean indicating if iframe support is enabled\n * @type {boolean}\n * @access protected\n */\n this.iframes = iframes;\n /**\n * An array containing exclusion selectors for iframes\n * @type {string[]}\n */\n this.exclude = exclude;\n /**\n * The maximum ms to wait for a load event before skipping an iframe\n * @type {number}\n */\n this.iframesTimeout = iframesTimeout;\n }\n\n /**\n * Checks if the specified DOM element matches the selector\n * @param {HTMLElement} element - The DOM element\n * @param {string|string[]} selector - The selector or an array with\n * selectors\n * @return {boolean}\n * @access public\n */\n static matches(element, selector) {\n const selectors = typeof selector === 'string' ? [selector] : selector,\n fn = (\n element.matches ||\n element.matchesSelector ||\n element.msMatchesSelector ||\n element.mozMatchesSelector ||\n element.oMatchesSelector ||\n element.webkitMatchesSelector\n );\n if (fn) {\n let match = false;\n selectors.every(sel => {\n if (fn.call(element, sel)) {\n match = true;\n return false;\n }\n return true;\n });\n return match;\n } else { // may be false e.g. when el is a textNode\n return false;\n }\n }\n\n /**\n * Returns all contexts filtered by duplicates (even nested)\n * @return {HTMLElement[]} - An array containing DOM contexts\n * @access protected\n */\n getContexts() {\n let ctx,\n filteredCtx = [];\n if (typeof this.ctx === 'undefined' || !this.ctx) { // e.g. null\n ctx = [];\n } else if (NodeList.prototype.isPrototypeOf(this.ctx)) {\n ctx = Array.prototype.slice.call(this.ctx);\n } else if (Array.isArray(this.ctx)) {\n ctx = this.ctx;\n } else if (typeof this.ctx === 'string') {\n ctx = Array.prototype.slice.call(\n document.querySelectorAll(this.ctx)\n );\n } else { // e.g. HTMLElement or element inside iframe\n ctx = [this.ctx];\n }\n // filter duplicate text nodes\n ctx.forEach(ctx => {\n const isDescendant = filteredCtx.filter(contexts => {\n return contexts.contains(ctx);\n }).length > 0;\n if (filteredCtx.indexOf(ctx) === -1 && !isDescendant) {\n filteredCtx.push(ctx);\n }\n });\n return filteredCtx;\n }\n\n /**\n * @callback DOMIterator~getIframeContentsSuccessCallback\n * @param {HTMLDocument} contents - The contentDocument of the iframe\n */\n /**\n * Calls the success callback function with the iframe document. If it can't\n * be accessed it calls the error callback function\n * @param {HTMLElement} ifr - The iframe DOM element\n * @param {DOMIterator~getIframeContentsSuccessCallback} successFn\n * @param {function} [errorFn]\n * @access protected\n */\n getIframeContents(ifr, successFn, errorFn = () => {}) {\n let doc;\n try {\n const ifrWin = ifr.contentWindow;\n doc = ifrWin.document;\n if (!ifrWin || !doc) { // no permission = null. Undefined in Phantom\n throw new Error('iframe inaccessible');\n }\n } catch (e) {\n errorFn();\n }\n if (doc) {\n successFn(doc);\n }\n }\n\n /Line truncated
|
||||
"mappings": ";AAoBA,IAAqB,cAArB,MAAqB,aAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAe/B,YAAY,KAAK,UAAU,MAAM,UAAU,CAAC,GAAG,iBAAiB,KAAM;AAOpE,SAAK,MAAM;AAMX,SAAK,UAAU;AAKf,SAAK,UAAU;AAKf,SAAK,iBAAiB;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,OAAO,QAAQ,SAAS,UAAU;AAChC,UAAM,YAAY,OAAO,aAAa,WAAW,CAAC,QAAQ,IAAI,UAC5D,KACE,QAAQ,WACR,QAAQ,mBACR,QAAQ,qBACR,QAAQ,sBACR,QAAQ,oBACR,QAAQ;AAEZ,QAAI,IAAI;AACN,UAAI,QAAQ;AACZ,gBAAU,MAAM,SAAO;AACrB,YAAI,GAAG,KAAK,SAAS,GAAG,GAAG;AACzB,kBAAQ;AACR,iBAAO;AAAA,QACT;AACA,eAAO;AAAA,MACT,CAAC;AACD,aAAO;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,cAAc;AACZ,QAAI,KACF,cAAc,CAAC;AACjB,QAAI,OAAO,KAAK,QAAQ,eAAe,CAAC,KAAK,KAAK;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ACA,QAAI,QAAQ,OAAO;AACjB,UAAI,KAAK;AAAA,QACP,KLine truncated
|
||||
"names": ["ctx", "ifr", "node", "dct", "Mark"]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../node_modules/.pnpm/minisearch@7.1.1/node_modules/minisearch/node_modules/tslib/tslib.es6.js", "../../../node_modules/.pnpm/minisearch@7.1.1/node_modules/minisearch/src/SearchableMap/TreeIterator.ts", "../../../node_modules/.pnpm/minisearch@7.1.1/node_modules/minisearch/src/SearchableMap/fuzzySearch.ts", "../../../node_modules/.pnpm/minisearch@7.1.1/node_modules/minisearch/src/SearchableMap/SearchableMap.ts", "../../../node_modules/.pnpm/minisearch@7.1.1/node_modules/minisearch/src/MiniSearch.ts"],
|
||||
"sourcesContent": ["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n iLine truncated
|
||||
"mappings": ";AAkHO,SAAS,UAAU,SAAS,YAAY,GAAG,WAAW;AACzD,WAAS,MAAM,OAAO;AAAE,WAAO,iBAAiB,IAAI,QAAQ,IAAI,EAAE,SAAU,SAAS;AAAE,cAAQ,KAAK;IAAE,CAAE;EAAE;AAC1G,SAAO,KAAK,MAAM,IAAI,UAAU,SAAU,SAAS,QAAQ;AACvD,aAAS,UAAU,OAAO;AAAE,UAAI;AAAE,aAAK,UAAU,KAAK,KAAK,CAAC;MAAE,SAAU,GAAG;AAAE,eAAO,CAAC;MAAE;IAAE;AACzF,aAAS,SAAS,OAAO;AAAE,UAAI;AAAE,aAAK,UAAU,OAAO,EAAE,KAAK,CAAC;MAAE,SAAU,GAAG;AAA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IAAI,OAAI;AACN,QAAI,KAAK,OAAO;AAAE,aAAO,KAAK;;AAE9B,SAAK,QAAQ;AAEb,UAAM,OAAO,KAAK,QAAO;AACzB,WAAO,CAAC,KAAK,KAAI,EAAG;AAAM,WAAK,SAAU;AAEzC,WAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;EAuBd,OAAQ,KAAa,IAA+B;AAClD,QAAI,OAAO,QAAQ,UAAU;AAAE,YAAM,IAAI,MAAM,sBAAsB;;AACrE,SAAK,QAAQ;AACb,UAAM,OAAO,WAAW,KAAK,OAAO,GAAG;AACvC,SAAK,IAAI,MAAM,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC;AACjC,WAAO;;;;;;;;;;;;;;;;;;EAmBT,MAAO,KAAa,SAAgB;AAClC,QAAI,OAAO,QAAQ,UAAU;AAAE,YAAM,IAAI,MAAM,sBAAsB;;AACrE,SAAK,QAAQ;Line truncated
|
||||
"names": ["last", "node", "child", "key", "chunk", "promise", "conditions", "options", "results", "query", "boosts", "data"]
|
||||
}
|
||||
@@ -0,0 +1,343 @@
|
||||
import {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
Comment,
|
||||
DeprecationTypes,
|
||||
EffectScope,
|
||||
ErrorCodes,
|
||||
ErrorTypeStrings,
|
||||
Fragment,
|
||||
KeepAlive,
|
||||
ReactiveEffect,
|
||||
Static,
|
||||
Suspense,
|
||||
Teleport,
|
||||
Text,
|
||||
TrackOpTypes,
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
TriggerOpTypes,
|
||||
VueElement,
|
||||
assertNumber,
|
||||
callWithAsyncErrorHandling,
|
||||
callWithErrorHandling,
|
||||
camelize,
|
||||
capitalize,
|
||||
cloneVNode,
|
||||
compatUtils,
|
||||
compile,
|
||||
computed,
|
||||
createApp,
|
||||
createBaseVNode,
|
||||
createBlock,
|
||||
createCommentVNode,
|
||||
createElementBlock,
|
||||
createHydrationRenderer,
|
||||
createPropsRestProxy,
|
||||
createRenderer,
|
||||
createSSRApp,
|
||||
createSlots,
|
||||
createStaticVNode,
|
||||
createTextVNode,
|
||||
createVNode,
|
||||
customRef,
|
||||
defineAsyncComponent,
|
||||
defineComponent,
|
||||
defineCustomElement,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
defineModel,
|
||||
defineOptions,
|
||||
defineProps,
|
||||
defineSSRCustomElement,
|
||||
defineSlots,
|
||||
devtools,
|
||||
effect,
|
||||
effectScope,
|
||||
getCurrentInstance,
|
||||
getCurrentScope,
|
||||
getCurrentWatcher,
|
||||
getTransitionRawChildren,
|
||||
guardReactiveProps,
|
||||
h,
|
||||
handleError,
|
||||
hasInjectionContext,
|
||||
hydrate,
|
||||
hydrateOnIdle,
|
||||
hydrateOnInteraction,
|
||||
hydrateOnMediaQuery,
|
||||
hydrateOnVisible,
|
||||
initCustomFormatter,
|
||||
initDirectivesForSSR,
|
||||
inject,
|
||||
isMemoSame,
|
||||
isProxy,
|
||||
isReactive,
|
||||
isReadonly,
|
||||
isRef,
|
||||
isRuntimeOnly,
|
||||
isShallow,
|
||||
isVNode,
|
||||
markRaw,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeProps,
|
||||
normalizeStyle,
|
||||
onActivated,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onBeforeUpdate,
|
||||
onDeactivated,
|
||||
onErrorCaptured,
|
||||
onMounted,
|
||||
onRenderTracked,
|
||||
onRenderTriggered,
|
||||
onScopeDispose,
|
||||
onServerPrefetch,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
onWatcherCleanup,
|
||||
openBlock,
|
||||
popScopeId,
|
||||
provide,
|
||||
proxyRefs,
|
||||
pushScopeId,
|
||||
queuePostFlushCb,
|
||||
reactive,
|
||||
readonly,
|
||||
ref,
|
||||
registerRuntimeCompiler,
|
||||
render,
|
||||
renderList,
|
||||
renderSlot,
|
||||
resolveComponent,
|
||||
resolveDirective,
|
||||
resolveDynamicComponent,
|
||||
resolveFilter,
|
||||
resolveTransitionHooks,
|
||||
setBlockTracking,
|
||||
setDevtoolsHook,
|
||||
setTransitionHooks,
|
||||
shallowReactive,
|
||||
shallowReadonly,
|
||||
shallowRef,
|
||||
ssrContextKey,
|
||||
ssrUtils,
|
||||
stop,
|
||||
toDisplayString,
|
||||
toHandlerKey,
|
||||
toHandlers,
|
||||
toRaw,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
transformVNodeArgs,
|
||||
triggerRef,
|
||||
unref,
|
||||
useAttrs,
|
||||
useCssModule,
|
||||
useCssVars,
|
||||
useHost,
|
||||
useId,
|
||||
useModel,
|
||||
useSSRContext,
|
||||
useShadowRoot,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
useTransitionState,
|
||||
vModelCheckbox,
|
||||
vModelDynamic,
|
||||
vModelRadio,
|
||||
vModelSelect,
|
||||
vModelText,
|
||||
vShow,
|
||||
version,
|
||||
warn,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
withAsyncContext,
|
||||
withCtx,
|
||||
withDefaults,
|
||||
withDirectives,
|
||||
withKeys,
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
} from "./chunk-CQOUZRMK.js";
|
||||
export {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
Comment,
|
||||
DeprecationTypes,
|
||||
EffectScope,
|
||||
ErrorCodes,
|
||||
ErrorTypeStrings,
|
||||
Fragment,
|
||||
KeepAlive,
|
||||
ReactiveEffect,
|
||||
Static,
|
||||
Suspense,
|
||||
Teleport,
|
||||
Text,
|
||||
TrackOpTypes,
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
TriggerOpTypes,
|
||||
VueElement,
|
||||
assertNumber,
|
||||
callWithAsyncErrorHandling,
|
||||
callWithErrorHandling,
|
||||
camelize,
|
||||
capitalize,
|
||||
cloneVNode,
|
||||
compatUtils,
|
||||
compile,
|
||||
computed,
|
||||
createApp,
|
||||
createBlock,
|
||||
createCommentVNode,
|
||||
createElementBlock,
|
||||
createBaseVNode as createElementVNode,
|
||||
createHydrationRenderer,
|
||||
createPropsRestProxy,
|
||||
createRenderer,
|
||||
createSSRApp,
|
||||
createSlots,
|
||||
createStaticVNode,
|
||||
createTextVNode,
|
||||
createVNode,
|
||||
customRef,
|
||||
defineAsyncComponent,
|
||||
defineComponent,
|
||||
defineCustomElement,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
defineModel,
|
||||
defineOptions,
|
||||
defineProps,
|
||||
defineSSRCustomElement,
|
||||
defineSlots,
|
||||
devtools,
|
||||
effect,
|
||||
effectScope,
|
||||
getCurrentInstance,
|
||||
getCurrentScope,
|
||||
getCurrentWatcher,
|
||||
getTransitionRawChildren,
|
||||
guardReactiveProps,
|
||||
h,
|
||||
handleError,
|
||||
hasInjectionContext,
|
||||
hydrate,
|
||||
hydrateOnIdle,
|
||||
hydrateOnInteraction,
|
||||
hydrateOnMediaQuery,
|
||||
hydrateOnVisible,
|
||||
initCustomFormatter,
|
||||
initDirectivesForSSR,
|
||||
inject,
|
||||
isMemoSame,
|
||||
isProxy,
|
||||
isReactive,
|
||||
isReadonly,
|
||||
isRef,
|
||||
isRuntimeOnly,
|
||||
isShallow,
|
||||
isVNode,
|
||||
markRaw,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeProps,
|
||||
normalizeStyle,
|
||||
onActivated,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onBeforeUpdate,
|
||||
onDeactivated,
|
||||
onErrorCaptured,
|
||||
onMounted,
|
||||
onRenderTracked,
|
||||
onRenderTriggered,
|
||||
onScopeDispose,
|
||||
onServerPrefetch,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
onWatcherCleanup,
|
||||
openBlock,
|
||||
popScopeId,
|
||||
provide,
|
||||
proxyRefs,
|
||||
pushScopeId,
|
||||
queuePostFlushCb,
|
||||
reactive,
|
||||
readonly,
|
||||
ref,
|
||||
registerRuntimeCompiler,
|
||||
render,
|
||||
renderList,
|
||||
renderSlot,
|
||||
resolveComponent,
|
||||
resolveDirective,
|
||||
resolveDynamicComponent,
|
||||
resolveFilter,
|
||||
resolveTransitionHooks,
|
||||
setBlockTracking,
|
||||
setDevtoolsHook,
|
||||
setTransitionHooks,
|
||||
shallowReactive,
|
||||
shallowReadonly,
|
||||
shallowRef,
|
||||
ssrContextKey,
|
||||
ssrUtils,
|
||||
stop,
|
||||
toDisplayString,
|
||||
toHandlerKey,
|
||||
toHandlers,
|
||||
toRaw,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
transformVNodeArgs,
|
||||
triggerRef,
|
||||
unref,
|
||||
useAttrs,
|
||||
useCssModule,
|
||||
useCssVars,
|
||||
useHost,
|
||||
useId,
|
||||
useModel,
|
||||
useSSRContext,
|
||||
useShadowRoot,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
useTransitionState,
|
||||
vModelCheckbox,
|
||||
vModelDynamic,
|
||||
vModelRadio,
|
||||
vModelSelect,
|
||||
vModelText,
|
||||
vShow,
|
||||
version,
|
||||
warn,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
withAsyncContext,
|
||||
withCtx,
|
||||
withDefaults,
|
||||
withDirectives,
|
||||
withKeys,
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
};
|
||||
//# sourceMappingURL=vue.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default defineConfig({
|
||||
title: 'FileCodeBox',
|
||||
description: '简单高效的文件分享工具',
|
||||
lang: 'zh-CN',
|
||||
lastUpdated: true,
|
||||
locales: {
|
||||
root: {
|
||||
label: '简体中文',
|
||||
lang: 'zh-CN',
|
||||
title: 'FileCodeBox',
|
||||
description: '匿名口令分享文本,文件',
|
||||
themeConfig: {
|
||||
logo: '/logo_small.png',
|
||||
nav: [
|
||||
{ text: '首页', link: '/' },
|
||||
{ text: '指南', link: '/guide/getting-started' },
|
||||
{ text: 'API', link: '/api/' },
|
||||
{ text: 'Demo', link: 'https://share.lanol.cn' },
|
||||
{
|
||||
text: '了解更多',
|
||||
items: [
|
||||
{ text: '更新日志', link: '/changelog' },
|
||||
{ text: '贡献指南', link: '/contributing' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
sidebar: {
|
||||
'/guide/': [
|
||||
{
|
||||
text: '介绍',
|
||||
items: [
|
||||
{
|
||||
text: '什么是 FileCodeBox',
|
||||
link: '/guide/introduction',
|
||||
},
|
||||
{ text: '快速开始', link: '/guide/getting-started' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '基础功能',
|
||||
items: [
|
||||
{ text: '文件上传', link: '/guide/upload' },
|
||||
{ text: '文件分享', link: '/guide/share' },
|
||||
{ text: '文件管理', link: '/guide/management' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '高级特性',
|
||||
items: [
|
||||
{ text: '存储配置', link: '/guide/storage' },
|
||||
{ text: '安全设置', link: '/guide/security' },
|
||||
{ text: '系统配置', link: '/guide/configuration' },
|
||||
],
|
||||
},
|
||||
],
|
||||
'/api/': [
|
||||
{
|
||||
text: 'API 参考',
|
||||
items: [
|
||||
{ text: '分享接口', link: '/api/#分享接口' },
|
||||
{ text: '管理接口', link: '/api/#管理接口' },
|
||||
{ text: '错误响应', link: '/api/#错误响应' },
|
||||
{ text: '状态码说明', link: '/api/#状态码说明' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
|
||||
],
|
||||
footer: {
|
||||
message: '基于 LGPL-3.0 license 发布',
|
||||
copyright: 'Copyright © 2022-present FileCodeBox',
|
||||
},
|
||||
search: {
|
||||
provider: 'local',
|
||||
},
|
||||
outline: {
|
||||
level: [2, 3],
|
||||
label: '目录',
|
||||
},
|
||||
},
|
||||
},
|
||||
en: {
|
||||
label: 'English',
|
||||
lang: 'en-US',
|
||||
title: 'FileCodeBox',
|
||||
description: 'Simple and efficient file sharing tool',
|
||||
themeConfig: {
|
||||
logo: '/logo_small.png',
|
||||
nav: [
|
||||
{ text: 'Home', link: '/en/' },
|
||||
{ text: 'Guide', link: '/en/guide/getting-started' },
|
||||
{ text: 'API', link: '/en/api/' },
|
||||
{ text: 'Demo', link: 'https://share.lanol.cn' },
|
||||
{
|
||||
text: 'More',
|
||||
items: [
|
||||
{ text: 'Changelog', link: '/en/changelog' },
|
||||
{ text: 'Contributing', link: '/en/contributing' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
sidebar: {
|
||||
'/en/guide/': [
|
||||
{
|
||||
text: 'Introduction',
|
||||
items: [
|
||||
{
|
||||
text: 'What is FileCodeBox',
|
||||
link: '/en/guide/introduction',
|
||||
},
|
||||
{
|
||||
text: 'Getting Started',
|
||||
link: '/en/guide/getting-started',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Basic Features',
|
||||
items: [
|
||||
{ text: 'File Upload', link: '/en/guide/upload' },
|
||||
{ text: 'File Sharing', link: '/en/guide/share' },
|
||||
{ text: 'File Management', link: '/en/guide/management' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Advanced Features',
|
||||
items: [
|
||||
{ text: 'Storage Configuration', link: '/en/guide/storage' },
|
||||
{ text: 'Security Settings', link: '/en/guide/security' },
|
||||
{
|
||||
text: 'System Configuration',
|
||||
link: '/en/guide/configuration',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
'/en/api/': [
|
||||
{
|
||||
text: 'API Reference',
|
||||
items: [
|
||||
{ text: 'Share API', link: '/en/api/#share-api' },
|
||||
{ text: 'Admin API', link: '/en/api/#admin-api' },
|
||||
{ text: 'Error Response', link: '/en/api/#error-response' },
|
||||
{ text: 'Status Codes', link: '/en/api/#status-codes' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
|
||||
],
|
||||
footer: {
|
||||
message: 'Released under the LGPL-3.0 license',
|
||||
copyright: 'Copyright © 2022-present FileCodeBox',
|
||||
},
|
||||
search: {
|
||||
provider: 'local',
|
||||
},
|
||||
outline: {
|
||||
level: [2, 3],
|
||||
label: '目录',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
themeConfig: {
|
||||
// 语言切换器
|
||||
langMenuLabel: '切换语言',
|
||||
|
||||
// 社交链接
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
|
||||
],
|
||||
|
||||
// 页脚
|
||||
footer: {
|
||||
message: '基于 LGPL-3.0 license 发布',
|
||||
copyright: 'Copyright © 2022-present FileCodeBox',
|
||||
},
|
||||
|
||||
// 搜索
|
||||
search: {
|
||||
provider: 'local',
|
||||
options: {
|
||||
locales: {
|
||||
zh: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: '搜索文档',
|
||||
buttonAriaLabel: '搜索文档',
|
||||
},
|
||||
modal: {
|
||||
noResultsText: '无法找到相关结果',
|
||||
resetButtonTitle: '清除查询条件',
|
||||
footer: {
|
||||
selectText: '选择',
|
||||
navigateText: '切换',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
en: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: 'Search',
|
||||
buttonAriaLabel: 'Search docs',
|
||||
},
|
||||
modal: {
|
||||
noResultsText: 'No results found',
|
||||
resetButtonTitle: 'Clear query',
|
||||
footer: {
|
||||
selectText: 'to select',
|
||||
navigateText: 'to navigate',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
outline: {
|
||||
level: [2, 3],
|
||||
label: '目录',
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,263 @@
|
||||
# FileCodeBox API 文档
|
||||
|
||||
## API 版本: 2.1.0
|
||||
|
||||
## 目录
|
||||
- [认证](#认证)
|
||||
- [分享接口](#分享接口)
|
||||
- [管理接口](#管理接口)
|
||||
|
||||
## 认证
|
||||
|
||||
部分接口需要在请求头中携带 `Authorization` 进行认证:
|
||||
|
||||
```
|
||||
Authorization: Bearer <token>
|
||||
```
|
||||
|
||||
## 分享接口
|
||||
|
||||
### 分享文本
|
||||
|
||||
**POST** `/share/text/`
|
||||
|
||||
分享文本内容,获取分享码。
|
||||
|
||||
**请求参数:**
|
||||
|
||||
| 参数名 | 类型 | 必填 | 默认值 | 描述 |
|
||||
|-------|------|------|--------|------|
|
||||
| text | string | 是 | - | 要分享的文本内容 |
|
||||
| expire_value | integer | 否 | 1 | 过期时间值 |
|
||||
| expire_style | string | 否 | "day" | 过期时间单位(day/hour/minute) |
|
||||
|
||||
**响应示例:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"code": "abc123",
|
||||
"name": "text.txt"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 分享文件
|
||||
|
||||
**POST** `/share/file/`
|
||||
|
||||
上传并分享文件,获取分享码。
|
||||
|
||||
**请求参数:**
|
||||
|
||||
| 参数名 | 类型 | 必填 | 默认值 | 描述 |
|
||||
|-------|------|------|--------|------|
|
||||
| file | file | 是 | - | 要上传的文件 |
|
||||
| expire_value | integer | 否 | 1 | 过期时间值 |
|
||||
| expire_style | string | 否 | "day" | 过期时间单位(day/hour/minute) |
|
||||
|
||||
**响应示例:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"code": "abc123",
|
||||
"name": "example.txt"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 获取文件信息
|
||||
|
||||
**GET** `/share/select/`
|
||||
|
||||
通过分享码获取文件信息。
|
||||
|
||||
**请求参数:**
|
||||
|
||||
| 参数名 | 类型 | 必填 | 描述 |
|
||||
|-------|------|------|------|
|
||||
| code | string | 是 | 文件分享码 |
|
||||
|
||||
**响应示例:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"code": "abc123",
|
||||
"name": "example.txt",
|
||||
"size": 1024,
|
||||
"text": "文件内容或下载链接"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 选择文件
|
||||
|
||||
**POST** `/share/select/`
|
||||
|
||||
通过分享码选择文件。
|
||||
|
||||
**请求参数:**
|
||||
|
||||
| 参数名 | 类型 | 必填 | 描述 |
|
||||
|-------|------|------|------|
|
||||
| code | string | 是 | 文件分享码 |
|
||||
|
||||
**响应示例:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"code": "abc123",
|
||||
"name": "example.txt",
|
||||
"size": 1024,
|
||||
"text": "文件内容或下载链接"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 下载文件
|
||||
|
||||
**GET** `/share/download`
|
||||
|
||||
下载分享的文件。
|
||||
|
||||
**请求参数:**
|
||||
|
||||
| 参数名 | 类型 | 必填 | 描述 |
|
||||
|-------|------|------|------|
|
||||
| key | string | 是 | 下载密钥 |
|
||||
| code | string | 是 | 文件分享码 |
|
||||
|
||||
## 管理接口
|
||||
|
||||
### 管理员登录
|
||||
|
||||
**POST** `/admin/login`
|
||||
|
||||
管理员登录获取token。
|
||||
|
||||
**请求参数:**
|
||||
|
||||
| 参数名 | 类型 | 必填 | 描述 |
|
||||
|-------|------|------|------|
|
||||
| password | string | 是 | 管理员密码 |
|
||||
|
||||
### 仪表盘数据
|
||||
|
||||
**GET** `/admin/dashboard`
|
||||
|
||||
获取系统仪表盘数据。
|
||||
|
||||
**响应示例:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"totalFiles": 100,
|
||||
"storageUsed": "1.5GB",
|
||||
"sysUptime": "10天",
|
||||
"yesterdayCount": 50,
|
||||
"yesterdaySize": "500MB",
|
||||
"todayCount": 30,
|
||||
"todaySize": "300MB"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 文件列表
|
||||
|
||||
**GET** `/admin/file/list`
|
||||
|
||||
获取系统中的文件列表。
|
||||
|
||||
**请求参数:**
|
||||
|
||||
| 参数名 | 类型 | 必填 | 默认值 | 描述 |
|
||||
|-------|------|------|--------|------|
|
||||
| page | integer | 否 | 1 | 当前页码 |
|
||||
| size | integer | 否 | 10 | 每页数量 |
|
||||
| keyword | string | 否 | "" | 搜索关键词 |
|
||||
|
||||
**响应示例:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"page": 1,
|
||||
"size": 10,
|
||||
"total": 100,
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "example.txt",
|
||||
"size": 1024,
|
||||
"created_at": "2024-01-01 12:00:00"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 删除文件
|
||||
|
||||
**DELETE** `/admin/file/delete`
|
||||
|
||||
删除系统中的文件。
|
||||
|
||||
**请求参数:**
|
||||
|
||||
| 参数名 | 类型 | 必填 | 描述 |
|
||||
|-------|------|------|------|
|
||||
| id | integer | 是 | 文件ID |
|
||||
|
||||
### 获取配置
|
||||
|
||||
**GET** `/admin/config/get`
|
||||
|
||||
获取系统配置信息。
|
||||
|
||||
### 更新配置
|
||||
|
||||
**PATCH** `/admin/config/update`
|
||||
|
||||
更新系统配置信息。
|
||||
|
||||
## 错误响应
|
||||
|
||||
当发生错误时,API会返回对应的错误信息:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 422,
|
||||
"detail": [
|
||||
{
|
||||
"loc": ["body", "password"],
|
||||
"msg": "密码不能为空",
|
||||
"type": "value_error"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 状态码说明
|
||||
|
||||
- 200: 请求成功
|
||||
- 401: 未授权
|
||||
- 403: 禁止访问
|
||||
- 404: 资源不存在
|
||||
- 422: 请求参数验证错误
|
||||
- 500: 服务器内部错误
|
||||
@@ -0,0 +1,263 @@
|
||||
# FileCodeBox API Documentation
|
||||
|
||||
## API Version: 2.1.0
|
||||
|
||||
## Table of Contents
|
||||
- [Authentication](#authentication)
|
||||
- [Share API](#share-api)
|
||||
- [Admin API](#admin-api)
|
||||
|
||||
## Authentication
|
||||
|
||||
Some APIs require `Authorization` header for authentication:
|
||||
|
||||
```
|
||||
Authorization: Bearer <token>
|
||||
```
|
||||
|
||||
## Share API
|
||||
|
||||
### Share Text
|
||||
|
||||
**POST** `/share/text/`
|
||||
|
||||
Share text content and get a share code.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| text | string | Yes | - | Text content to share |
|
||||
| expire_value | integer | No | 1 | Expiration time value |
|
||||
| expire_style | string | No | "day" | Expiration time unit(day/hour/minute) |
|
||||
|
||||
**Response Example:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"code": "abc123",
|
||||
"name": "text.txt"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Share File
|
||||
|
||||
**POST** `/share/file/`
|
||||
|
||||
Upload and share a file, get a share code.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| file | file | Yes | - | File to upload |
|
||||
| expire_value | integer | No | 1 | Expiration time value |
|
||||
| expire_style | string | No | "day" | Expiration time unit(day/hour/minute) |
|
||||
|
||||
**Response Example:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"code": "abc123",
|
||||
"name": "example.txt"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Get File Info
|
||||
|
||||
**GET** `/share/select/`
|
||||
|
||||
Get file information by share code.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|----------|-------------|
|
||||
| code | string | Yes | File share code |
|
||||
|
||||
**Response Example:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"code": "abc123",
|
||||
"name": "example.txt",
|
||||
"size": 1024,
|
||||
"text": "File content or download link"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Select File
|
||||
|
||||
**POST** `/share/select/`
|
||||
|
||||
Select file by share code.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|----------|-------------|
|
||||
| code | string | Yes | File share code |
|
||||
|
||||
**Response Example:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"code": "abc123",
|
||||
"name": "example.txt",
|
||||
"size": 1024,
|
||||
"text": "File content or download link"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Download File
|
||||
|
||||
**GET** `/share/download`
|
||||
|
||||
Download shared file.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|----------|-------------|
|
||||
| key | string | Yes | Download key |
|
||||
| code | string | Yes | File share code |
|
||||
|
||||
## Admin API
|
||||
|
||||
### Admin Login
|
||||
|
||||
**POST** `/admin/login`
|
||||
|
||||
Admin login to get token.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|----------|-------------|
|
||||
| password | string | Yes | Admin password |
|
||||
|
||||
### Dashboard Data
|
||||
|
||||
**GET** `/admin/dashboard`
|
||||
|
||||
Get system dashboard data.
|
||||
|
||||
**Response Example:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"totalFiles": 100,
|
||||
"storageUsed": "1.5GB",
|
||||
"sysUptime": "10 days",
|
||||
"yesterdayCount": 50,
|
||||
"yesterdaySize": "500MB",
|
||||
"todayCount": 30,
|
||||
"todaySize": "300MB"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### File List
|
||||
|
||||
**GET** `/admin/file/list`
|
||||
|
||||
Get system file list.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| page | integer | No | 1 | Current page |
|
||||
| size | integer | No | 10 | Page size |
|
||||
| keyword | string | No | "" | Search keyword |
|
||||
|
||||
**Response Example:**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"detail": {
|
||||
"page": 1,
|
||||
"size": 10,
|
||||
"total": 100,
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "example.txt",
|
||||
"size": 1024,
|
||||
"created_at": "2024-01-01 12:00:00"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Delete File
|
||||
|
||||
**DELETE** `/admin/file/delete`
|
||||
|
||||
Delete file from system.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|----------|-------------|
|
||||
| id | integer | Yes | File ID |
|
||||
|
||||
### Get Config
|
||||
|
||||
**GET** `/admin/config/get`
|
||||
|
||||
Get system configuration.
|
||||
|
||||
### Update Config
|
||||
|
||||
**PATCH** `/admin/config/update`
|
||||
|
||||
Update system configuration.
|
||||
|
||||
## Error Response
|
||||
|
||||
When an error occurs, the API will return corresponding error message:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 422,
|
||||
"detail": [
|
||||
{
|
||||
"loc": ["body", "password"],
|
||||
"msg": "Password cannot be empty",
|
||||
"type": "value_error"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Status Codes
|
||||
|
||||
- 200: Success
|
||||
- 401: Unauthorized
|
||||
- 403: Forbidden
|
||||
- 404: Not Found
|
||||
- 422: Validation Error
|
||||
- 500: Internal Server Error
|
||||
@@ -0,0 +1,67 @@
|
||||
# Getting Started
|
||||
|
||||
## Introduction
|
||||
|
||||
FileCodeBox is a simple and efficient file sharing tool that supports temporary file transfer, sharing, and management. This guide will help you quickly deploy and use FileCodeBox.
|
||||
|
||||
## Features
|
||||
|
||||
- 🚀 Quick Deployment: Support Docker one-click deployment
|
||||
- 🔒 Secure & Reliable: File access requires extraction code
|
||||
- ⏱️ Time Control: Support setting file expiration time
|
||||
- 📊 Download Limit: Can limit file download times
|
||||
- 🖼️ File Preview: Support preview of images, videos, audio, and other formats
|
||||
- 📱 Responsive Design: Perfect adaptation for mobile and desktop
|
||||
|
||||
## Deployment Methods
|
||||
|
||||
### Docker Deployment
|
||||
|
||||
```bash
|
||||
docker run -d --restart=always -p 12345:12345 -v /opt/FileCodeBox/:/app/data --name filecodebox lanol/filecodebox:beta
|
||||
```
|
||||
|
||||
### Manual Deployment
|
||||
|
||||
1. Clone the repository
|
||||
```bash
|
||||
git clone https://github.com/vastsa/FileCodeBox.git
|
||||
```
|
||||
|
||||
2. Install dependencies
|
||||
```bash
|
||||
cd FileCodeBox
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
3. Start the service
|
||||
```bash
|
||||
python main.py
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
1. Access the System
|
||||
Open browser and visit `http://localhost:12345`
|
||||
|
||||
2. Upload Files
|
||||
- Click upload button or drag files to upload area
|
||||
- Set file expiration time and download limit
|
||||
- Get share link and extraction code
|
||||
|
||||
3. Download Files
|
||||
- Visit share link
|
||||
- Enter extraction code
|
||||
- Download file
|
||||
|
||||
4. Admin Panel
|
||||
- Visit `http://localhost:12345/#/admin`
|
||||
- Enter admin password: `FileCodeBox2023`
|
||||
- Enter admin panel
|
||||
- View system information, file list, user management, etc.
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [Storage Configuration](/en/guide/storage) - Learn how to configure different storage methods
|
||||
- [Security Settings](/en/guide/security) - Learn how to enhance system security
|
||||
- [API Documentation](/en/api/) - Learn how to integrate through API
|
||||
@@ -0,0 +1,243 @@
|
||||
<div align="center">
|
||||
|
||||
<img src="https://fastly.jsdelivr.net/gh/vastsa/FileCodeBox@V1.6/static/banners/img_1.png" alt="FileCodeBox Logo">
|
||||
|
||||
<p><em>Share text and files anonymously with a passcode, like picking up a package</em></p>
|
||||
|
||||
[](https://github.com/vastsa/FileCodeBox/stargazers)
|
||||
[](https://github.com/vastsa/FileCodeBox/network)
|
||||
[](https://github.com/vastsa/FileCodeBox/issues)
|
||||
[](https://github.com/vastsa/FileCodeBox/blob/master/LICENSE)
|
||||
[](https://qm.qq.com/q/PemPzhdEIM)
|
||||
[](https://www.python.org)
|
||||
[](https://fastapi.tiangolo.com)
|
||||
[](https://v3.vuejs.org)
|
||||
|
||||
</div>
|
||||
|
||||
## 📝 Introduction
|
||||
|
||||
FileCodeBox is a lightweight file sharing tool developed with FastAPI + Vue3. It allows users to share text and files easily, where recipients only need a passcode to retrieve the files, just like picking up a package from a delivery locker.
|
||||
|
||||
## 🖼️ Preview
|
||||
|
||||
<div align="center">
|
||||
<h3>
|
||||
<a href="https://github.com/vastsa/FileCodeBoxFronted" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Frontend-FileCodeBoxFronted-blue?style=for-the-badge&logo=github" alt="Frontend Repository">
|
||||
</a>
|
||||
|
||||
<a href="https://share.lanol.cn" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Demo-share.lanol.cn-green?style=for-the-badge&logo=internet-explorer" alt="Demo Site">
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
||||
## 🎯 Use Cases
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>📁 Temporary File Sharing</h4>
|
||||
Quick file sharing without registration
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>📝 Quick Text Sharing</h4>
|
||||
Share code snippets and text content
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🕶️ Anonymous Transfer</h4>
|
||||
Privacy-protected file transfer
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>💾 Temporary Storage</h4>
|
||||
File storage with expiration time
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🔄 Cross-platform Transfer</h4>
|
||||
Quick file transfer between devices
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🌐 Private Share Service</h4>
|
||||
Build your own file sharing service
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## ✨ Core Features
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>🚀 Lightweight</h4>
|
||||
Based on FastAPI + SQLite3 + Vue3 + ElementUI
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>📤 Easy Upload</h4>
|
||||
Support copy-paste and drag-drop
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>📦 Multiple Types</h4>
|
||||
Support text and various file types
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>🔒 Security</h4>
|
||||
|
||||
- IP upload limits
|
||||
- Error attempt limits
|
||||
- File expiration
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🎫 Passcode Sharing</h4>
|
||||
Random codes with customizable limits
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🌍 Multi-language</h4>
|
||||
Support for Simplified Chinese, Traditional Chinese, and English
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>🎭 Anonymous</h4>
|
||||
No registration required
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🛠 Admin Panel</h4>
|
||||
File and system management
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🐳 Docker</h4>
|
||||
One-click deployment
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>💾 Storage Options</h4>
|
||||
Local, S3, OneDrive support
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>📱 Responsive</h4>
|
||||
Mobile-friendly design
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>💻 CLI Support</h4>
|
||||
Command-line download
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Docker Deployment
|
||||
|
||||
```bash
|
||||
docker run -d --restart=always -p 12345:12345 -v /opt/FileCodeBox/:/app/data --name filecodebox lanol/filecodebox:beta
|
||||
```
|
||||
|
||||
### Manual Deployment
|
||||
|
||||
1. Clone the repository
|
||||
```bash
|
||||
git clone https://github.com/vastsa/FileCodeBox.git
|
||||
```
|
||||
|
||||
2. Install dependencies
|
||||
```bash
|
||||
cd FileCodeBox
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
3. Start the service
|
||||
```bash
|
||||
python main.py
|
||||
```
|
||||
|
||||
## 📖 Usage Guide
|
||||
|
||||
### Share Files
|
||||
1. Open the website, click "Share File"
|
||||
2. Select or drag files
|
||||
3. Set expiration time and count
|
||||
4. Get the passcode
|
||||
|
||||
### Retrieve Files
|
||||
1. Open the website, enter passcode
|
||||
2. Click retrieve
|
||||
3. Download file or view text
|
||||
|
||||
### Admin Panel
|
||||
1. Visit `/admin`
|
||||
2. Enter admin password
|
||||
3. Manage files and settings
|
||||
|
||||
## 🛠 Development Guide
|
||||
|
||||
### Project Structure
|
||||
```
|
||||
FileCodeBox/
|
||||
├── apps/ # Application code
|
||||
│ ├── admin/ # Admin backend
|
||||
│ └── base/ # Base functions
|
||||
├── core/ # Core functions
|
||||
├── data/ # Data directory
|
||||
└── fcb-fronted/ # Frontend code
|
||||
```
|
||||
|
||||
### Development Environment
|
||||
- Python 3.8+
|
||||
- Node.js 14+
|
||||
- Vue 3
|
||||
- FastAPI
|
||||
|
||||
### Local Development
|
||||
1. Backend development
|
||||
```bash
|
||||
python main.py
|
||||
```
|
||||
|
||||
2. Frontend development
|
||||
```bash
|
||||
cd fcb-fronted
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
1. Fork the project
|
||||
2. Create your feature branch `git checkout -b feature/xxx`
|
||||
3. Commit your changes `git commit -m 'Add xxx'`
|
||||
4. Push to the branch `git push origin feature/xxx`
|
||||
5. Open a Pull Request
|
||||
|
||||
## ❓ FAQ
|
||||
|
||||
### Q: How to modify upload size limit?
|
||||
A: Change `uploadSize` in admin panel
|
||||
|
||||
### Q: How to configure storage engine?
|
||||
A: Select storage engine and configure parameters in admin panel
|
||||
|
||||
### Q: How to backup data?
|
||||
A: Backup the `data` directory
|
||||
|
||||
For more questions, visit [Wiki](https://github.com/vastsa/FileCodeBox/wiki/常见问题)
|
||||
|
||||
## 😀 Project Statistics and Analytics
|
||||
|
||||
<div align="center">
|
||||
<a href="https://hellogithub.com/repository/75ad7ffedd404a6485b4d621ec5b47e6" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=75ad7ffedd404a6485b4d621ec5b47e6&claim_uid=beSz6INEkCM4mDH" alt="Featured|HelloGitHub" style="width: 200px; height: 45px;" width="200" height="45" /></a>
|
||||
|
||||

|
||||
|
||||
[](https://star-history.com/#vastsa/FileCodeBox&Date)
|
||||
</div>
|
||||
|
||||
## 📜 Disclaimer
|
||||
|
||||
This project is open-source for learning purposes only. It should not be used for any illegal purposes. The author is not responsible for any consequences. Please retain the project address and copyright information when using it.
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: "FileCodeBox"
|
||||
text: "File Express Box"
|
||||
tagline: Share text and files anonymously with access codes, just like picking up a package
|
||||
image:
|
||||
src: /logo_small.png
|
||||
alt: FileCodeBox
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Get Started
|
||||
link: /en/guide/getting-started
|
||||
- theme: alt
|
||||
text: Live Demo
|
||||
link: https://share.lanol.cn
|
||||
- theme: alt
|
||||
text: View on GitHub
|
||||
link: https://github.com/vastsa/FileCodeBox
|
||||
|
||||
features:
|
||||
- icon: 🚀
|
||||
title: Quick Deployment
|
||||
details: Supports one-click Docker deployment, simple and fast, no complex configuration needed
|
||||
- icon: 🔒
|
||||
title: Secure & Reliable
|
||||
details: File access requires an access code, supports expiration time and download limit settings
|
||||
- icon: 💻
|
||||
title: Clean Interface
|
||||
details: Clean user interface with drag-and-drop upload support for excellent user experience
|
||||
- icon: 🛠️
|
||||
title: Feature Rich
|
||||
details: Supports file preview, online playback, image processing, and many other features
|
||||
- icon: 📦
|
||||
title: Storage Extensions
|
||||
details: Supports various storage methods including local storage and object storage
|
||||
- icon: 🔌
|
||||
title: API Support
|
||||
details: Provides complete REST API for easy integration with other systems
|
||||
---
|
||||
@@ -0,0 +1,68 @@
|
||||
# 快速开始
|
||||
|
||||
## 简介
|
||||
|
||||
FileCodeBox 是一个简单高效的文件分享工具,支持文件临时中转、分享和管理。本指南将帮助您快速部署和使用 FileCodeBox。
|
||||
|
||||
## 特性
|
||||
|
||||
- 🚀 快速部署:支持 Docker 一键部署
|
||||
- 🔒 安全可靠:文件访问需要提取码
|
||||
- ⏱️ 时效控制:支持设置文件有效期
|
||||
- 📊 下载限制:可限制文件下载次数
|
||||
- 🖼️ 文件预览:支持图片、视频、音频等多种格式预览
|
||||
- 📱 响应式设计:完美适配移动端和桌面端
|
||||
|
||||
## 部署方式
|
||||
|
||||
### Docker 部署(推荐)
|
||||
|
||||
```bash
|
||||
docker run -d --restart=always -p 12345:12345 -v /opt/FileCodeBox/:/app/data --name filecodebox lanol/filecodebox:beta
|
||||
```
|
||||
|
||||
### 手动部署
|
||||
|
||||
1. 克隆项目
|
||||
```bash
|
||||
git clone https://github.com/vastsa/FileCodeBox.git
|
||||
```
|
||||
|
||||
2. 安装依赖
|
||||
```bash
|
||||
cd FileCodeBox
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
3. 启动服务
|
||||
```bash
|
||||
python main.py
|
||||
```
|
||||
|
||||
|
||||
## 使用方法
|
||||
|
||||
1. 访问系统
|
||||
打开浏览器访问 `http://localhost:12345`
|
||||
|
||||
2. 上传文件
|
||||
- 点击上传按钮或拖拽文件到上传区域
|
||||
- 设置文件有效期和下载次数限制
|
||||
- 获取分享链接和提取码
|
||||
|
||||
3. 下载文件
|
||||
- 访问分享链接
|
||||
- 输入提取码
|
||||
- 下载文件
|
||||
|
||||
4. 后台管理
|
||||
- 访问 `http://localhost:12345/#/admin`
|
||||
- 输入管理员密码:`FileCodeBox2023`
|
||||
- 进入后台管理页面
|
||||
- 查看系统信息、文件列表、用户管理等
|
||||
|
||||
## 下一步
|
||||
|
||||
- [存储配置](/guide/storage) - 了解如何配置不同的存储方式
|
||||
- [安全设置](/guide/security) - 了解如何增强系统安全性
|
||||
- [API 文档](/api/) - 了解如何通过 API 集成
|
||||
@@ -0,0 +1,235 @@
|
||||
<div align="center">
|
||||
|
||||
<img src="https://fastly.jsdelivr.net/gh/vastsa/FileCodeBox@V1.6/static/banners/img_1.png" alt="FileCodeBox Logo">
|
||||
|
||||
<p><em>匿名口令分享文本和文件,像拿快递一样取文件</em></p>
|
||||
|
||||
[](https://github.com/vastsa/FileCodeBox/stargazers)
|
||||
[](https://github.com/vastsa/FileCodeBox/network)
|
||||
[](https://github.com/vastsa/FileCodeBox/issues)
|
||||
[](https://github.com/vastsa/FileCodeBox/blob/master/LICENSE)
|
||||
[](https://qm.qq.com/q/PemPzhdEIM)
|
||||
[](https://www.python.org)
|
||||
[](https://fastapi.tiangolo.com)
|
||||
[](https://v3.vuejs.org)
|
||||
</div>
|
||||
|
||||
|
||||
## 🚀 更新计划
|
||||
- [ ] 切片上传,同文件秒传,断点续传
|
||||
- [ ] 用户登录重构
|
||||
- [x] webdav存储
|
||||
- [x] 存储支持自定义路径
|
||||
- [x] s3优化,不修改昵称为uuid,新建目录
|
||||
|
||||
## 📝 项目简介
|
||||
|
||||
FileCodeBox 是一个基于 FastAPI + Vue3 开发的轻量级文件分享工具。它允许用户通过简单的方式分享文本和文件,接收者只需要一个提取码就可以取得文件,就像从快递柜取出快递一样简单。
|
||||
|
||||
## 🎯 应用场景
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>📁 临时文件分享</h4>
|
||||
快速分享单个文件,无需注册登录
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>📝 文本快速分享</h4>
|
||||
分享代码片段、文本内容等
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🕶️ 匿名文件传输</h4>
|
||||
保护隐私的文件传输方式
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>💾 临时文件存储</h4>
|
||||
支持设置过期时间的文件存储
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🔄 跨平台传输</h4>
|
||||
在不同设备间快速传输文件
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🌐 小型分享服务</h4>
|
||||
搭建私有的文件分享服务
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## ✨ 核心特性
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>🚀 轻量简洁</h4>
|
||||
基于 FastAPI + SQLite3 + Vue3 + ElementUI,部署简单,性能出色
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>📤 便捷上传</h4>
|
||||
支持复制粘贴、拖拽上传,操作简单直观
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>📦 多种类型</h4>
|
||||
支持文本和各类文件的分享
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>🔒 安全机制</h4>
|
||||
|
||||
- IP 限制上传次数
|
||||
- 错误次数限制
|
||||
- 文件过期机制
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🎫 提取码分享</h4>
|
||||
随机提取码,可自定义次数及有效期
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🌍 多语言支持</h4>
|
||||
支持中文简体、繁体及英文
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>🎭 匿名分享</h4>
|
||||
无需注册登录,保护隐私
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🛠 管理面板</h4>
|
||||
文件管理和系统配置
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>🐳 容器部署</h4>
|
||||
支持 Docker 一键部署
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>💾 存储扩展</h4>
|
||||
支持本地存储、S3 协议、OneDrive 等
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>📱 响应式设计</h4>
|
||||
支持移动端访问
|
||||
</td>
|
||||
<td align="center">
|
||||
<h4>💻 终端支持</h4>
|
||||
支持命令行下载
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 🚀 快速开始
|
||||
|
||||
### Docker 部署
|
||||
|
||||
```bash
|
||||
docker run -d --restart=always -p 12345:12345 -v /opt/FileCodeBox/:/app/data --name filecodebox lanol/filecodebox:beta
|
||||
```
|
||||
|
||||
### 手动部署
|
||||
|
||||
1. 克隆项目
|
||||
```bash
|
||||
git clone https://github.com/vastsa/FileCodeBox.git
|
||||
```
|
||||
|
||||
2. 安装依赖
|
||||
```bash
|
||||
cd FileCodeBox
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
3. 启动服务
|
||||
```bash
|
||||
python main.py
|
||||
```
|
||||
|
||||
## 📖 使用说明
|
||||
|
||||
### 分享文件
|
||||
1. 打开网页,点击"分享文件"
|
||||
2. 选择或拖拽文件
|
||||
3. 设置过期时间和次数
|
||||
4. 获取提取码
|
||||
|
||||
### 获取文件
|
||||
1. 打开网页,输入提取码
|
||||
2. 点击获取
|
||||
3. 下载文件或查看文本
|
||||
|
||||
### 管理面板
|
||||
1. 访问 `/admin`
|
||||
2. 输入管理员密码
|
||||
3. 管理文件和配置
|
||||
|
||||
## 🛠 开发指南
|
||||
|
||||
### 项目结构
|
||||
```
|
||||
FileCodeBox/
|
||||
├── apps/ # 应用代码
|
||||
│ ├── admin/ # 管理后台
|
||||
│ └── base/ # 基础功能
|
||||
├── core/ # 核心功能
|
||||
├── data/ # 数据目录
|
||||
└── fcb-fronted/ # 前端代码
|
||||
```
|
||||
|
||||
### 开发环境
|
||||
- Python 3.8+
|
||||
- Node.js 14+
|
||||
- Vue 3
|
||||
- FastAPI
|
||||
|
||||
### 本地开发
|
||||
1. 后端开发
|
||||
```bash
|
||||
python main.py
|
||||
```
|
||||
|
||||
2. 前端开发
|
||||
```bash
|
||||
cd fcb-fronted
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 🤝 贡献指南
|
||||
|
||||
1. Fork 本项目
|
||||
2. 创建新分支 `git checkout -b feature/xxx`
|
||||
3. 提交更改 `git commit -m 'Add xxx'`
|
||||
4. 推送到分支 `git push origin feature/xxx`
|
||||
5. 提交 Pull Request
|
||||
|
||||
## ❓ 常见问题
|
||||
|
||||
### Q: 如何修改上传大小限制?
|
||||
A: 在管理面板中修改配置项 `uploadSize`
|
||||
|
||||
### Q: 如何配置存储引擎?
|
||||
A: 在管理面板中选择存储引擎并配置相应参数
|
||||
|
||||
### Q: 如何备份数据?
|
||||
A: 备份 `data` 目录即可
|
||||
|
||||
更多问题请访问 [Wiki](https://github.com/vastsa/FileCodeBox/wiki/常见问题)
|
||||
|
||||
## 📊 项目统计
|
||||
|
||||
<div align="center">
|
||||
<a href="https://hellogithub.com/repository/75ad7ffedd404a6485b4d621ec5b47e6" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=75ad7ffedd404a6485b4d621ec5b47e6&claim_uid=beSz6INEkCM4mDH" alt="Featured|HelloGitHub" style="width: 200px; height: 45px;" width="200" height="45" /></a>
|
||||
|
||||

|
||||
|
||||
[](https://star-history.com/#vastsa/FileCodeBox&Date)
|
||||
</div>
|
||||
|
||||
## 📜 免责声明
|
||||
|
||||
本项目开源仅供学习使用,不得用于任何违法用途,否则后果自负,与作者无关。使用时请保留项目地址和版权信息。
|
||||
@@ -0,0 +1,26 @@
|
||||
# 阿里云设置
|
||||
S3 AccessKeyId: `AccessKeyId`
|
||||
|
||||
S3 SecretAccessKey: `SecretAccessKey`
|
||||
|
||||
S3 BucketName: `bucket-name`
|
||||
|
||||
S3 EndpointUrl: `https://<bucket-name>.<region>.aliyuncs.com`
|
||||
|
||||
S3 Signature Version: `s3v4`
|
||||
|
||||
S3 Region Name:`region`
|
||||
|
||||
# Minio设置
|
||||
|
||||
S3 AccessKeyId: `AccessKeyId`
|
||||
|
||||
S3 SecretAccessKey: `SecretAccessKey`
|
||||
|
||||
S3 BucketName: `bucket-name`
|
||||
|
||||
S3 EndpointUrl: api接口地址
|
||||
|
||||
S3 Signature Version: `s3v4`
|
||||
|
||||
S3 Region Name:根据`configurations`里面设置的 `Server Location`
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: "FileCodeBox"
|
||||
text: "文件快递柜"
|
||||
tagline: 匿名口令分享文本,文件,像拿快递一样取文件
|
||||
image:
|
||||
src: /logo_small.png
|
||||
alt: FileCodeBox
|
||||
actions:
|
||||
- theme: brand
|
||||
text: 快速开始
|
||||
link: /guide/getting-started
|
||||
- theme: alt
|
||||
text: 在线体验
|
||||
link: https://share.lanol.cn
|
||||
- theme: alt
|
||||
text: 在 GitHub 上查看
|
||||
link: https://github.com/vastsa/FileCodeBox
|
||||
|
||||
features:
|
||||
- icon: 🚀
|
||||
title: 快速部署
|
||||
details: 支持 Docker 一键部署,简单快捷,无需复杂配置
|
||||
- icon: 🔒
|
||||
title: 安全可靠
|
||||
details: 文件访问需要提取码,支持设置有效期和下载次数限制
|
||||
- icon: 💻
|
||||
title: 简洁界面
|
||||
details: 清爽的用户界面,支持拖拽上传,使用体验极佳
|
||||
- icon: 🛠️
|
||||
title: 功能丰富
|
||||
details: 支持文件预览、在线播放、图片处理等多种功能
|
||||
- icon: 📦
|
||||
title: 存储扩展
|
||||
details: 支持本地存储、对象存储等多种存储方式
|
||||
- icon: 🔌
|
||||
title: API 支持
|
||||
details: 提供完整的 REST API,方便与其他系统集成
|
||||
---
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"vitepress": "^1.6.3"
|
||||
},
|
||||
"scripts": {
|
||||
"docs:dev": "vitepress dev",
|
||||
"docs:build": "vitepress build",
|
||||
"docs:preview": "vitepress preview"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 92 KiB |
@@ -1,15 +0,0 @@
|
||||
/* eslint-env node */
|
||||
require('@rushstack/eslint-patch/modern-module-resolution')
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
'extends': [
|
||||
'plugin:vue/vue3-essential',
|
||||
'eslint:recommended',
|
||||
'@vue/eslint-config-typescript',
|
||||
'@vue/eslint-config-prettier/skip-formatting'
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest'
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
.vite/
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
.git
|
||||
/cypress/videos/
|
||||
/cypress/screenshots/
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/prettierrc",
|
||||
"semi": false,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"printWidth": 100,
|
||||
"trailingComma": "none"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
export {}
|
||||
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
CardTools: typeof import('./src/components/CardTools.vue')['default']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElMain: typeof import('element-plus/es')['ElMain']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
FileBox: typeof import('./src/components/FileBox.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
UploadFile: typeof import('./src/components/UploadFile.vue')['default']
|
||||
UploadText: typeof import('./src/components/UploadText.vue')['default']
|
||||
}
|
||||
export interface ComponentCustomProperties {
|
||||
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
.el-container{display:flex;flex-direction:row;flex:1;flex-basis:auto;box-sizing:border-box;min-width:0}.el-container.is-vertical{flex-direction:column}.el-aside{overflow:auto;box-sizing:border-box;flex-shrink:0;width:var(--el-aside-width,300px)}.el-footer{--el-footer-padding:0 20px;--el-footer-height:60px;padding:var(--el-footer-padding);box-sizing:border-box;flex-shrink:0;height:var(--el-footer-height)}.el-header{--el-header-padding:0 20px;--el-header-height:60px;padding:var(--el-header-padding);box-sizing:border-box;flex-shrink:0;height:var(--el-header-height)}.el-main{--el-main-padding:20px;display:block;flex:1;flex-basis:auto;overflow:auto;box-sizing:border-box;padding:var(--el-main-padding)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center top}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center bottom}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transition:var(--el-transition-md-fade);transform-origin:top left}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}:root{--el-menu-active-color:var(--el-color-primary);--el-menu-text-color:var(--el-text-color-primary);--el-menu-hover-text-color:var(--el-color-primary);--el-menu-bg-color:var(--el-fill-color-blank);--el-menu-hover-bg-color:var(--el-color-primary-light-9);--el-menu-item-height:56px;--el-menu-sub-item-height:calc(var(--el-menu-item-height) - 6px);--el-menu-horizontal-sub-item-height:36px;--el-menu-item-font-size:var(--el-font-size-base);--el-menu-item-hover-fill:var(--el-color-primary-light-9);--el-menu-border-color:var(--el-border-color);--el-menu-base-level-padding:20px;--el-menu-level-padding:20px;--el-menu-icon-width:24px}.el-menu{border-right:solid 1px var(--el-menu-border-color);list-style:none;position:relative;margin:0;padding-left:0;background-color:var(--el-menu-bg-color);box-sizing:border-box}.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-menu-item,.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-menu-item-group__title,.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-sub-menu__title{white-space:nowrap;padding-left:calc(var(--el-menu-base-level-padding) + var(--el-menu-level) * var(--el-menu-level-padding))}.el-menu--horizontal{display:flex;flex-wrap:nowrap;border-right:none}.el-menu--horizontal.el-menu{border-bottom:solid 1px var(--el-menu-border-color)}.el-menu--horizontal>.el-menu-item{display:inline-flex;justify-content:center;align-items:center;height:100%;margin:0;border-bottom:2px solid transparent;color:var(--el-menu-text-color)}.el-menu--horizontal>.el-menu-item a,.el-menu--horizontal>.el-menu-item a:hover{color:inherit}.el-menu--horizontal>.el-sub-menu:focus,.el-menu--horizontal>.el-sub-menu:hover{Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{T as qe,h as Ge,t as de,i as Se,E as Ue,b as Ze}from"./el-input-1fa85f7c.js";import{E as Qe,a as Xe}from"./el-form-item-e5c627c6.js";import"./el-tooltip-4ed993c7.js";import{E as Te}from"./el-popper-61ab67a6.js";import{d as _,u as x,o as I,a as X,w as E,r as $,ay as Pe,aY as Ye,f as h,T as Be,_ as R,av as Je,c as p,V as A,e as F,g as Me,i as Ne,ah as U,E as O,I as se,D as fe,aF as Ke,b as Ce,aH as le,k as me,s as S,aZ as et,a_ as tt,t as ke,O as ue,p as be,P as Ie,Q as Oe,z as M,G as Y,L as Ae,A as nt,C as ot,a9 as pe,aM as we,aN as xe,j as _e,m as at,aC as st,a$ as lt,b0 as rt,q as ut,n as it,aw as ct,R as ze,S as ye,Z as oe,X as ae,aR as dt,aT as mt,aU as pt,a8 as vt,a6 as ft,ad as ht,aB as $e,B as V,aa as gt}from"./index-098ca3b6.js";import{t as ie}from"./aria-bc8e8b0f.js";import{f as bt}from"./vnode-1dbdb4af.js";import"./_baseClone-88b87991.js";const _t=_({name:"ElCollapseTransition"}),yt=_({..._t,setup(e){const o=x("collapse-transition"),n=t=>{t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom},s={beforeEnter(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0},enter(t){t.dataset.oldOverflow=t.style.overflow,t.scrollHeight!==0?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=0,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom,t.style.overflow="hidden"},afterEnter(t){t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow},enterCancelled(t){n(t)},beforeLeave(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.maxHeight=`${t.scrollHeight}px`,t.style.overflow="hidden"},leave(t){t.scrollHeight!==0&&(t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0)},afterLeave(t){n(t)},leaveCancelled(t){n(t)}};return(t,d)=>(I(),X(Be,Pe({name:h(o).b()},Ye(s)),{default:E(()=>[$(t.$slots,"default")]),_:3},16,["name"]))}});var ce=R(yt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);ce.install=e=>{e.component(ce.name,ce)};const Mt=ce,Ct=_({name:"ElContainer"}),kt=_({...Ct,props:{direction:{type:String}},setup(e){const o=e,n=Je(),s=x("container"),t=p(()=>o.direction==="vertical"?!0:o.direction==="horizontal"?!1:n&&n.default?n.default().some(i=>{const f=i.type.name;return f==="ElHeader"||f==="ElFooter"}):!1);return(d,i)=>(I(),A("section",{class:F([h(s).b(),h(s).is("vertical",h(t))])},[$(d.$slots,"default")],2))}});var It=R(kt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/container.vue"]]);const wt=_({name:"ElAside"}),Et=_({...wt,props:{width:{type:String,default:null}},setup(e){const o=e,n=x("aside"),s=p(()=>o.width?n.cssVarBlock({width:o.width}):{});return(t,d)=>(I(),A("aside",{class:F(h(n).b()),style:Me(h(s))},[$(t.$slots,"default")],6))}});var He=R(Et,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/aside.vue"]]);const St=_({name:"ElFooter"}),xt=_({...St,props:{height:{type:String,default:null}},setup(e){const o=e,n=x("footer"),s=p(()=>o.height?n.cssVarBlock({height:o.height}):{});return(t,d)=>(I(),A("footer",{class:F(h(n).b()),style:Me(h(s))},[$(t.$slots,"default")],6))}});var De=R(xt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/footer.vue"]]);const $t=_({name:"ElHeader"}),Tt=_({...$t,props:{height:{type:String,default:null}},setup(e){const o=e,n=x("header"),s=p(()=>o.height?n.cssVarBlock({height:o.height}):{});return(t,d)=>(I(),A("header",{class:F(h(n).b()),style:Me(h(s))},[$(t.$slots,"default")],6))}});var Le=R(Tt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/header.vue"]]);const Pt=_({name:"ElMain"}),Bt=_({...Pt,setup(e){const o=x("main");return(n,s)=>(I(),A("main",{class:F(h(o).b())},[$(n.$slots,"default")],2))}});var Ve=R(Bt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/main.vue"]]);const Nt=Ne(It,{Aside:He,Footer:De,Header:Le,Main:Ve});U(He);U(De);const Ot=U(Le),At=U(Ve);let zt=class{constructor(o,n){this.parent=o,this.domNode=n,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(o){o===this.subMenuItems.length?o=0:o<0&&(o=this.subMenuItems.length-1),this.subMenuItems[o].focus(),this.subIndex=o}addListeners(){const o=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,n=>{n.addEventListener("keydown",s=>{let t=!1;switch(s.code){case O.down:{this.gotoSubIndex(this.subIndex+1),t=!0;break}case O.up:{this.gotoSubIndex(this.subIndex-1),t=!0;break}case O.tab:{ie(o,"mouseleave");break}case O.enter:case O.space:{t=!Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
.el-card{--el-card-border-color:var(--el-border-color-light);--el-card-border-radius:4px;--el-card-padding:20px;--el-card-bg-color:var(--el-fill-color-blank)}.el-card{border-radius:var(--el-card-border-radius);border:1px solid var(--el-card-border-color);background-color:var(--el-card-bg-color);overflow:hidden;color:var(--el-text-color-primary);transition:var(--el-transition-duration)}.el-card.is-always-shadow{box-shadow:var(--el-box-shadow-light)}.el-card.is-hover-shadow:focus,.el-card.is-hover-shadow:hover{box-shadow:var(--el-box-shadow-light)}.el-card__header{padding:calc(var(--el-card-padding) - 2px) var(--el-card-padding);border-bottom:1px solid var(--el-card-border-color);box-sizing:border-box}.el-card__body{padding:var(--el-card-padding)}.el-icon-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@-webkit-keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.el-icon{--color:inherit;height:1em;width:1em;line-height:1em;display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}.el-drawer{--el-drawer-bg-color:var(--el-dialog-bg-color, var(--el-bg-color));--el-drawer-padding-primary:var(--el-dialog-padding-primary, 20px)}.el-drawer{position:absolute;box-sizing:border-box;background-color:var(--el-drawer-bg-color);display:flex;flex-direction:column;box-shadow:var(--el-box-shadow-dark);overflow:hidden;transition:all var(--el-transition-duration)}.el-drawer .rtl,.el-drawer .ltr,.el-drawer .ttb,.el-drawer .btt{transform:translate(0)}.el-drawer__sr-focus:focus{outline:0!important}.el-drawer__header{align-items:center;color:#72767b;display:flex;margin-bottom:32px;padding:var(--el-drawer-padding-primary);padding-bottom:0}.el-drawer__header>:first-child{flex:1}.el-drawer__title{margin:0;flex:1;line-height:inherit;font-size:1rem}.el-drawer__footer{padding:var(--el-drawer-padding-primary);padding-top:10px;text-align:right}.el-drawer__close-btn{display:inline-flex;border:none;cursor:pointer;font-size:var(--el-font-size-extra-large);color:inherit;background-color:transparent;outline:0}.el-drawer__close-btn:focus i,.el-drawer__close-btn:hover i{color:var(--el-color-primary)}.el-drawer__body{flex:1;padding:var(--el-drawer-padding-primary);overflow:auto}.el-drawer__body>*{box-sizing:border-box}.el-drawer.ltr,.el-drawer.rtl{height:100%;top:0;bottom:0}.el-drawer.btt,.el-drawer.ttb{width:100%;left:0;right:0}.el-drawer.ltr{left:0}.el-drawer.rtl{right:0}.el-drawer.ttb{top:0}.el-drawer.btt{bottom:0}.el-drawer-fade-enter-active,.el-drawer-fade-leave-active{transition:all var(--el-transition-duration)}.el-drawer-fade-enter-active,.el-drawer-fade-enter-from,.el-drawer-fade-enter-to,.el-drawer-fade-leave-active,.el-drawer-fade-leave-from,.el-drawer-fade-leave-to{overflow:hidden!important}.el-drawer-fade-enter-from,.el-drawer-fade-leave-to{opacity:0}.el-drawer-fade-enter-to,.el-drawer-fade-leave-from{opacity:1}.el-drawer-fade-enter-from .rtl,.el-drawer-fade-leave-to .rtl{transform:translate(100%)}.el-drawer-fade-enter-from .ltr,.el-drawer-fade-leave-to .ltr{transform:translate(-100%)}.el-drawer-fade-enter-from .ttb,.el-drawer-fade-leave-to .ttb{transform:translateY(-100%)}.el-drawer-fade-enter-from .btt,.el-drawer-fade-leave-to .btt{transform:translateY(100%)}.el-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;height:100%;background-color:var(--el-overlay-color-lighter);overflow:auto}.el-overlay .el-overlay-root{height:0}.el-progress{position:relative;line-height:1;display:flex;align-items:center}.el-progress__text{font-size:14px;color:var(--el-text-color-regular);margin-left:5px;min-width:50px;line-height:1}.el-progress__text i{vertical-align:middle;display:block}.el-progress--circle,.el-progress--dashboard{display:inline-block}.el-progress--circle .el-progress__text,.el-progress--dashboard .el-progress__text{position:absolute;top:50%;left:0;width:100%;text-align:center;margin:0;transform:translateY(-50%)}.el-progress--circle .el-progress__text i,.el-progress--dashboard .el-progress__text i{vertical-align:middle;display:inline-block}.el-progress--without-text .el-progress__text{display:none}.el-progress--without-text .el-progress-bar{padding-right:0;margin-right:0;display:block}.el-progress--text-inside .el-progress-bar{padding-right:0;margin-right:0}.el-progress.is-success .el-progress-bar__inner{background-color:var(--el-color-success)}.el-progress.is-success .el-progress__text{color:var(--el-color-success)}.el-progress.is-warning .el-progress-bar__inner{background-color:var(--el-color-warning)}.el-progress.is-warning .el-progress__text{color:var(--el-color-warning)}.el-progress.is-exception .el-progress-bLine truncated
|
||||
@@ -1,297 +0,0 @@
|
||||
import{t as $E,F as WE,U as I0,u as Ju,h as pa,a as D0,E as KE}from"./el-input-1fa85f7c.js";import{a3 as x0,P as Cc,aC as QE,Q as XE,aD as ga,J as ZE,u as rn,aE as JE,F as w0,aF as ju,O as bc,H as jE,I as eS,aG as tS,D as rS,ai as Ni,b as nn,j as xr,d as yt,o as Re,V as Xe,e as We,f as J,r as ft,Z as tr,X as _t,W as Gt,S as je,g as _r,_ as In,i as ba,B as at,z as jr,aH as nS,aj as M0,k as ed,c as nt,w as Pe,a as St,h as L0,L as Ta,aI as aS,af as iS,aJ as oS,s as At,aK as sS,aL as lS,n as cS,aM as uS,aN as td,av as dS,p as _S,A as k0,ay as P0,ax as mS,C as B0,T as F0,aO as U0,an as G0,R as la,U as pS,aP as gS,al as ES,aQ as SS,am as fS,G as rd,aR as q0,t as nd,aS as Y0,a8 as hS,a6 as z0,a9 as ad,aa as id,aB as bS,a5 as TS,aT as vS,aU as CS,aV as RS,ab as NS,aW as AS,aX as yS,ac as OS}from"./index-098ca3b6.js";import{g as IS,E as DS}from"./el-tag-3005f0d6.js";import{g as va,a as xS,c as wS}from"./_commonjsHelpers-de833af9.js";import{P as Ai}from"./vnode-1dbdb4af.js";const MS=(...n)=>e=>{n.forEach(r=>{x0(r)?r(e):r.value=e})},LS=(n,e,r)=>{let o={offsetX:0,offsetY:0};const u=l=>{const d=l.clientX,p=l.clientY,{offsetX:S,offsetY:T}=o,C=n.value.getBoundingClientRect(),R=C.left,O=C.top,w=C.width,L=C.height,I=document.documentElement.clientWidth,F=document.documentElement.clientHeight,k=-R+S,q=-O+T,G=I-R-w+S,U=F-O-L+T,Q=ie=>{const ee=Math.min(Math.max(S+ie.clientX-d,k),G),Z=Math.min(Math.max(T+ie.clientY-p,q),U);o={offsetX:ee,offsetY:Z},n.value.style.transform=`translate(${ga(ee)}, ${ga(Z)})`},W=()=>{document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",W)};document.addEventListener("mousemove",Q),document.addEventListener("mouseup",W)},c=()=>{e.value&&n.value&&e.value.addEventListener("mousedown",u)},_=()=>{e.value&&n.value&&e.value.removeEventListener("mousedown",u)};Cc(()=>{QE(()=>{r.value?c():_()})}),XE(()=>{_()})},kS=(n,e={})=>{ZE(n)||$E("[useLockscreen]","You need to pass a ref param to this function");const r=e.ns||rn("popup"),o=JE(()=>r.bm("parent","hidden"));if(!w0||ju(document.body,o.value))return;let u=0,c=!1,_="0";const l=()=>{setTimeout(()=>{rS(document==null?void 0:document.body,o.value),c&&document&&(document.body.style.width=_)},200)};bc(n,d=>{if(!d){l();return}c=!ju(document.body,o.value),c&&(_=document.body.style.width),u=IS(r.namespace.value);const p=document.documentElement.clientHeight<document.body.scrollHeight,S=jE(document.body,"overflowY");u>0&&(p||S==="scroll")&&c&&(document.body.style.width=`calc(100% - ${u}px)`),eS(document.body,o.value)}),tS(()=>l())},H0=n=>{if(!n)return{onClick:Ni,onMousedown:Ni,onMouseup:Ni};let e=!1,r=!1;return{onClick:_=>{e&&r&&n(_),e=r=!1},onMousedown:_=>{e=_.target===_.currentTarget},onMouseup:_=>{r=_.target===_.currentTarget}}},PS=nn({header:{type:String,default:""},bodyStyle:{type:xr([String,Object,Array]),default:""},shadow:{type:String,values:["always","hover","never"],default:"always"}}),BS=yt({name:"ElCard"}),FS=yt({...BS,props:PS,setup(n){const e=rn("card");return(r,o)=>(Re(),Xe("div",{class:We([J(e).b(),J(e).is(`${r.shadow}-shadow`)])},[r.$slots.header||r.header?(Re(),Xe("div",{key:0,class:We(J(e).e("header"))},[ft(r.$slots,"header",{},()=>[tr(_t(r.header),1)])],2)):Gt("v-if",!0),je("div",{class:We(J(e).e("body")),style:_r(r.bodyStyle)},[ft(r.$slots,"default")],6)],2))}});var US=In(FS,[["__file","/home/runner/work/element-plus/element-plus/packages/components/card/src/card.vue"]]);const GS=ba(US),qS=nn({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:xr([String,Array,Object])},zIndex:{type:xr([String,Number])}}),YS={click:n=>n instanceof MouseEvent},zS="overlay";var HS=yt({name:"ElOverlay",props:qS,emits:YS,setup(n,{slots:e,emit:r}){const o=rn(zS),u=d=>{r("click",d)},{onClick:c,onMousedown:_,onMouseup:l}=H0(n.customMaskEvent?void 0:u);return()=>n.mask?at("div",{class:[o.b(),n.overlayClass],style:{zIndex:n.zIndex},onClick:c,onMousedown:_,onMouseup:l},[ft(e,"default")],Ai.STYLE|Ai.CLASS|Ai.PROPS,["onClick","onMouseup","onMousedown"]):jr("div",{class:n.overlayClass,style:{zIndex:n.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[ft(e,"default")])}});const V0=HS,$0=Symbol("dialogInjectionKey"),W0=nn({center:Boolean,alignCenter:Boolean,closeIcon:{type:nS},customClass:{type:String,default:""},draggable:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""}}),VS={close:()=>!0},$S=["aria-label"],WS=["id"],KS=yt({name:"ElDialogContent"}),QS=yt({...KS,props:W0,emits:VS,setup(n){const e=n,{t:r}=M0(),{Close:o}=aS,{dialogRef:u,headerRef:c,bodyId:_,ns:l,style:d}=ed($0),{focusTrapRef:p}=ed(WE),S=nt(()=>[l.b(),l.is("fullscreen",e.fullscreen),l.is("draggable",e.draggable),l.is("align-center",e.alignCenter),{[l.m("center")]:e.center},e.customClass]),T=MS(p,u),C=nt(()=>e.draggable);return LS(u,c,C),(R,O)=>(Re(),Xe("div",{ref:J(T),class:We(J(S)),style:_r(J(d)),tabindex:"-1"},[je("header",{ref_key:"headerRef",ref:c,class:We(J(l).e("header"))},[Line truncated
|
||||
M 50 50
|
||||
m 0 ${q?"":"-"}${k}
|
||||
a ${k} ${k} 0 1 1 0 ${q?"-":""}${k*2}
|
||||
a ${k} ${k} 0 1 1 0 ${q?"":"-"}${k*2}
|
||||
`}),d=nt(()=>2*Math.PI*_.value),p=nt(()=>e.type==="dashboard"?.75:1),S=nt(()=>`${-1*d.value*(1-p.value)/2}px`),T=nt(()=>({strokeDasharray:`${d.value*p.value}px, ${d.value}px`,strokeDashoffset:S.value})),C=nt(()=>({strokeDasharray:`${d.value*p.value*(e.percentage/100)}px, ${d.value}px`,strokeDashoffset:S.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),R=nt(()=>{let k;return e.color?k=F(e.percentage):k=r[e.status]||r.default,k}),O=nt(()=>e.status==="warning"?gS:e.type==="line"?e.status==="success"?ES:SS:e.status==="success"?fS:G0),w=nt(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),L=nt(()=>e.format(e.percentage));function I(k){const q=100/k.length;return k.map((U,Q)=>rd(U)?{color:U,percentage:(Q+1)*q}:U).sort((U,Q)=>U.percentage-Q.percentage)}const F=k=>{var q;const{color:G}=e;if(x0(G))return G(k);if(rd(G))return G;{const U=I(G);for(const Q of U)if(Q.percentage>k)return Q.color;return(q=U[U.length-1])==null?void 0:q.color}};return(k,q)=>(Re(),Xe("div",{class:We([J(o).b(),J(o).m(k.type),J(o).is(k.status),{[J(o).m("without-text")]:!k.showText,[J(o).m("text-inside")]:k.textInside}]),role:"progressbar","aria-valuenow":k.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[k.type==="line"?(Re(),Xe("div",{key:0,class:We(J(o).b("bar"))},[je("div",{class:We(J(o).be("bar","outer")),style:_r({height:`${k.strokeWidth}px`})},[je("div",{class:We([J(o).be("bar","inner"),{[J(o).bem("bar","inner","indeterminate")]:k.indeterminate},{[J(o).bem("bar","inner","striped")]:k.striped},{[J(o).bem("bar","inner","striped-flow")]:k.stripedFlow}]),style:_r(J(u))},[(k.showText||k.$slots.default)&&k.textInside?(Re(),Xe("div",{key:0,class:We(J(o).be("bar","innerText"))},[ft(k.$slots,"default",{percentage:k.percentage},()=>[je("span",null,_t(J(L)),1)])],2)):Gt("v-if",!0)],6)],6)],2)):(Re(),Xe("div",{key:1,class:We(J(o).b("circle")),style:_r({height:`${k.width}px`,width:`${k.width}px`})},[(Re(),Xe("svg",gf,[je("path",{class:We(J(o).be("circle","track")),d:J(l),stroke:`var(${J(o).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":k.strokeLinecap,"stroke-width":J(c),fill:"none",style:_r(J(T))},null,14,Ef),je("path",{class:We(J(o).be("circle","path")),d:J(l),stroke:J(R),fill:"none",opacity:k.percentage?1:0,"stroke-linecap":k.strokeLinecap,"stroke-width":J(c),style:_r(J(C))},null,14,Sf)]))],6)),(k.showText||k.$slots.default)&&!k.textInside?(Re(),Xe("div",{key:2,class:We(J(o).e("text")),style:_r({fontSize:`${J(w)}px`})},[ft(k.$slots,"default",{percentage:k.percentage},()=>[k.status?(Re(),St(J(Ta),{key:1},{default:Pe(()=>[(Re(),St(L0(J(O))))]),_:1})):(Re(),Xe("span",ff,_t(J(L)),1))])],6)):Gt("v-if",!0)],10,pf))}});var Tf=In(bf,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const vf=ba(Tf);const Cf=q0("fileData",()=>{const n=nd(JSON.parse(localStorage.getItem("receiveData")||"[]")||[]),e=nd(JSON.parse(localStorage.getItem("shareData")||"[]")||[]);function r(){localStorage.setItem("receiveData",JSON.stringify(n)),localStorage.setItem("shareData",JSON.stringify(e))}function o(l){n.unshift(l),r()}function u(l){e.unshift(l),r()}function c(l){n.splice(l,1),r()}function _(l){e.splice(l,1),r()}return{receiveData:n,shareData:e,save:r,addShareData:u,addReceiveData:o,deleteReceiveData:c,deleteShareData:_}}),Z0=q0("fileBox",()=>({showFileBox:At(!1)}));function J0(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(e=>{const r=n[e],o=typeof r;(o==="object"||o==="function")&&!Object.isFrozen(r)&&J0(r)}),n}class od{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function j0(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Rr(n,...e){const r=Object.create(null);for(const o in n)r[o]=n[o];return e.forEach(function(o){for(const u in o)r[u]=o[u]}),r}const Rf="</span>",sd=n=>!!n.scope,Nf=(n,{prefix:e})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const r=n.split(".");return[`${e}${r.shift()}`,...r.map((o,u)=>`${o}${"_".repeat(u+1)}`)].join(" ")}return`${e}${n}`};class Af{constructor(e,r){this.buffer="",this.classPrefix=r.classPrefix,e.walk(this)}addText(e){this.buffer+=j0(e)}openNode(e){if(!sd(e))return;const r=Nf(e.scope,{prefix:this.classPrefix});this.span(r)}closeNode(e){sd(e)&&(this.buffer+=Rf)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const ld=(n={})=>{const e={children:[]};return Object.assign(e,n),e};class Rc{constructor(){this.rootNode=ld(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const r=ld({scope:eLine truncated
|
||||
https://github.com/highlightjs/highlight.js/issues/2277`),ne=X,Ne=se),be===void 0&&(be=!0);const ze={code:Ne,language:ne};ue("before:highlight",ze);const et=ze.result?ze.result:T(ze.language,ze.code,be);return et.code=ze.code,ue("after:highlight",et),et}function T(X,se,be,Ne){const ne=Object.create(null);function ze(oe,me){return oe.keywords[me]}function et(){if(!ge.keywords){Ve.addText(Oe);return}let oe=0;ge.keywordPatternRe.lastIndex=0;let me=ge.keywordPatternRe.exec(Oe),Ce="";for(;me;){Ce+=Oe.substring(oe,me.index);const xe=pt.case_insensitive?me[0].toLowerCase():me[0],tt=ze(ge,xe);if(tt){const[Ct,Ue]=tt;if(Ve.addText(Ce),Ce="",ne[xe]=(ne[xe]||0)+1,ne[xe]<=gh&&(Lt+=Ue),Ct.startsWith("_"))Ce+=me[0];else{const Ge=pt.classNameAliases[Ct]||Ct;Ie(me[0],Ge)}}else Ce+=me[0];oe=ge.keywordPatternRe.lastIndex,me=ge.keywordPatternRe.exec(Oe)}Ce+=Oe.substring(oe),Ve.addText(Ce)}function Ke(){if(Oe==="")return;let oe=null;if(typeof ge.subLanguage=="string"){if(!e[ge.subLanguage]){Ve.addText(Oe);return}oe=T(ge.subLanguage,Oe,!0,zt[ge.subLanguage]),zt[ge.subLanguage]=oe._top}else oe=R(Oe,ge.subLanguage.length?ge.subLanguage:null);ge.relevance>0&&(Lt+=oe.relevance),Ve.__addSublanguage(oe._emitter,oe.language)}function De(){ge.subLanguage!=null?Ke():et(),Oe=""}function Ie(oe,me){oe!==""&&(Ve.startScope(me),Ve.addText(oe),Ve.endScope())}function Fe(oe,me){let Ce=1;const xe=me.length-1;for(;Ce<=xe;){if(!oe._emit[Ce]){Ce++;continue}const tt=pt.classNameAliases[oe[Ce]]||oe[Ce],Ct=me[Ce];tt?Ie(Ct,tt):(Oe=Ct,et(),Oe=""),Ce++}}function we(oe,me){return oe.scope&&typeof oe.scope=="string"&&Ve.openNode(pt.classNameAliases[oe.scope]||oe.scope),oe.beginScope&&(oe.beginScope._wrap?(Ie(Oe,pt.classNameAliases[oe.beginScope._wrap]||oe.beginScope._wrap),Oe=""):oe.beginScope._multi&&(Fe(oe.beginScope,me),Oe="")),ge=Object.create(oe,{parent:{value:ge}}),ge}function He(oe,me,Ce){let xe=xf(oe.endRe,Ce);if(xe){if(oe["on:end"]){const tt=new od(oe);oe["on:end"](me,tt),tt.isMatchIgnored&&(xe=!1)}if(xe){for(;oe.endsParent&&oe.parent;)oe=oe.parent;return oe}}if(oe.endsWithParent)return He(oe.parent,me,Ce)}function it(oe){return ge.matcher.regexIndex===0?(Oe+=oe[0],1):(Qt=!0,0)}function ot(oe){const me=oe[0],Ce=oe.rule,xe=new od(Ce),tt=[Ce.__beforeBegin,Ce["on:begin"]];for(const Ct of tt)if(Ct&&(Ct(oe,xe),xe.isMatchIgnored))return it(me);return Ce.skip?Oe+=me:(Ce.excludeBegin&&(Oe+=me),De(),!Ce.returnBegin&&!Ce.excludeBegin&&(Oe=me)),we(Ce,oe),Ce.returnBegin?0:me.length}function mt(oe){const me=oe[0],Ce=se.substring(oe.index),xe=He(ge,oe,Ce);if(!xe)return _d;const tt=ge;ge.endScope&&ge.endScope._wrap?(De(),Ie(me,ge.endScope._wrap)):ge.endScope&&ge.endScope._multi?(De(),Fe(ge.endScope,oe)):tt.skip?Oe+=me:(tt.returnEnd||tt.excludeEnd||(Oe+=me),De(),tt.excludeEnd&&(Oe=me));do ge.scope&&Ve.closeNode(),!ge.skip&&!ge.subLanguage&&(Lt+=ge.relevance),ge=ge.parent;while(ge!==xe.parent);return xe.starts&&we(xe.starts,oe),tt.returnEnd?0:me.length}function Tt(){const oe=[];for(let me=ge;me!==pt;me=me.parent)me.scope&&oe.unshift(me.scope);oe.forEach(me=>Ve.openNode(me))}let Yt={};function mr(oe,me){const Ce=me&&me[0];if(Oe+=oe,Ce==null)return De(),0;if(Yt.type==="begin"&&me.type==="end"&&Yt.index===me.index&&Ce===""){if(Oe+=se.slice(me.index,me.index+1),!u){const xe=new Error(`0 width match regex (${X})`);throw xe.languageName=X,xe.badRule=Yt.rule,xe}return 1}if(Yt=me,me.type==="begin")return ot(me);if(me.type==="illegal"&&!be){const xe=new Error('Illegal lexeme "'+Ce+'" for mode "'+(ge.scope||"<unnamed>")+'"');throw xe.mode=ge,xe}else if(me.type==="end"){const xe=mt(me);if(xe!==_d)return xe}if(me.type==="illegal"&&Ce==="")return 1;if(Kt>1e5&&Kt>me.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Oe+=Ce,Ce.length}const pt=ie(X);if(!pt)throw wr(c.replace("{}",X)),new Error('Unknown language: "'+X+'"');const or=dh(pt);let Dt="",ge=Ne||or;const zt={},Ve=new l.__emitter(l);Tt();let Oe="",Lt=0,vt=0,Kt=0,Qt=!1;try{if(pt.__emitTokens)pt.__emitTokens(se,Ve);else{for(ge.matcher.considerAll();;){Kt++,Qt?Qt=!1:ge.matcher.considerAll(),ge.matcher.lastIndex=vt;const oe=ge.matcher.exec(se);if(!oe)break;const me=se.substring(vt,oe.index),Ce=mr(me,oe);vt=oe.index+Ce}mr(se.substring(vt))}return Ve.finalize(),Dt=Ve.toHTML(),{language:X,value:Dt,relevance:Lt,illegal:!1,_emitter:Ve,_top:ge}}catch(oe){if(oe.message&&oe.message.includes("Illegal"))return{language:X,value:yi(se),illegal:!0,relevance:0,_illegalBy:{message:oe.message,index:vt,context:se.slice(vt-100,vt+100),mode:oe.mode,resultSoFar:Dt},_emitter:Ve};if(u)return{language:X,value:yi(se),illegal:!1,relevance:0,errorRaised:oe,_emitter:Ve,_top:ge};throw oe}}function C(X){const se={value:yi(X),illegal:!1,relevance:0,_top:_,_emitter:new l.__emitter(l)};return se._emitter.addText(X),se}function R(X,se){se=se||l.languages||Object.keys(e);const be=C(X),Ne=se.filter(ie).filter(Z).map(De=>T(De,X,!1));Ne.unshift(be);const ne=Ne.sort((De,Ie)=>{if(De.relevance!==Ie.relevance)return Ie.relevLine truncated
|
||||
`},O]}}return ms=u,ms}var ps,J_;function rT(){if(J_)return ps;J_=1;function n(e){const r="[a-zA-Z_][\\w.]*",o="<\\?(lasso(script)?|=)",u="\\]|\\?>",c={$pattern:r+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},_=e.COMMENT("<!--","-->",{relevance:0}),l={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[_]}},d={className:"meta",begin:"\\[/noprocess|"+o},p={className:"symbol",begin:"'"+r+"'"},S=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+r},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:r,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+r,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[p]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:r+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:c,contains:[{className:"meta",begin:u,relevance:0,starts:{end:"\\[|"+o,returnEnd:!0,relevance:0,contains:[_]}},l,d,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:c,contains:[{className:"meta",begin:u,relevance:0,starts:{end:"\\[noprocess\\]|"+o,returnEnd:!0,contains:[_]}},l,d].concat(S)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(S)}}return ps=n,ps}var gs,j_;function nT(){if(j_)return gs;j_=1;function n(e){const o=e.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(Z=>Z+"(?![a-zA-Z@:_])")),u=new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map(Z=>Z+"(?![a-zA-Z:_])").join("|")),c=[{begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}],_=[{begin:/\^{6}[0-9a-f]{6}/},{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{begin:/\^{2}[\u0000-\u007f]/}],l={className:"keyword",begin:/\\/,relevance:0,contains:[{endsParent:!0,begin:o},{endsParent:!0,begin:u},{endsParent:!0,variants:_},{endsParent:!0,relevance:0,variants:c}]},d={className:"params",relevance:0,begin:/#+\d?/},p={variants:_},S={className:"built_in",relevance:0,begin:/[$&^_]/},T={className:"meta",begin:/% ?!(T[eE]X|tex|BIB|bib)/,end:"$",relevance:10},C=e.COMMENT("%","$",{relevance:0}),R=[l,d,p,S,T,C],O={begin:/\{/,end:/\}/,relevance:0,contains:["self",...R]},w=e.inherit(Line truncated
|
||||
]`,O={scope:"string",variants:[S,p,T,C]},w={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},L=["false","null","true"],I=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],F=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],q={keyword:I,literal:($=>{const ue=[];return $.forEach(pe=>{ue.push(pe),pe.toLowerCase()===pe?ue.push(pe.toUpperCase()):ue.push(pe.toLowerCase())}),ue})(L),built_in:F},G=$=>$.map(ue=>ue.replace(/\|\d+$/,"")),U={variants:[{match:[/new/,r.concat(R,"+"),r.concat("(?!",G(F).join("\\b|"),"\\b)"),c],scope:{1:"keyword",4:"title.class"}}]},Q=r.concat(u,"\\b(?!\\()"),W={variants:[{match:[r.concat(/::/,r.lookahead(/(?!class\b)/)),Q],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[c,r.concat(/::/,r.lookahead(/(?!class\b)/)),Q],scope:{1:"title.class",3:"variable.constant"}},{match:[c,r.concat("::",r.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[c,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},ie={scope:"attr",match:r.concat(u,r.lookahead(":"),r.lookahead(/(?!::)/))},ee={relevance:0,begin:/\(/,end:/\)/,keywords:q,contains:[ie,_,W,e.C_BLOCK_COMMENT_MODE,O,w,U]},Z={relevance:0,match:[/\b/,r.concat("(?!fn\\b|function\\b|",G(I).join("\\b|"),"|",G(F).join("\\b|"),"\\b)"),u,r.concat(R,"*"),r.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[ee]};ee.contains.push(Z);const Se=[ie,W,e.C_BLOCK_COMMENT_MODE,O,w,U],Te={begin:r.concat(/#\[\s*/,c),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:L,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:L,keyword:["new","array"]},contains:["self",...Se]},...Se,{scope:"meta",match:c}]};return{case_insensitive:!1,keywords:q,contains:[Te,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},_,Z,W,{match:[/const/,/\s/,u],scope:{1:"keyword",3:"variable.constant"}},U,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:q,contains:["self",_,W,e.C_BLOCK_COMMENT_MODE,O,w]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trLine truncated
|
||||
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}return yl=n,yl}var Ol,_p;function Ev(){if(_p)return Ol;_p=1;function n(e){const r="[a-z][a-zA-Z0-9_]*",o={className:"string",begin:"\\$.{1}"},u={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:r+":",relevance:0},e.C_NUMBER_MODE,u,o,{begin:"\\|[ ]*"+r+"([ ]+"+r+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+r}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,o,e.C_NUMBER_MODE,u]}]}}return Ol=n,Ol}var Il,mp;function Sv(){if(mp)return Il;mp=1;function n(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}return Il=n,Il}var Dl,pp;function fv(){if(pp)return Dl;pp=1;function n(e){const r={className:"variable",begin:/\b_+[a-zA-Z]\w*/},o={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},u={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},c=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],_=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],l=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSitesLine truncated
|
||||
]*?"'`},{begin:`"[^\r
|
||||
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}return Ml=n,Ml}var Ll,fp;function vv(){if(fp)return Ll;fp=1;function n(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}return Ll=n,Ll}var kl,hp;function Cv(){if(hp)return kl;hp=1;const n=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],u=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],c=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clLine truncated
|
||||
(multipart)?`,end:`\\]
|
||||
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return Pl=n,Pl}var Bl,Tp;function Nv(){if(Tp)return Bl;Tp=1;function n(W){return W?typeof W=="string"?W:W.source:null}function e(W){return r("(?=",W,")")}function r(...W){return W.map(ee=>n(ee)).join("")}function o(W){const ie=W[W.length-1];return typeof ie=="object"&&ie.constructor===Object?(W.splice(W.length-1,1),ie):{}}function u(...W){return"("+(o(W).capture?"":"?:")+W.map(Z=>n(Z)).join("|")+")"}const c=W=>r(/\b/,W,/\w$/.test(W)?/\b/:/\B/),_=["Protocol","Type"].map(c),l=["init","self"].map(c),d=["Any","Self"],p=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],S=["false","nil","true"],T=["assignment","associativity","higherThan","left","lowerThan","none","right"],C=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],R=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],O=u(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),w=u(O,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),L=r(O,w,"*"),I=u(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),F=u(I,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),k=r(I,F,"*"),q=r(/[A-Z]/,F,"*"),G=["autoclosure",r(/convention\(/,u("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",r(/objc\(/,k,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],U=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Q(W){const ie={match:/\s+/,relevance:0},ee=W.COMMENT("/\\*","\\*/",{contains:["self"]}),Z=[W.C_LINE_COMMENT_MODE,ee],Se={match:[/\./,u(..._,...l)],className:{2:"keyword"}},Te={match:r(/\./,u(...p)),relevance:0},$=p.filter(Ue=>typeof Ue=="string").concat(["_|0"]),ue=p.filter(Ue=>typeof Ue!="string").concat(d).map(c),pe={variants:[{className:"keyword",match:u(...ue,...l)}]},X={$pattern:u(/\b\w+/,/#\w+/),keyword:$.concat(C),literal:S},se=[Se,Te,pe],be={match:r(/\./,u(...R)),relevance:0},Ne={className:"built_in",match:r(/\b/,u(...R),/(?=\()/)},ne=[be,Ne],ze={match:/->/,relevance:0},et={className:"operator",relevance:0,variants:[{match:L},{match:`\\.(\\.|${w})+`}]},Ke=[ze,et],De="([0-9]_*)+",Ie="([0-9a-fA-F]_*)+",Fe={clLine truncated
|
||||
`,A7="∄",y7="∄",O7="𝔑",I7="𝔫",D7="≧̸",x7="≱",w7="≱",M7="≧̸",L7="⩾̸",k7="⩾̸",P7="⋙̸",B7="≵",F7="≫⃒",U7="≯",G7="≯",q7="≫̸",Y7="↮",z7="⇎",H7="⫲",V7="∋",$7="⋼",W7="⋺",K7="∋",Q7="Њ",X7="њ",Z7="↚",J7="⇍",j7="‥",e8="≦̸",t8="≰",r8="↚",n8="⇍",a8="↮",i8="⇎",o8="≰",s8="≦̸",l8="⩽̸",c8="⩽̸",u8="≮",d8="⋘̸",_8="≴",m8="≪⃒",p8="≮",g8="⋪",E8="⋬",S8="≪̸",f8="∤",h8="",b8=" ",T8="𝕟",v8="ℕ",C8="⫬",R8="¬",N8="≢",A8="≭",y8="∦",O8="∉",I8="≠",D8="≂̸",x8="∄",w8="≯",M8="≱",L8="≧̸",k8="≫̸",P8="≹",B8="⩾̸",F8="≵",U8="≎̸",G8="≏̸",q8="∉",Y8="⋵̸",z8="⋹̸",H8="∉",V8="⋷",$8="⋶",W8="⧏̸",K8="⋪",Q8="⋬",X8="≮",Z8="≰",J8="≸",j8="≪̸",eB="⩽̸",tB="≴",rB="⪢̸",nB="⪡̸",aB="∌",iB="∌",oB="⋾",sB="⋽",lB="⊀",cB="⪯̸",uB="⋠",dB="∌",_B="⧐̸",mB="⋫",pB="⋭",gB="⊏̸",EB="⋢",SB="⊐̸",fB="⋣",hB="⊂⃒",bB="⊈",TB="⊁",vB="⪰̸",CB="⋡",RB="≿̸",NB="⊃⃒",AB="⊉",yB="≁",OB="≄",IB="≇",DB="≉",xB="∤",wB="∦",MB="∦",LB="⫽⃥",kB="∂̸",PB="⨔",BB="⊀",FB="⋠",UB="⊀",GB="⪯̸",qB="⪯̸",YB="⤳̸",zB="↛",HB="⇏",VB="↝̸",$B="↛",WB="⇏",KB="⋫",QB="⋭",XB="⊁",ZB="⋡",JB="⪰̸",jB="𝒩",eF="𝓃",tF="∤",rF="∦",nF="≁",aF="≄",iF="≄",oF="∤",sF="∦",lF="⋢",cF="⋣",uF="⊄",dF="⫅̸",_F="⊈",mF="⊂⃒",pF="⊈",gF="⫅̸",EF="⊁",SF="⪰̸",fF="⊅",hF="⫆̸",bF="⊉",TF="⊃⃒",vF="⊉",CF="⫆̸",RF="≹",NF="Ñ",AF="ñ",yF="≸",OF="⋪",IF="⋬",DF="⋫",xF="⋭",wF="Ν",MF="ν",LF="#",kF="№",PF=" ",BF="≍⃒",FF="⊬",UF="⊭",GF="⊮",qF="⊯",YF="≥⃒",zF=">⃒",HF="⤄",VF="⧞",$F="⤂",WF="≤⃒",KF="<⃒",QF="⊴⃒",XF="⤃",ZF="⊵⃒",JF="∼⃒",jF="⤣",e9="↖",t9="⇖",r9="↖",n9="⤧",a9="Ó",i9="ó",o9="⊛",s9="Ô",l9="ô",c9="⊚",u9="О",d9="о",_9="⊝",m9="Ő",p9="ő",g9="⨸",E9="⊙",S9="⦼",f9="Œ",h9="œ",b9="⦿",T9="𝔒",v9="𝔬",C9="˛",R9="Ò",N9="ò",A9="⧁",y9="⦵",O9="Ω",I9="∮",D9="↺",x9="⦾",w9="⦻",M9="‾",L9="⧀",k9="Ō",P9="ō",B9="Ω",F9="ω",U9="Ο",G9="ο",q9="⦶",Y9="⊖",z9="𝕆",H9="𝕠",V9="⦷",$9="“",W9="‘",K9="⦹",Q9="⊕",X9="↻",Z9="⩔",J9="∨",j9="⩝",eU="ℴ",tU="ℴ",rU="ª",nU="º",aU="⊶",iU="⩖",oU="⩗",sU="⩛",lU="Ⓢ",cU="𝒪",uU="ℴ",dU="Ø",_U="ø",mU="⊘",pU="Õ",gU="õ",EU="⨶",SU="⨷",fU="⊗",hU="Ö",bU="ö",TU="⌽",vU="‾",CU="⏞",RU="⎴",NU="⏜",AU="¶",yU="∥",OU="∥",IU="⫳",DU="⫽",xU="∂",wU="∂",MU="П",LU="п",kU="%",PU=".",BU="‰",FU="⊥",UU="‱",GU="𝔓",qU="𝔭",YU="Φ",zU="φ",HU="ϕ",VU="ℳ",$U="☎",WU="Π",KU="π",QU="⋔",XU="ϖ",ZU="ℏ",JU="ℎ",jU="ℏ",eG="⨣",tG="⊞",rG="⨢",nG="+",aG="∔",iG="⨥",oG="⩲",sG="±",lG="±",cG="⨦",uG="⨧",dG="±",_G="ℌ",mG="⨕",pG="𝕡",gG="ℙ",EG="£",SG="⪷",fG="⪻",hG="≺",bG="≼",TG="⪷",vG="≺",CG="≼",RG="≺",NG="⪯",AG="≼",yG="≾",OG="⪯",IG="⪹",DG="⪵",xG="⋨",wG="⪯",MG="⪳",LG="≾",kG="′",PG="″",BG="ℙ",FG="⪹",UG="⪵",GG="⋨",qG="∏",YG="∏",zG="⌮",HG="⌒",VG="⌓",$G="∝",WG="∝",KG="∷",QG="∝",XG="≾",ZG="⊰",JG="𝒫",jG="𝓅",eq="Ψ",tq="ψ",rq=" ",nq="𝔔",aq="𝔮",iq="⨌",oq="𝕢",sq="ℚ",lq="⁗",cq="𝒬",uq="𝓆",dq="ℍ",_q="⨖",mq="?",pq="≟",gq='"',Eq='"',Sq="⇛",fq="∽̱",hq="Ŕ",bq="ŕ",Tq="√",vq="⦳",Cq="⟩",Rq="⟫",Nq="⦒",Aq="⦥",yq="⟩",Oq="»",Iq="⥵",Dq="⇥",xq="⤠",wq="⤳",Mq="→",Lq="↠",kq="⇒",Pq="⤞",Bq="↪",Fq="↬",Uq="⥅",Gq="⥴",qq="⤖",Yq="↣",zq="↝",Hq="⤚",Vq="⤜",$q="∶",Wq="ℚ",Kq="⤍",Qq="⤏",Xq="⤐",Zq="❳",Jq="}",jq="]",eY="⦌",tY="⦎",rY="⦐",nY="Ř",aY="ř",iY="Ŗ",oY="ŗ",sY="⌉",lY="}",cY="Р",uY="р",dY="⤷",_Y="⥩",mY="”",pY="”",gY="↳",EY="ℜ",SY="ℛ",fY="ℜ",hY="ℝ",bY="ℜ",TY="▭",vY="®",CY="®",RY="∋",NY="⇋",AY="⥯",yY="⥽",OY="⌋",IY="𝔯",DY="ℜ",xY="⥤",wY="⇁",MY="⇀",LY="⥬",kY="Ρ",PY="ρ",BY="ϱ",FY="⟩",UY="⇥",GY="→",qY="→",YY="⇒",zY="⇄",HY="↣",VY="⌉",$Y="⟧",WY="⥝",KY="⥕",QY="⇂",XY="⌋",ZY="⇁",JY="⇀",jY="⇄",ez="⇌",tz="⇉",rz="↝",nz="↦",az="⊢",iz="⥛",oz="⋌",sz="⧐",lz="⊳",cz="⊵",uz="⥏",dz="⥜",_z="⥔",mz="↾",pz="⥓",gz="⇀",Ez="˚",Sz="≓",fz="⇄",hz="⇌",bz="",Tz="⎱",vz="⎱",Cz="⫮",Rz="⟭",Nz="⇾",Az="⟧",yz="⦆",Oz="𝕣",Iz="ℝ",Dz="⨮",xz="⨵",wz="⥰",Mz=")",Lz="⦔",kz="⨒",Pz="⇉",Bz="⇛",Fz="›",Uz="𝓇",Gz="ℛ",qz="↱",Yz="↱",zz="]",Hz="’",Vz="’",$z="⋌",Wz="⋊",Kz="▹",Qz="⊵",Xz="▸",Zz="⧎",Jz="⧴",jz="⥨",eH="℞",tH="Ś",rH="ś",nH="‚",aH="⪸",iH="Š",oH="š",sH="⪼",lH="≻",cH="≽",uH="⪰",dH="⪴",_H="Ş",mH="ş",pH="Ŝ",gH="ŝ",EH="⪺",SH="⪶",fH="⋩",hH="⨓",bH="≿",TH="С",vH="с",CH="⊡",RH="⋅",NH="⩦",AH="⤥",yH="↘",OH="⇘",IH="↘",DH="§",xH=";",wH="⤩",MH="∖",LH="∖",kH="✶",Line truncated
|
||||
`," "],Nj=["{","}","|","\\","^","`"].concat(Rj),Aj=["'"].concat(Nj),$p=["%","/","?",";","#"].concat(Aj),Wp=["/","?","#"],yj=255,Kp=/^[+a-z0-9A-Z_-]{0,63}$/,Oj=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Qp={javascript:!0,"javascript:":!0},Xp={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ij(n,e){if(n&&n instanceof Sa)return n;var r=new Sa;return r.parse(n,e),r}Sa.prototype.parse=function(n,e){var r,o,u,c,_,l=n;if(l=l.trim(),!e&&n.split("#").length===1){var d=Cj.exec(l);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}var p=Tj.exec(l);if(p&&(p=p[0],u=p.toLowerCase(),this.protocol=p,l=l.substr(p.length)),(e||p||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(_=l.substr(0,2)==="//",_&&!(p&&Qp[p])&&(l=l.substr(2),this.slashes=!0)),!Qp[p]&&(_||p&&!Xp[p])){var S=-1;for(r=0;r<Wp.length;r++)c=l.indexOf(Wp[r]),c!==-1&&(S===-1||c<S)&&(S=c);var T,C;for(S===-1?C=l.lastIndexOf("@"):C=l.lastIndexOf("@",S),C!==-1&&(T=l.slice(0,C),l=l.slice(C+1),this.auth=T),S=-1,r=0;r<$p.length;r++)c=l.indexOf($p[r]),c!==-1&&(S===-1||c<S)&&(S=c);S===-1&&(S=l.length),l[S-1]===":"&&S--;var R=l.slice(0,S);l=l.slice(S),this.parseHost(R),this.hostname=this.hostname||"";var O=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!O){var w=this.hostname.split(/\./);for(r=0,o=w.length;r<o;r++){var L=w[r];if(L&&!L.match(Kp)){for(var I="",F=0,k=L.length;F<k;F++)L.charCodeAt(F)>127?I+="x":I+=L[F];if(!I.match(Kp)){var q=w.slice(0,r),G=w.slice(r+1),U=L.match(Oj);U&&(q.push(U[1]),G.unshift(U[2])),G.length&&(l=G.join(".")+l),this.hostname=q.join(".");break}}}}this.hostname.length>yj&&(this.hostname=""),O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var Q=l.indexOf("#");Q!==-1&&(this.hash=l.substr(Q),l=l.slice(0,Q));var W=l.indexOf("?");return W!==-1&&(this.search=l.substr(W),l=l.slice(0,W)),l&&(this.pathname=l),Xp[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Sa.prototype.parseHost=function(n){var e=vj.exec(n);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),n=n.substr(0,n.length-e.length)),n&&(this.hostname=n)};var Dj=Ij;an.encode=Sj;an.decode=hj;an.format=bj;an.parse=Dj;var Ir={},ic,Zp;function _g(){return Zp||(Zp=1,ic=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),ic}var oc,Jp;function mg(){return Jp||(Jp=1,oc=/[\0-\x1F\x7F-\x9F]/),oc}var sc,jp;function xj(){return jp||(jp=1,sc=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),sc}var lc,e0;function pg(){return e0||(e0=1,lc=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),lc}var t0;function wj(){return t0||(t0=1,Ir.Any=_g(),Ir.Cc=mg(),Ir.Cf=xj(),Ir.P=Oc,Ir.Z=pg()),Ir}(function(n){function e($){return Object.prototype.toString.call($)}function r($){return e($)==="[object String]"}var o=Object.prototype.hasOwnProperty;function u($,ue){return o.call($,ue)}function c($){var ue=Array.prototype.slice.call(arguments,1);return ue.forEach(function(pe){if(pe){if(typeof pe!="object")throw new TypeError(pe+"must be object");Object.keys(pe).forEach(function(X){$[X]=pe[X]})}}),$}function _($,ue,pe){return[].concat($.slice(0,ue),pe,$.slice(ue+1))}function l($){return!($>=55296&&$<=57343||$>=64976&&$<=65007||($&65535)===65535||($&65535)===65534||$>=0&&$<=8||$===11||$>=14&&$<=31||$>=127&&$<=159||$>1114111)}function d($){if($>65535){$-=65536;var ue=55296+($>>10),pe=56320+($&1023);return String.fromCharCode(ue,pe)}return String.fromCharCode($)}var p=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,S=/&([a-z#][a-z0-9]{1,31});/gi,T=new RegExp(p.source+"|"+S.source,"gi"),C=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,R=dg;function O($,ue){var pe=0;return u(R,ue)?R[ue]:ue.charCodeAt(0)===35&&C.test(ue)&&(pe=ue[1].toLowerCase()==="x"?parseInt(ue.slice(2),16):parseInt(ue.slice(1),10),l(pe))?d(pe):$}function w($){return $.indexOf("\\")<0?$:$.replace(p,"$1")}function L($){return $.indexOf("\\")<0&&$.indexOf("&")<0?$:$.replace(T,function(ue,pe,X){return pe||O(ue,X)})}var I=/[&<>"]/,F=/[&<>"]/g,k={"&":"&","<":"<",">":">",'"':"""};function q($){return k[$]}function G($){return I.test($)?$.replace(F,q):$}var U=/[.?*+^$[\]\\(){}|-]/g;function Q($){return $.replace(U,"\\$&")}function W($){switch($){case 9:case 32:return!0}return!1}function ie($){if($>=8192&&$<=8202)return!0;switch($){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var ee=Oc;function Z($){return ee.test($)}function Se($){switch($){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Te($){return $=$.trim().reLine truncated
|
||||
`};ar.fence=function(n,e,r,o,u){var c=n[e],_=c.info?Fj(c.info).trim():"",l="",d="",p,S,T,C,R;return _&&(T=_.split(/(\s+)/g),l=T[0],d=T.slice(2).join("")),r.highlight?p=r.highlight(c.content,l,d)||Mr(c.content):p=Mr(c.content),p.indexOf("<pre")===0?p+`
|
||||
`:_?(S=c.attrIndex("class"),C=c.attrs?c.attrs.slice():[],S<0?C.push(["class",r.langPrefix+l]):(C[S]=C[S].slice(),C[S][1]+=" "+r.langPrefix+l),R={attrs:C},"<pre><code"+u.renderAttrs(R)+">"+p+`</code></pre>
|
||||
`):"<pre><code"+u.renderAttrs(c)+">"+p+`</code></pre>
|
||||
`};ar.image=function(n,e,r,o,u){var c=n[e];return c.attrs[c.attrIndex("alt")][1]=u.renderInlineAsText(c.children,r,o),u.renderToken(n,e,r)};ar.hardbreak=function(n,e,r){return r.xhtmlOut?`<br />
|
||||
`:`<br>
|
||||
`};ar.softbreak=function(n,e,r){return r.breaks?r.xhtmlOut?`<br />
|
||||
`:`<br>
|
||||
`:`
|
||||
`};ar.text=function(n,e){return Mr(n[e].content)};ar.html_block=function(n,e){return n[e].content};ar.html_inline=function(n,e){return n[e].content};function on(){this.rules=Bj({},ar)}on.prototype.renderAttrs=function(e){var r,o,u;if(!e.attrs)return"";for(u="",r=0,o=e.attrs.length;r<o;r++)u+=" "+Mr(e.attrs[r][0])+'="'+Mr(e.attrs[r][1])+'"';return u};on.prototype.renderToken=function(e,r,o){var u,c="",_=!1,l=e[r];return l.hidden?"":(l.block&&l.nesting!==-1&&r&&e[r-1].hidden&&(c+=`
|
||||
`),c+=(l.nesting===-1?"</":"<")+l.tag,c+=this.renderAttrs(l),l.nesting===0&&o.xhtmlOut&&(c+=" /"),l.block&&(_=!0,l.nesting===1&&r+1<e.length&&(u=e[r+1],(u.type==="inline"||u.hidden||u.nesting===-1&&u.tag===l.tag)&&(_=!1))),c+=_?`>
|
||||
`:">",c)};on.prototype.renderInline=function(n,e,r){for(var o,u="",c=this.rules,_=0,l=n.length;_<l;_++)o=n[_].type,typeof c[o]<"u"?u+=c[o](n,_,e,r,this):u+=this.renderToken(n,_,e);return u};on.prototype.renderInlineAsText=function(n,e,r){for(var o="",u=0,c=n.length;u<c;u++)n[u].type==="text"?o+=n[u].content:n[u].type==="image"?o+=this.renderInlineAsText(n[u].children,e,r):n[u].type==="softbreak"&&(o+=`
|
||||
`);return o};on.prototype.render=function(n,e,r){var o,u,c,_="",l=this.rules;for(o=0,u=n.length;o<u;o++)c=n[o].type,c==="inline"?_+=this.renderInline(n[o].children,e,r):typeof l[c]<"u"?_+=l[n[o].type](n,o,e,r,this):_+=this.renderToken(n,o,e,r);return _};var Uj=on;function Wt(){this.__rules__=[],this.__cache__=null}Wt.prototype.__find__=function(n){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===n)return e;return-1};Wt.prototype.__compile__=function(){var n=this,e=[""];n.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(o){e.indexOf(o)<0&&e.push(o)})}),n.__cache__={},e.forEach(function(r){n.__cache__[r]=[],n.__rules__.forEach(function(o){o.enabled&&(r&&o.alt.indexOf(r)<0||n.__cache__[r].push(o.fn))})})};Wt.prototype.at=function(n,e,r){var o=this.__find__(n),u=r||{};if(o===-1)throw new Error("Parser rule not found: "+n);this.__rules__[o].fn=e,this.__rules__[o].alt=u.alt||[],this.__cache__=null};Wt.prototype.before=function(n,e,r,o){var u=this.__find__(n),c=o||{};if(u===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(u,0,{name:e,enabled:!0,fn:r,alt:c.alt||[]}),this.__cache__=null};Wt.prototype.after=function(n,e,r,o){var u=this.__find__(n),c=o||{};if(u===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(u+1,0,{name:e,enabled:!0,fn:r,alt:c.alt||[]}),this.__cache__=null};Wt.prototype.push=function(n,e,r){var o=r||{};this.__rules__.push({name:n,enabled:!0,fn:e,alt:o.alt||[]}),this.__cache__=null};Wt.prototype.enable=function(n,e){Array.isArray(n)||(n=[n]);var r=[];return n.forEach(function(o){var u=this.__find__(o);if(u<0){if(e)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[u].enabled=!0,r.push(o)},this),this.__cache__=null,r};Wt.prototype.enableOnly=function(n,e){Array.isArray(n)||(n=[n]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(n,e)};Wt.prototype.disable=function(n,e){Array.isArray(n)||(n=[n]);var r=[];return n.forEach(function(o){var u=this.__find__(o);if(u<0){if(e)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[u].enabled=!1,r.push(o)},this),this.__cache__=null,r};Wt.prototype.getRules=function(n){return this.__cache__===null&&this.__compile__(),this.__cache__[n]||[]};var Ic=Wt,Gj=/\r\n?|\n/g,qj=/\0/g,Yj=function(e){var r;r=e.src.replace(Gj,`
|
||||
`),r=r.replace(qj,"�"),e.src=r},zj=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)},Hj=function(e){var r=e.tokens,o,u,c;for(u=0,c=r.length;u<c;u++)o=r[u],o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)},Vj=Be.arrayReplaceAt;function $j(n){return/^<a[>\s]/i.test(n)}function Wj(n){return/^<\/a\s*>/i.test(n)}var Kj=function(e){var r,o,u,c,_,l,d,p,S,T,C,R,O,w,L,I,F=e.tokens,k;if(e.md.options.linkify){for(o=0,u=F.length;o<u;o++)if(!(F[o].type!=="inline"||!e.md.linkify.pretest(F[o].content)))for(c=F[o].children,O=0,r=c.length-1;r>=0;r--){if(l=c[r],l.type==="link_close"){for(r--;c[r].level!==l.level&&c[r].type!=="link_open";)r--;continue}if(l.type==="html_inline"&&($j(l.content)&&O>0&&O--,Wj(l.content)&&O++),!(O>0)&&l.type==="text"&&e.md.linkify.test(l.content)){for(S=l.content,k=e.md.linkify.match(S),d=[],R=l.level,C=0,k.length>0&&k[0].index===0&&r>0&&c[r-1].type==="text_special"&&(k=k.slice(1)),p=0;p<k.length;p++)w=k[p].url,L=e.md.normalizeLink(w),e.md.validateLink(L)&&(I=k[p].text,k[p].schema?k[p].schema==="mailto:"&&!/^mailto:/i.test(I)?I=e.md.normalizeLinkText("mailto:"+I).replace(/^mailto:/,""):I=e.md.normalizeLinkText(I):I=e.md.normalizeLinkText("http://"+I).replace(/^http:\/\//,""),T=k[p].index,T>C&&(_=new e.Token("text","",0),_.content=S.slice(C,T),_.level=R,d.push(_)),_=new e.Token("link_open","a",1),_.attrs=[["href",L]],_.level=R++,_.markup="linkify",_.info="auto",d.push(_),_=new e.Token("text","",0),_.content=I,_.level=R,d.push(_),_=new e.Token("link_close","a",-1),_.level=--R,_.markup="linkify",_.info="auto",d.push(_),C=k[p].lastIndex);C<S.length&&(_=new e.Token("text","",0),_.content=S.slice(C),_.level=R,d.push(_)),F[o].children=c=Vj(c,r,d)}}}},gg=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Qj=/\((c|tm|r)\)/i,Xj=/\((c|tm|r)\)/ig,Zj={c:"©",r:"®",tm:"™"};function Jj(n,e){return Zj[e.toLowerCase()]}function jj(n){var e,r,o=0;for(e=n.length-1;e>=0;e--)r=n[e],r.type==="text"&&!o&&(r.content=r.content.replace(Xj,Jj)),r.type==="link_open"&&r.info==="auto"&&o--,r.type==="link_close"&&r.info==="auto"&&o++}function eee(n){var e,r,o=0;for(e=n.length-1;e>=0;e--)r=n[e],r.type==="text"&&!o&&gg.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&o--,r.type==="link_close"&&r.info==="auto"&&o++}var tee=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type==="inline"&&(Qj.test(e.tokens[r].content)&&jj(e.tokens[r].children),gg.test(e.tokens[r].content)&&eee(e.tokens[r].children))},n0=Be.isWhiteSpace,a0=Be.isPunctChar,i0=Be.isMdAsciiPunct,ree=/['"]/,o0=/['"]/g,s0="’";function ua(n,e,r){return n.slice(0,e)+r+n.slice(e+1)}function nee(n,e){var r,o,u,c,_,l,d,p,S,T,C,R,O,w,L,I,F,k,q,G,U;for(q=[],r=0;r<n.length;r++){for(o=n[r],d=n[r].level,F=q.length-1;F>=0&&!(q[F].level<=d);F--);if(q.length=F+1,o.type==="text"){u=o.content,_=0,l=u.length;e:for(;_<l&&(o0.lastIndex=_,c=o0.exec(u),!!c);){if(L=I=!0,_=c.index+1,k=c[0]==="'",S=32,c.index-1>=0)S=u.charCodeAt(c.index-1);else for(F=r-1;F>=0&&!(n[F].type==="softbreak"||n[F].type==="hardbreak");F--)if(n[F].content){S=n[F].content.charCodeAt(n[F].content.length-1);break}if(T=32,_<l)T=u.charCodeAt(_);else for(F=r+1;F<n.length&&!(n[F].type==="softbreak"||n[F].type==="hardbreak");F++)if(n[F].content){T=n[F].content.charCodeAt(0);break}if(C=i0(S)||a0(String.fromCharCode(S)),R=i0(T)||a0(String.fromCharCode(T)),O=n0(S),w=n0(T),w?L=!1:R&&(O||C||(L=!1)),O?I=!1:C&&(w||R||(I=!1)),T===34&&c[0]==='"'&&S>=48&&S<=57&&(I=L=!1),L&&I&&(L=C,I=R),!L&&!I){k&&(o.content=ua(o.content,c.index,s0));continue}if(I){for(F=q.length-1;F>=0&&(p=q[F],!(q[F].level<d));F--)if(p.single===k&&q[F].level===d){p=q[F],k?(G=e.md.options.quotes[2],U=e.md.options.quotes[3]):(G=e.md.options.quotes[0],U=e.md.options.quotes[1]),o.content=ua(o.content,c.index,U),n[p.token].content=ua(n[p.token].content,p.pos,G),_+=U.length-1,p.token===r&&(_+=G.length-1),u=o.content,l=u.length,q.length=F;continue e}}L?q.push({token:r,pos:c.index,single:k,level:d}):I&&k&&(o.content=ua(o.content,c.index,s0))}}}}var aee=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type!=="inline"||!ree.test(e.tokens[r].content)||nee(e.tokens[r].children,e)},iee=function(e){var r,o,u,c,_,l,d=e.tokens;for(r=0,o=d.length;r<o;r++)if(d[r].type==="inline"){for(u=d[r].children,_=u.length,c=0;c<_;c++)u[c].type==="text_special"&&(u[c].type="text");for(c=l=0;c<_;c++)u[c].type==="text"&&c+1<_&&u[c+1].type==="text"?u[c+1].content=u[c].content+u[c+1].content:(c!==l&&(u[l]=u[c]),l++);c!==l&&(u.length=l)}};function sn(n,e,r){this.type=n,this.tag=e,this.attrs=null,this.map=null,this.nestiLine truncated
|
||||
`,_.map=[r,e.line],!0},_ee=function(e,r,o,u){var c,_,l,d,p,S,T,C=!1,R=e.bMarks[r]+e.tShift[r],O=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||R+3>O||(c=e.src.charCodeAt(R),c!==126&&c!==96)||(p=R,R=e.skipChars(R,c),_=R-p,_<3)||(T=e.src.slice(p,R),l=e.src.slice(R,O),c===96&&l.indexOf(String.fromCharCode(c))>=0))return!1;if(u)return!0;for(d=r;d++,!(d>=o||(R=p=e.bMarks[d]+e.tShift[d],O=e.eMarks[d],R<O&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(R)===c&&!(e.sCount[d]-e.blkIndent>=4)&&(R=e.skipChars(R,c),!(R-p<_)&&(R=e.skipSpaces(R),!(R<O)))){C=!0;break}return _=e.sCount[r],e.line=d+(C?1:0),S=e.push("fence","code",0),S.info=l,S.content=e.getLines(r+1,d,_,!0),S.markup=T,S.map=[r,e.line],!0},c0=Be.isSpace,mee=function(e,r,o,u){var c,_,l,d,p,S,T,C,R,O,w,L,I,F,k,q,G,U,Q,W,ie=e.lineMax,ee=e.bMarks[r]+e.tShift[r],Z=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(ee++)!==62)return!1;if(u)return!0;for(d=R=e.sCount[r]+1,e.src.charCodeAt(ee)===32?(ee++,d++,R++,c=!1,q=!0):e.src.charCodeAt(ee)===9?(q=!0,(e.bsCount[r]+R)%4===3?(ee++,d++,R++,c=!1):c=!0):q=!1,O=[e.bMarks[r]],e.bMarks[r]=ee;ee<Z&&(_=e.src.charCodeAt(ee),c0(_));){_===9?R+=4-(R+e.bsCount[r]+(c?1:0))%4:R++;ee++}for(w=[e.bsCount[r]],e.bsCount[r]=e.sCount[r]+1+(q?1:0),S=ee>=Z,F=[e.sCount[r]],e.sCount[r]=R-d,k=[e.tShift[r]],e.tShift[r]=ee-e.bMarks[r],U=e.md.block.ruler.getRules("blockquote"),I=e.parentType,e.parentType="blockquote",C=r+1;C<o&&(W=e.sCount[C]<e.blkIndent,ee=e.bMarks[C]+e.tShift[C],Z=e.eMarks[C],!(ee>=Z));C++){if(e.src.charCodeAt(ee++)===62&&!W){for(d=R=e.sCount[C]+1,e.src.charCodeAt(ee)===32?(ee++,d++,R++,c=!1,q=!0):e.src.charCodeAt(ee)===9?(q=!0,(e.bsCount[C]+R)%4===3?(ee++,d++,R++,c=!1):c=!0):q=!1,O.push(e.bMarks[C]),e.bMarks[C]=ee;ee<Z&&(_=e.src.charCodeAt(ee),c0(_));){_===9?R+=4-(R+e.bsCount[C]+(c?1:0))%4:R++;ee++}S=ee>=Z,w.push(e.bsCount[C]),e.bsCount[C]=e.sCount[C]+1+(q?1:0),F.push(e.sCount[C]),e.sCount[C]=R-d,k.push(e.tShift[C]),e.tShift[C]=ee-e.bMarks[C];continue}if(S)break;for(G=!1,l=0,p=U.length;l<p;l++)if(U[l](e,C,o,!0)){G=!0;break}if(G){e.lineMax=C,e.blkIndent!==0&&(O.push(e.bMarks[C]),w.push(e.bsCount[C]),k.push(e.tShift[C]),F.push(e.sCount[C]),e.sCount[C]-=e.blkIndent);break}O.push(e.bMarks[C]),w.push(e.bsCount[C]),k.push(e.tShift[C]),F.push(e.sCount[C]),e.sCount[C]=-1}for(L=e.blkIndent,e.blkIndent=0,Q=e.push("blockquote_open","blockquote",1),Q.markup=">",Q.map=T=[r,0],e.md.block.tokenize(e,r,C),Q=e.push("blockquote_close","blockquote",-1),Q.markup=">",e.lineMax=ie,e.parentType=I,T[1]=e.line,l=0;l<k.length;l++)e.bMarks[l+r]=O[l],e.tShift[l+r]=k[l],e.sCount[l+r]=F[l],e.bsCount[l+r]=w[l];return e.blkIndent=L,!0},pee=Be.isSpace,gee=function(e,r,o,u){var c,_,l,d,p=e.bMarks[r]+e.tShift[r],S=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||(c=e.src.charCodeAt(p++),c!==42&&c!==45&&c!==95))return!1;for(_=1;p<S;){if(l=e.src.charCodeAt(p++),l!==c&&!pee(l))return!1;l===c&&_++}return _<3?!1:(u||(e.line=r+1,d=e.push("hr","hr",0),d.map=[r,e.line],d.markup=Array(_+1).join(String.fromCharCode(c))),!0)},Sg=Be.isSpace;function u0(n,e){var r,o,u,c;return o=n.bMarks[e]+n.tShift[e],u=n.eMarks[e],r=n.src.charCodeAt(o++),r!==42&&r!==45&&r!==43||o<u&&(c=n.src.charCodeAt(o),!Sg(c))?-1:o}function d0(n,e){var r,o=n.bMarks[e]+n.tShift[e],u=o,c=n.eMarks[e];if(u+1>=c||(r=n.src.charCodeAt(u++),r<48||r>57))return-1;for(;;){if(u>=c)return-1;if(r=n.src.charCodeAt(u++),r>=48&&r<=57){if(u-o>=10)return-1;continue}if(r===41||r===46)break;return-1}return u<c&&(r=n.src.charCodeAt(u),!Sg(r))?-1:u}function Eee(n,e){var r,o,u=n.level+2;for(r=e+2,o=n.tokens.length-2;r<o;r++)n.tokens[r].level===u&&n.tokens[r].type==="paragraph_open"&&(n.tokens[r+2].hidden=!0,n.tokens[r].hidden=!0,r+=2)}var See=function(e,r,o,u){var c,_,l,d,p,S,T,C,R,O,w,L,I,F,k,q,G,U,Q,W,ie,ee,Z,Se,Te,$,ue,pe,X=!1,se=!0;if(e.sCount[r]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[r]-e.listIndent>=4&&e.sCount[r]<e.blkIndent)return!1;if(u&&e.parentType==="paragraph"&&e.sCount[r]>=e.blkIndent&&(X=!0),(Z=d0(e,r))>=0){if(T=!0,Te=e.bMarks[r]+e.tShift[r],I=Number(e.src.slice(Te,Z-1)),X&&I!==1)return!1}else if((Z=u0(e,r))>=0)T=!1;else return!1;if(X&&e.skipSpaces(Z)>=e.eMarks[r])return!1;if(L=e.src.charCodeAt(Z-1),u)return!0;for(w=e.tokens.length,T?(pe=e.push("ordered_list_open","ol",1),I!==1&&(pe.attrs=[["start",I]])):pe=e.push("bullet_list_open","ul",1),pe.map=O=[r,0],pe.markup=String.fromCharCode(L),k=r,Se=!1,ue=e.md.block.ruler.getRules("list"),U=e.parentType,e.parentType="list";k<o;){for(ee=Z,F=e.eMarks[k],S=q=e.sCount[k]+Z-(e.bMarks[r]+e.tShift[r]);ee<F;){if(c=e.src.charCodeAt(ee),c===9)q+=4-(q+e.bsCount[k])%4;else if(c===32)q++;else break;ee++}if(_=ee,_>=F?p=1:p=q-S,p>4&&(p=1),d=S+p,pe=e.push("list_item_open","li",1),pe.markup=String.fromCharCode(L),pe.map=C=[r,0],T&&(pe.info=e.src.slice(Te,Z-1)),ie=e.tight,W=e.tShift[r],Q=e.sCount[r],G=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=d,e.tight=!0,e.tShift[r]=_-e.bMarks[r],e.sCount[r]=q,_>=F&&e.isEmpty(r+1)?e.line=Math.min(e.line+2,o):e.md.block.tokenize(e,r,o,!0)Line truncated
|
||||
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
||||
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
||||
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
||||
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
||||
c69,-144,104.5,-217.7,106.5,-221
|
||||
l`+t/2.075+" -"+t+`
|
||||
c5.3,-9.3,12,-14,20,-14
|
||||
H400000v`+(40+t)+`H845.2724
|
||||
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
||||
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
||||
M`+(834+t)+" "+a+"h400000v"+(40+t)+"h-400000z"},we=function(t,a){return"M263,"+(601+t+a)+`c0.7,0,18,39.7,52,119
|
||||
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
||||
c340,-704.7,510.7,-1060.3,512,-1067
|
||||
l`+t/2.084+" -"+t+`
|
||||
c4.7,-7.3,11,-11,19,-11
|
||||
H40000v`+(40+t)+`H1012.3
|
||||
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
||||
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
||||
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
||||
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
||||
M`+(1001+t)+" "+a+"h400000v"+(40+t)+"h-400000z"},He=function(t,a){return"M983 "+(10+t+a)+`
|
||||
l`+t/3.13+" -"+t+`
|
||||
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
||||
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
||||
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
||||
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
||||
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
||||
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
||||
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
||||
M`+(1001+t)+" "+a+"h400000v"+(40+t)+"h-400000z"},it=function(t,a){return"M424,"+(2398+t+a)+`
|
||||
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
||||
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
||||
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
||||
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
||||
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
||||
v`+(40+t)+`H1014.6
|
||||
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
||||
c-2,6,-10,9,-24,9
|
||||
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+a+`
|
||||
h400000v`+(40+t)+"h-400000z"},ot=function(t,a){return"M473,"+(2713+t+a)+`
|
||||
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
||||
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
||||
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
||||
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
||||
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
||||
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
||||
606zM`+(1001+t)+" "+a+"h400000v"+(40+t)+"H1017.7z"},mt=function(t){var a=t/2;return"M400000 "+t+" H0 L"+a+" 0 l65 45 L145 "+(t-80)+" H400000z"},Tt=function(t,a,i){var s=i-54-a-t;return"M702 "+(t+a)+"H400000"+(40+t)+`
|
||||
H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
||||
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
||||
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
||||
219 661 l218 661zM702 `+a+"H400000v"+(40+t)+"H742z"},Yt=function(t,a,i){a=1e3*a;var s="";switch(t){case"sqrtMain":s=Fe(a,Ie);break;case"sqrtSize1":s=we(a,Ie);break;case"sqrtSize2":s=He(a,Ie);break;case"sqrtSize3":s=it(a,Ie);break;case"sqrtSize4":s=ot(a,Ie);break;case"sqrtTall":s=Tt(a,Ie,i)}return s},mr=function(t,a){switch(t){case"⎜":return"M291 0 H417 V"+a+" H291z M291 0 H417 V"+a+" H291z";case"∣":return"M145 0 H188 V"+a+" H145z M145 0 H188 V"+a+" H145z";case"∥":return"M145 0 H188 V"+a+" H145z M145 0 H188 V"+a+" H145z"+("M367 0 H410 V"+a+" H367z M367 0 H410 V"+a+" H367z");case"⎟":return"M457 0 H583 V"+a+" H457z M457 0 H583 V"+a+" H457z";case"⎢":return"M319 0 H403 V"+a+" H319z M319 0 H403 V"+a+" H319z";case"⎥":return"M263 0 H347 V"+a+" H263z M263 0 H347 V"+a+" H263z";case"⎪":return"M384 0 H504 V"+a+" H384z M384 0 H504 V"+a+" H384z";case"⏐":return"M312 0 H355 V"+a+" H312z M312 0 H355 V"+a+" H312z";case"‖":return"M257 0 H300 V"+a+" H257z M257 0 H300 V"+a+" H257z"+("M478 0 H521 V"+a+" H478z M478 0 H521 V"+a+" H478z");default:return""}},pt={doubleleftarrow:`M262 157
|
||||
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
||||
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
||||
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
||||
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
||||
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
||||
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
||||
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
||||
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
||||
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
||||
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
||||
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
||||
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
||||
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
||||
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
||||
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
||||
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
||||
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
||||
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
||||
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
||||
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
||||
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
||||
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
||||
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
||||
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
||||
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
||||
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
||||
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
||||
435 0h399565z`,leftgroupunder:`M400000 262
|
||||
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
||||
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
||||
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
||||
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
||||
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
||||
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
||||
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
||||
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
||||
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
||||
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
||||
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
||||
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
||||
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
||||
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
||||
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
||||
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
||||
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
||||
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
||||
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
||||
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
||||
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
||||
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
||||
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
||||
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
||||
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
||||
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
||||
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
||||
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
||||
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
||||
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
||||
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
||||
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
||||
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
||||
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
||||
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
||||
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
||||
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
||||
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
||||
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
||||
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
||||
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
||||
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
||||
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
||||
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
||||
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
||||
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
||||
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
||||
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||||
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
||||
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
||||
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
||||
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
||||
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
||||
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
||||
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
||||
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
||||
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
||||
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
||||
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
||||
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
||||
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
||||
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
||||
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
||||
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
||||
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
||||
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
||||
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
||||
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
||||
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
||||
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
||||
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
||||
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
||||
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
||||
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
||||
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
||||
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
||||
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
||||
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
||||
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
||||
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
||||
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
||||
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
||||
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
||||
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
||||
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
||||
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
||||
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
||||
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
||||
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
||||
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
||||
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
||||
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
||||
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
||||
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
||||
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
||||
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
||||
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
||||
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
||||
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
||||
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
||||
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
||||
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
||||
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
||||
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
||||
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
||||
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
||||
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
||||
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
||||
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||||
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||||
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||||
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
||||
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||||
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||||
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||||
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
||||
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
||||
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
||||
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
||||
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
||||
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
||||
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
||||
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
||||
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
||||
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
||||
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
||||
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||||
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
||||
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
||||
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
||||
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
||||
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
||||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||||
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
||||
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
||||
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
||||
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
||||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||||
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},or=function(t,a){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+a+` v1759 h347 v-84
|
||||
H403z M403 1759 V0 H319 V1759 v`+a+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+a+` v1759 H0 v84 H347z
|
||||
M347 1759 V0 H263 V1759 v`+a+" v1759 h84z";case"vert":return"M145 15 v585 v"+a+` v585 c2.667,10,9.667,15,21,15
|
||||
c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||||
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+a+" v585 h43z";case"doublevert":return"M145 15 v585 v"+a+` v585 c2.667,10,9.667,15,21,15
|
||||
c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||||
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+a+` v585 h43z
|
||||
M367 15 v585 v`+a+` v585 c2.667,10,9.667,15,21,15
|
||||
c10,0,16.667,-5,20,-15 v-585 v`+-a+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||||
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+a+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+a+` v1715 h263 v84 H319z
|
||||
MM319 602 V0 H403 V602 v`+a+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+a+` v1799 H0 v-84 H319z
|
||||
MM319 602 V0 H403 V602 v`+a+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+a+` v602 h84z
|
||||
M403 1759 V0 H319 V1759 v`+a+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+a+` v602 h84z
|
||||
M347 1759 V0 h-84 V1759 v`+a+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
||||
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
||||
-36,557 l0,`+(a+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
||||
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
||||
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
||||
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
||||
l0,-`+(a+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
||||
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
||||
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
||||
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(a+9)+`
|
||||
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
||||
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
||||
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
||||
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
||||
l0,-`+(a+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
||||
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},Dt=function(){function E(a){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=a,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=E.prototype;return t.hasClass=function(i){return I.contains(this.classes,i)},t.toNode=function(){for(var i=document.createDocumentFragment(),s=0;s<this.children.length;s++)i.appendChild(this.children[s].toNode());return i},t.toMarkup=function(){for(var i="",s=0;s<this.children.length;s++)i+=this.children[s].toMarkup();return i},t.toText=function(){var i=function(m){return m.toText()};return this.children.map(i).join("")},E}(),ge={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77Line truncated
|
||||
`+Ye+" children.");for(var st=0;st<Ye;st++){var Or=new Xt(ke[st]),Ft=new Ht([Or],{width:"400em",height:re(Le),viewBox:"0 0 "+N+" "+qe,preserveAspectRatio:Et[st]+" slice"}),Nt=Y.makeSvgSpan([Je[st]],[Ft],a);if(Ye===1)return{span:Nt,minWidth:ye,height:Le};Nt.style.height=re(Le),Ee.push(Nt)}return{span:Y.makeSpan(["stretchy"],Ee,a),minWidth:ye,height:Le}}}var s=i(),m=s.span,f=s.minWidth,b=s.height;return m.height=b,m.style.height=re(b),f>0&&(m.style.minWidth=re(f)),m},Zg=function(t,a,i,s,m){var f,b=t.height+t.depth+i+s;if(/fbox|color|angl/.test(a)){if(f=Y.makeSpan(["stretchy",a],[],m),a==="fbox"){var N=m.color&&m.getColor();N&&(f.style.borderColor=N)}}else{var y=[];/^[bx]cancel$/.test(a)&&y.push(new cn({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(a)&&y.push(new cn({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var M=new Ht(y,{width:"100%",height:re(b)});f=Y.makeSvgSpan([],[M],m)}return f.height=b,f.style.height=re(b),f},ur={encloseSpan:Zg,mathMLnode:Wg,svgSpan:Xg};function Ae(E,t){if(!E||E.type!==t)throw new Error("Expected node of type "+t+", but got "+(E?"node of type "+E.type:String(E)));return E}function Xa(E){var t=Zn(E);if(!t)throw new Error("Expected node of symbol group type, but got "+(E?"node of type "+E.type:String(E)));return t}function Zn(E){return E&&(E.type==="atom"||Ba.hasOwnProperty(E.type))?E:null}var Za=function(t,a){var i,s,m;t&&t.type==="supsub"?(s=Ae(t.base,"accent"),i=s.base,t.base=i,m=ka(Me(t,a)),t.base=s):(s=Ae(t,"accent"),i=s.base);var f=Me(i,a.havingCrampedStyle()),b=s.isShifty&&I.isCharacterBox(i),N=0;if(b){var y=I.getBaseElem(i),M=Me(y,a.havingCrampedStyle());N=kn(M).skew}var z=s.label==="\\c",V=z?f.height+f.depth:Math.min(f.height,a.fontMetrics().xHeight),H;if(s.isStretchy)H=ur.svgSpan(s,a),H=Y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"elem",elem:H,wrapperClasses:["svg-align"],wrapperStyle:N>0?{width:"calc(100% - "+re(2*N)+")",marginLeft:re(2*N)}:void 0}]},a);else{var K,ae;s.label==="\\vec"?(K=Y.staticSvg("vec",a),ae=Y.svgData.vec[1]):(K=Y.makeOrd({mode:s.mode,text:s.label},a,"textord"),K=kn(K),K.italic=0,ae=K.width,z&&(V+=K.depth)),H=Y.makeSpan(["accent-body"],[K]);var le=s.label==="\\textcircled";le&&(H.classes.push("accent-full"),V=f.height);var _e=N;le||(_e-=ae/2),H.style.left=re(_e),s.label==="\\textcircled"&&(H.style.top=".2em"),H=Y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:-V},{type:"elem",elem:H}]},a)}var Ee=Y.makeSpan(["mord","accent"],[H],a);return m?(m.children[0]=Ee,m.height=Math.max(Ee.height,m.height),m.classes[0]="mord",m):Ee},Wc=function(t,a){var i=t.isStretchy?ur.mathMLnode(t.label):new te.MathNode("mo",[Bt(t.label,t.mode)]),s=new te.MathNode("mover",[$e(t.base,a),i]);return s.setAttribute("accent","true"),s},Jg=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(E){return"\\"+E}).join("|"));ce({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(t,a){var i=Qn(a[0]),s=!Jg.test(t.funcName),m=!s||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:s,isShifty:m,base:i}},htmlBuilder:Za,mathmlBuilder:Wc}),ce({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(t,a){var i=a[0],s=t.parser.mode;return s==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),s="text"),{type:"accent",mode:s,label:t.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:Za,mathmlBuilder:Wc}),ce({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(t,a){var i=t.parser,s=t.funcName,m=a[0];return{type:"accentUnder",mode:i.mode,label:s,base:m}},htmlBuilder:function(t,a){var i=Me(t.base,a),s=ur.svgSpan(t,a),m=t.label==="\\utilde"?.12:0,f=Y.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:m},{type:"elem",elem:i}]},a);return Y.makeSpan(["mord","accentunder"],[f],a)},mathmlBuilder:function(t,a){var i=ur.mathMLnode(t.label),s=new te.MathNode("munder",[$e(t.base,a),i]);return s.setAttribute("accentunder","true"),s}});var Jn=function(t){var a=new te.MathNode("mpadded",t?[t]:[]);return a.setAttribute("width","+0.6em"),a.setAttribute("lspace","0.3em"),a};ce({type:"xArrow",Line truncated
|
||||
]`,yE="\\\\[a-zA-Z@]+",OE="\\\\[^\uD800-\uDFFF]",IE="("+yE+")"+Bu+"*",DE=`\\\\(
|
||||
|[ \r ]+
|
||||
?)[ \r ]*`,gi="[̀-ͯ]",xE=new RegExp(gi+"+$"),wE="("+Bu+"+)|"+(DE+"|")+"([!-\\[\\]-‧-豈-]"+(gi+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(gi+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+IE)+("|"+OE+")"),Fu=function(){function E(a,i){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=a,this.settings=i,this.tokenRegex=new RegExp(wE,"g"),this.catcodes={"%":14,"~":13}}var t=E.prototype;return t.setCatcode=function(i,s){this.catcodes[i]=s},t.lex=function(){var i=this.input,s=this.tokenRegex.lastIndex;if(s===i.length)return new Sr("EOF",new $t(this,s,s));var m=this.tokenRegex.exec(i);if(m===null||m.index!==s)throw new c("Unexpected character: '"+i[s]+"'",new Sr(i[s],new $t(this,s,s+1)));var f=m[6]||m[3]||(m[2]?"\\ ":" ");if(this.catcodes[f]===14){var b=i.indexOf(`
|
||||
`,this.tokenRegex.lastIndex);return b===-1?(this.tokenRegex.lastIndex=i.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=b+1,this.lex()}return new Sr(f,new $t(this,s,this.tokenRegex.lastIndex))},E}(),ME=function(){function E(a,i){a===void 0&&(a={}),i===void 0&&(i={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=i,this.builtins=a,this.undefStack=[]}var t=E.prototype;return t.beginGroup=function(){this.undefStack.push({})},t.endGroup=function(){if(this.undefStack.length===0)throw new c("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var i=this.undefStack.pop();for(var s in i)i.hasOwnProperty(s)&&(i[s]==null?delete this.current[s]:this.current[s]=i[s])},t.endGroups=function(){for(;this.undefStack.length>0;)this.endGroup()},t.has=function(i){return this.current.hasOwnProperty(i)||this.builtins.hasOwnProperty(i)},t.get=function(i){return this.current.hasOwnProperty(i)?this.current[i]:this.builtins[i]},t.set=function(i,s,m){if(m===void 0&&(m=!1),m){for(var f=0;f<this.undefStack.length;f++)delete this.undefStack[f][i];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][i]=s)}else{var b=this.undefStack[this.undefStack.length-1];b&&!b.hasOwnProperty(i)&&(b[i]=this.current[i])}s==null?delete this.current[i]:this.current[i]=s},E}(),LE=mu,kE=LE;A("\\noexpand",function(E){var t=E.popToken();return E.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),A("\\expandafter",function(E){var t=E.popToken();return E.expandOnce(!0),{tokens:[t],numArgs:0}}),A("\\@firstoftwo",function(E){var t=E.consumeArgs(2);return{tokens:t[0],numArgs:0}}),A("\\@secondoftwo",function(E){var t=E.consumeArgs(2);return{tokens:t[1],numArgs:0}}),A("\\@ifnextchar",function(E){var t=E.consumeArgs(3);E.consumeSpaces();var a=E.future();return t[0].length===1&&t[0][0].text===a.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),A("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),A("\\TextOrMath",function(E){var t=E.consumeArgs(2);return E.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Uu={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};A("\\char",function(E){var t=E.popToken(),a,i="";if(t.text==="'")a=8,t=E.popToken();else if(t.text==='"')a=16,t=E.popToken();else if(t.text==="`")if(t=E.popToken(),t.text[0]==="\\")i=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new c("\\char` missing argument");i=t.text.charCodeAt(0)}else a=10;if(a){if(i=Uu[t.text],i==null||i>=a)throw new c("Invalid base-"+a+" digit "+t.text);for(var s;(s=Uu[E.future().text])!=null&&s<a;)i*=a,i+=s,E.popToken()}return"\\@char{"+i+"}"});var Ei=function(t,a,i){var s=t.consumeArg().tokens;if(s.length!==1)throw new c("\\newcommand's first argument must be a macro name");var m=s[0].text,f=t.isDefined(m);if(f&&!a)throw new c("\\newcommand{"+m+"} attempting to redefine "+(m+"; use \\renewcommand"));if(!f&&!i)throw new c("\\renewcommand{"+m+"} when command "+m+" does not yet exist; use \\newcommand");var b=0;if(s=t.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var N="",y=t.expandNextToken();y.text!=="]"&&y.text!=="EOF";)N+=y.text,y=t.expandNextToken();if(!N.match(/^\s*[0-9]+\s*$/))throw new c("Invalid number of arguments: "+N);b=parseInt(N),s=t.consumeArg().tokens}return t.macros.set(m,{tokens:s,numArgs:b}),""};A("\\newcommand",function(E){return Ei(E,!1,!0)}),A("\\renewcommand",function(E){return Ei(E,!0,!1)}),A("\\providecommand",function(E){return Ei(E,!0,!0)}),A("\\message",function(E){var t=E.consumeArgs(1)[0];return console.log(t.reverse().map(function(a){return a.text}).join("")),""}),A("\\errmessage",function(E){var t=E.consumeArgs(1)[0];return console.error(t.reverse().map(function(a){return a.text}).join("")),""}),A("\\show",function(E){var t=E.popToken(),a=t.text;return console.log(t,E.macros.get(a),hr[a],Ze.math[a],Ze.text[a]),""}),A("\\bgroup","{"),A("\\egroup","}"),A("~","\\nobreakspace"),A("\\lq","`"),A("\\rq","'"),A("\\aa","\\r a"),A("\\AA","\\r A"),A("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),A("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),A("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),A("ℬ","\\mathscr{B}"),A("ℰ","\\mathscr{E}"),A("ℱ","\\mathscr{F}"),A("ℋ","\\mathscr{H}"),A("ℐ","\\mathscr{I}"),A("ℒ","\\mathscr{L}"),A("ℳ","\\mathscr{M}"),A("ℛ","\\mathscr{R}"),A("ℭ","\\mathfrak{C}"),A("ℌ","\\mathfrak{H}"),A("ℨ","\\mathfrak{Z}"),A("\\Bbbk","\\Bbb{k}"),A("·","\\cdotp"),A("\\llap","\\mathllap{\\textrm{#1}}"),A("\\rlap","\\mathrlap{\\textrm{#1}}"),A("\\clap","\\mathclap{\\textrm{#1}}"),A("\\mathstrut","\\vphantom{(}"),A("\\underbar","\\underline{\\text{#1}}"),A("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),A("\\neq"Line truncated
|
||||
please report what input caused this bug`);return m=m.slice(1,-1),{type:"verb",mode:"text",body:m,star:f}}Vu.hasOwnProperty(s[0])&&!Ze[this.mode][s[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+s[0]+'" used in math mode',i),s=Vu[s[0]]+s.slice(1));var b=xE.exec(s);b&&(s=s.substring(0,b.index),s==="i"?s="ı":s==="j"&&(s="ȷ"));var N;if(Ze[this.mode][s]){this.settings.strict&&this.mode==="math"&&mn.indexOf(s)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+s[0]+'" used in math mode',i);var y=Ze[this.mode][s].group,M=$t.range(i),z;if(Pa.hasOwnProperty(y)){var V=y;z={type:"atom",mode:this.mode,family:V,loc:M,text:s}}else z={type:y,mode:this.mode,loc:M,text:s};N=z}else if(s.charCodeAt(0)>=128)this.settings.strict&&(De(s.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+s[0]+'" used in math mode',i):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+s[0]+'"'+(" ("+s.charCodeAt(0)+")"),i)),N={type:"textord",mode:"text",loc:$t.range(i),text:s};else return null;if(this.consume(),b)for(var H=0;H<b[0].length;H++){var K=b[0][H];if(!fi[K])throw new c("Unknown accent ' "+K+"'",i);var ae=fi[K][this.mode]||fi[K].text;if(!ae)throw new c("Accent "+K+" unsupported in "+this.mode+" mode",i);N={type:"accent",mode:this.mode,loc:$t.range(i),label:ae,isStretchy:!1,isShifty:!0,base:N}}return N},E}();$u.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var BE=function(t,a){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var i=new $u(t,a);delete i.gullet.macros.current["\\df@tag"];var s=i.parse();if(delete i.gullet.macros.current["\\current@color"],delete i.gullet.macros.current["\\color"],i.gullet.macros.get("\\df@tag")){if(!a.displayMode)throw new c("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:i.subparse([new Sr("\\df@tag")])}]}return s},hi=BE,Wu=function(t,a,i){a.textContent="";var s=bi(t,i).toNode();a.appendChild(s)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Wu=function(){throw new c("KaTeX doesn't work in quirks mode.")});var FE=function(t,a){var i=bi(t,a).toMarkup();return i},UE=function(t,a){var i=new q(a);return hi(t,i)},Ku=function(t,a,i){if(i.throwOnError||!(t instanceof c))throw t;var s=Y.makeSpan(["katex-error"],[new Ot(a)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+i.errorColor),s},bi=function(t,a){var i=new q(a);try{var s=hi(t,i);return Hg(s,t,i)}catch(m){return Ku(m,t,i)}},GE=function(t,a){var i=new q(a);try{var s=hi(t,i);return Vg(s,t,i)}catch(m){return Ku(m,t,i)}},qE={version:"0.16.8",render:Wu,renderToString:FE,ParseError:c,SETTINGS_SCHEMA:F,__parse:UE,__renderToDomTree:bi,__renderToHTMLTree:GE,__setFontMetrics:Oe,__defineSymbol:g,__defineFunction:ce,__defineMacro:A,__domTree:{Span:Nr,Anchor:ln,SymbolNode:Ot,SvgNode:Ht,PathNode:Xt,LineNode:cn}},YE=qE;return o=o.default,o}()})})(wg);var ore=wg.exports,hc=ore;function y0(n,e){var r,o,u=n.posMax,c=!0,_=!0;return r=e>0?n.src.charCodeAt(e-1):-1,o=e+1<=u?n.src.charCodeAt(e+1):-1,(r===32||r===9||o>=48&&o<=57)&&(_=!1),(o===32||o===9)&&(c=!1),{can_open:c,can_close:_}}function sre(n,e){var r,o,u,c,_;if(n.src[n.pos]!=="$")return!1;if(c=y0(n,n.pos),!c.can_open)return e||(n.pending+="$"),n.pos+=1,!0;for(r=n.pos+1,o=r;(o=n.src.indexOf("$",o))!==-1;){for(_=o-1;n.src[_]==="\\";)_-=1;if((o-_)%2==1)break;o+=1}return o===-1?(e||(n.pending+="$"),n.pos=r,!0):o-r===0?(e||(n.pending+="$$"),n.pos=r+1,!0):(c=y0(n,o),c.can_close?(e||(u=n.push("math_inline","math",0),u.markup="$",u.content=n.src.slice(r,o)),n.pos=o+1,!0):(e||(n.pending+="$"),n.pos=r,!0))}function lre(n,e,r,o){var u,c,_,l,d=!1,p,S=n.bMarks[e]+n.tShift[e],T=n.eMarks[e];if(S+2>T||n.src.slice(S,S+2)!=="$$")return!1;if(S+=2,u=n.src.slice(S,T),o)return!0;for(u.trim().slice(-2)==="$$"&&(u=u.trim().slice(0,-2),d=!0),_=e;!d&&(_++,!(_>=r||(S=n.bMarks[_]+n.tShift[_],T=n.eMarks[_],S<T&&n.tShift[_]<n.blkIndent)));)n.src.slice(S,T).trim().slice(-2)==="$$"&&(l=n.src.slice(0,T).lastIndexOf("$$"),c=n.src.slice(S,l),d=!0);return n.line=_+1,p=n.push("math_block","math",0),p.block=!0,p.content=(u&&u.trim()?u+`
|
||||
`:"")+n.getLines(e+1,_,n.tShift[e],!0)+(c&&c.trim()?c:""),p.map=[e,n.line],p.markup="$$",!0}function ma(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var cre=function(e,r){r=r||{},r.katex&&(hc=r.katex),r.blockClass||(r.blockClass="");var o=function(l){r.displayMode=!1;try{return hc.renderToString(l,r)}catch(d){return r.throwOnError&&console.log(d),`<span class='katex-error' title='${ma(d.toString())}'>${ma(l)}</span>`}},u=function(l,d){return o(l[d].content)},c=function(l){r.displayMode=!0;try{return`<p class="katex-block ${r.blockClass}">`+hc.renderToString(l,r)+"</p>"}catch(d){return r.throwOnError&&console.log(d),`<p class='katex-block katex-error ${r.blockClass}' title='${ma(d.toString())}'>${ma(l)}</p>`}},_=function(l,d){return c(l[d].content)+`
|
||||
`};e.inline.ruler.after("escape","math_inline",sre),e.block.ruler.after("blockquote","math_block",lre,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=u,e.renderer.rules.math_block=_};const ure=va(cre);/*!
|
||||
* qrcode.vue v3.4.1
|
||||
* A Vue.js component to generate QRCode.
|
||||
* © 2017-2023 @scopewu(https://github.com/scopewu)
|
||||
* MIT License.
|
||||
*/var ha=function(){return ha=Object.assign||function(e){for(var r,o=1,u=arguments.length;o<u;o++){r=arguments[o];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(e[c]=r[c])}return e},ha.apply(this,arguments)};var Lr;(function(n){var e=function(){function _(l,d,p,S){if(this.version=l,this.errorCorrectionLevel=d,this.modules=[],this.isFunction=[],l<_.MIN_VERSION||l>_.MAX_VERSION)throw new RangeError("Version value out of range");if(S<-1||S>7)throw new RangeError("Mask value out of range");this.size=l*4+17;for(var T=[],C=0;C<this.size;C++)T.push(!1);for(var C=0;C<this.size;C++)this.modules.push(T.slice()),this.isFunction.push(T.slice());this.drawFunctionPatterns();var R=this.addEccAndInterleave(p);if(this.drawCodewords(R),S==-1)for(var O=1e9,C=0;C<8;C++){this.applyMask(C),this.drawFormatBits(C);var w=this.getPenaltyScore();w<O&&(S=C,O=w),this.applyMask(C)}u(0<=S&&S<=7),this.mask=S,this.applyMask(S),this.drawFormatBits(S),this.isFunction=[]}return _.encodeText=function(l,d){var p=n.QrSegment.makeSegments(l);return _.encodeSegments(p,d)},_.encodeBinary=function(l,d){var p=n.QrSegment.makeBytes(l);return _.encodeSegments([p],d)},_.encodeSegments=function(l,d,p,S,T,C){if(p===void 0&&(p=1),S===void 0&&(S=40),T===void 0&&(T=-1),C===void 0&&(C=!0),!(_.MIN_VERSION<=p&&p<=S&&S<=_.MAX_VERSION)||T<-1||T>7)throw new RangeError("Invalid value");var R,O;for(R=p;;R++){var w=_.getNumDataCodewords(R,d)*8,L=c.getTotalBits(l,R);if(L<=w){O=L;break}if(R>=S)throw new RangeError("Data too long")}for(var I=0,F=[_.Ecc.MEDIUM,_.Ecc.QUARTILE,_.Ecc.HIGH];I<F.length;I++){var k=F[I];C&&O<=_.getNumDataCodewords(R,k)*8&&(d=k)}for(var q=[],G=0,U=l;G<U.length;G++){var Q=U[G];r(Q.mode.modeBits,4,q),r(Q.numChars,Q.mode.numCharCountBits(R),q);for(var W=0,ie=Q.getData();W<ie.length;W++){var ee=ie[W];q.push(ee)}}u(q.length==O);var Z=_.getNumDataCodewords(R,d)*8;u(q.length<=Z),r(0,Math.min(4,Z-q.length),q),r(0,(8-q.length%8)%8,q),u(q.length%8==0);for(var Se=236;q.length<Z;Se^=253)r(Se,8,q);for(var Te=[];Te.length*8<q.length;)Te.push(0);return q.forEach(function($,ue){return Te[ue>>>3]|=$<<7-(ue&7)}),new _(R,d,Te,T)},_.prototype.getModule=function(l,d){return 0<=l&&l<this.size&&0<=d&&d<this.size&&this.modules[d][l]},_.prototype.getModules=function(){return this.modules},_.prototype.drawFunctionPatterns=function(){for(var l=0;l<this.size;l++)this.setFunctionModule(6,l,l%2==0),this.setFunctionModule(l,6,l%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);for(var d=this.getAlignmentPatternPositions(),p=d.length,l=0;l<p;l++)for(var S=0;S<p;S++)l==0&&S==0||l==0&&S==p-1||l==p-1&&S==0||this.drawAlignmentPattern(d[l],d[S]);this.drawFormatBits(0),this.drawVersion()},_.prototype.drawFormatBits=function(l){for(var d=this.errorCorrectionLevel.formatBits<<3|l,p=d,S=0;S<10;S++)p=p<<1^(p>>>9)*1335;var T=(d<<10|p)^21522;u(T>>>15==0);for(var S=0;S<=5;S++)this.setFunctionModule(8,S,o(T,S));this.setFunctionModule(8,7,o(T,6)),this.setFunctionModule(8,8,o(T,7)),this.setFunctionModule(7,8,o(T,8));for(var S=9;S<15;S++)this.setFunctionModule(14-S,8,o(T,S));for(var S=0;S<8;S++)this.setFunctionModule(this.size-1-S,8,o(T,S));for(var S=8;S<15;S++)this.setFunctionModule(8,this.size-15+S,o(T,S));this.setFunctionModule(8,this.size-8,!0)},_.prototype.drawVersion=function(){if(!(this.version<7)){for(var l=this.version,d=0;d<12;d++)l=l<<1^(l>>>11)*7973;var p=this.version<<12|l;u(p>>>18==0);for(var d=0;d<18;d++){var S=o(p,d),T=this.size-11+d%3,C=Math.floor(d/3);this.setFunctionModule(T,C,S),this.setFunctionModule(C,T,S)}}},_.prototype.drawFinderPattern=function(l,d){for(var p=-4;p<=4;p++)for(var S=-4;S<=4;S++){var T=Math.max(Math.abs(S),Math.abs(p)),C=l+S,R=d+p;0<=C&&C<this.size&&0<=R&&R<this.size&&this.setFunctionModule(C,R,T!=2&&T!=4)}},_.prototype.drawAlignmentPattern=function(l,d){for(var p=-2;p<=2;p++)for(var S=-2;S<=2;S++)this.setFunctionModule(l+S,d+p,Math.max(Math.abs(S),Math.abs(p))!=1)},_.prototype.setFunctionModule=function(l,d,p){this.modules[d][l]=p,this.isFunction[d][l]=!0},_.prototype.addEccAndInterleave=function(l){var d=this.version,p=this.errorCorrectionLevel;if(l.length!=_.getNumDataCodewords(d,p))throw new RangeError("Invalid argument");for(var S=_.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][d],T=_.ECC_CODEWORDS_PER_BLOCK[p.ordinal][d],C=Math.floor(_.getNumRawDataModules(d)/8),R=S-C%S,O=Math.floor(C/S),w=[],L=_.reedSolomonComputeDivisor(T),I=0,F=0;I<S;I++){var k=l.slice(F,F+O-T+(I<R?0:1));F+=k.length;var q=_.reedSolomonComputeRemainder(k,L);I<R&&k.push(0),w.push(k.concat(q))}for(var G=[],U=function(Q){w.forEach(function(W,ie){(Q!=O-T||ie>=R)&&G.push(W[Q])})},I=0;I<w[0].length;I++)U(I);return u(G.length==C),G},_.prototype.drawCodewords=function(l){if(l.length!=Math.floor(_.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");for(var d=0,p=this.size-1;p>=1;p-=2){p==6&&(p=5);for(var S=0;S<this.size;S++)for(var T=0;T<2;T++){var C=p-T,R=(p+1&2)==0,O=R?this.size-1-S:S;!this.isFuLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
.el-pagination{--el-pagination-font-size:14px;--el-pagination-bg-color:var(--el-fill-color-blank);--el-pagination-text-color:var(--el-text-color-primary);--el-pagination-border-radius:2px;--el-pagination-button-color:var(--el-text-color-primary);--el-pagination-button-width:32px;--el-pagination-button-height:32px;--el-pagination-button-disabled-color:var(--el-text-color-placeholder);--el-pagination-button-disabled-bg-color:var(--el-fill-color-blank);--el-pagination-button-bg-color:var(--el-fill-color);--el-pagination-hover-color:var(--el-color-primary);--el-pagination-font-size-small:12px;--el-pagination-button-width-small:24px;--el-pagination-button-height-small:24px;--el-pagination-item-gap:16px;white-space:nowrap;color:var(--el-pagination-text-color);font-size:var(--el-pagination-font-size);font-weight:400;display:flex;align-items:center}.el-pagination .el-input__inner{text-align:center;-moz-appearance:textfield}.el-pagination .el-select .el-input{width:128px}.el-pagination button{display:flex;justify-content:center;align-items:center;font-size:var(--el-pagination-font-size);min-width:var(--el-pagination-button-width);height:var(--el-pagination-button-height);line-height:var(--el-pagination-button-height);color:var(--el-pagination-button-color);background:var(--el-pagination-bg-color);padding:0 4px;border:none;border-radius:var(--el-pagination-border-radius);cursor:pointer;text-align:center;box-sizing:border-box}.el-pagination button *{pointer-events:none}.el-pagination button:focus{outline:0}.el-pagination button:hover{color:var(--el-pagination-hover-color)}.el-pagination button.is-active{color:var(--el-pagination-hover-color);cursor:default;font-weight:700}.el-pagination button.is-active.is-disabled{font-weight:700;color:var(--el-text-color-secondary)}.el-pagination button.is-disabled,.el-pagination button:disabled{color:var(--el-pagination-button-disabled-color);background-color:var(--el-pagination-button-disabled-bg-color);cursor:not-allowed}.el-pagination button:focus-visible{outline:1px solid var(--el-pagination-hover-color);outline-offset:-1px}.el-pagination .btn-next .el-icon,.el-pagination .btn-prev .el-icon{display:block;font-size:12px;font-weight:700;width:inherit}.el-pagination>.is-first{margin-left:0!important}.el-pagination>.is-last{margin-right:0!important}.el-pagination .btn-prev{margin-left:var(--el-pagination-item-gap)}.el-pagination__sizes,.el-pagination__total{margin-left:var(--el-pagination-item-gap);font-weight:400;color:var(--el-text-color-regular)}.el-pagination__total[disabled=true]{color:var(--el-text-color-placeholder)}.el-pagination__jump{display:flex;align-items:center;margin-left:var(--el-pagination-item-gap);font-weight:400;color:var(--el-text-color-regular)}.el-pagination__jump[disabled=true]{color:var(--el-text-color-placeholder)}.el-pagination__goto{margin-right:8px}.el-pagination__editor{text-align:center;box-sizing:border-box}.el-pagination__editor.el-input{width:56px}.el-pagination__editor .el-input__inner::-webkit-inner-spin-button,.el-pagination__editor .el-input__inner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.el-pagination__classifier{margin-left:8px}.el-pagination__rightwrapper{flex:1;display:flex;align-items:center;justify-content:flex-end}.el-pagination.is-background .btn-next,.el-pagination.is-background .btn-prev,.el-pagination.is-background .el-pager li{margin:0 4px;background-color:var(--el-pagination-button-bg-color)}.el-pagination.is-background .btn-next.is-active,.el-pagination.is-background .btn-prev.is-active,.el-pagination.is-background .el-pager li.is-active{background-color:var(--el-color-primary);color:var(--el-color-white)}.el-pagination.is-background .btn-next.is-disabled,.el-pagination.is-background .btn-next:disabled,.el-pagination.is-background .btn-prev.is-disabled,.el-pagination.is-background .btn-prev:disabled,.el-pagination.is-background .el-pager li.is-disabled,.el-pagination.is-background .el-pager li:disabled{color:var(--el-text-color-placeholder);background-color:var(--el-disabled-bg-color)}.el-pagination.is-background .btn-next.is-disabled.is-active,.el-pagination.is-background .btn-next:disabled.is-active,.el-pagination.is-background .btn-prev.is-disabled.is-active,.el-pagination.is-background .btn-prev:disabled.is-active,.el-pagination.is-background .el-pager li.is-disabled.is-active,.el-pagination.is-background .el-pager li:disabled.is-active{color:var(--el-text-color-secondary);background-color:var(--el-fill-color-dark)}.el-pagination.is-background .btn-prev{margin-left:var(--el-pagination-item-gap)}.el-pagination--small .btn-next,.el-pagination--small .btn-prev,.el-pagination--small .el-pager li{height:var(--el-pagination-button-height-small);line-height:var(--el-pagination-button-height-small);font-size:var(--el-pagination-font-size-small);min-width:var(--el-pagination-button-width-small)}.el-pagination--small button,.el-pagination--small span:not([class*=suffix]){font-size:var(--el-pagination-font-size-smallLine truncated
|
||||
@@ -1,20 +0,0 @@
|
||||
import{U as dt,d as Ol,e as Ot,g as zt,c as bt,f as bn,b as zl,t as Wl,E as Hl}from"./el-input-1fa85f7c.js";import"./el-tag-3005f0d6.js";import{b as yn,i as Cn,a as _l,E as Bl,d as lt,c as wn,C as Il}from"./el-select-a6f71890.js";import{i as ct,a as at,b as Vl,g as Kl,S as Sn,k as xn,c as Dl,d as Ul,e as En,f as ql,h as jl,j as Gl,l as Yl,m as Xl,n as Jl,u as Ql,y as Zl,E as ea}from"./el-popper-61ab67a6.js";import"./el-tooltip-4ed993c7.js";import{b1 as Zt,b2 as ft,b3 as kn,b4 as Pn,b5 as en,b6 as He,b7 as Rn,b8 as ta,b9 as Nn,ba as Wt,bb as Ln,bc as yt,bd as Mn,be as na,bf as la,bg as aa,bh as oa,ae as Ht,G as Ct,l as Se,af as ot,k as ce,c as M,a2 as st,O as ie,n as Le,aM as se,s as P,ar as _e,q as wt,bi as tn,d as U,av as $n,u as Q,o as A,a as oe,w as X,S as J,e as W,f as b,A as Ne,V as B,J as qe,bj as rt,r as ze,a9 as Be,Z as Te,X as Y,W as pe,h as ht,_ as we,g as $e,b as Me,j as _t,p as Bt,x as Fn,i as It,ah as Vt,aH as it,aj as Re,L as Ye,m as An,bk as Tn,B as G,aa as ut,aC as We,bl as sa,bm as nn,bn as ra,Y as ia,bo as ua,a_ as Kt,z as O,a1 as je,F as Ge,aZ as da,bp as ca,R as ye,bq as On,br as zn,P as Xe,aS as fa,az as Dt,I as Wn,a4 as ha,aF as Qe,D as St,aJ as pa,bs as ln,a$ as an,C as on,bt as va,bu as ga,bv as ma,Q as ba,a8 as ya,ad as vt,aB as gt}from"./index-098ca3b6.js";import{g as Ca}from"./_commonjsHelpers-de833af9.js";function Ut(e){return e}function wa(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Sa=800,xa=16,Ea=Date.now;function ka(e){var t=0,n=0;return function(){var l=Ea(),a=xa-(l-n);if(n=l,a>0){if(++t>=Sa)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Pa(e){return function(){return e}}var Ra=Zt?function(e,t){return Zt(e,"toString",{configurable:!0,enumerable:!1,value:Pa(t),writable:!0})}:Ut;const Na=Ra;var La=ka(Na);const Hn=La;var sn=Math.max;function _n(e,t,n){return t=sn(t===void 0?e.length-1:t,0),function(){for(var l=arguments,a=-1,s=sn(l.length-t,0),i=Array(s);++a<s;)i[a]=l[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=l[a];return o[t]=n(i),wa(e,this,o)}}function Ma(e,t){return Hn(_n(e,t,Ut),e+"")}function $a(e,t,n){if(!ft(n))return!1;var l=typeof t;return(l=="number"?ct(n)&&kn(t,n.length):l=="string"&&t in n)?Pn(n[t],e):!1}function Fa(e){return Ma(function(t,n){var l=-1,a=n.length,s=a>1?n[a-1]:void 0,i=a>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,i&&$a(n[0],n[1],i)&&(s=a<3?void 0:s,a=1),t=Object(t);++l<a;){var o=n[l];o&&e(t,o,l,s)}return t})}var rn=en?en.isConcatSpreadable:void 0;function Aa(e){return He(e)||at(e)||!!(rn&&e&&e[rn])}function qt(e,t,n,l,a){var s=-1,i=e.length;for(n||(n=Aa),a||(a=[]);++s<i;){var o=e[s];t>0&&n(o)?t>1?qt(o,t-1,n,l,a):Vl(a,o):l||(a[a.length]=o)}return a}function Ta(e){var t=e==null?0:e.length;return t?qt(e,1):[]}function Oa(e){return Hn(_n(e,void 0,Ta),e+"")}var za="[object Object]",Wa=Function.prototype,Ha=Object.prototype,Bn=Wa.toString,_a=Ha.hasOwnProperty,Ba=Bn.call(Object);function Ia(e){if(!Rn(e)||ta(e)!=za)return!1;var t=Kl(e);if(t===null)return!0;var n=_a.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Bn.call(n)==Ba}var Va=1,Ka=2;function Da(e,t,n,l){var a=n.length,s=a,i=!l;if(e==null)return!s;for(e=Object(e);a--;){var o=n[a];if(i&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<s;){o=n[a];var r=o[0],u=e[r],c=o[1];if(i&&o[2]){if(u===void 0&&!(r in e))return!1}else{var f=new Sn;if(l)var v=l(u,c,r,e,t,f);if(!(v===void 0?yn(c,u,Va|Ka,l,f):v))return!1}}return!0}function In(e){return e===e&&!ft(e)}function Ua(e){for(var t=xn(e),n=t.length;n--;){var l=t[n],a=e[l];t[n]=[l,a,In(a)]}return t}function Vn(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function qa(e){var t=Ua(e);return t.length==1&&t[0][2]?Vn(t[0][0],t[0][1]):function(n){return n===e||Da(n,e,t)}}function ja(e,t){return e!=null&&t in Object(e)}function Ga(e,t,n){t=Nn(t,e);for(var l=-1,a=t.length,s=!1;++l<a;){var i=Wt(t[l]);if(!(s=e!=null&&n(e,i)))break;e=e[i]}return s||++l!=a?s:(a=e==null?0:e.length,!!a&&Dl(a)&&kn(i,a)&&(He(e)||at(e)))}function Kn(e,t){return e!=null&&Ga(e,t,ja)}var Ya=1,Xa=2;function Ja(e,t){return Ln(e)&&In(t)?Vn(Wt(e),t):function(n){var l=yt(n,e);return l===void 0&&l===t?Kn(n,e):yn(t,l,Ya|Xa)}}function Qa(e){return function(t){return t==null?void 0:t[e]}}function Za(e){return function(t){return Mn(t,e)}}function eo(e){return Ln(e)?Qa(Wt(e)):Za(e)}function to(e){return typeof e=="function"?e:e==null?Ut:typeof e=="object"?He(e)?Ja(e[0],e[1]):qa(e):eo(e)}function no(e){return function(t,n,l){for(var a=-1,s=Object(t),i=l(t),o=i.length;o--;){var r=i[e?o:++a];if(n(s[r],r,s)===!1)break}return t}}var lo=no();const Dn=lo;function ao(e,t){return e&&Dn(e,t,xn)}function oo(e,t){return function(n,l){if(n==null)return n;if(!ct(n))return e(n,l);for(var a=n.length,s=t?a:-1,i=Object(n);(t?s--:++s<a)&&l(i[s],s,i)!==!1;);return n}}var so=oo(ao);coLine truncated
|
||||
* Checks if an event is supported in the current execution environment.
|
||||
*
|
||||
* NOTE: This will not work correctly for non-generic events such as `change`,
|
||||
* `reset`, `load`, `error`, and `select`.
|
||||
*
|
||||
* Borrows from Modernizr.
|
||||
*
|
||||
* @param {string} eventNameSuffix Event name, e.g. "click".
|
||||
* @param {?boolean} capture Check if the capture phase is supported.
|
||||
* @return {boolean} True if the event is supported.
|
||||
* @internal
|
||||
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
||||
*/const ko=function(e,t){if(e&&e.addEventListener){const n=function(l){const a=Eo(l);t&&Reflect.apply(t,this,[l,a])};e.addEventListener("wheel",n,{passive:!0})}},Po={beforeMount(e,t){ko(e,t.value)}},el={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Ht,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},tl={[dt]:e=>Ct(e)||Se(e)||ot(e),change:e=>Ct(e)||Se(e)||ot(e)},Ke=Symbol("checkboxGroupContextKey"),Ro=({model:e,isChecked:t})=>{const n=ce(Ke,void 0),l=M(()=>{var s,i;const o=(s=n==null?void 0:n.max)==null?void 0:s.value,r=(i=n==null?void 0:n.min)==null?void 0:i.value;return!st(o)&&e.value.length>=o&&!t.value||!st(r)&&e.value.length<=r&&t.value});return{isDisabled:Ol(M(()=>(n==null?void 0:n.disabled.value)||l.value)),isLimitDisabled:l}},No=(e,{model:t,isLimitExceeded:n,hasOwnLabel:l,isDisabled:a,isLabeledByFormItem:s})=>{const i=ce(Ke,void 0),{formItem:o}=Ot(),{emit:r}=se();function u(h){var m,g;return h===e.trueLabel||h===!0?(m=e.trueLabel)!=null?m:!0:(g=e.falseLabel)!=null?g:!1}function c(h,m){r("change",u(h),m)}function f(h){if(n.value)return;const m=h.target;r("change",u(m.checked),h)}async function v(h){n.value||!l.value&&!a.value&&s.value&&(h.composedPath().some(w=>w.tagName==="LABEL")||(t.value=u([!1,e.falseLabel].includes(t.value)),await Le(),c(t.value,h)))}const p=M(()=>(i==null?void 0:i.validateEvent)||e.validateEvent);return ie(()=>e.modelValue,()=>{p.value&&(o==null||o.validate("change").catch(h=>zt()))}),{handleChange:f,onClickRoot:v}},Lo=e=>{const t=P(!1),{emit:n}=se(),l=ce(Ke,void 0),a=M(()=>st(l)===!1),s=P(!1);return{model:M({get(){var o,r;return a.value?(o=l==null?void 0:l.modelValue)==null?void 0:o.value:(r=e.modelValue)!=null?r:t.value},set(o){var r,u;a.value&&_e(o)?(s.value=((r=l==null?void 0:l.max)==null?void 0:r.value)!==void 0&&o.length>(l==null?void 0:l.max.value),s.value===!1&&((u=l==null?void 0:l.changeEvent)==null||u.call(l,o))):(n(dt,o),t.value=o)}}),isGroup:a,isLimitExceeded:s}},Mo=(e,t,{model:n})=>{const l=ce(Ke,void 0),a=P(!1),s=M(()=>{const u=n.value;return ot(u)?u:_e(u)?wt(e.label)?u.map(tn).some(c=>Cn(c,e.label)):u.map(tn).includes(e.label):u!=null?u===e.trueLabel:!!u}),i=bt(M(()=>{var u;return(u=l==null?void 0:l.size)==null?void 0:u.value}),{prop:!0}),o=bt(M(()=>{var u;return(u=l==null?void 0:l.size)==null?void 0:u.value})),r=M(()=>!!(t.default||e.label));return{checkboxButtonSize:i,isChecked:s,isFocused:a,checkboxSize:o,hasOwnLabel:r}},$o=(e,{model:t})=>{function n(){_e(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&n()},nl=(e,t)=>{const{formItem:n}=Ot(),{model:l,isGroup:a,isLimitExceeded:s}=Lo(e),{isFocused:i,isChecked:o,checkboxButtonSize:r,checkboxSize:u,hasOwnLabel:c}=Mo(e,t,{model:l}),{isDisabled:f}=Ro({model:l,isChecked:o}),{inputId:v,isLabeledByFormItem:p}=bn(e,{formItemContext:n,disableIdGeneration:c,disableIdManagement:a}),{handleChange:h,onClickRoot:m}=No(e,{model:l,isLimitExceeded:s,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:p});return $o(e,{model:l}),{inputId:v,isLabeledByFormItem:p,isChecked:o,isDisabled:f,isFocused:i,checkboxButtonSize:r,checkboxSize:u,hasOwnLabel:c,model:l,handleChange:h,onClickRoot:m}},Fo=["tabindex","role","aria-checked"],Ao=["id","aria-hidden","name","tabindex","disabled","true-value","false-value"],To=["id","aria-hidden","disabled","value","name","tabindex"],Oo=U({name:"ElCheckbox"}),zo=U({...Oo,props:el,emits:tl,setup(e){const t=e,n=$n(),{inputId:l,isLabeledByFormItem:a,isChecked:s,isDisabled:i,isFocused:o,checkboxSize:r,hasOwnLabel:u,model:c,handleChange:f,onClickRoot:v}=nl(t,n),p=Q("checkbox"),h=M(()=>[p.b(),p.m(r.value),p.is("disabled",i.value),p.is("bordered",t.border),p.is("checked",s.value)]),m=M(()=>[p.e("input"),p.is("disabled",i.value),p.is("checked",s.value),p.is("indeterminate",t.indeterminate),p.is("focus",o.value)]);return(g,w)=>(A(),oe(ht(!b(u)&&b(a)?"span":"label"),{class:W(b(h)),"aria-controls":g.indeterminate?g.controls:null,onClick:b(v)},{default:X(()=>[J("span",{class:W(b(m)),tabindex:g.indeterminate?0:void 0,role:g.indeterminate?"checkbox":void 0,"aria-checked":g.indeterminate?"mixed":void 0},[g.trueLabel||g.falseLabel?Ne((A(),B("input",{key:0,id:b(l),"onUpdate:modelValue":w[0]||(w[0]=y=>qe(c)?c.value=y:null),class:W(b(p).e("original")),type:"checkbox","aria-hidden":g.indeterminate?"true":"false",name:g.name,tabindex:g.tabindex,disabled:b(i),"true-value":g.trueLabel,"false-value":g.falseLabel,onChange:w[1]||(w[1]=(...y)=>b(f)&&b(f)(...y)),onFocus:w[2]||(w[2]=y=>o.value=!0),onBlur:w[3]||(w[3]=y=>o.value=!1)},null,42,Ao)),[[rt,b(c)]]):Ne((A(),B("input",{key:1,id:b(l),"onUpdate:modelValue":w[4]||(w[4]=y=>qe(c)?c.value=y:null),clasLine truncated
|
||||
* escape-html
|
||||
* Copyright(c) 2012-2013 TJ Holowaychuk
|
||||
* Copyright(c) 2015 Andreas Lubbe
|
||||
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
||||
* MIT Licensed
|
||||
*/var As=/["'&<>]/,Ts=Os;function Os(e){var t=""+e,n=As.exec(t);if(!n)return t;var l,a="",s=0,i=0;for(s=n.index;s<t.length;s++){switch(t.charCodeAt(s)){case 34:l=""";break;case 38:l="&";break;case 39:l="'";break;case 60:l="<";break;case 62:l=">";break;default:continue}i!==s&&(a+=t.substring(i,s)),i=s+1,a+=l}return i!==s?a+t.substring(i,s):a}const zs=Ca(Ts),mt=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},Ws=function(e,t,n,l,a){if(!t&&!l&&(!a||Array.isArray(a)&&!a.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const s=l?null:function(o,r){return a?(Array.isArray(a)||(a=[a]),a.map(u=>typeof u=="string"?yt(o,u):u(o,r,e))):(t!=="$key"&&wt(o)&&"$value"in o&&(o=o.$value),[wt(o)?yt(o,t):o])},i=function(o,r){if(l)return l(o.value,r.value);for(let u=0,c=o.key.length;u<c;u++){if(o.key[u]<r.key[u])return-1;if(o.key[u]>r.key[u])return 1}return 0};return e.map((o,r)=>({value:o,index:r,key:s?s(o,r):null})).sort((o,r)=>{let u=i(o,r);return u||(u=o.index-r.index),u*+n}).map(o=>o.value)},sl=function(e,t){let n=null;return e.columns.forEach(l=>{l.id===t&&(n=l)}),n},Hs=function(e,t){let n=null;for(let l=0;l<e.columns.length;l++){const a=e.columns[l];if(a.columnKey===t){n=a;break}}return n||Wl("ElTable",`No column matching with column-key: ${t}`),n},pn=function(e,t,n){const l=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return l?sl(e,l[0]):null},ae=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let l=e;for(const a of n)l=l[a];return`${l}`}else if(typeof t=="function")return t.call(null,e)},Ae=function(e,t){const n={};return(e||[]).forEach((l,a)=>{n[ae(l,t)]={row:l,index:a}}),n};function _s(e,t){const n={};let l;for(l in e)n[l]=e[l];for(l in t)if(je(t,l)){const a=t[l];typeof a<"u"&&(n[l]=a)}return n}function Gt(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function rl(e){return e===""||e!==void 0&&(e=Gt(e),Number.isNaN(e)&&(e=80)),e}function Bs(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function Is(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...l)=>t(n(...l)))}function De(e,t,n){let l=!1;const a=e.indexOf(t),s=a!==-1,i=o=>{o==="add"?e.push(t):e.splice(a,1),l=!0,_e(t.children)&&t.children.forEach(r=>{De(e,r,n??!s)})};return ot(n)?n&&!s?i("add"):!n&&s&&i("remove"):i(s?"remove":"add"),l}function Vs(e,t,n="children",l="hasChildren"){const a=i=>!(Array.isArray(i)&&i.length);function s(i,o,r){t(i,o,r),o.forEach(u=>{if(u[l]){t(u,null,r+1);return}const c=u[n];a(c)||s(u,c,r+1)})}e.forEach(i=>{if(i[l]){t(i,null,0);return}const o=i[n];a(o)||s(i,o,0)})}let Pe;function Ks(e,t,n,l,a){a=qn({enterable:!0,showArrow:!0},a);const s=e==null?void 0:e.dataset.prefix,i=e==null?void 0:e.querySelector(`.${s}-scrollbar__wrap`);function o(){const g=a.effect==="light",w=document.createElement("div");return w.className=[`${s}-popper`,g?"is-light":"is-dark",a.popperClass||""].join(" "),n=zs(n),w.innerHTML=n,w.style.zIndex=String(l()),e==null||e.appendChild(w),w}function r(){const g=document.createElement("div");return g.className=`${s}-popper__arrow`,g}function u(){c&&c.update()}Pe==null||Pe(),Pe=()=>{try{c&&c.destroy(),p&&(e==null||e.removeChild(p)),t.removeEventListener("mouseenter",f),t.removeEventListener("mouseleave",v),i==null||i.removeEventListener("scroll",Pe),Pe=void 0}catch{}};let c=null,f=u,v=Pe;a.enterable&&({onOpen:f,onClose:v}=Ql({showAfter:a.showAfter,hideAfter:a.hideAfter,open:u,close:Pe}));const p=o();p.onmouseenter=f,p.onmouseleave=v;const h=[];if(a.offset&&h.push({name:"offset",options:{offset:[0,a.offset]}}),a.showArrow){const g=p.appendChild(r());h.push({name:"arrow",options:{element:g,padding:10}})}const m=a.popperOptions||{};return c=Zl(t,p,{placement:a.placement||"top",strategy:"fixed",...m,modifiers:m.modifiers?h.concat(m.modifiers):h}),t.addEventListener("mouseenter",f),t.addEventListener("mouseleave",v),i==null||i.addEventListener("scroll",Pe),c}function il(e){return e.children?po(e.children,il):[e]}function vn(e,t){return e+t.colSpan}const ul=(e,t,n,l)=>{let a=0,s=e;const i=n.states.columns.value;if(l){const r=il(l[e]);a=i.slice(0,i.indexOf(r[0])).reduce(vn,0),s=a+r.reduce(vn,0)-1}else a=e;let o;switch(t){case"left":s<n.states.fixedLeafColumnsLength.value&&(o="left");break;case"right":a>=i.length-n.states.rightFixedLeafColumnsLength.value&&(o="right");break;default:s<n.states.fixedLeafColumnsLength.value?o="left":a>=i.length-n.states.rightFixedLeafColumnsLength.value&&(o="right")}return o?{direction:o,start:a,after:s}:{}},Yt=(e,t,n,l,a,s=0)=>{const i=[],{direction:o,start:r,after:u}=ul(t,n,l,a);if(o){const c=o==="left";i.push(`${e}-fixed-column--${o}`),c&&u+s===l.states.fixedLeafColumnsLength.value-1?i.push("is-last-column"):!c&&r-s===l.states.columns.value.length-l.states.rightFixedLeafColumnsLength.value&&i.push("is-first-colLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{E as Te,a as qe,b as Le,u as be}from"./el-input-1fa85f7c.js";import{E as Ze,u as Ge,a as Xe,b as xe,c as We,d as Ye,e as Je,_ as Qe}from"./CardTools.vue_vue_type_script_setup_true_lang-f604ff71.js";import{n as V,E as et,b as Me,d as N,u as Re,c as $,p as tt,o as C,a as I,w as m,r as de,e as v,f as B,g as ne,h as D,_ as ce,i as Ae,j as H,m as K,k as nt,l as ye,q as oe,s as T,t as fe,v as st,x as Ve,y as Oe,z as U,A as Z,B as f,C as te,T as Ne,D as se,F as Pe,G as le,H as q,I as Ce,J as ot,K as lt,L as at,M as rt,N as he,O as re,P as je,Q as it,R as z,S as k,U as J,V as G,W as _,X as A,Y as Q,Z as X,$ as ze,a0 as _e,a1 as Ee,a2 as ut,a3 as we,a4 as ke,a5 as dt,a6 as ct,a7 as ft,a8 as mt,a9 as pt,aa as vt,ab as gt,ac as bt,ad as yt}from"./index-098ca3b6.js";import{o as Be}from"./aria-bc8e8b0f.js";import{i as Ct}from"./el-tag-3005f0d6.js";import"./_commonjsHelpers-de833af9.js";import"./vnode-1dbdb4af.js";const ie="_trap-focus-children",O=[],$e=e=>{if(O.length===0)return;const t=O[O.length-1][ie];if(t.length>0&&e.code===et.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const n=e.shiftKey,o=e.target===t[0],i=e.target===t[t.length-1];o&&n&&(e.preventDefault(),t[t.length-1].focus()),i&&!n&&(e.preventDefault(),t[0].focus())}},ht={beforeMount(e){e[ie]=Be(e),O.push(e),O.length<=1&&document.addEventListener("keydown",$e)},updated(e){V(()=>{e[ie]=Be(e)})},unmounted(){O.shift(),O.length===0&&document.removeEventListener("keydown",$e)}},De=Symbol("rowContextKey"),Et=["start","center","end","space-around","space-between","space-evenly"],wt=["top","middle","bottom"],kt=Me({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:Et,default:"start"},align:{type:String,values:wt}}),Bt=N({name:"ElRow"}),$t=N({...Bt,props:kt,setup(e){const t=e,n=Re("row"),o=$(()=>t.gutter);tt(De,{gutter:o});const i=$(()=>{const a={};return t.gutter&&(a.marginRight=a.marginLeft=`-${t.gutter/2}px`),a}),l=$(()=>[n.b(),n.is(`justify-${t.justify}`,t.justify!=="start"),n.is(`align-${t.align}`,!!t.align)]);return(a,d)=>(C(),I(D(a.tag),{class:v(B(l)),style:ne(B(i))},{default:m(()=>[de(a.$slots,"default")]),_:3},8,["class","style"]))}});var St=ce($t,[["__file","/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]);const It=Ae(St),Tt=Me({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:H([Number,Object]),default:()=>K({})},sm:{type:H([Number,Object]),default:()=>K({})},md:{type:H([Number,Object]),default:()=>K({})},lg:{type:H([Number,Object]),default:()=>K({})},xl:{type:H([Number,Object]),default:()=>K({})}}),Lt=N({name:"ElCol"}),Mt=N({...Lt,props:Tt,setup(e){const t=e,{gutter:n}=nt(De,{gutter:$(()=>0)}),o=Re("col"),i=$(()=>{const a={};return n.value&&(a.paddingLeft=a.paddingRight=`${n.value/2}px`),a}),l=$(()=>{const a=[];return["span","offset","pull","push"].forEach(s=>{const g=t[s];ye(g)&&(s==="span"?a.push(o.b(`${t[s]}`)):g>0&&a.push(o.b(`${s}-${t[s]}`)))}),["xs","sm","md","lg","xl"].forEach(s=>{ye(t[s])?a.push(o.b(`${s}-${t[s]}`)):oe(t[s])&&Object.entries(t[s]).forEach(([g,b])=>{a.push(g!=="span"?o.b(`${s}-${g}-${b}`):o.b(`${s}-${b}`))})}),n.value&&a.push(o.is("guttered")),[o.b(),a]});return(a,d)=>(C(),I(D(a.tag),{class:v(B(l)),style:ne(B(i))},{default:m(()=>[de(a.$slots,"default")]),_:3},8,["class","style"]))}});var Rt=ce(Mt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]);const At=Ae(Rt);function Vt(e){let t;const n=T(!1),o=fe({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(r){o.text=r}function l(){const r=o.parent,c=b.ns;if(!r.vLoadingAddClassList){let u=r.getAttribute("loading-number");u=Number.parseInt(u)-1,u?r.setAttribute("loading-number",u.toString()):(se(r,c.bm("parent","relative")),r.removeAttribute("loading-number")),se(r,c.bm("parent","hidden"))}a(),g.unmount()}function a(){var r,c;(c=(r=b.$el)==null?void 0:r.parentNode)==null||c.removeChild(b.$el)}function d(){var r;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=window.setTimeout(y,400),o.visible=!1,(r=e.closed)==null||r.call(e))}function y(){if(!n.value)return;const r=o.parent;n.value=!1,r.vLoadingAddClassList=void 0,l()}const s=N({name:"ElLoading",setup(r,{expose:c}){const{ns:u,zIndex:h}=Oe("loading");return c({ns:u,zIndex:h}),()=>{const E=o.spinner||o.svg,w=U("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...E?{innerHTML:E}:{}},[U("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),L=o.text?U("p",{class:u.b("text")},[o.text]):void 0;return U(Ne,{name:u.b("fade"),onAfterLeave:y},{default:m(()=>[Z(f("div",{style:{backgroundColor:o.background||""},class:[u.b("mask"),o.customClass,o.fullscreen?"is-fullscreen":""]},[U("div",{class:u.b("spinner")},[w,L])]),[[te,o.visible]])])})}}}),g=st(s),b=g.mount(document.createElement("div"));return{...Ve(o),setTeLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
:root{--el-loading-spinner-size:42px;--el-loading-fullscreen-spinner-size:50px}.el-loading-parent--relative{position:relative!important}.el-loading-parent--hidden{overflow:hidden!important}.el-loading-mask{position:absolute;z-index:2000;background-color:var(--el-mask-color);margin:0;top:0;right:0;bottom:0;left:0;transition:opacity var(--el-transition-duration)}.el-loading-mask.is-fullscreen{position:fixed}.el-loading-mask.is-fullscreen .el-loading-spinner{margin-top:calc((0px - var(--el-loading-fullscreen-spinner-size))/ 2)}.el-loading-mask.is-fullscreen .el-loading-spinner .circular{height:var(--el-loading-fullscreen-spinner-size);width:var(--el-loading-fullscreen-spinner-size)}.el-loading-spinner{top:50%;margin-top:calc((0px - var(--el-loading-spinner-size))/ 2);width:100%;text-align:center;position:absolute}.el-loading-spinner .el-loading-text{color:var(--el-color-primary);margin:3px 0;font-size:14px}.el-loading-spinner .circular{display:inline;height:var(--el-loading-spinner-size);width:var(--el-loading-spinner-size);-webkit-animation:loading-rotate 2s linear infinite;animation:loading-rotate 2s linear infinite}.el-loading-spinner .path{-webkit-animation:loading-dash 1.5s ease-in-out infinite;animation:loading-dash 1.5s ease-in-out infinite;stroke-dasharray:90,150;stroke-dashoffset:0;stroke-width:2;stroke:var(--el-color-primary);stroke-linecap:round}.el-loading-spinner i{color:var(--el-color-primary)}.el-loading-fade-enter-from,.el-loading-fade-leave-to{opacity:0}@-webkit-keyframes loading-rotate{to{transform:rotate(360deg)}}@keyframes loading-rotate{to{transform:rotate(360deg)}}@-webkit-keyframes loading-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40px}to{stroke-dasharray:90,150;stroke-dashoffset:-120px}}@keyframes loading-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40px}to{stroke-dasharray:90,150;stroke-dashoffset:-120px}}.el-row{display:flex;flex-wrap:wrap;position:relative;box-sizing:border-box}.el-row.is-justify-center{justify-content:center}.el-row.is-justify-end{justify-content:flex-end}.el-row.is-justify-space-between{justify-content:space-between}.el-row.is-justify-space-around{justify-content:space-around}.el-row.is-justify-space-evenly{justify-content:space-evenly}.el-row.is-align-top{align-items:flex-start}.el-row.is-align-middle{align-items:center}.el-row.is-align-bottom{align-items:flex-end}[class*=el-col-]{box-sizing:border-box}[class*=el-col-].is-guttered{display:block;min-height:1px}.el-col-0,.el-col-0.is-guttered{display:none}.el-col-0{max-width:0%;flex:0 0 0%}.el-col-offset-0{margin-left:0}.el-col-pull-0{position:relative;right:0}.el-col-push-0{position:relative;left:0}.el-col-1{max-width:4.1666666667%;flex:0 0 4.1666666667%}.el-col-offset-1{margin-left:4.1666666667%}.el-col-pull-1{position:relative;right:4.1666666667%}.el-col-push-1{position:relative;left:4.1666666667%}.el-col-2{max-width:8.3333333333%;flex:0 0 8.3333333333%}.el-col-offset-2{margin-left:8.3333333333%}.el-col-pull-2{position:relative;right:8.3333333333%}.el-col-push-2{position:relative;left:8.3333333333%}.el-col-3{max-width:12.5%;flex:0 0 12.5%}.el-col-offset-3{margin-left:12.5%}.el-col-pull-3{position:relative;right:12.5%}.el-col-push-3{position:relative;left:12.5%}.el-col-4{max-width:16.6666666667%;flex:0 0 16.6666666667%}.el-col-offset-4{margin-left:16.6666666667%}.el-col-pull-4{position:relative;right:16.6666666667%}.el-col-push-4{position:relative;left:16.6666666667%}.el-col-5{max-width:20.8333333333%;flex:0 0 20.8333333333%}.el-col-offset-5{margin-left:20.8333333333%}.el-col-pull-5{position:relative;right:20.8333333333%}.el-col-push-5{position:relative;left:20.8333333333%}.el-col-6{max-width:25%;flex:0 0 25%}.el-col-offset-6{margin-left:25%}.el-col-pull-6{position:relative;right:25%}.el-col-push-6{position:relative;left:25%}.el-col-7{max-width:29.1666666667%;flex:0 0 29.1666666667%}.el-col-offset-7{margin-left:29.1666666667%}.el-col-pull-7{position:relative;right:29.1666666667%}.el-col-push-7{position:relative;left:29.1666666667%}.el-col-8{max-width:33.3333333333%;flex:0 0 33.3333333333%}.el-col-offset-8{margin-left:33.3333333333%}.el-col-pull-8{position:relative;right:33.3333333333%}.el-col-push-8{position:relative;left:33.3333333333%}.el-col-9{max-width:37.5%;flex:0 0 37.5%}.el-col-offset-9{margin-left:37.5%}.el-col-pull-9{position:relative;right:37.5%}.el-col-push-9{position:relative;left:37.5%}.el-col-10{max-width:41.6666666667%;flex:0 0 41.6666666667%}.el-col-offset-10{margin-left:41.6666666667%}.el-col-pull-10{position:relative;right:41.6666666667%}.el-col-push-10{position:relative;left:41.6666666667%}.el-col-11{max-width:45.8333333333%;flex:0 0 45.8333333333%}.el-col-offset-11{margin-left:45.8333333333%}.el-col-pull-11{position:relative;right:45.8333333333%}.el-col-push-11{position:relative;left:45.8333333333%}.el-col-12{max-width:50%;flex:0 0 50%}.el-col-offset-12{margin-left:50%}.el-col-pull-12{pLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
@charset "UTF-8";.el-radio-group{display:inline-flex;align-items:center;flex-wrap:wrap;font-size:0}.el-radio{--el-radio-font-size:var(--el-font-size-base);--el-radio-text-color:var(--el-text-color-regular);--el-radio-font-weight:var(--el-font-weight-primary);--el-radio-input-height:14px;--el-radio-input-width:14px;--el-radio-input-border-radius:var(--el-border-radius-circle);--el-radio-input-bg-color:var(--el-fill-color-blank);--el-radio-input-border:var(--el-border);--el-radio-input-border-color:var(--el-border-color);--el-radio-input-border-color-hover:var(--el-color-primary)}.el-radio{color:var(--el-radio-text-color);font-weight:var(--el-radio-font-weight);position:relative;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;outline:0;font-size:var(--el-font-size-base);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:32px;height:32px}.el-radio.el-radio--large{height:40px}.el-radio.el-radio--small{height:24px}.el-radio.is-bordered{padding:0 15px 0 9px;border-radius:var(--el-border-radius-base);border:var(--el-border);box-sizing:border-box}.el-radio.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-radio.is-bordered.is-disabled{cursor:not-allowed;border-color:var(--el-border-color-lighter)}.el-radio.is-bordered.el-radio--large{padding:0 19px 0 11px;border-radius:var(--el-border-radius-base)}.el-radio.is-bordered.el-radio--large .el-radio__label{font-size:var(--el-font-size-base)}.el-radio.is-bordered.el-radio--large .el-radio__inner{height:14px;width:14px}.el-radio.is-bordered.el-radio--small{padding:0 11px 0 7px;border-radius:var(--el-border-radius-base)}.el-radio.is-bordered.el-radio--small .el-radio__label{font-size:12px}.el-radio.is-bordered.el-radio--small .el-radio__inner{height:12px;width:12px}.el-radio:last-child{margin-right:0}.el-radio__input{white-space:nowrap;cursor:pointer;outline:0;display:inline-flex;position:relative;vertical-align:middle}.el-radio__input.is-disabled .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color);cursor:not-allowed}.el-radio__input.is-disabled .el-radio__inner:after{cursor:not-allowed;background-color:var(--el-disabled-bg-color)}.el-radio__input.is-disabled .el-radio__inner+.el-radio__label{cursor:not-allowed}.el-radio__input.is-disabled.is-checked .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color)}.el-radio__input.is-disabled.is-checked .el-radio__inner:after{background-color:var(--el-text-color-placeholder)}.el-radio__input.is-disabled+span.el-radio__label{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-radio__input.is-checked .el-radio__inner{border-color:var(--el-color-primary);background:var(--el-color-primary)}.el-radio__input.is-checked .el-radio__inner:after{transform:translate(-50%,-50%) scale(1)}.el-radio__input.is-checked+.el-radio__label{color:var(--el-color-primary)}.el-radio__input.is-focus .el-radio__inner{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner{border:var(--el-radio-input-border);border-radius:var(--el-radio-input-border-radius);width:var(--el-radio-input-width);height:var(--el-radio-input-height);background-color:var(--el-radio-input-bg-color);position:relative;cursor:pointer;display:inline-block;box-sizing:border-box}.el-radio__inner:hover{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner:after{width:4px;height:4px;border-radius:var(--el-radio-input-border-radius);background-color:var(--el-color-white);content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(0);transition:transform .15s ease-in}.el-radio__original{opacity:0;outline:0;position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;margin:0}.el-radio__original:focus-visible+.el-radio__inner{outline:2px solid var(--el-radio-input-border-color-hover);outline-offset:1px;border-radius:var(--el-radio-input-border-radius)}.el-radio:focus:not(:focus-visible):not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner{box-shadow:0 0 2px 2px var(--el-radio-input-border-color-hover)}.el-radio__label{font-size:var(--el-radio-font-size);padding-left:8px}.el-radio.el-radio--large .el-radio__label{font-size:14px}.el-radio.el-radio--large .el-radio__inner{width:14px;height:14px}.el-radio.el-radio--small .el-radio__label{font-size:12px}.el-radio.el-radio--small .el-radio__inner{width:12px;height:12px}.el-upload{--el-upload-dragger-padding-horizontal:40px;--el-upload-dragger-padding-vertical:10px}.el-upload{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;outline:0}.el-upload__input{display:none}.el-upload__tip{font-size:12px;color:var(--el-text-color-regular);margin-top:7px}.el-upload iframe{position:absolute;z-index:-1;top:0;left:0;opacity:0}.el-upload--picture-card{--el-upload-picture-card-size:148px;background-color:var(--el-fill-color-lighter);border:1px dashed var(--el-border-color-darker)Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{U as te,C as Xe,c as Je,d as M,u as Ye,e as Qe,f as Ze,g as ye,t as ae,i as ge,b as he,E as et}from"./el-input-1fa85f7c.js";import{f as tt,c as be,d as _e,e as at,_ as st}from"./CardTools.vue_vue_type_script_setup_true_lang-f604ff71.js";import"./el-tag-3005f0d6.js";import{i as ot,E as lt,a as nt}from"./el-select-a6f71890.js";import"./el-popper-61ab67a6.js";import{b as V,ae as ke,G as le,l as ne,af as re,s as B,k as Se,c as P,d as C,u as T,o as g,V as E,S as R,A as Ee,ag as $e,f as e,J as we,e as b,r as U,Z as j,X as D,U as O,_ as N,n as Re,g as Ce,P as Ue,p as xe,t as rt,x as it,O as Y,i as De,ah as Fe,j as w,m as Q,ai as x,aj as ut,a as F,w as k,a9 as Le,aa as Pe,Y as Be,W as $,B as S,L as I,ak as dt,al as ct,am as pt,an as ft,ao as mt,ap as vt,aq as yt,ar as gt,as as Z,q as ie,at as ht,au as bt,av as _t,Q as kt,aw as St,ax as ue,ay as de,a7 as se,a8 as oe,az as Et,aA as $t,aB as A,ad as Ve}from"./index-098ca3b6.js";import{b as wt}from"./_baseClone-88b87991.js";import"./_commonjsHelpers-de833af9.js";import"./vnode-1dbdb4af.js";var Rt=1,Ct=4;function ce(l){return wt(l,Rt|Ct)}const Te=V({size:ke,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),Ut=V({...Te,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),Oe={[te]:l=>le(l)||ne(l)||re(l),[Xe]:l=>le(l)||ne(l)||re(l)},ze=Symbol("radioGroupKey"),Ie=(l,i)=>{const a=B(),t=Se(ze,void 0),p=P(()=>!!t),u=P({get(){return p.value?t.modelValue:l.modelValue},set(y){p.value?t.changeEvent(y):i&&i(te,y),a.value.checked=l.modelValue===l.label}}),c=Je(P(()=>t==null?void 0:t.size)),h=M(P(()=>t==null?void 0:t.disabled)),m=B(!1),d=P(()=>h.value||p.value&&u.value!==l.label?-1:0);return{radioRef:a,isGroup:p,radioGroup:t,focus:m,size:c,disabled:h,tabIndex:d,modelValue:u}},xt=["value","name","disabled"],Dt=C({name:"ElRadio"}),Ft=C({...Dt,props:Ut,emits:Oe,setup(l,{emit:i}){const a=l,t=T("radio"),{radioRef:p,radioGroup:u,focus:c,size:h,disabled:m,modelValue:d}=Ie(a,i);function y(){Re(()=>i("change",d.value))}return(r,s)=>{var n;return g(),E("label",{class:b([e(t).b(),e(t).is("disabled",e(m)),e(t).is("focus",e(c)),e(t).is("bordered",r.border),e(t).is("checked",e(d)===r.label),e(t).m(e(h))])},[R("span",{class:b([e(t).e("input"),e(t).is("disabled",e(m)),e(t).is("checked",e(d)===r.label)])},[Ee(R("input",{ref_key:"radioRef",ref:p,"onUpdate:modelValue":s[0]||(s[0]=o=>we(d)?d.value=o:null),class:b(e(t).e("original")),value:r.label,name:r.name||((n=e(u))==null?void 0:n.name),disabled:e(m),type:"radio",onFocus:s[1]||(s[1]=o=>c.value=!0),onBlur:s[2]||(s[2]=o=>c.value=!1),onChange:y},null,42,xt),[[$e,e(d)]]),R("span",{class:b(e(t).e("inner"))},null,2)],2),R("span",{class:b(e(t).e("label")),onKeydown:s[3]||(s[3]=O(()=>{},["stop"]))},[U(r.$slots,"default",{},()=>[j(D(r.label),1)])],34)],2)}}});var Lt=N(Ft,[["__file","/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);const Pt=V({...Te,name:{type:String,default:""}}),Bt=["value","name","disabled"],Vt=C({name:"ElRadioButton"}),Tt=C({...Vt,props:Pt,setup(l){const i=l,a=T("radio"),{radioRef:t,focus:p,size:u,disabled:c,modelValue:h,radioGroup:m}=Ie(i),d=P(()=>({backgroundColor:(m==null?void 0:m.fill)||"",borderColor:(m==null?void 0:m.fill)||"",boxShadow:m!=null&&m.fill?`-1px 0 0 0 ${m.fill}`:"",color:(m==null?void 0:m.textColor)||""}));return(y,r)=>{var s;return g(),E("label",{class:b([e(a).b("button"),e(a).is("active",e(h)===y.label),e(a).is("disabled",e(c)),e(a).is("focus",e(p)),e(a).bm("button",e(u))])},[Ee(R("input",{ref_key:"radioRef",ref:t,"onUpdate:modelValue":r[0]||(r[0]=n=>we(h)?h.value=n:null),class:b(e(a).be("button","original-radio")),value:y.label,type:"radio",name:y.name||((s=e(m))==null?void 0:s.name),disabled:e(c),onFocus:r[1]||(r[1]=n=>p.value=!0),onBlur:r[2]||(r[2]=n=>p.value=!1)},null,42,Bt),[[$e,e(h)]]),R("span",{class:b(e(a).be("button","inner")),style:Ce(e(h)===y.label?e(d):{}),onKeydown:r[3]||(r[3]=O(()=>{},["stop"]))},[U(y.$slots,"default",{},()=>[j(D(y.label),1)])],38)],2)}}});var Ne=N(Tt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);const Ot=V({id:{type:String,default:void 0},size:ke,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:""},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0}}),zt=Oe,It=["id","aria-label","aria-labelledby"],Nt=C({name:"ElRadioGroup"}),At=C({...Nt,props:Ot,emits:zt,setup(l,{emit:i}){const a=l,t=T("radio"),p=Ye(),u=B(),{formItem:c}=Qe(),{inputId:h,isLabeledByFormItem:m}=Ze(a,{formItemContext:c}),d=r=>{i(te,r),Re(()=>i("change",r))};Ue(()=>{const r=u.value.querySelectorAll("[type=radio]"),s=r[0];!Array.from(r).some(n=>n.checked)&&s&&(s.tabIndex=0)});const y=P(()=>a.name||p.value);return xe(ze,rt({...it(a),changeEvent:d,name:y})),Y(()=>a.modelValue,()=>{a.validateEvent&&(c==null||c.validate("chanLine truncated
|
||||