[
  {
    "path": ".dockerignore",
    "content": ".idea\nlogs\n*.log\ndist/\n**/node_modules/\n\n**/tmp/\n**/vendor/\n.github/\n.devops\nk8s\nworkspace\n.git/\n"
  },
  {
    "path": ".gitattributes",
    "content": "*.md linguist-language=Go\n*.yml linguist-language=Go\n*.html linguist-language=Go\n*.js linguist-language=Go\n*.ts linguist-language=Go\n*.vue linguist-language=Go\n*.xml linguist-language=Go\n*.css linguist-language=Go\n*.sql linguist-language=Go\n*.uml linguist-language=Go\n*.cmd linguist-language=Go\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: 'bug'\nassignees: ''\n\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report_zh.md",
    "content": "---\nname: Bug 报告\nabout: 创建一份 Bug 报告帮助我们优化产品\ntitle: ''\nlabels: 'bug'\nassignees: ''\n\n---\n\n**Bug 描述**\n例如，当 xxx 时，xxx 功能不工作。\n\n**复现步骤**\n该 Bug 复现步骤如下\n1. \n2. \n3. \n\n**期望结果**\nxxx 能工作。\n\n**截屏**\n![截屏1](http://static-docs.crawlab.cn/login.png)\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: 'enhancement'\nassignees: ''\n\n---\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request_zh.md",
    "content": "---\nname: 功能需求\nabout: 优化和功能需求建议\ntitle: ''\nlabels: 'enhancement'\nassignees: ''\n\n---\n\n**请描述该需求尝试解决的问题**\n例如，当 xxx 时，我总是被当前 xxx 的设计所困扰。\n\n**请描述您认为可行的解决方案**\n例如，添加 xxx 功能能够解决问题。\n\n**考虑过的替代方案**\n例如，如果用 xxx，也能解决该问题。\n"
  },
  {
    "path": ".github/workflows/docker-crawlab-tencent.yml",
    "content": "name: \"Docker Image CI: crawlab (tencent)\"\n\non:\n  push:\n    branches: [ develop, main ]\n  #pull_request:\n  #  branches: [ main ]\n  release:\n    types: [ published ]\n  workflow_dispatch:\n  repository_dispatch:\n    types: [ docker-crawlab ]\n\nenv:\n  IMAGE_PATH_CRAWLAB_BACKEND: backend\n  IMAGE_PATH_CRAWLAB_FRONTEND: frontend\n  IMAGE_NAME_CRAWLAB: ccr.ccs.tencentyun.com/crawlab/crawlab\n  IMAGE_NAME_CRAWLAB_BACKEND: crawlabteam/crawlab-backend\n  IMAGE_NAME_CRAWLAB_FRONTEND: crawlabteam/crawlab-frontend\n\njobs:\n  setup:\n    runs-on: ubuntu-latest\n    outputs:\n      is_matched_backend: ${{ steps.check_changed_files.outputs.is_matched_backend }}\n      is_matched_frontend: ${{ steps.check_changed_files.outputs.is_matched_frontend }}\n      is_matched_dockerfile: ${{ steps.check_changed_files.outputs.is_matched_dockerfile }}\n      version: ${{ steps.version.outputs.version }}\n    steps:\n      - uses: actions/checkout@v2\n      - name: Get changed files\n        id: changed_files\n        uses: tj-actions/changed-files@v18.7\n      - id: check_changed_files\n        name: Check changed files\n        run: |\n          # check changed files\n          is_matched_backend=0\n          is_matched_frontend=0\n          is_matched_dockerfile=0\n          for file in ${{ steps.changed_files.outputs.all_changed_files }}; do\n            if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_BACKEND}/.* ]]; then\n              file_backend=$file\n              is_matched_backend=1\n            fi\n            if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_FRONTEND}/.* ]]; then\n              file_frontend=$file\n              is_matched_frontend=1\n            fi\n            if [[ $file == Dockerfile ]]; then\n              file_dockerfile=$file\n              is_matched_dockerfile=1\n            fi\n          done\n          \n          # set outputs\n          if [[ \"${{ github.ref }}\" == \"refs/tags/\"* ]]; then\n            is_matched_backend=1\n            is_matched_frontend=1\n            is_matched_dockerfile=1\n          fi\n          \n          echo \"::set-output name=is_matched_backend::$is_matched_backend\"\n          echo \"::set-output name=is_matched_frontend::$is_matched_frontend\"\n          echo \"::set-output name=is_matched_dockerfile::$is_matched_dockerfile\"\n          \n          # echo outputs\n          echo \"is_matched_backend=$is_matched_backend, file_backend=$file_backend\"\n          echo \"is_matched_frontend=$is_matched_frontend, file_frontend=$file_frontend\"\n          echo \"is_matched_dockerfile=$is_matched_dockerfile, file_dockerfile=$file_dockerfile\"\n          \n      - id: version\n        name: Get version\n        run: |\n          # Strip git ref prefix from version\n          VERSION=$(echo \"${{ github.ref }}\" | sed -e 's,.*/\\(.*\\),\\1,')\n          \n          # Strip \"v\" prefix from tag name\n          [[ \"${{ github.ref }}\" == \"refs/tags/\"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')\n          \n          # Use Docker `latest` tag convention\n          [ \"$VERSION\" == \"main\" ] && VERSION=latest\n          \n          echo \"::set-output name=version::$VERSION\"\n      \n  build-backend:\n    needs: [ setup ]\n    if: needs.setup.outputs.is_matched_backend == '1'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - name: Get changed files\n        id: changed-files\n        uses: tj-actions/changed-files@v18.7\n      - name: Build image\n        run: |\n          cd $IMAGE_PATH_CRAWLAB_BACKEND\n          docker build . --file Dockerfile --tag image\n      - name: Log into registry\n        run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin\n      - name: Push image\n        run: |\n          IMAGE_VERSION=${{needs.setup.outputs.version}}\n          IMAGE_NAME=$IMAGE_NAME_CRAWLAB_BACKEND\n          docker tag image $IMAGE_NAME:$IMAGE_VERSION\n          docker push $IMAGE_NAME:$IMAGE_VERSION\n\n  build-frontend:\n    needs: [ setup ]\n    if: needs.setup.outputs.is_matched_frontend == '1'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - name: Get changed files\n        id: changed-files\n        uses: tj-actions/changed-files@v18.7\n      - name: Build image\n        run: |\n          cd $IMAGE_PATH_CRAWLAB_FRONTEND\n          docker build . --file Dockerfile --tag image\n      - name: Log into registry\n        run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin\n      - name: Push image\n        run: |\n          IMAGE_VERSION=${{needs.setup.outputs.version}}\n          IMAGE_NAME=$IMAGE_NAME_CRAWLAB_FRONTEND\n          docker tag image $IMAGE_NAME:$IMAGE_VERSION\n          docker push $IMAGE_NAME:$IMAGE_VERSION\n\n  build-crawlab:\n    if: ${{ always() }}\n    needs: [ setup, build-backend, build-frontend ]\n    runs-on: ubuntu-latest\n    services:\n      mongo:\n        image: mongo:4.2\n        ports:\n          - 27017:27017\n    steps:\n      - uses: actions/checkout@v2\n      - name: Update Dockerfile\n        run: |\n          IMAGE_VERSION=${{needs.setup.outputs.version}}\n          if [[ $IMAGE_VERSION != \"latest\" ]]; then\n            for n in crawlab-backend crawlab-frontend; do\n              IMAGE_NAME=$n\n              sed -i \"s/${IMAGE_NAME}:latest/${IMAGE_NAME}:${IMAGE_VERSION}/\" Dockerfile\n            done\n          fi\n\n      - name: Build image\n        run: docker build . --file Dockerfile --tag image\n\n      - name: Test image\n        run: |\n          docker run --rm -d --name crawlab_master \\\n            -e CRAWLAB_NODE_MASTER=true \\\n            -e CRAWLAB_DEMO=true \\\n            -e CRAWLAB_MONGO_HOST=localhost \\\n            -e CRAWLAB_MONGO_PORT=27017 \\\n            -p 8080:8080 \\\n            --network host \\\n            image\n          docker exec crawlab_master env\n          docker logs -f crawlab_master &\n          sleep 10\n          docker ps\n          cmd='curl http://localhost:8080/api/system-info -s'\n          echo \"cmd: ${cmd}\"\n          res=`${cmd}`\n          echo \"res: ${res}\"\n          if [[ $res =~ \"success\" ]]; then\n            :\n          else\n            exit 1\n          fi\n          docker stop crawlab_master\n\n      - name: Set up Python\n        uses: actions/setup-python@v1\n        with:\n          python-version: '3.8'\n\n      - name: Test demo\n        run: |\n          pip install crawlab-demo\n          crawlab-demo validate\n\n      - name: Log into registry\n        run: echo ${{ secrets.DOCKER_TENCENT_PASSWORD }} | docker login -u ${{ secrets.DOCKER_TENCENT_USERNAME }} --password-stdin ccr.ccs.tencentyun.com\n\n      - name: Push image\n        run: |\n          IMAGE_VERSION=${{needs.setup.outputs.version}}\n          IMAGE_ID=$IMAGE_NAME_CRAWLAB\n          docker tag image $IMAGE_ID:$IMAGE_VERSION\n          docker push $IMAGE_ID:$IMAGE_VERSION\n"
  },
  {
    "path": ".github/workflows/docker-crawlab.yml",
    "content": "name: \"Docker Image CI: crawlab\"\n\non:\n  push:\n    branches: [ develop, main ]\n  #pull_request:\n  #  branches: [ main ]\n  release:\n    types: [ published ]\n  workflow_dispatch:\n  repository_dispatch:\n    types: [ docker-crawlab ]\n\nenv:\n  IMAGE_PATH_CRAWLAB_BACKEND: backend\n  IMAGE_PATH_CRAWLAB_FRONTEND: frontend\n  IMAGE_NAME_CRAWLAB: crawlabteam/crawlab\n  IMAGE_NAME_CRAWLAB_BACKEND: crawlabteam/crawlab-backend\n  IMAGE_NAME_CRAWLAB_FRONTEND: crawlabteam/crawlab-frontend\n\njobs:\n  setup:\n    runs-on: ubuntu-latest\n    outputs:\n      is_matched_backend: ${{ steps.check_changed_files.outputs.is_matched_backend }}\n      is_matched_frontend: ${{ steps.check_changed_files.outputs.is_matched_frontend }}\n      is_matched_dockerfile: ${{ steps.check_changed_files.outputs.is_matched_dockerfile }}\n      version: ${{ steps.version.outputs.version }}\n    steps:\n      - uses: actions/checkout@v2\n      - name: Get changed files\n        id: changed_files\n        uses: tj-actions/changed-files@v18.7\n      - id: check_changed_files\n        name: Check changed files\n        run: |\n          # check changed files\n          is_matched_backend=0\n          is_matched_frontend=0\n          is_matched_dockerfile=0\n          for file in ${{ steps.changed_files.outputs.all_changed_files }}; do\n            if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_BACKEND}/.* ]]; then\n              file_backend=$file\n              is_matched_backend=1\n            fi\n            if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_FRONTEND}/.* ]]; then\n              file_frontend=$file\n              is_matched_frontend=1\n            fi\n            if [[ $file == Dockerfile ]]; then\n              file_dockerfile=$file\n              is_matched_dockerfile=1\n            fi\n          done\n          \n          # set outputs\n          if [[ \"${{ github.ref }}\" == \"refs/tags/\"* ]]; then\n            is_matched_backend=1\n            is_matched_frontend=1\n            is_matched_dockerfile=1\n          fi\n          \n          echo \"::set-output name=is_matched_backend::$is_matched_backend\"\n          echo \"::set-output name=is_matched_frontend::$is_matched_frontend\"\n          echo \"::set-output name=is_matched_dockerfile::$is_matched_dockerfile\"\n          \n          # echo outputs\n          echo \"is_matched_backend=$is_matched_backend, file_backend=$file_backend\"\n          echo \"is_matched_frontend=$is_matched_frontend, file_frontend=$file_frontend\"\n          echo \"is_matched_dockerfile=$is_matched_dockerfile, file_dockerfile=$file_dockerfile\"\n          \n      - id: version\n        name: Get version\n        run: |\n          # Strip git ref prefix from version\n          VERSION=$(echo \"${{ github.ref }}\" | sed -e 's,.*/\\(.*\\),\\1,')\n          \n          # Strip \"v\" prefix from tag name\n          [[ \"${{ github.ref }}\" == \"refs/tags/\"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')\n          \n          # Use Docker `latest` tag convention\n          [ \"$VERSION\" == \"main\" ] && VERSION=latest\n          \n          echo \"::set-output name=version::$VERSION\"\n      \n  build-backend:\n    needs: [ setup ]\n    if: needs.setup.outputs.is_matched_backend == '1'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - name: Get changed files\n        id: changed-files\n        uses: tj-actions/changed-files@v18.7\n      - name: Build image\n        run: |\n          cd $IMAGE_PATH_CRAWLAB_BACKEND\n          docker build . --file Dockerfile --tag image\n      - name: Log into registry\n        run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin\n      - name: Push image\n        run: |\n          IMAGE_VERSION=${{needs.setup.outputs.version}}\n          IMAGE_NAME=$IMAGE_NAME_CRAWLAB_BACKEND\n          docker tag image $IMAGE_NAME:$IMAGE_VERSION\n          docker push $IMAGE_NAME:$IMAGE_VERSION\n\n  build-frontend:\n    needs: [ setup ]\n    if: needs.setup.outputs.is_matched_frontend == '1'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - name: Get changed files\n        id: changed-files\n        uses: tj-actions/changed-files@v18.7\n      - name: Build image\n        run: |\n          cd $IMAGE_PATH_CRAWLAB_FRONTEND\n          docker build . --file Dockerfile --tag image\n      - name: Log into registry\n        run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin\n      - name: Push image\n        run: |\n          IMAGE_VERSION=${{needs.setup.outputs.version}}\n          IMAGE_NAME=$IMAGE_NAME_CRAWLAB_FRONTEND\n          docker tag image $IMAGE_NAME:$IMAGE_VERSION\n          docker push $IMAGE_NAME:$IMAGE_VERSION\n\n  build-crawlab:\n    if: ${{ always() }}\n    needs: [ setup, build-backend, build-frontend ]\n    runs-on: ubuntu-latest\n    services:\n      mongo:\n        image: mongo:4.2\n        ports:\n          - 27017:27017\n    steps:\n      - uses: actions/checkout@v2\n      - name: Update Dockerfile\n        run: |\n          IMAGE_VERSION=${{needs.setup.outputs.version}}\n          if [[ $IMAGE_VERSION != \"latest\" ]]; then\n            for n in crawlab-backend crawlab-frontend; do\n              IMAGE_NAME=$n\n              sed -i \"s/${IMAGE_NAME}:latest/${IMAGE_NAME}:${IMAGE_VERSION}/\" Dockerfile\n            done\n          fi\n\n      - name: Build image\n        run: docker build . --file Dockerfile --tag image\n\n      - name: Test image\n        run: |\n          docker run --rm -d --name crawlab_master \\\n            -e CRAWLAB_NODE_MASTER=true \\\n            -e CRAWLAB_DEMO=true \\\n            -e CRAWLAB_MONGO_HOST=localhost \\\n            -e CRAWLAB_MONGO_PORT=27017 \\\n            -p 8080:8080 \\\n            --network host \\\n            image\n          docker exec crawlab_master env\n          docker logs -f crawlab_master &\n          sleep 10\n          docker ps\n          cmd='curl http://localhost:8080/api/system-info -s'\n          echo \"cmd: ${cmd}\"\n          res=`${cmd}`\n          echo \"res: ${res}\"\n          if [[ $res =~ \"success\" ]]; then\n            :\n          else\n            exit 1\n          fi\n          docker stop crawlab_master\n\n      - name: Set up Python\n        uses: actions/setup-python@v1\n        with:\n          python-version: '3.8'\n\n      - name: Test demo\n        run: |\n          pip install crawlab-demo\n          crawlab-demo validate\n\n      - name: Log into registry\n        run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin\n\n      - name: Push image\n        run: |\n          IMAGE_VERSION=${{needs.setup.outputs.version}}\n          IMAGE_ID=$IMAGE_NAME_CRAWLAB\n          docker tag image $IMAGE_ID:$IMAGE_VERSION\n          docker push $IMAGE_ID:$IMAGE_VERSION\n"
  },
  {
    "path": ".gitignore",
    "content": ".idea/\n.vscode/\n.DS_Store\nnode_modules/\nlogs/\ntmp/\n_book/\n*.lock\nvendor/\n.crawlab\ndist/\n"
  },
  {
    "path": "CHANGELOG-zh.md",
    "content": "# 0.6.0 (TBC)\n\n(TBC)\n\n# 0.5.1 (2020-07-31)\n\n### 功能 / 优化\n- **加入错误详情信息**.\n- **加入 Golang 编程语言支持**.\n- **加入 Chrome Driver 和 Firefox 的 Web Driver 安装脚本**.\n- **支持系统任务**. \"系统任务\"跟普通爬虫任务相似，允许用户查看诸如安装语言之类的任务日志.\n- **将安装语言从 RPC 更改为系统任务**.\n\n### Bug 修复\n- **修复在爬虫市场中第一次下载爬虫时会报500错误**. [#808](https://github.com/crawlab-team/crawlab/issues/808)\n- **修复一部分翻译问题**.\n- **修复任务详情 500 错误**. [#810](https://github.com/crawlab-team/crawlab/issues/810)\n- **修复密码重置问题**. [#811](https://github.com/crawlab-team/crawlab/issues/811)\n- **修复无法下载 CSV 问题**. [#812](https://github.com/crawlab-team/crawlab/issues/812)\n- **修复无法安装 Node.js 问题**. [#813](https://github.com/crawlab-team/crawlab/issues/813)\n- **修复批量添加定时任务时默认为禁用问题**. [#814](https://github.com/crawlab-team/crawlab/issues/814)\n\n# 0.5.0 (2020-07-19)\n### 功能 / 优化\n- **爬虫市场**. 允许用户下载开源爬虫到 Crawlab.\n- **批量操作**. 允许用户与 Crawlab 批量交互，例如批量运行任务、批量删除爬虫等等.\n- **迁移 MongoDB 驱动器至 `MongoDriver`**.\n- **重构优化节点逻辑代码**.\n- **更改默认 `task.workers` 至 16**.\n- **更改默认 nginx `client_max_body_size` 为 200m**.\n- **支持写日志到 ElasticSearch**.\n- **在 Scrapy 页面展示错误详情**.\n- **删除挑战页面**.\n- **将反馈、免责声明页面移动到顶部**.\n\n### Bug 修复\n- **修复由于 TTL 索引未创建导致的日志不过期问题**.\n- **设置默认日志过期时间为 1 天**.\n- **`task_id` 索引没有创建**.\n- **`docker-compose.yml` 修复**.\n- **修复 404 页面**.\n- **修复无法先创建工作节点问题**.\n\n# 0.4.10 (2020-04-21)\n### 功能 / 优化\n- **优化日志管理**. 集中化管理日志，储存在 MongoDB，减少对 PubSub 的依赖，允许日志异常检测.\n- **自动安装依赖**. 允许从 `requirements.txt` 和 `package.json` 自动安装依赖.\n- **API Token**. 允许用户生成 API Token，并利用它们来集成到自己的系统中.\n- **Web Hook**. 当任务开始或结束时，触发 Web Hook http 请求到预定义好的 URL.\n- **自动生成结果集**. 如果没有设置，自动设置结果集为 `results_<spider_name>`.\n- **优化项目列表**. 项目列表中不展示 \"No Project\".\n- **升级 Node.js**. 将 Node.js 版本从 v8.12 升级到 v10.19.\n- **定时任务增加运行按钮**. 允许用户在定时任务界面手动运行爬虫任务.\n\n### Bug 修复\n- **无法注册**. [#670](https://github.com/crawlab-team/crawlab/issues/670)\n- **爬虫定时任务标签 Cron 表达式显示秒**. [#678](https://github.com/crawlab-team/crawlab/issues/678)\n- **爬虫每日数据缺失**. [#684](https://github.com/crawlab-team/crawlab/issues/684)\n- **结果数量未即时更新**. [#689](https://github.com/crawlab-team/crawlab/issues/689)\n\n# 0.4.9 (2020-03-31)\n### 功能 / 优化\n- **挑战**. 用户可以完成不同的趣味挑战..\n- **更高级的权限控制**. 更细化的权限管理，例如普通用户只能查看或管理自己的爬虫或项目，而管理用户可以查看或管理所有爬虫或项目.\n- **反馈**. 允许用户发送反馈和评分给 Crawlab 开发组.\n- **更好的主页指标**. 优化主页上的指标展示.\n- **可配置爬虫转化为自定义爬虫**. 用户可以将自己的可配置爬虫转化为 Scrapy 自定义爬虫.\n- **查看定时任务触发的任务**. 允许用户查看定时任务触发的任务. [#648](https://github.com/crawlab-team/crawlab/issues/648)\n- **支持结果去重**. 允许用户配置结果去重. [#579](https://github.com/crawlab-team/crawlab/issues/579)\n- **支持任务重试**. 允许任务重新触发历史任务.\n\n### Bug 修复\n- **无法注册**. [#670](https://github.com/crawlab-team/crawlab/issues/670)\n- **CLI 无法在 Windows 上使用**. [#580](https://github.com/crawlab-team/crawlab/issues/580)\n- **重新上传错误**. [#643](https://github.com/crawlab-team/crawlab/issues/643) [#640](https://github.com/crawlab-team/crawlab/issues/640)\n- **上传丢失文件目录**. [#646](https://github.com/crawlab-team/crawlab/issues/646)\n- **无法在爬虫定时任务标签中添加定时任务**.\n\n# 0.4.8 (2020-03-11)\n### 功能 / 优化\n- **支持更多编程语言安装**. 现在用户可以安装或预装更多的编程语言，包括 Java、.Net Core、PHP.\n- **安装 UI 优化**. 用户能够更好的查看和管理节点列表页的安装.\n- **更多 Git 支持**. 允许用户查看 Git Commits 记录，并 Checkout 到相应 Commit.\n- **支持用 Hostname 作为节点注册类型**. 用户可以将 hostname 作为节点的唯一识别号.\n- **RPC 支持**. 加入 RPC 支持来更好的管理节点通信.\n- **是否在主节点运行开关**. 用户可以决定是否在主节点运行，如果为否，则所有任务将在工作节点上运行.\n- **默认禁用教程**.\n- **加入相关文档侧边栏**.\n- **加载页面优化**.\n\n### Bug 修复\n- **重复节点**. [#391](https://github.com/crawlab-team/crawlab/issues/391)\n- **重复上传爬虫**. [#603](https://github.com/crawlab-team/crawlab/issues/603)\n- **节点第三方模块安装失败导致 节点安装第三方部分无法使用**. [#609](https://github.com/crawlab-team/crawlab/issues/609)\n- **离线节点也会创建任务**. [#622](https://github.com/crawlab-team/crawlab/issues/622)\n\n# 0.4.7 (2020-02-24)\n### 功能 / 优化\n- **更好的支持 Scrapy**. 爬虫识别，`settings.py` 配置，日志级别选择，爬虫选择. [#435](https://github.com/crawlab-team/crawlab/issues/435)\n- **Git 同步**. 允许用户将 Git 项目同步到 Crawlab.\n- **长任务支持**. 用户可以添加长任务爬虫，这些爬虫可以跑长期运行的任务. [425](https://github.com/crawlab-team/crawlab/issues/425)\n- **爬虫列表优化**. 分状态任务列数统计，任务列表详情弹出框，图例. [425](https://github.com/crawlab-team/crawlab/issues/425)\n- **版本升级检测**. 检测最新版本，通知用户升级.\n- **批量操作爬虫**. 允许用户批量运行/停止爬虫任务，以及批量删除爬虫.\n- **复制爬虫**. 允许用户复制已存在爬虫来创建新爬虫.\n- **微信群二维码**.\n\n### Bug 修复\n- **定时任务爬虫选择问题**. 字段不会随着爬虫变化而响应.\n- **定时任务冲突问题**. 两个不同的爬虫设置定时任务，时间设置成相同的话，可能会有bug. [#515](https://github.com/crawlab-team/crawlab/issues/515) [#565](https://github.com/crawlab-team/crawlab/issues/565)\n- **任务日志问题**. 在同一时间触发的不同任务可能会写入同一个日志文件. [#577](https://github.com/crawlab-team/crawlab/issues/577)\n- **任务列表筛选选项不全**.\n\n# 0.4.6 (2020-02-13)\n### 功能 / 优化\n- **Node.js SDK**. 用户可以将 SDK 应用到他们的 Node.js 爬虫中.\n- **日志管理优化**. 日志搜索，错误高亮，自动滚动.\n- **任务执行流程优化**. 允许用户在触发任务后跳转到该任务详情页.\n- **任务展示优化**. 在爬虫详情页的最近任务表格中加入了“参数”列. [#295](https://github.com/crawlab-team/crawlab/issues/295)\n- **爬虫列表优化**. 在爬虫列表页加入\"更新时间\"和\"创建时间\". [#505](https://github.com/crawlab-team/crawlab/issues/505)\n- **页面加载占位器**. \n\n### Bug 修复\n- **定时任务配置失去焦点**. [#519](https://github.com/crawlab-team/crawlab/issues/519)\n- **无法用 CLI 工具上传爬虫**. [#524](https://github.com/crawlab-team/crawlab/issues/524)\n\n# 0.4.5 (2020-02-03)\n### 功能 / 优化\n- **交互式教程**. 引导用户了解 Crawlab 的主要功能.\n- **加入全局环境变量**. 可以设置全局环境变量，然后传入到所有爬虫程序中. [#177](https://github.com/crawlab-team/crawlab/issues/177)\n- **项目**. 允许用户将爬虫关联到项目上. [#316](https://github.com/crawlab-team/crawlab/issues/316)\n- **示例爬虫**. 当初始化时，自动加入示例爬虫. [#379](https://github.com/crawlab-team/crawlab/issues/379)\n- **用户管理优化**. 限制管理用户的权限. [#456](https://github.com/crawlab-team/crawlab/issues/456)\n- **设置页面优化**.\n- **任务结果页面优化**.\n\n### Bug 修复\n- **无法找到爬虫文件错误**. [#485](https://github.com/crawlab-team/crawlab/issues/485)\n- **点击删除按钮导致跳转**. [#480](https://github.com/crawlab-team/crawlab/issues/480)\n- **无法在空爬虫里创建文件**. [#479](https://github.com/crawlab-team/crawlab/issues/479)\n- **下载结果错误**. [#465](https://github.com/crawlab-team/crawlab/issues/465)\n- **crawlab-sdk CLI 错误**. [#458](https://github.com/crawlab-team/crawlab/issues/458)\n- **页面刷新问题**. [#441](https://github.com/crawlab-team/crawlab/issues/441)\n- **结果不支持 JSON**. [#202](https://github.com/crawlab-team/crawlab/issues/202)\n- **修复“删除爬虫后获取所有爬虫”错误**.\n- **修复 i18n 警告**.\n\n# 0.4.4 (2020-01-17)\n\n### 功能 / 优化\n- **邮件通知**. 允许用户发送邮件消息通知.\n- **钉钉机器人通知**. 允许用户发送钉钉机器人消息通知.\n- **企业微信机器人通知**. 允许用户发送企业微信机器人消息通知.\n- **API 地址优化**. 在前端加入相对路径，因此用户不需要特别注明 `CRAWLAB_API_ADDRESS`.\n- **SDK 兼容**. 允许用户通过 Crawlab SDK 与 Scrapy 或通用爬虫集成.\n- **优化文件管理**. 加入树状文件侧边栏，让用户更方便的编辑文件.\n- **高级定时任务 Cron**. 允许用户通过 Cron 可视化编辑器编辑定时任务.\n\n### Bug 修复\n- **`nil retuened` 错误**.\n- **使用 HTTPS 出现的报错**.\n- **无法在爬虫列表页运行可配置爬虫**.\n- **上传爬虫文件缺少表单验证**.\n\n# 0.4.3 (2020-01-07)\n\n### 功能 / 优化\n- **依赖安装**. 允许用户在平台 Web 界面安装/卸载依赖以及添加编程语言（暂时只有 Node.js）。\n- **Docker 中预装编程语言**. 允许 Docker 用户通过设置 `CRAWLAB_SERVER_LANG_NODE` 为 `Y` 来预装 `Node.js` 环境.\n- **在爬虫详情页添加定时任务列表**. 允许用户在爬虫详情页查看、添加、编辑定时任务. [#360](https://github.com/crawlab-team/crawlab/issues/360)\n- **Cron 表达式与 Linux 一致**. 将表达式从 6 元素改为 5 元素，与 Linux 一致.\n- **启用/禁用定时任务**. 允许用户启用/禁用定时任务. [#297](https://github.com/crawlab-team/crawlab/issues/297)\n- **优化任务管理**. 允许用户批量删除任务. [#341](https://github.com/crawlab-team/crawlab/issues/341)\n- **优化爬虫管理**. 允许用户在爬虫列表页对爬虫进行筛选和排序.\n- **添加中文版 `CHANGELOG`**.\n- **在顶部添加 Github 加星按钮**.\n\n### Bug 修复\n- **定时任务问题**. [#423](https://github.com/crawlab-team/crawlab/issues/423)\n- **上传爬虫zip文件问题**. [#403](https://github.com/crawlab-team/crawlab/issues/403) [#407](https://github.com/crawlab-team/crawlab/issues/407)\n- **因为网络原因导致崩溃**. [#340](https://github.com/crawlab-team/crawlab/issues/340)\n- **定时任务无法正常运行**\n- **定时任务列表列表错位问题**\n- **刷新按钮跳转错误问题**\n\n# 0.4.2 (2019-12-26)\n### 功能 / 优化\n- **免责声明**. 加入免责声明.\n- **通过 API 获取版本号**. [#371](https://github.com/crawlab-team/crawlab/issues/371)\n- **通过配置来允许用户注册**. [#346](https://github.com/crawlab-team/crawlab/issues/346)\n- **允许添加新用户**.\n- **更高级的文件管理**. 允许用户添加、编辑、重命名、删除代码文件. [#286](https://github.com/crawlab-team/crawlab/issues/286)\n- **优化爬虫创建流程**. 允许用户在上传 zip 文件前创建空的自定义爬虫.\n- **优化任务管理**. 允许用户通过选择条件过滤任务. [#341](https://github.com/crawlab-team/crawlab/issues/341)\n\n### Bug 修复\n- **重复节点**. [#391](https://github.com/crawlab-team/crawlab/issues/391)\n- **\"mongodb no reachable\" 错误**. [#373](https://github.com/crawlab-team/crawlab/issues/373)\n\n# 0.4.1 (2019-12-13)\n### 功能 / 优化\n- **Spiderfile 优化**. 将阶段由数组更换为字典. [#358](https://github.com/crawlab-team/crawlab/issues/358)\n- **百度统计更新**.\n\n### Bug 修复\n- **无法展示定时任务**. [#353](https://github.com/crawlab-team/crawlab/issues/353)\n- **重复节点注册**. [#334](https://github.com/crawlab-team/crawlab/issues/334)\n\n# 0.4.0 (2019-12-06)\n### 功能 / 优化\n- **可配置爬虫**. 允许用户添加 `Spiderfile` 来配置抓取规则.\n- **执行模式**. 允许用户选择 3 种任务执行模式: *所有节点*, *指定节点* and *随机*.\n\n### Bug 修复\n- **任务意外被杀死**. [#306](https://github.com/crawlab-team/crawlab/issues/306)\n- **文档更正**. [#301](https://github.com/crawlab-team/crawlab/issues/258) [#301](https://github.com/crawlab-team/crawlab/issues/258)\n- **直接部署与 Windows 不兼容**. [#288](https://github.com/crawlab-team/crawlab/issues/288)\n- **日志文件丢失**. [#269](https://github.com/crawlab-team/crawlab/issues/269)\n\n# 0.3.5 (2019-10-28)\n### 功能 / 优化\n- **优雅关闭**. [详情](https://github.com/crawlab-team/crawlab/commit/63fab3917b5a29fd9770f9f51f1572b9f0420385)\n- **节点信息优化**. [详情](https://github.com/crawlab-team/crawlab/commit/973251a0fbe7a2184ac0da09e0404a17c736aee7)\n- **将系统环境变量添加到任务**. [详情](https://github.com/crawlab-team/crawlab/commit/4ab4892471965d6342d30385578ca60dc51f8ad3)\n- **自动刷新任务日志**. [详情](https://github.com/crawlab-team/crawlab/commit/4ab4892471965d6342d30385578ca60dc51f8ad3)\n- **允许 HTTPS 部署**. [详情](https://github.com/crawlab-team/crawlab/commit/5d8f6f0c56768a6e58f5e46cbf5adff8c7819228)\n\n### Bug 修复\n- **定时任务中无法获取爬虫列表**. [详情](https://github.com/crawlab-team/crawlab/commit/311f72da19094e3fa05ab4af49812f58843d8d93)\n- **无法获取工作节点信息**. [详情](https://github.com/crawlab-team/crawlab/commit/6af06efc17685a9e232e8c2b5fd819ec7d2d1674)\n- **运行爬虫任务时无法选择节点**. [详情](https://github.com/crawlab-team/crawlab/commit/31f8e03234426e97aed9b0bce6a50562f957edad)\n- **结果量很大时无法获取结果数量**. [#260](https://github.com/crawlab-team/crawlab/issues/260)\n- **定时任务中的节点问题**. [#244](https://github.com/crawlab-team/crawlab/issues/244)\n\n\n# 0.3.1 (2019-08-25)\n### 功能 / 优化\n- **Docker 镜像优化**. 将 Docker 镜像进一步分割成 alpine 镜像版本的 master、worker、frontendSplit docker further into master, worker, frontend.\n- **单元测试**. 用单元测试覆盖部分后端代码.\n- **前端优化**. 登录页、按钮大小、上传 UI 提示. \n- **更灵活的节点注册**. 允许用户传一个变量作为注册 key，而不是默认的 MAC 地址.\n\n### Bug 修复\n- **上传大爬虫文件错误**. 上传大爬虫文件时的内存崩溃问题. [#150](https://github.com/crawlab-team/crawlab/issues/150)\n- **无法同步爬虫**. 通过提高写权限等级来修复同步爬虫文件时的问题. [#114](https://github.com/crawlab-team/crawlab/issues/114)\n- **爬虫页问题**. 通过删除 `Site` 字段来修复. [#112](https://github.com/crawlab-team/crawlab/issues/112)\n- **节点展示问题**. 当在多个机器上跑 Docker 容器时，节点无法正确展示. [#99](https://github.com/crawlab-team/crawlab/issues/99)\n\n# 0.3.0 (2019-07-31)\n### 功能 / 优化\n- **Golang 后端**: 将后端由 Python 重构为 Golang，很大的提高了稳定性和性能.\n- **节点网络图**: 节点拓扑图可视化.\n- **节点系统信息**: 可以查看包括操作系统、CPU数量、可执行文件在内的系统信息.\n- **节点监控改进**: 节点通过 Redis 来监控和注册.\n- **文件管理**: 可以在线编辑爬虫文件，包括代码高亮.\n- **登录页/注册页/用户管理**: 要求用户登录后才能使用 Crawlab, 允许用户注册和用户管理，有一些基于角色的鉴权机制.\n- **自动部署爬虫**: 爬虫将被自动部署或同步到所有在线节点.\n- **更小的 Docker 镜像**: 瘦身版 Docker 镜像，通过多阶段构建将 Docker 镜像大小从 1.3G 减小到 700M 左右.\n\n### Bug 修复\n- **节点状态**. 节点状态不会随着节点下线而更新. [#87](https://github.com/tikazyq/crawlab/issues/87) \n- **爬虫部署错误**. 通过自动爬虫部署来修复 [#83](https://github.com/tikazyq/crawlab/issues/83) \n- **节点无法显示**. 节点无法显示在线 [#81](https://github.com/tikazyq/crawlab/issues/81) \n- **定时任务无法工作**. 通过 Golang 后端修复 [#64](https://github.com/tikazyq/crawlab/issues/64) \n- **Flower 错误**. 通过 Golang 后端修复 [#57](https://github.com/tikazyq/crawlab/issues/57) \n\n# 0.2.4 (2019-07-07)\n### 功能 / 优化\n- **文档**: 更优和更详细的文档.\n- **更好的 Crontab**: 通过 UI 界面生成 Cron 表达式.\n- **更优的性能**: 从原生 flask 引擎 切换到 `gunicorn`. [#78](https://github.com/tikazyq/crawlab/issues/78)\n\n### Bug 修复\n- **删除爬虫**. 删除爬虫时不止在数据库中删除，还应该删除相关的文件夹、任务和定时任务. [#69](https://github.com/tikazyq/crawlab/issues/69)\n- **MongoDB 授权**. 允许用户注明 `authenticationDatabase` 来连接 `mongodb`. [#68](https://github.com/tikazyq/crawlab/issues/68)\n- **Windows 兼容性**. 加入 `eventlet` 到 `requirements.txt`. [#59](https://github.com/tikazyq/crawlab/issues/59)\n\n\n# 0.2.3 (2019-06-12)\n### 功能 / 优化\n- **Docker**: 用户能够运行 Docker 镜像来加快部署.\n- **CLI**: 允许用户通过命令行来执行 Crawlab 程序.\n- **上传爬虫**: 允许用户上传自定义爬虫到 Crawlab.\n- **预览时编辑字段**: 允许用户在可配置爬虫中预览数据时编辑字段.\n\n### Bug 修复\n- **爬虫分页**. 爬虫列表页中修复分页问题.\n\n# 0.2.2 (2019-05-30)\n### 功能 / 优化\n- **自动抓取字段**: 在可配置爬虫列表页种自动抓取字段.\n- **下载结果**: 允许下载结果为 CSV 文件.\n- **百度统计**: 允许用户选择是否允许向百度统计发送统计数据.\n\n### Bug 修复\n- **结果页分页**. [#45](https://github.com/tikazyq/crawlab/issues/45)\n- **定时任务重复触发**: 将 Flask DEBUG 设置为 False 来保证定时任务无法重复触发. [#32](https://github.com/tikazyq/crawlab/issues/32)\n- **前端环境**: 添加 `VUE_APP_BASE_URL` 作为生产环境模式变量，然后 API 不会永远都是 `localhost` [#30](https://github.com/tikazyq/crawlab/issues/30)\n\n# 0.2.1 (2019-05-27)\n- **可配置爬虫**: 允许用户创建爬虫来抓取数据，而不用编写代码.\n\n# 0.2 (2019-05-10)\n\n- **高级数据统计**: 爬虫详情页的高级数据统计.\n- **网站数据**: 加入网站列表（中国），允许用户查看 robots.txt、首页响应时间等信息.\n\n# 0.1.1 (2019-04-23)\n\n- **基础统计**: 用户可以查看基础统计数据，包括爬虫和任务页中的失败任务数、结果数.\n- **近实时任务信息**: 周期性（5 秒）向服务器轮训数据来实现近实时查看任务信息.\n- **定时任务**: 利用 apscheduler 实现定时任务，允许用户设置类似 Cron 的定时任务.\n\n# 0.1 (2019-04-17)\n\n- **首次发布**\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# 0.6.0 (TBC)\n\n(TBC)\n\n# 0.5.1 (2020-07-31)\n\n### Features / Enhancement\n- **Added error message details**.\n- **Added Golang programming language support**.\n- **Added web driver installation scripts for Chrome Driver and Firefox**.\n- **Support system tasks**. A \"system task\" is similar to normal spider task, it allows users to view logs of general tasks such as installing languages.\n- **Changed methods of installing languages from RPC to system tasks**.\n\n### Bug Fixes\n- **Fixed first download repo 500 error in Spider Market page**. [#808](https://github.com/crawlab-team/crawlab/issues/808)\n- **Fixed some translation issues**.\n- **Fixed 500 error in task detail page**. [#810](https://github.com/crawlab-team/crawlab/issues/810)\n- **Fixed password reset issue**. [#811](https://github.com/crawlab-team/crawlab/issues/811)\n- **Fixed unable to download CSV issue**. [#812](https://github.com/crawlab-team/crawlab/issues/812)\n- **Fixed unable to install node.js issue**. [#813](https://github.com/crawlab-team/crawlab/issues/813)\n- **Fixed disabled status for batch adding schedules**. [#814](https://github.com/crawlab-team/crawlab/issues/814)\n\n# 0.5.0 (2020-07-19)\n### Features / Enhancement\n- **Spider Market**. Allow users to download open-source spiders into Crawlab.\n- **Batch actions**. Allow users to interact with Crawlab in batch fashions, e.g. batch run tasks, batch delete spiders, ect.\n- **Migrate MongoDB driver to `MongoDriver`**.\n- **Refactor and optmize node-related logics**.\n- **Change default `task.workers` to 16**.\n- **Change default nginx `client_max_body_size` to 200m**.\n- **Support writing logs to ElasticSearch**.\n- **Display error details in Scrapy page**.\n- **Removed Challenge page**.\n- **Moved Feedback and Dislaimer pages to navbar**.\n\n### Bug Fixes\n- **Fixed log not expiring issue because of failure to create TTL index**.\n- **Set default log expire duration to 1 day**.\n- **`task_id` index not created**.\n- **`docker-compose.yml` fix**.\n- **Fixed 404 page**.\n- **Fixed unable to create worker node before master node issue**.\n\n# 0.4.10 (2020-04-21)\n### Features / Enhancement\n- **Enhanced Log Management**. Centralizing log storage in MongoDB, reduced the dependency of PubSub, allowing log error detection.\n- **API Token**. Allow users to generate API tokens and use them to integrate into their own systems.\n- **Web Hook**. Trigger a Web Hook http request to pre-defined URL when a task starts or finishes.\n- **Auto Install Dependencies**. Allow installing dependencies automatically from `requirements.txt` or `package.json`.\n- **Auto Results Collection**. Set results collection to `results_<spider_name>` if it is not set.\n- **Optimized Project List**. Not display \"No Project\" item in the project list.\n- **Upgrade Node.js**. Upgrade Node.js version from v8.12 to v10.19.\n- **Add Run Button in Schedule Page**. Allow users to manually run task in Schedule Page.\n\n### Bug Fixes\n- **Cannot register**. [#670](https://github.com/crawlab-team/crawlab/issues/670)\n- **Spider schedule tab cron expression shows second**. [#678](https://github.com/crawlab-team/crawlab/issues/678)\n- **Missing daily stats in spider**. [#684](https://github.com/crawlab-team/crawlab/issues/684)\n- **Results count not update in time**. [#689](https://github.com/crawlab-team/crawlab/issues/689)\n\n# 0.4.9 (2020-03-31)\n### Features / Enhancement\n- **Challenges**. Users can achieve different challenges based on their actions.\n- **More Advanced Access Control**. More granular access control, e.g. normal users can only view/manage their own spiders/projects and admin users can view/manage all spiders/projects.\n- **Feedback**. Allow users to send feedbacks and ratings to Crawlab team.\n- **Better Home Page Metrics**. Optimized metrics display on home page.\n- **Configurable Spiders Converted to Customized Spiders**. Allow users to convert their configurable spiders into customized spiders which are also Scrapy spiders.\n- **View Tasks Triggered by Schedule**. Allow users to view tasks triggered by a schedule. [#648](https://github.com/crawlab-team/crawlab/issues/648)\n- **Support Results De-Duplication**. Allow users to configure de-duplication of results. [#579](https://github.com/crawlab-team/crawlab/issues/579)\n- **Support Task Restart**. Allow users to re-run historical tasks.\n\n### Bug Fixes\n- **CLI unable to use on Windows**. [#580](https://github.com/crawlab-team/crawlab/issues/580)\n- **Re-upload error**. [#643](https://github.com/crawlab-team/crawlab/issues/643) [#640](https://github.com/crawlab-team/crawlab/issues/640)\n- **Upload missing folders**. [#646](https://github.com/crawlab-team/crawlab/issues/646)\n- **Unable to add schedules in Spider Page**.\n\n# 0.4.8 (2020-03-11)\n### Features / Enhancement\n- **Support Installations of More Programming Languages**. Now users can install or pre-install more programming languages including Java, .Net Core and PHP.\n- **Installation UI Optimization**. Users can better view and manage installations on Node List page.\n- **More Git Support**. Allow users to view Git Commits record, and allow checkout to corresponding commit.\n- **Support Hostname Node Registration Type**. Users can set hostname as the node key as the unique identifier.\n- **RPC Support**. Added RPC support to better manage node communication.\n- **Run On Master Switch**. Users can determine whether to run tasks on master. If not, all tasks will be run only on worker nodes.\n- **Disabled Tutorial by Default**.\n- **Added Related Documentation Sidebar**.\n- **Loading Page Optimization**.\n\n### Bug Fixes\n- **Duplicated Nodes**. [#391](https://github.com/crawlab-team/crawlab/issues/391)\n- **Duplicated Spider Upload**. [#603](https://github.com/crawlab-team/crawlab/issues/603)\n- **Failure in dependencies installation results in unusable dependency installation functionalities.**. [#609](https://github.com/crawlab-team/crawlab/issues/609)\n- **Create Tasks for Offline Nodes**. [#622](https://github.com/crawlab-team/crawlab/issues/622)\n\n# 0.4.7 (2020-02-24)\n### Features / Enhancement\n- **Better Support for Scrapy**. Spiders identification, `settings.py` configuration, log level selection, spider selection. [#435](https://github.com/crawlab-team/crawlab/issues/435)\n- **Git Sync**. Allow users to sync git projects to Crawlab.\n- **Long Task Support**. Users can add long-task spiders which is supposed to run without finishing. [#425](https://github.com/crawlab-team/crawlab/issues/425)\n- **Spider List Optimization**. Tasks count by status, tasks detail popup, legend. [#425](https://github.com/crawlab-team/crawlab/issues/425)\n- **Upgrade Check**. Check latest version and notifiy users to upgrade.\n- **Spiders Batch Operation**. Allow users to run/stop spider tasks and delete spiders in batches.\n- **Copy Spiders**. Allow users to copy an existing spider to create a new one.\n- **Wechat Group QR Code**.\n\n### Bug Fixes\n- **Schedule Spider Selection Issue**. Fields not responding to spider change.\n- **Cron Jobs Conflict**. Possible bug when two spiders set to the same time of their cron jobs. [#515](https://github.com/crawlab-team/crawlab/issues/515) [#565](https://github.com/crawlab-team/crawlab/issues/565)\n- **Task Log Issue**. Different tasks write to the same log file if triggered at the same time. [#577](https://github.com/crawlab-team/crawlab/issues/577)\n- **Task List Filter Options Incomplete**.\n\n# 0.4.6 (2020-02-13)\n### Features / Enhancement\n- **SDK for Node.js**. Users can apply SDK in their Node.js spiders.\n- **Log Management Optimization**. Log search, error highlight, auto-scrolling.\n- **Task Execution Process Optimization**. Allow users to be redirected to task detail page after triggering a task.\n- **Task Display Optimization**. Added \"Param\" in the Latest Tasks table in the spider detail page. [#295](https://github.com/crawlab-team/crawlab/issues/295)\n- **Spider List Optimization**. Added \"Update Time\" and \"Create Time\" in spider list page.\n- **Page Loading Placeholder**. \n\n### Bug Fixes\n- **Lost Focus in Schedule Configuration**. [#519](https://github.com/crawlab-team/crawlab/issues/519)\n- **Unable to Upload Spider using CLI**. [#524](https://github.com/crawlab-team/crawlab/issues/524)\n\n# 0.4.5 (2020-02-03)\n### Features / Enhancement\n- **Interactive Tutorial**. Guide users through the main functionalities of Crawlab.\n- **Global Environment Variables**. Allow users to set global environment variables, which will be passed into all spider programs. [#177](https://github.com/crawlab-team/crawlab/issues/177)\n- **Project**. Allow users to link spiders to projects. [#316](https://github.com/crawlab-team/crawlab/issues/316)\n- **Demo Spiders**. Added demo spiders when Crawlab is initialized. [#379](https://github.com/crawlab-team/crawlab/issues/379)\n- **User Admin Optimization**. Restrict privilleges of admin users. [#456](https://github.com/crawlab-team/crawlab/issues/456)\n- **Setting Page Optimization**.\n- **Task Results Optimization**.\n\n### Bug Fixes\n- **Unable to find spider file error**. [#485](https://github.com/crawlab-team/crawlab/issues/485)\n- **Click delete button results in redirect**. [#480](https://github.com/crawlab-team/crawlab/issues/480)\n- **Unable to create files in an empty spider**. [#479](https://github.com/crawlab-team/crawlab/issues/479)\n- **Download results error**. [#465](https://github.com/crawlab-team/crawlab/issues/465)\n- **crawlab-sdk CLI error**. [#458](https://github.com/crawlab-team/crawlab/issues/458)\n- **Page refresh issue**. [#441](https://github.com/crawlab-team/crawlab/issues/441)\n- **Results not support JSON**. [#202](https://github.com/crawlab-team/crawlab/issues/202)\n- **Getting all spider after deleting a spider**.\n- **i18n warning**.\n\n# 0.4.4 (2020-01-17)\n### Features / Enhancement\n- **Email Notification**. Allow users to send email notifications.\n- **DingTalk Robot Notification**. Allow users to send DingTalk Robot notifications.\n- **Wechat Robot Notification**. Allow users to send Wechat Robot notifications.\n- **API Address Optimization**. Added relative URL path in frontend so that users don't have to specify `CRAWLAB_API_ADDRESS` explicitly.\n- **SDK Compatiblity**. Allow users to integrate Scrapy or general spiders with Crawlab SDK.\n- **Enhanced File Management**. Added tree-like file sidebar to allow users to edit files much more easier.\n- **Advanced Schedule Cron**. Allow users to edit schedule cron with visualized cron editor.\n\n### Bug Fixes\n- **`nil retuened` error**.\n- **Error when using HTTPS**.\n- **Unable to run Configurable Spiders on Spider List**.\n- **Missing form validation before uploading spider files**.\n\n# 0.4.3 (2020-01-07)\n\n### Features / Enhancement\n- **Dependency Installation**. Allow users to install/uninstall dependencies and add programming languages (Node.js only for now) on the platform web interface.\n- **Pre-install Programming Languages in Docker**. Allow Docker users to set `CRAWLAB_SERVER_LANG_NODE` as `Y` to pre-install `Node.js` environments.\n- **Add Schedule List in Spider Detail Page**. Allow users to view / add / edit schedule cron jobs in the spider detail page. [#360](https://github.com/crawlab-team/crawlab/issues/360)\n- **Align Cron Expression with Linux**. Change the expression of 6 elements to 5 elements as aligned in Linux.\n- **Enable/Disable Schedule Cron**. Allow users to enable/disable the schedule jobs. [#297](https://github.com/crawlab-team/crawlab/issues/297)\n- **Better Task Management**. Allow users to batch delete tasks. [#341](https://github.com/crawlab-team/crawlab/issues/341)\n- **Better Spider Management**. Allow users to sort and filter spiders in the spider list page.\n- **Added Chinese `CHANGELOG`**.\n- **Added Github Star Button at Nav Bar**.\n\n### Bug Fixes\n- **Schedule Cron Task Issue**. [#423](https://github.com/crawlab-team/crawlab/issues/423)\n- **Upload Spider Zip File Issue**. [#403](https://github.com/crawlab-team/crawlab/issues/403) [#407](https://github.com/crawlab-team/crawlab/issues/407)\n- **Exit due to Network Failure**. [#340](https://github.com/crawlab-team/crawlab/issues/340)\n- **Cron Jobs not Running Correctly**\n- **Schedule List Columns Mis-positioned**\n- **Clicking Refresh Button Redirected to 404 Page**\n\n# 0.4.2 (2019-12-26)\n### Features / Enhancement\n- **Disclaimer**. Added page for Disclaimer.\n- **Call API to fetch version**. [#371](https://github.com/crawlab-team/crawlab/issues/371)\n- **Configure to allow user registration**. [#346](https://github.com/crawlab-team/crawlab/issues/346)\n- **Allow adding new users**.\n- **More Advanced File Management**. Allow users to add / edit / rename / delete files. [#286](https://github.com/crawlab-team/crawlab/issues/286)\n- **Optimized Spider Creation Process**. Allow users to create an empty customized spider before uploading the zip file.\n- **Better Task Management**. Allow users to filter tasks by selecting through certian criterions. [#341](https://github.com/crawlab-team/crawlab/issues/341)\n\n### Bug Fixes\n- **Duplicated nodes**. [#391](https://github.com/crawlab-team/crawlab/issues/391)\n- **\"mongodb no reachable\" error**. [#373](https://github.com/crawlab-team/crawlab/issues/373)\n\n# 0.4.1 (2019-12-13)\n### Features / Enhancement\n- **Spiderfile Optimization**. Stages changed from dictionary to array. [#358](https://github.com/crawlab-team/crawlab/issues/358)\n- **Baidu Tongji Update**.\n\n### Bug Fixes\n- **Unable to display schedule tasks**. [#353](https://github.com/crawlab-team/crawlab/issues/353)\n- **Duplicate node registration**. [#334](https://github.com/crawlab-team/crawlab/issues/334)\n\n# 0.4.0 (2019-12-06)\n### Features / Enhancement\n- **Configurable Spider**. Allow users to add spiders using *Spiderfile* to configure crawling rules.\n- **Execution Mode**. Allow users to select 3 modes for task execution: *All Nodes*, *Selected Nodes* and *Random*.\n\n### Bug Fixes\n- **Task accidentally killed**. [#306](https://github.com/crawlab-team/crawlab/issues/306)\n- **Documentation fix**. [#301](https://github.com/crawlab-team/crawlab/issues/258) [#301](https://github.com/crawlab-team/crawlab/issues/258)\n- **Direct deploy incompatible with Windows**. [#288](https://github.com/crawlab-team/crawlab/issues/288)\n- **Log files lost**. [#269](https://github.com/crawlab-team/crawlab/issues/269)\n\n# 0.3.5 (2019-10-28)\n### Features / Enhancement\n- **Graceful Showdown**. [detail](https://github.com/crawlab-team/crawlab/commit/63fab3917b5a29fd9770f9f51f1572b9f0420385)\n- **Node Info Optimization**. [detail](https://github.com/crawlab-team/crawlab/commit/973251a0fbe7a2184ac0da09e0404a17c736aee7)\n- **Append System Environment Variables to Tasks**. [detail](https://github.com/crawlab-team/crawlab/commit/4ab4892471965d6342d30385578ca60dc51f8ad3)\n- **Auto Refresh Task Log**. [detail](https://github.com/crawlab-team/crawlab/commit/4ab4892471965d6342d30385578ca60dc51f8ad3)\n- **Enable HTTPS Deployment**. [detail](https://github.com/crawlab-team/crawlab/commit/5d8f6f0c56768a6e58f5e46cbf5adff8c7819228)\n\n### Bug Fixes\n- **Unable to fetch spider list info in schedule jobs**. [detail](https://github.com/crawlab-team/crawlab/commit/311f72da19094e3fa05ab4af49812f58843d8d93)\n- **Unable to fetch node info from worker nodes**. [detail](https://github.com/crawlab-team/crawlab/commit/6af06efc17685a9e232e8c2b5fd819ec7d2d1674)\n- **Unable to select node when trying to run spider tasks**. [detail](https://github.com/crawlab-team/crawlab/commit/31f8e03234426e97aed9b0bce6a50562f957edad)\n- **Unable to fetch result count when result volume is large**. [#260](https://github.com/crawlab-team/crawlab/issues/260)\n- **Node issue in schedule tasks**. [#244](https://github.com/crawlab-team/crawlab/issues/244)\n\n\n# 0.3.1 (2019-08-25)\n### Features / Enhancement\n- **Docker Image Optimization**. Split docker further into master, worker, frontend with alpine image.\n- **Unit Tests**. Covered part of the backend code with unit tests.\n- **Frontend Optimization**. Login page, button size, hints of upload UI optimization. \n- **More Flexible Node Registration**. Allow users to pass a variable as key for node registration instead of MAC by default.\n\n### Bug Fixes\n- **Uploading Large Spider Files Error**. Memory crash issue when uploading large spider files. [#150](https://github.com/crawlab-team/crawlab/issues/150)\n- **Unable to Sync Spiders**. Fixes through increasing level of write permission when synchronizing spider files. [#114](https://github.com/crawlab-team/crawlab/issues/114)\n- **Spider Page Issue**. Fixes through removing the field \"Site\". [#112](https://github.com/crawlab-team/crawlab/issues/112)\n- **Node Display Issue**. Nodes do not display correctly when running docker containers on multiple machines. [#99](https://github.com/crawlab-team/crawlab/issues/99)\n\n# 0.3.0 (2019-07-31)\n### Features / Enhancement\n- **Golang Backend**: Refactored code from Python backend to Golang, much more stability and performance.\n- **Node Network Graph**: Visualization of node typology.\n- **Node System Info**: Available to see system info including OS, CPUs and executables.\n- **Node Monitoring Enhancement**: Nodes are monitored and registered through Redis.\n- **File Management**: Available to edit spider files online, including code highlight.\n- **Login/Regiser/User Management**: Require users to login to use Crawlab, allow user registration and user management, some role-based authorization.\n- **Automatic Spider Deployment**: Spiders are deployed/synchronized to all online nodes automatically.\n- **Smaller Docker Image**: Slimmed Docker image and reduced Docker image size from 1.3G to \\~700M by applying Multi-Stage Build.\n\n### Bug Fixes\n- **Node Status**. Node status does not change even though it goes offline actually. [#87](https://github.com/tikazyq/crawlab/issues/87) \n- **Spider Deployment Error**. Fixed through Automatic Spider Deployment [#83](https://github.com/tikazyq/crawlab/issues/83) \n- **Node not showing**. Node not able to show online [#81](https://github.com/tikazyq/crawlab/issues/81) \n- **Cron Job not working**. Fixed through new Golang backend [#64](https://github.com/tikazyq/crawlab/issues/64) \n- **Flower Error**. Fixed through new Golang backend [#57](https://github.com/tikazyq/crawlab/issues/57) \n\n# 0.2.4 (2019-07-07)\n### Features / Enhancement\n- **Documentation**: Better and much more detailed documentation.\n- **Better Crontab**: Make crontab expression through crontab UI.\n- **Better Performance**: Switched from native flask engine to `gunicorn`. [#78](https://github.com/tikazyq/crawlab/issues/78)\n\n### Bugs Fixes\n- **Deleting Spider**. Deleting a spider does not only remove record in db but also removing related folder, tasks and schedules. [#69](https://github.com/tikazyq/crawlab/issues/69)\n- **MongoDB Auth**. Allow user to specify `authenticationDatabase` to connect to `mongodb`. [#68](https://github.com/tikazyq/crawlab/issues/68)\n- **Windows Compatibility**. Added `eventlet` to `requirements.txt`. [#59](https://github.com/tikazyq/crawlab/issues/59)\n\n\n# 0.2.3 (2019-06-12)\n### Features / Enhancement\n- **Docker**: User can run docker image to speed up deployment.\n- **CLI**: Allow user to use command-line interface to execute Crawlab programs.\n- **Upload Spider**: Allow user to upload Customized Spider to Crawlab.\n- **Edit Fields on Preview**: Allow user to edit fields when previewing data in Configurable Spider.\n\n### Bugs Fixes\n- **Spiders Pagination**. Fixed pagination problem in spider page.\n\n# 0.2.2 (2019-05-30)\n### Features / Enhancement\n- **Automatic Extract Fields**: Automatically extracting data fields in list pages for configurable spider.\n- **Download Results**: Allow downloading results as csv file.\n- **Baidu Tongji**: Allow users to choose to report usage info to Baidu Tongji.\n\n### Bug Fixes\n- **Results Page Pagination**: Fixes so the pagination of results page is working correctly. [#45](https://github.com/tikazyq/crawlab/issues/45)\n- **Schedule Tasks Duplicated Triggers**: Set Flask DEBUG as False so that schedule tasks won't trigger twice. [#32](https://github.com/tikazyq/crawlab/issues/32)\n- **Frontend Environment**: Added `VUE_APP_BASE_URL` as production mode environment variable so the API call won't be always `localhost` in deployed env [#30](https://github.com/tikazyq/crawlab/issues/30)\n\n# 0.2.1 (2019-05-27)\n- **Configurable Spider**: Allow users to create a spider to crawl data without coding.\n\n# 0.2 (2019-05-10)\n\n- **Advanced Stats**: Advanced analytics in spider detail view.\n- **Sites Data**: Added sites list (China) for users to check info such as robots.txt and home page response time/code.\n\n# 0.1.1 (2019-04-23)\n\n- **Basic Stats**: User can view basic stats such as number of failed tasks and number of results in spiders and tasks pages.\n- **Near Realtime Task Info**: Periodically (5 sec) polling data from server to allow view task info in a near-realtime fashion.\n- **Scheduled Tasks**: Allow users to set up cron-like scheduled/periodical tasks using apscheduler.\n\n# 0.1 (2019-04-17)\n\n- **Initial Release**\n"
  },
  {
    "path": "DISCLAIMER-zh.md",
    "content": "# 免责声明\n\n本免责及隐私保护声明(以下简称“免责声明”或“本声明”)适用于 Crawlab 开发组 (以下简称“开发组”)研发的系列软件(以下简称\"Crawlab\") 在您阅读本声明后若不同意此声明中的任何条款，或对本声明存在质疑，请立刻停止使用我们的软件。若您已经开始或正在使用 Crawlab，则表示您已阅读并同意本声明的所有条款之约定。\n\n1. 总则：您通过安装 Crawlab 并使用 Crawlab 提供的服务与功能即表示您已经同意与开发组立本协议。开发组可随时执行全权决定更改“条款”。经修订的“条款”一经在 Github 免责声明页面上公布后，立即自动生效。\n2. 本产品是基于Golang的分布式爬虫管理平台，支持Python、NodeJS、Go、Java、PHP等多种编程语言以及多种爬虫框架。\n3. 一切因使用 Crawlab 而引致之任何意外、疏忽、合约毁坏、诽谤、版权或知识产权侵犯及其所造成的损失(包括在非官方站点下载 Crawlab 而感染电脑病毒)，Crawlab 开发组概不负责，亦不承担任何法律责任。\n4. 用户对使用 Crawlab 自行承担风险，我们不做任何形式的保证， 因网络状况、通讯线路等任何技术原因而导致用户不能正常升级更新，我们也不承担任何法律责任。\n5. 用户使用 Crawlab 对目标网站进行抓取时需遵从《网络安全法》等与爬虫相关的法律法规，切勿擅自采集公民个人信息、用 DDoS 等方式造成目标网站瘫痪、不遵从目标网站的 robots.txt 协议等非法手段。\n6. Crawlab 尊重并保护所有用户的个人隐私权，不会窃取任何用户计算机中的信息。\n7. 系统的版权：Crawlab 开发组对所有开发的或合作开发的产品拥有知识产权，著作权，版权和使用权，这些产品受到适用的知识产权、版权、商标、服务商标、专利或其他法律的保护。\n8. 传播:任何公司或个人在网络上发布，传播我们软件的行为都是允许的，但因公司或个人传播软件可能造成的任何法律和刑事事件 Crawlab 开发组不负任何责任。\n"
  },
  {
    "path": "DISCLAIMER.md",
    "content": "# Disclaimer\n\nThis Disclaimer and privacy protection statement (hereinafter referred to as \"disclaimer statement\" or \"this statement\") is applicable to the series of software (hereinafter referred to as \"crawlab\") developed by crawlab development group (hereinafter referred to as \"development group\") after you read this statement, if you do not agree with any terms in this statement or have doubts about this statement, please stop using our software immediately. If you have started or are using crawlab, you have read and agree to all terms of this statement.\n\n1. General: by installing crawlab and using the services and functions provided by crawlab, you have agreed to establish this agreement with the development team. The developer group may at any time change the terms at its sole discretion. The amended \"terms\" shall take effect automatically as soon as they are published on the GitHub disclaimer page.\n2. This product is a distributed crawler management platform based on golang, supporting python, nodejs, go, Java, PHP and other programming languages as well as a variety of crawler frameworks.\n3. The development team of crawlab shall not be responsible for any accident, negligence, contract damage, defamation, copyright or intellectual property infringement caused by the use of crawlab and any loss caused by it (including computer virus infection caused by downloading crawlab on the unofficial site), and shall not bear any legal responsibility.\n4. The user shall bear the risk of using crawlab by himself, we do not make any form of guarantee, and we will not bear any legal responsibility for the user's failure to upgrade and update normally due to any technical reasons such as network condition and communication line.\n5. When users use crawlab to grab the target website, they need to comply with the laws and regulations related to crawlers, such as the network security law. Do not collect personal information of citizens without authorization, cause the target website to be paralyzed by DDoS, or fail to comply with the robots.txt protocol and other illegal means of the target website.\n6. Crawlab respects and protects the personal privacy of all users and will not steal any information from users' computers.\n7. Copyright of the system: Crawlab development team owns the intellectual property rights, copyrights, copyrights and use rights for all developed or jointly developed products, which are protected by applicable intellectual property rights, copyrights, trademarks, service trademarks, patents or other laws.\n8. Communication: any company or individual who publishes or disseminates our software on the Internet is allowed, but the crawlab development team shall not be responsible for any legal and criminal events that may be caused by the company or individual disseminating the software.\n"
  },
  {
    "path": "Dockerfile",
    "content": "FROM crawlabteam/crawlab-backend:latest AS backend-build\n\nFROM crawlabteam/crawlab-frontend:latest AS frontend-build\n\nFROM crawlabteam/crawlab-public-plugins:latest AS public-plugins-build\n\n# images\nFROM crawlabteam/crawlab-base:latest\n\n# add files\nCOPY ./backend/conf /app/backend/conf\nCOPY ./nginx /app/nginx\nCOPY ./bin /app/bin\n\n# copy backend files\nRUN mkdir -p /opt/bin\nCOPY --from=backend-build /go/bin/crawlab /opt/bin\nRUN cp /opt/bin/crawlab /usr/local/bin/crawlab-server\n\n# copy frontend files\nCOPY --from=frontend-build /app/dist /app/dist\n\n# copy public-plugins files\nCOPY --from=public-plugins-build /app/plugins /app/plugins\n\n# copy nginx config files\nCOPY ./nginx/crawlab.conf /etc/nginx/conf.d\n\n# start backend\nCMD [\"/bin/bash\", \"/app/bin/docker-init.sh\"]\n"
  },
  {
    "path": "LICENSE",
    "content": "BSD 3-Clause License\n\nCopyright (c) 2020, Crawlab Team\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "README-zh.md",
    "content": "# Crawlab\n\n<p>\n  <a href=\"https://github.com/crawlab-team/crawlab/actions/workflows/docker-crawlab.yml\" target=\"_blank\">\n    <img src=\"https://github.com/crawlab-team/crawlab/workflows/Docker%20Image%20CI:%20crawlab/badge.svg\">\n  </a>\n  <a href=\"https://hub.docker.com/r/tikazyq/crawlab\" target=\"_blank\">\n    <img src=\"https://img.shields.io/docker/pulls/tikazyq/crawlab?label=pulls&logo=docker\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/releases\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/release/crawlab-team/crawlab.svg?logo=github\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/commits/main\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/last-commit/crawlab-team/crawlab.svg\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/issues?q=is%3Aissue+is%3Aopen+label%3Abug\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/issues/crawlab-team/crawlab/bug.svg?label=bugs&color=red\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/issues/crawlab-team/crawlab/enhancement.svg?label=enhancements&color=cyan\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/blob/main/LICENSE\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/license/crawlab-team/crawlab.svg\">\n  </a>\n</p>\n\n中文 | [English](https://github.com/crawlab-team/crawlab)\n\n[安装](#安装) | [运行](#运行) | [截图](#截图) | [架构](#架构) | [集成](#与其他框架的集成) | [比较](#与其他框架比较) | [相关文章](#相关文章) | [社区&赞助](#社区--赞助) | [更新日志](https://github.com/crawlab-team/crawlab/blob/main/CHANGELOG-zh.md) | [免责声明](https://github.com/crawlab-team/crawlab/blob/main/DISCLAIMER-zh.md)\n\n基于Golang的分布式爬虫管理平台，支持Python、NodeJS、Go、Java、PHP等多种编程语言以及多种爬虫框架。\n\n[查看演示 Demo](https://demo.crawlab.cn) | [文档](https://docs.crawlab.cn/zh/)\n\n## 安装\n\n您可以参考这个[安装指南](https://docs.crawlab.cn/zh/guide/installation)。\n\n## 快速开始\n\n请打开命令行并执行下列命令。请保证您已经提前安装了 `docker-compose`。\n\n```bash\ngit clone https://github.com/crawlab-team/examples\ncd examples/docker/basic\ndocker-compose up -d\n```\n\n接下来，您可以看看 `docker-compose.yml` (包含详细配置参数)，以及参考 [文档](http://docs.crawlab.cn) 来查看更多信息。\n\n## 运行\n\n### Docker\n\n请用`docker-compose`来一键启动，甚至不用配置 MongoDB 数据库，**当然我们推荐这样做**。在当前目录中创建`docker-compose.yml`文件，输入以下内容。\n\n```yaml\nversion: '3.3'\nservices:\n  master: \n    image: crawlabteam/crawlab:latest\n    container_name: crawlab_example_master\n    environment:\n      CRAWLAB_NODE_MASTER: \"Y\"\n      CRAWLAB_MONGO_HOST: \"mongo\"\n    volumes:\n      - \"./.crawlab/master:/root/.crawlab\"\n    ports:    \n      - \"8080:8080\"\n    depends_on:\n      - mongo\n\n  worker01: \n    image: crawlabteam/crawlab:latest\n    container_name: crawlab_example_worker01\n    environment:\n      CRAWLAB_NODE_MASTER: \"N\"\n      CRAWLAB_GRPC_ADDRESS: \"master\"\n      CRAWLAB_FS_FILER_URL: \"http://master:8080/api/filer\"\n    volumes:\n      - \"./.crawlab/worker01:/root/.crawlab\"\n    depends_on:\n      - master\n\n  worker02: \n    image: crawlabteam/crawlab:latest\n    container_name: crawlab_example_worker02\n    environment:\n      CRAWLAB_NODE_MASTER: \"N\"\n      CRAWLAB_GRPC_ADDRESS: \"master\"\n      CRAWLAB_FS_FILER_URL: \"http://master:8080/api/filer\"\n    volumes:\n      - \"./.crawlab/worker02:/root/.crawlab\"\n    depends_on:\n      - master\n\n  mongo:\n    image: mongo:4.2\n    container_name: crawlab_example_mongo\n    restart: always\n```\n\n然后执行以下命令，Crawlab主节点、工作节点＋MongoDB 就启动了。打开`http://localhost:8080`就能看到界面。\n\n```bash\ndocker-compose up -d\n```\n\nDocker部署的详情，请见[相关文档](https://docs.crawlab.cn/zh/guide/installation/docker.html)。\n\n## 截图\n\n#### 登陆页\n\n![]( https://github.com/crawlab-team/images/blob/main/20210729/screenshot-login.png?raw=true)\n\n#### 主页\n\n![]( https://github.com/crawlab-team/images/blob/main/20210729/screenshot-home.png?raw=true)\n\n#### 节点列表\n\n![]( https://github.com/crawlab-team/images/blob/main/20210729/screenshot-node-list.png?raw=true)\n\n#### 爬虫列表\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-spider-list.png?raw=true)\n\n#### 爬虫概览\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-spider-detail-overview.png?raw=true)\n\n#### 爬虫文件\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-spider-detail-files.png?raw=true)\n\n#### 任务日志\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-task-detail-logs.png?raw=true)\n\n#### 任务结果\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-task-detail-data.png?raw=true)\n\n#### 定时任务\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-schedule-detail-overview.png?raw=true)\n\n## 架构\n\nCrawlab的架构包括了一个主节点（Master Node）和多个工作节点（Worker Node），以及 [SeaweedFS](https://github.com/chrislusf/seaweedfs) (分布式文件系统) 和 MongoDB 数据库。\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/crawlab-architecture-v0.6.png?raw=true)\n\n前端应用与主节点 (Master Node) 进行交互，主节点与其他模块（例如 MongoDB、SeaweedFS、工作节点）进行通信。主节点和工作节点 (Worker Nodes) 通过 [gRPC](https://grpc.io) (一种 RPC 框架) 进行通信。任务通过主节点上的任务调度器 (Task Scheduler) 进行调度分发，并被工作节点上的任务处理模块 (Task Handler) 接收，然后分配到任务执行器 (Task Runners) 中。任务执行器实际上是执行爬虫程序的进程，它可以通过 gRPC (内置于 SDK) 发送数据到其他数据源中，例如 MongoDB。\n\n### 主节点\n\n主节点是整个Crawlab架构的核心，属于Crawlab的中控系统。\n\n主节点主要负责以下功能:\n1. 爬虫任务调度\n2. 工作节点管理和通信\n3. 爬虫部署\n4. 前端以及API服务\n5. 执行任务（可以将主节点当成工作节点）\n\n主节点负责与前端应用进行通信，并将爬虫任务派发给工作节点。同时，主节点会同步（部署）爬虫到分布式文件系统 SeaweedFS，用于工作节点的文件同步。\n\n### 工作节点\n\n工作节点的主要功能是执行爬虫任务和储存抓取数据与日志，并且通过Redis的`PubSub`跟主节点通信。通过增加工作节点数量，Crawlab可以做到横向扩展，不同的爬虫任务可以分配到不同的节点上执行。\n\n### MongoDB\n\nMongoDB是Crawlab的运行数据库，储存有节点、爬虫、任务、定时任务等数据。任务队列也储存在 MongoDB 里。\n\n### SeaweedFS\n\nSeaweedFS 是开源分布式文件系统，由 [Chris Lu](https://github.com/chrislusf) 开发和维护。它能在分布式系统中有效稳定的储存和共享文件。在 Crawlab 中，SeaweedFS 主要用作文件同步和日志存储。\n\n### 前端\n\nFrontend app is built upon [Element-Plus](https://github.com/element-plus/element-plus), a popular [Vue 3](https://github.com/vuejs/vue-next)-based UI framework. It interacts with API hosted on the Master Node, and indirectly controls Worker Nodes. \n\n前端应用是基于 [Element-Plus](https://github.com/element-plus/element-plus) 构建的，它是基于 [Vue 3](https://github.com/vuejs/vue-next) 的 UI 框架。前端应用与主节点上的 API 进行交互，并间接控制工作节点。\n\n## 与其他框架的集成\n\n[Crawlab SDK](https://github.com/crawlab-team/crawlab-sdk) 提供了一些 `helper` 方法来让您的爬虫更好的集成到 Crawlab 中，例如保存结果数据到 Crawlab 中等等。\n\n### 集成 Scrapy\n\n在 `settings.py` 中找到 `ITEM_PIPELINES`（`dict` 类型的变量），在其中添加如下内容。\n\n```python\nITEM_PIPELINES = {\n    'crawlab.scrapy.pipelines.CrawlabPipeline': 888,\n}\n```\n\n然后，启动 Scrapy 爬虫，运行完成之后，您就应该能看到抓取结果出现在 **任务详情 -> 数据** 里。\n\n### 通用 Python 爬虫\n\n将下列代码加入到您爬虫中的结果保存部分。\n\n```python\n# 引入保存结果方法\nfrom crawlab import save_item\n\n# 这是一个结果，需要为 dict 类型\nresult = {'name': 'crawlab'}\n\n# 调用保存结果方法\nsave_item(result)\n```\n\n然后，启动爬虫，运行完成之后，您就应该能看到抓取结果出现在 **任务详情 -> 数据** 里。\n\n### 其他框架和语言\n\n爬虫任务实际上是通过 shell 命令执行的。任务 ID (Task ID) 作为环境变量 `CRAWLAB_TASK_ID` 被传入爬虫任务进程中，从而抓取的数据可以跟任务管理。\n\n## 与其他框架比较\n\n现在已经有一些爬虫管理框架了，因此为啥还要用Crawlab？\n\n因为很多现有当平台都依赖于Scrapyd，限制了爬虫的编程语言以及框架，爬虫工程师只能用scrapy和python。当然，scrapy是非常优秀的爬虫框架，但是它不能做一切事情。\n\nCrawlab使用起来很方便，也很通用，可以适用于几乎任何主流语言和框架。它还有一个精美的前端界面，让用户可以方便的管理和运行爬虫。\n\n|框架 | 技术 | 优点 | 缺点 | Github 统计数据 |\n|:---|:---|:---|-----| :---- |\n| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|不局限于 scrapy，可以运行任何语言和框架的爬虫，精美的 UI 界面，天然支持分布式爬虫，支持节点管理、爬虫管理、任务管理、定时任务、结果导出、数据统计、消息通知、可配置爬虫、在线编辑代码等功能|暂时不支持爬虫版本管理| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) |\n| [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|精美的 UI 界面，内置了 scrapy 日志解析器，有较多任务运行统计图表，支持节点管理、定时任务、邮件提醒、移动界面，算是 scrapy-based 中功能完善的爬虫管理平台|不支持 scrapy 以外的爬虫，Python Flask 为后端，性能上有一定局限性| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) |\n| [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy 是崔庆才大神开发的爬虫管理平台，安装部署非常简单，同样基于 scrapyd，有精美的 UI 界面，支持节点管理、代码编辑、可配置规则等功能|同样不支持 scrapy 以外的爬虫，而且据使用者反馈，1.0 版本有很多 bug，期待 2.0 版本会有一定程度的改进| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) |\n| [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|基于 scrapyd，开源版 Scrapyhub，非常简洁的 UI 界面，支持定时任务|可能有些过于简洁了，不支持分页，不支持节点管理，不支持 scrapy 以外的爬虫| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) |\n\n## 贡献者\n<a href=\"https://github.com/tikazyq\">\n  <img src=\"https://avatars3.githubusercontent.com/u/3393101?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/wo10378931\">\n  <img src=\"https://avatars2.githubusercontent.com/u/8297691?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/yaziming\">\n  <img src=\"https://avatars2.githubusercontent.com/u/54052849?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/hantmac\">\n  <img src=\"https://avatars2.githubusercontent.com/u/7600925?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/duanbin0414\">\n  <img src=\"https://avatars3.githubusercontent.com/u/50389867?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/zkqiang\">\n  <img src=\"https://avatars3.githubusercontent.com/u/32983588?s=460&u=83082ddc0a3020279374b94cce70f1aebb220b3d&v=4\" height=\"80\">\n</a>\n\n## JetBrains 支持\n\n<p align=\"center\">\n  <a href=\"https://www.jetbrains.com\" target=\"_blank\">\n    <img src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png\" height=\"360\">\n  </a>\n</p>\n\n## 社区\n\n如果您觉得Crawlab对您的日常开发或公司有帮助，请加作者微信 tikazyq1 并注明\"Crawlab\"，作者会将你拉入群。\n\n<p align=\"center\">\n    <img src=\"https://crawlab.oss-cn-hangzhou.aliyuncs.com/gitbook/qrcode.png\" height=\"360\">\n</p>\n"
  },
  {
    "path": "README.md",
    "content": "# Crawlab\n\n<p>\n  <a href=\"https://github.com/crawlab-team/crawlab/actions/workflows/docker-crawlab.yml\" target=\"_blank\">\n    <img src=\"https://github.com/crawlab-team/crawlab/workflows/Docker%20Image%20CI:%20crawlab/badge.svg\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/releases\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/release/crawlab-team/crawlab.svg?logo=github\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/commits/main\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/last-commit/crawlab-team/crawlab.svg\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/issues?q=is%3Aissue+is%3Aopen+label%3Abug\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/issues/crawlab-team/crawlab/bug.svg?label=bugs&color=red\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/issues/crawlab-team/crawlab/enhancement.svg?label=enhancements&color=cyan\">\n  </a>\n  <a href=\"https://github.com/crawlab-team/crawlab/blob/main/LICENSE\" target=\"_blank\">\n    <img src=\"https://img.shields.io/github/license/crawlab-team/crawlab.svg\">\n  </a>\n</p>\n\n[中文](https://github.com/crawlab-team/crawlab/blob/main/README-zh.md) | English\n\n[Installation](#installation) | [Run](#run) | [Screenshot](#screenshot) | [Architecture](#architecture) | [Integration](#integration-with-other-frameworks) | [Compare](#comparison-with-other-frameworks) | [Community & Sponsorship](#community--sponsorship) | [CHANGELOG](https://github.com/crawlab-team/crawlab/blob/main/CHANGELOG.md) | [Disclaimer](https://github.com/crawlab-team/crawlab/blob/main/DISCLAIMER.md)\n\nGolang-based distributed web crawler management platform, supporting various languages including Python, NodeJS, Go, Java, PHP and various web crawler frameworks including Scrapy, Puppeteer, Selenium.\n\n[Demo](https://demo.crawlab.cn) | [Documentation](https://docs.crawlab.cn/en/)\n\n## Installation\n\nYou can follow the [installation guide](https://docs.crawlab.cn/en/guide/installation/).\n\n## Quick Start\n\nPlease open the command line prompt and execute the command below. Make sure you have installed `docker-compose` in advance.\n\n```bash\ngit clone https://github.com/crawlab-team/examples\ncd examples/docker/basic\ndocker-compose up -d\n```\n\nNext, you can look into the `docker-compose.yml` (with detailed config params) and the [Documentation](http://docs.crawlab.cn/en/) for further information. \n\n## Run\n\n### Docker\n\nPlease use `docker-compose` to one-click to start up. By doing so, you don't even have to configure MongoDB database. Create a file named `docker-compose.yml` and input the code below.\n\n\n```yaml\nversion: '3.3'\nservices:\n  master: \n    image: crawlabteam/crawlab:latest\n    container_name: crawlab_example_master\n    environment:\n      CRAWLAB_NODE_MASTER: \"Y\"\n      CRAWLAB_MONGO_HOST: \"mongo\"\n    volumes:\n      - \"./.crawlab/master:/root/.crawlab\"\n    ports:    \n      - \"8080:8080\"\n    depends_on:\n      - mongo\n\n  worker01: \n    image: crawlabteam/crawlab:latest\n    container_name: crawlab_example_worker01\n    environment:\n      CRAWLAB_NODE_MASTER: \"N\"\n      CRAWLAB_GRPC_ADDRESS: \"master\"\n      CRAWLAB_FS_FILER_URL: \"http://master:8080/api/filer\"\n    volumes:\n      - \"./.crawlab/worker01:/root/.crawlab\"\n    depends_on:\n      - master\n\n  worker02: \n    image: crawlabteam/crawlab:latest\n    container_name: crawlab_example_worker02\n    environment:\n      CRAWLAB_NODE_MASTER: \"N\"\n      CRAWLAB_GRPC_ADDRESS: \"master\"\n      CRAWLAB_FS_FILER_URL: \"http://master:8080/api/filer\"\n    volumes:\n      - \"./.crawlab/worker02:/root/.crawlab\"\n    depends_on:\n      - master\n\n  mongo:\n    image: mongo:4.2\n    container_name: crawlab_example_mongo\n    restart: always\n```\n\nThen execute the command below, and Crawlab Master and Worker Nodes + MongoDB will start up. Open the browser and enter `http://localhost:8080` to see the UI interface.\n\n```bash\ndocker-compose up -d\n```\n\nFor Docker Deployment details, please refer to [relevant documentation](https://docs.crawlab.cn/en/guide/installation/docker.html).\n\n\n## Screenshot\n\n#### Login\n\n![]( https://github.com/crawlab-team/images/blob/main/20210729/screenshot-login.png?raw=true)\n\n#### Home Page\n\n![]( https://github.com/crawlab-team/images/blob/main/20210729/screenshot-home.png?raw=true)\n\n#### Node List\n\n![]( https://github.com/crawlab-team/images/blob/main/20210729/screenshot-node-list.png?raw=true)\n\n#### Spider List\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-spider-list.png?raw=true)\n\n#### Spider Overview\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-spider-detail-overview.png?raw=true)\n\n#### Spider Files\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-spider-detail-files.png?raw=true)\n\n#### Task Log\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-task-detail-logs.png?raw=true)\n\n#### Task Results\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-task-detail-data.png?raw=true)\n\n#### Cron Job\n\n![](https://github.com/crawlab-team/images/blob/main/20210729/screenshot-schedule-detail-overview.png?raw=true)\n\n## Architecture\n\nThe architecture of Crawlab is consisted of a master node, worker nodes, [SeaweedFS](https://github.com/chrislusf/seaweedfs) (a distributed file system) and MongoDB database. \n\n![](https://github.com/crawlab-team/images/blob/main/20210729/crawlab-architecture-v0.6.png?raw=true)\n\nThe frontend app interacts with the master node, which communicates with other components such as MongoDB, SeaweedFS and worker nodes. Master node and worker nodes communicate with each other via [gRPC](https://grpc.io) (a RPC framework). Tasks are scheduled by the task scheduler module in the master node, and received by the task handler module in worker nodes, which executes these tasks in task runners. Task runners are actually processes running spider or crawler programs, and can also send data through gRPC (integrated in SDK) to other data sources, e.g. MongoDB.\n\n### Master Node\n\nThe Master Node is the core of the Crawlab architecture. It is the center control system of Crawlab.\n\nThe Master Node provides below services:\n1. Task Scheduling;\n2. Worker Node Management and Communication;\n3. Spider Deployment;\n4. Frontend and API Services;\n5. Task Execution (you can regard the Master Node as a Worker Node)\n\nThe Master Node communicates with the frontend app, and send crawling tasks to Worker Nodes. In the mean time, the Master Node uploads (deploys) spiders to the distributed file system SeaweedFS, for synchronization by worker nodes.\n\n### Worker Node\n\nThe main functionality of the Worker Nodes is to execute crawling tasks and store results and logs, and communicate with the Master Node through gRPC. By increasing the number of Worker Nodes, Crawlab can scale horizontally, and different crawling tasks can be assigned to different nodes to execute.\n\n### MongoDB\n\nMongoDB is the operational database of Crawlab. It stores data of nodes, spiders, tasks, schedules, etc. Task queue is also stored in MongoDB.\n\n### SeaweedFS\n\nSeaweedFS is an open source distributed file system authored by [Chris Lu](https://github.com/chrislusf). It can robustly store and share files across a distributed system. In Crawlab, SeaweedFS mainly plays the role as file synchronization system and the place where task log files are stored. \n\n### Frontend\n\nFrontend app is built upon [Element-Plus](https://github.com/element-plus/element-plus), a popular [Vue 3](https://github.com/vuejs/vue-next)-based UI framework. It interacts with API hosted on the Master Node, and indirectly controls Worker Nodes. \n\n## Integration with Other Frameworks\n\n[Crawlab SDK](https://github.com/crawlab-team/crawlab-sdk) provides some `helper` methods to make it easier for you to integrate your spiders into Crawlab, e.g. saving results.\n\n### Scrapy\n\nIn `settings.py` in your Scrapy project, find the variable named `ITEM_PIPELINES` (a `dict` variable). Add content below.\n\n```python\nITEM_PIPELINES = {\n    'crawlab.scrapy.pipelines.CrawlabPipeline': 888,\n}\n```\n\nThen, start the Scrapy spider. After it's done, you should be able to see scraped results in **Task Detail -> Data**\n\n### General Python Spider\n\nPlease add below content to your spider files to save results.\n\n```python\n# import result saving method\nfrom crawlab import save_item\n\n# this is a result record, must be dict type\nresult = {'name': 'crawlab'}\n\n# call result saving method\nsave_item(result)\n```\n\nThen, start the spider. After it's done, you should be able to see scraped results in **Task Detail -> Data**\n\n### Other Frameworks / Languages\n\nA crawling task is actually executed through a shell command. The Task ID will be passed to the crawling task process in the form of environment variable named `CRAWLAB_TASK_ID`. By doing so, the data can be related to a task.\n\n## Comparison with Other Frameworks\n\nThere are existing spider management frameworks. So why use Crawlab? \n\nThe reason is that most of the existing platforms are depending on Scrapyd, which limits the choice only within python and scrapy. Surely scrapy is a great web crawl framework, but it cannot do everything. \n\nCrawlab is easy to use, general enough to adapt spiders in any language and any framework. It has also a beautiful frontend interface for users to manage spiders much more easily. \n\n|Framework | Technology | Pros | Cons | Github Stats |\n|:---|:---|:---|-----| :---- |\n| [Crawlab](https://github.com/crawlab-team/crawlab) | Golang + Vue|Not limited to Scrapy, available for all programming languages and frameworks. Beautiful UI interface. Naturally support distributed spiders. Support spider management, task management, cron job, result export, analytics, notifications, configurable spiders, online code editor, etc.|Not yet support spider versioning| ![](https://img.shields.io/github/stars/crawlab-team/crawlab) ![](https://img.shields.io/github/forks/crawlab-team/crawlab) |\n| [ScrapydWeb](https://github.com/my8100/scrapydweb) | Python Flask + Vue|Beautiful UI interface, built-in Scrapy log parser, stats and graphs for task execution, support node management, cron job, mail notification, mobile. Full-feature spider management platform.|Not support spiders other than Scrapy. Limited performance because of Python Flask backend.| ![](https://img.shields.io/github/stars/my8100/scrapydweb) ![](https://img.shields.io/github/forks/my8100/scrapydweb) |\n| [Gerapy](https://github.com/Gerapy/Gerapy) | Python Django + Vue|Gerapy is built by web crawler guru [Germey Cui](https://github.com/Germey). Simple installation and deployment. Beautiful UI interface. Support node management, code edit, configurable crawl rules, etc.|Again not support spiders other than Scrapy. A lot of bugs based on user feedback in v1.0. Look forward to improvement in v2.0| ![](https://img.shields.io/github/stars/Gerapy/Gerapy) ![](https://img.shields.io/github/forks/Gerapy/Gerapy) |\n| [SpiderKeeper](https://github.com/DormyMo/SpiderKeeper) | Python Flask|Open-source Scrapyhub. Concise and simple UI interface. Support cron job.|Perhaps too simplified, not support pagination, not support node management, not support spiders other than Scrapy.| ![](https://img.shields.io/github/stars/DormyMo/SpiderKeeper) ![](https://img.shields.io/github/forks/DormyMo/SpiderKeeper) |\n\n## Contributors\n<a href=\"https://github.com/tikazyq\">\n  <img src=\"https://avatars3.githubusercontent.com/u/3393101?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/wo10378931\">\n  <img src=\"https://avatars2.githubusercontent.com/u/8297691?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/yaziming\">\n  <img src=\"https://avatars2.githubusercontent.com/u/54052849?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/hantmac\">\n  <img src=\"https://avatars2.githubusercontent.com/u/7600925?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/duanbin0414\">\n  <img src=\"https://avatars3.githubusercontent.com/u/50389867?s=460&v=4\" height=\"80\">\n</a>\n<a href=\"https://github.com/zkqiang\">\n  <img src=\"https://avatars3.githubusercontent.com/u/32983588?s=460&u=83082ddc0a3020279374b94cce70f1aebb220b3d&v=4\" height=\"80\">\n</a>\n\n## Supported by JetBrains\n\n<p align=\"center\">\n  <a href=\"https://www.jetbrains.com\" target=\"_blank\">\n    <img src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png\" height=\"360\">\n  </a>\n</p>\n\n## Community\n\nIf you feel Crawlab could benefit your daily work or your company, please add the author's Wechat account noting \"Crawlab\" to enter the discussion group.\n\n<p align=\"center\">\n    <img src=\"https://crawlab.oss-cn-hangzhou.aliyuncs.com/gitbook/qrcode.png\" height=\"360\">\n</p>\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\n| Version | Supported          |\n| ------- | ------------------ |\n| 0.6.x   | :white_check_mark: |\n| 0.5.x   | :white_check_mark: |\n| < 0.5   | :x:                |\n\n## Reporting a Vulnerability\n\nIf you encounter a security vulnerability, please submit an issue with tag \"security\" and highlight the reasons and impact of the security vulnerability.\n"
  },
  {
    "path": "backend/.air.master.conf",
    "content": "# Config file for [Air](https://github.com/cosmtrek/air) in TOML format\n\n# Working directory\n# . or absolute path, please note that the directories following must be under root.\nroot = \".\"\ntmp_dir = \"/tmp\"\n\n[build]\n# Just plain old shell command. You could use `make` as well.\ncmd = \"go build -o ../tmp/main ./ \"\n# Binary file yields from `cmd`.\nbin = \"../tmp/main\"\n# Customize binary.\nfull_bin = \"../tmp/main master\"\n# Watch these filename extensions.\ninclude_ext = [\"go\", \"tpl\", \"tmpl\", \"html\"]\n# Ignore these filename extensions or directories.\nexclude_dir = [\"assets\", \"tmp\", \"vendor\", \"frontend/node_modules\"]\n# Watch these directories if you specified.\ninclude_dir = [\"../libs\"]\n# Exclude files.\nexclude_file = []\n# This log file places in your tmp_dir.\nlog = \"air.log\"\n# It's not necessary to trigger build each time file changes if it's too frequent.\ndelay = 1000 # ms\n# Stop running old binary when build errors occur.\nstop_on_error = true\n# Send Interrupt signal before killing process (windows does not support this feature)\nsend_interrupt = false\n# Delay after sending Interrupt signal\nkill_delay = 500 # ms\n\n[log]\n# Show log time\ntime = false\n\n[color]\n# Customize each part's color. If no color found, use the raw app log.\nmain = \"magenta\"\nwatcher = \"cyan\"\nbuild = \"yellow\"\nrunner = \"green\"\n\n[misc]\n# Delete tmp directory on exit\nclean_on_exit = true"
  },
  {
    "path": "backend/.air.worker.conf",
    "content": "# Config file for [Air](https://github.com/cosmtrek/air) in TOML format\n\n# Working directory\n# . or absolute path, please note that the directories following must be under root.\nroot = \".\"\ntmp_dir = \"/tmp\"\n\n[build]\n# Just plain old shell command. You could use `make` as well.\ncmd = \"go build -o ../tmp/main ./ \"\n# Binary file yields from `cmd`.\nbin = \"../tmp/main\"\n# Customize binary.\nfull_bin = \"../tmp/main worker\"\n# Watch these filename extensions.\ninclude_ext = [\"go\", \"tpl\", \"tmpl\", \"html\"]\n# Ignore these filename extensions or directories.\nexclude_dir = [\"assets\", \"tmp\", \"vendor\", \"frontend/node_modules\"]\n# Watch these directories if you specified.\ninclude_dir = [\"../libs\"]\n# Exclude files.\nexclude_file = []\n# This log file places in your tmp_dir.\nlog = \"air.log\"\n# It's not necessary to trigger build each time file changes if it's too frequent.\ndelay = 1000 # ms\n# Stop running old binary when build errors occur.\nstop_on_error = true\n# Send Interrupt signal before killing process (windows does not support this feature)\nsend_interrupt = false\n# Delay after sending Interrupt signal\nkill_delay = 500 # ms\n\n[log]\n# Show log time\ntime = false\n\n[color]\n# Customize each part's color. If no color found, use the raw app log.\nmain = \"magenta\"\nwatcher = \"cyan\"\nbuild = \"yellow\"\nrunner = \"green\"\n\n[misc]\n# Delete tmp directory on exit\nclean_on_exit = true"
  },
  {
    "path": "backend/.editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = tab\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[{*.yml, *.yaml, *.json}]\nindent_size = 2\n"
  },
  {
    "path": "backend/Dockerfile",
    "content": "FROM golang:1.18 AS build\n\nWORKDIR /go/src/app\nCOPY . .\n\nENV GO111MODULE on\n#ENV GOPROXY https://goproxy.io\n\nRUN go mod tidy \\\n  && go install -v ./...\n\nFROM alpine:3.14\n\n# copy files\nCOPY --from=build /go/bin/crawlab /go/bin/crawlab\n"
  },
  {
    "path": "backend/README.md",
    "content": "# crawlab-backend\n\nBackend (Golang) for Crawlab"
  },
  {
    "path": "backend/Taskfile.yml",
    "content": "version: '3'\n\ntasks:\n  dev:\n    desc: Switch to dev mode for local development.\n    cmds:\n      - cp -f go.mod.dev go.mod\n\n  deploy:\n    desc: Switch to deploy mode for code publish.\n    cmds:\n      - echo 'not implemented'\n"
  },
  {
    "path": "backend/bin/semver.sh",
    "content": "#!/usr/bin/env bash\n# SPDX-License-Identifier: Apache-2.0\n\nset -o errexit -o nounset -o pipefail\n\nNAT='0|[1-9][0-9]*'\nALPHANUM='[0-9]*[A-Za-z-][0-9A-Za-z-]*'\nIDENT=\"$NAT|$ALPHANUM\"\nFIELD='[0-9A-Za-z-]+'\n\nSEMVER_REGEX=\"\\\n^[vV]?\\\n($NAT)\\\\.($NAT)\\\\.($NAT)\\\n(\\\\-(${IDENT})(\\\\.(${IDENT}))*)?\\\n(\\\\+${FIELD}(\\\\.${FIELD})*)?$\"\n\nPROG=semver\nPROG_VERSION=\"3.4.0\"\n\nUSAGE=\"\\\nUsage:\n  $PROG bump major <version>\n  $PROG bump minor <version>\n  $PROG bump patch <version>\n  $PROG bump prerel|prerelease [<prerel>] <version>\n  $PROG bump build <build> <version>\n  $PROG bump release <version>\n  $PROG get major <version>\n  $PROG get minor <version>\n  $PROG get patch <version>\n  $PROG get prerel|prerelease <version>\n  $PROG get build <version>\n  $PROG get release <version>\n  $PROG compare <version> <other_version>\n  $PROG diff <version> <other_version>\n  $PROG validate <version>\n  $PROG --help\n  $PROG --version\n\nArguments:\n  <version>  A version must match the following regular expression:\n             \\\"${SEMVER_REGEX}\\\"\n             In English:\n             -- The version must match X.Y.Z[-PRERELEASE][+BUILD]\n                where X, Y and Z are non-negative integers.\n             -- PRERELEASE is a dot separated sequence of non-negative integers and/or\n                identifiers composed of alphanumeric characters and hyphens (with\n                at least one non-digit). Numeric identifiers must not have leading\n                zeros. A hyphen (\\\"-\\\") introduces this optional part.\n             -- BUILD is a dot separated sequence of identifiers composed of alphanumeric\n                characters and hyphens. A plus (\\\"+\\\") introduces this optional part.\n\n  <other_version>  See <version> definition.\n\n  <prerel>  A string as defined by PRERELEASE above. Or, it can be a PRERELEASE\n            prototype string followed by a dot.\n\n  <build>   A string as defined by BUILD above.\n\nOptions:\n  -v, --version          Print the version of this tool.\n  -h, --help             Print this help message.\n\nCommands:\n  bump      Bump by one of major, minor, patch; zeroing or removing\n            subsequent parts. \\\"bump prerel\\\" (or its synonym \\\"bump prerelease\\\")\n            sets the PRERELEASE part and removes any BUILD part. A trailing dot\n            in the <prerel> argument introduces an incrementing numeric field\n            which is added or bumped. If no <prerel> argument is provided, an\n            incrementing numeric field is introduced/bumped. \\\"bump build\\\" sets\n            the BUILD part.  \\\"bump release\\\" removes any PRERELEASE or BUILD parts.\n            The bumped version is written to stdout.\n\n  get       Extract given part of <version>, where part is one of major, minor,\n            patch, prerel (alternatively: prerelease), build, or release.\n\n  compare   Compare <version> with <other_version>, output to stdout the\n            following values: -1 if <other_version> is newer, 0 if equal, 1 if\n            older. The BUILD part is not used in comparisons.\n\n  diff      Compare <version> with <other_version>, output to stdout the\n            difference between two versions by the release type (MAJOR, MINOR,\n            PATCH, PRERELEASE, BUILD).\n\n  validate  Validate if <version> follows the SEMVER pattern (see <version>\n            definition). Print 'valid' to stdout if the version is valid, otherwise\n            print 'invalid'.\n\nSee also:\n  https://semver.org -- Semantic Versioning 2.0.0\"\n\nfunction error {\n  echo -e \"$1\" >&2\n  exit 1\n}\n\nfunction usage_help {\n  error \"$USAGE\"\n}\n\nfunction usage_version {\n  echo -e \"${PROG}: $PROG_VERSION\"\n  exit 0\n}\n\n# normalize the \"part\" keywords to a canonical string.  At present,\n# only \"prerelease\" is normalized to \"prerel\".\n\nfunction normalize_part {\n    if [ \"$1\" == \"prerelease\" ]\n    then\n\techo \"prerel\"\n    else\n\techo \"$1\"\n    fi\n}\n\nfunction validate_version {\n  local version=$1\n  if [[ \"$version\" =~ $SEMVER_REGEX ]]; then\n    # if a second argument is passed, store the result in var named by $2\n    if [ \"$#\" -eq \"2\" ]; then\n      local major=${BASH_REMATCH[1]}\n      local minor=${BASH_REMATCH[2]}\n      local patch=${BASH_REMATCH[3]}\n      local prere=${BASH_REMATCH[4]}\n      local build=${BASH_REMATCH[8]}\n      eval \"$2=(\\\"$major\\\" \\\"$minor\\\" \\\"$patch\\\" \\\"$prere\\\" \\\"$build\\\")\"\n    else\n      echo \"$version\"\n    fi\n  else\n    error \"version $version does not match the semver scheme 'X.Y.Z(-PRERELEASE)(+BUILD)'. See help for more information.\"\n  fi\n}\n\nfunction is_nat {\n    [[ \"$1\" =~ ^($NAT)$ ]]\n}\n\nfunction is_null {\n    [ -z \"$1\" ]\n}\n\nfunction order_nat {\n    [ \"$1\" -lt \"$2\" ] && { echo -1 ; return ; }\n    [ \"$1\" -gt \"$2\" ] && { echo 1 ; return ; }\n    echo 0\n}\n\nfunction order_string {\n    [[ $1 < $2 ]] && { echo -1 ; return ; }\n    [[ $1 > $2 ]] && { echo 1 ; return ; }\n    echo 0\n}\n\n# given two (named) arrays containing NAT and/or ALPHANUM fields, compare them\n# one by one according to semver 2.0.0 spec. Return -1, 0, 1 if left array ($1)\n# is less-than, equal, or greater-than the right array ($2).  The longer array\n# is considered greater-than the shorter if the shorter is a prefix of the longer.\n#\nfunction compare_fields {\n    local l=\"$1[@]\"\n    local r=\"$2[@]\"\n    local leftfield=( \"${!l}\" )\n    local rightfield=( \"${!r}\" )\n    local left\n    local right\n\n    local i=$(( -1 ))\n    local order=$(( 0 ))\n\n    while true\n    do\n        [ $order -ne 0 ] && { echo $order ; return ; }\n\n        : $(( i++ ))\n        left=\"${leftfield[$i]}\"\n        right=\"${rightfield[$i]}\"\n\n        is_null \"$left\" && is_null \"$right\" && { echo 0  ; return ; }\n        is_null \"$left\"                     && { echo -1 ; return ; }\n                           is_null \"$right\" && { echo 1  ; return ; }\n\n        is_nat \"$left\" &&  is_nat \"$right\" && { order=$(order_nat \"$left\" \"$right\") ; continue ; }\n        is_nat \"$left\"                     && { echo -1 ; return ; }\n                           is_nat \"$right\" && { echo 1  ; return ; }\n                                              { order=$(order_string \"$left\" \"$right\") ; continue ; }\n    done\n}\n\n# shellcheck disable=SC2206     # checked by \"validate\"; ok to expand prerel id's into array\nfunction compare_version {\n  local order\n  validate_version \"$1\" V\n  validate_version \"$2\" V_\n\n  # compare major, minor, patch\n\n  local left=( \"${V[0]}\" \"${V[1]}\" \"${V[2]}\" )\n  local right=( \"${V_[0]}\" \"${V_[1]}\" \"${V_[2]}\" )\n\n  order=$(compare_fields left right)\n  [ \"$order\" -ne 0 ] && { echo \"$order\" ; return ; }\n\n  # compare pre-release ids when M.m.p are equal\n\n  local prerel=\"${V[3]:1}\"\n  local prerel_=\"${V_[3]:1}\"\n  local left=( ${prerel//./ } )\n  local right=( ${prerel_//./ } )\n\n  # if left and right have no pre-release part, then left equals right\n  # if only one of left/right has pre-release part, that one is less than simple M.m.p\n\n  [ -z \"$prerel\" ] && [ -z \"$prerel_\" ] && { echo 0  ; return ; }\n  [ -z \"$prerel\" ]                      && { echo 1  ; return ; }\n                      [ -z \"$prerel_\" ] && { echo -1 ; return ; }\n\n  # otherwise, compare the pre-release id's\n\n  compare_fields left right\n}\n\n# render_prerel -- return a prerel field with a trailing numeric string\n#                  usage: render_prerel numeric [prefix-string]\n#\nfunction render_prerel {\n    if [ -z \"$2\" ]\n    then\n        echo \"${1}\"\n    else\n        echo \"${2}${1}\"\n    fi\n}\n\n# extract_prerel -- extract prefix and trailing numeric portions of a pre-release part\n#                   usage: extract_prerel prerel prerel_parts\n#                   The prefix and trailing numeric parts are returned in \"prerel_parts\".\n#\nPREFIX_ALPHANUM='[.0-9A-Za-z-]*[.A-Za-z-]'\nDIGITS='[0-9][0-9]*'\nEXTRACT_REGEX=\"^(${PREFIX_ALPHANUM})*(${DIGITS})$\"\n\nfunction extract_prerel {\n    local prefix; local numeric;\n\n    if [[ \"$1\" =~ $EXTRACT_REGEX ]]\n    then                                        # found prefix and trailing numeric parts\n        prefix=\"${BASH_REMATCH[1]}\"\n        numeric=\"${BASH_REMATCH[2]}\"\n    else                                        # no numeric part\n        prefix=\"${1}\"\n        numeric=\n    fi\n\n    eval \"$2=(\\\"$prefix\\\" \\\"$numeric\\\")\"\n}\n\n# bump_prerel -- return the new pre-release part based on previous pre-release part\n#                and prototype for bump\n#                usage: bump_prerel proto previous\n#\nfunction bump_prerel {\n    local proto; local prev_prefix; local prev_numeric;\n\n    # case one: no trailing dot in prototype => simply replace previous with proto\n    if [[ ! ( \"$1\" =~ \\.$ ) ]]\n    then\n        echo \"$1\"\n        return\n    fi\n\n    proto=\"${1%.}\"                              # discard trailing dot marker from prototype\n\n    extract_prerel \"${2#-}\" prerel_parts        # extract parts of previous pre-release\n#   shellcheck disable=SC2154\n    prev_prefix=\"${prerel_parts[0]}\"\n    prev_numeric=\"${prerel_parts[1]}\"\n\n    # case two: bump or append numeric to previous pre-release part\n    if [ \"$proto\" == \"+\" ]                      # dummy \"+\" indicates no prototype argument provided\n    then\n        if [ -n \"$prev_numeric\" ]\n        then\n            : $(( ++prev_numeric ))             # previous pre-release is already numbered, bump it\n            render_prerel \"$prev_numeric\" \"$prev_prefix\"\n        else\n            render_prerel 1 \"$prev_prefix\"      # append starting number\n        fi\n        return\n    fi\n\n    # case three: set, bump, or append using prototype prefix\n    if [  \"$prev_prefix\" != \"$proto\" ]\n    then\n        render_prerel 1 \"$proto\"                # proto not same pre-release; set and start at '1'\n    elif [ -n \"$prev_numeric\" ]\n    then\n        : $(( ++prev_numeric ))                 # pre-release is numbered; bump it\n        render_prerel \"$prev_numeric\" \"$prev_prefix\"\n    else\n        render_prerel 1 \"$prev_prefix\"          # start pre-release at number '1'\n    fi\n}\n\nfunction command_bump {\n  local new; local version; local sub_version; local command;\n\n  command=\"$(normalize_part \"$1\")\"\n\n  case $# in\n    2) case \"$command\" in\n        major|minor|patch|prerel|release) sub_version=\"+.\"; version=$2;;\n        *) usage_help;;\n       esac ;;\n    3) case \"$command\" in\n        prerel|build) sub_version=$2 version=$3 ;;\n        *) usage_help;;\n       esac ;;\n    *) usage_help;;\n  esac\n\n  validate_version \"$version\" parts\n  # shellcheck disable=SC2154\n  local major=\"${parts[0]}\"\n  local minor=\"${parts[1]}\"\n  local patch=\"${parts[2]}\"\n  local prere=\"${parts[3]}\"\n  local build=\"${parts[4]}\"\n\n  case \"$command\" in\n    major) new=\"$((major + 1)).0.0\";;\n    minor) new=\"${major}.$((minor + 1)).0\";;\n    patch) new=\"${major}.${minor}.$((patch + 1))\";;\n    release) new=\"${major}.${minor}.${patch}\";;\n    prerel) new=$(validate_version \"${major}.${minor}.${patch}-$(bump_prerel \"$sub_version\" \"$prere\")\");;\n    build) new=$(validate_version \"${major}.${minor}.${patch}${prere}+${sub_version}\");;\n    *) usage_help ;;\n  esac\n\n  echo \"$new\"\n  exit 0\n}\n\nfunction command_compare {\n  local v; local v_;\n\n  case $# in\n    2) v=$(validate_version \"$1\"); v_=$(validate_version \"$2\") ;;\n    *) usage_help ;;\n  esac\n\n  set +u                        # need unset array element to evaluate to null\n  compare_version \"$v\" \"$v_\"\n  exit 0\n}\n\nfunction command_diff {\n  validate_version \"$1\" v1_parts\n  # shellcheck disable=SC2154\n  local v1_major=\"${v1_parts[0]}\"\n  local v1_minor=\"${v1_parts[1]}\"\n  local v1_patch=\"${v1_parts[2]}\"\n  local v1_prere=\"${v1_parts[3]}\"\n  local v1_build=\"${v1_parts[4]}\"\n\n  validate_version \"$2\" v2_parts\n  # shellcheck disable=SC2154\n  local v2_major=\"${v2_parts[0]}\"\n  local v2_minor=\"${v2_parts[1]}\"\n  local v2_patch=\"${v2_parts[2]}\"\n  local v2_prere=\"${v2_parts[3]}\"\n  local v2_build=\"${v2_parts[4]}\"\n\n  if [ \"${v1_major}\" != \"${v2_major}\" ]; then\n    echo \"major\"\n  elif [ \"${v1_minor}\" != \"${v2_minor}\" ]; then\n    echo \"minor\"\n  elif [ \"${v1_patch}\" != \"${v2_patch}\" ]; then\n    echo \"patch\"\n  elif [ \"${v1_prere}\" != \"${v2_prere}\" ]; then\n    echo \"prerelease\"\n  elif [ \"${v1_build}\" != \"${v2_build}\" ]; then\n    echo \"build\"\n  fi\n}\n\n# shellcheck disable=SC2034\nfunction command_get {\n    local part version\n\n    if [[ \"$#\" -ne \"2\" ]] || [[ -z \"$1\" ]] || [[ -z \"$2\" ]]; then\n        usage_help\n        exit 0\n    fi\n\n    part=\"$1\"\n    version=\"$2\"\n\n    validate_version \"$version\" parts\n    local major=\"${parts[0]}\"\n    local minor=\"${parts[1]}\"\n    local patch=\"${parts[2]}\"\n    local prerel=\"${parts[3]:1}\"\n    local build=\"${parts[4]:1}\"\n    local release=\"${major}.${minor}.${patch}\"\n\n    part=\"$(normalize_part \"$part\")\"\n\n    case \"$part\" in\n        major|minor|patch|release|prerel|build) echo \"${!part}\" ;;\n        *) usage_help ;;\n    esac\n\n    exit 0\n}\n\nfunction command_validate {\n  if [[ \"$#\" -ne \"1\" ]]; then\n        usage_help\n  fi  \n  \n  if [[ \"$1\" =~ $SEMVER_REGEX ]]; then\n    echo \"valid\"\n  else\n    echo \"invalid\"\n  fi\n\n  exit 0\n}\n\ncase $# in\n  0) echo \"Unknown command: $*\"; usage_help;;\nesac\n\ncase $1 in\n  --help|-h) echo -e \"$USAGE\"; exit 0;;\n  --version|-v) usage_version ;;\n  bump) shift; command_bump \"$@\";;\n  get) shift; command_get \"$@\";;\n  compare) shift; command_compare \"$@\";;\n  diff) shift; command_diff \"$@\";;\n  validate) shift; command_validate \"$@\";;\n  *) echo \"Unknown arguments: $*\"; usage_help;;\nesac\n"
  },
  {
    "path": "backend/bin/update-deps.sh",
    "content": "#!/bin/bash\n\ngo get -u github.com/crawlab-team/crawlab/core@main\ngo mod tidy\n"
  },
  {
    "path": "backend/bin/update-ver.sh",
    "content": "#!/bin/sh\n\n# update version type (major, minor, patch, prerelease)\nupdate_version_type=\"prerelease\"\nif [ -n \"$1\" ]; then\n\tupdate_version_type=\"$1\"\nfi\n\n# current version\ncurrent_version=$(grep -oEi 'version: v([0-9\\.?]+)' conf/config.yml | sed -E 's/version: v//g')\n\n# next version\nnext_version=$(./bin/semver.sh bump $update_version_type $current_version)\n\n# update next version to conf/config.yml\nsed -i '' \"s/version: v$current_version/version: v$next_version/g\" conf/config.yml\n\n"
  },
  {
    "path": "backend/conf/config.yml",
    "content": "# Crawlab Configuration File\nedition: global.edition.community\nversion: v0.6.3\n\nmongo:\n  host: localhost\n  port: 27017\n  db: crawlab_test\n  username: \"\"\n  password: \"\"\n  authSource: \"admin\"\n\nserver:\n  host: 0.0.0.0\n  port: 8000\n\ngrpc:\n  address: localhost:9666\n  server:\n    address: 0.0.0.0:9666\n  authKey: Crawlab2021!\n\napi:\n  endpoint: http://localhost:8000\n\nlog:\n  path: /var/log/crawlab\n"
  },
  {
    "path": "backend/go.mod",
    "content": "module crawlab\n\ngo 1.22\n\nreplace (\n\tgithub.com/crawlab-team/crawlab/core => ../core\n\tgithub.com/crawlab-team/crawlab/db => ../db\n\tgithub.com/crawlab-team/crawlab/fs => ../fs\n\tgithub.com/crawlab-team/crawlab/grpc => ../grpc\n\tgithub.com/crawlab-team/crawlab/template-parser => ../template-parser\n\tgithub.com/crawlab-team/crawlab/trace => ../trace\n\tgithub.com/crawlab-team/crawlab/vcs => ../vcs\n)\n\nrequire github.com/crawlab-team/crawlab/core v0.0.0-20240614095218-7b4ee8399ab0\n\nrequire (\n\tdario.cat/mergo v1.0.0 // indirect\n\tgithub.com/cyphar/filepath-securejoin v0.2.4 // indirect\n\tgithub.com/golang-jwt/jwt/v5 v5.2.1 // indirect\n\tgithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect\n\tgithub.com/sirupsen/logrus v1.9.0 // indirect\n)\n\nrequire (\n\tcloud.google.com/go/compute/metadata v0.3.0 // indirect\n\tgithub.com/Masterminds/semver v1.4.2 // indirect\n\tgithub.com/Masterminds/sprig v2.16.0+incompatible // indirect\n\tgithub.com/Microsoft/go-winio v0.6.1 // indirect\n\tgithub.com/ProtonMail/go-crypto v1.0.0 // indirect\n\tgithub.com/PuerkitoBio/goquery v1.8.0 // indirect\n\tgithub.com/ReneKroon/ttlcache v1.7.0 // indirect\n\tgithub.com/andybalholm/cascadia v1.3.1 // indirect\n\tgithub.com/aokoli/goutils v1.0.1 // indirect\n\tgithub.com/apex/log v1.9.0 // indirect\n\tgithub.com/bytedance/sonic v1.9.1 // indirect\n\tgithub.com/cenkalti/backoff/v4 v4.1.0 // indirect\n\tgithub.com/cloudflare/circl v1.3.7 // indirect\n\tgithub.com/crawlab-team/crawlab/db v0.0.0-20240614095218-7b4ee8399ab0 // indirect\n\tgithub.com/crawlab-team/crawlab/fs v0.0.0-20240614095218-7b4ee8399ab0 // indirect\n\tgithub.com/crawlab-team/crawlab/grpc v0.0.0-20240614111723-e5b20af9a40b // indirect\n\tgithub.com/crawlab-team/crawlab/template-parser v0.0.0-20240614095218-7b4ee8399ab0 // indirect\n\tgithub.com/crawlab-team/crawlab/trace v0.0.0-20240614095218-7b4ee8399ab0 // indirect\n\tgithub.com/crawlab-team/crawlab/vcs v0.0.0-20240614095218-7b4ee8399ab0 // indirect\n\tgithub.com/crawlab-team/goseaweedfs v0.6.3 // indirect\n\tgithub.com/denisenkom/go-mssqldb v0.11.0 // indirect\n\tgithub.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect\n\tgithub.com/elastic/go-elasticsearch/v8 v8.14.0 // indirect\n\tgithub.com/emirpasic/gods v1.18.1 // indirect\n\tgithub.com/fsnotify/fsnotify v1.7.0 // indirect\n\tgithub.com/gabriel-vasile/mimetype v1.4.2 // indirect\n\tgithub.com/gin-contrib/sse v0.1.0 // indirect\n\tgithub.com/gin-gonic/gin v1.9.1 // indirect\n\tgithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect\n\tgithub.com/go-git/go-billy/v5 v5.5.0 // indirect\n\tgithub.com/go-git/go-git/v5 v5.12.0 // indirect\n\tgithub.com/go-logr/logr v1.4.1 // indirect\n\tgithub.com/go-logr/stdr v1.2.2 // indirect\n\tgithub.com/go-ole/go-ole v1.2.6 // indirect\n\tgithub.com/go-playground/locales v0.14.1 // indirect\n\tgithub.com/go-playground/universal-translator v0.18.1 // indirect\n\tgithub.com/go-playground/validator/v10 v10.14.0 // indirect\n\tgithub.com/go-sql-driver/mysql v1.6.0 // indirect\n\tgithub.com/goccy/go-json v0.10.2 // indirect\n\tgithub.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect\n\tgithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect\n\tgithub.com/golang/protobuf v1.5.4 // indirect\n\tgithub.com/golang/snappy v0.0.4 // indirect\n\tgithub.com/google/uuid v1.6.0 // indirect\n\tgithub.com/gorilla/css v1.0.0 // indirect\n\tgithub.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 // indirect\n\tgithub.com/hashicorp/go-uuid v1.0.3 // indirect\n\tgithub.com/hashicorp/hcl v1.0.0 // indirect\n\tgithub.com/huandu/xstrings v1.2.0 // indirect\n\tgithub.com/imdario/mergo v0.3.16 // indirect\n\tgithub.com/imroc/req v0.3.0 // indirect\n\tgithub.com/inconshreveable/mousetrap v1.0.0 // indirect\n\tgithub.com/jackc/chunkreader/v2 v2.0.1 // indirect\n\tgithub.com/jackc/pgconn v1.11.0 // indirect\n\tgithub.com/jackc/pgio v1.0.0 // indirect\n\tgithub.com/jackc/pgpassfile v1.0.0 // indirect\n\tgithub.com/jackc/pgproto3/v2 v2.3.3 // indirect\n\tgithub.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect\n\tgithub.com/jackc/pgtype v1.10.0 // indirect\n\tgithub.com/jackc/pgx/v4 v4.18.2 // indirect\n\tgithub.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0 // indirect\n\tgithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect\n\tgithub.com/json-iterator/go v1.1.12 // indirect\n\tgithub.com/kevinburke/ssh_config v1.2.0 // indirect\n\tgithub.com/klauspost/compress v1.17.2 // indirect\n\tgithub.com/klauspost/cpuid/v2 v2.2.5 // indirect\n\tgithub.com/leodido/go-urn v1.2.4 // indirect\n\tgithub.com/lib/pq v1.10.4 // indirect\n\tgithub.com/magiconair/properties v1.8.7 // indirect\n\tgithub.com/matcornic/hermes/v2 v2.1.0 // indirect\n\tgithub.com/mattn/go-isatty v0.0.19 // indirect\n\tgithub.com/mattn/go-runewidth v0.0.3 // indirect\n\tgithub.com/mattn/go-sqlite3 v1.14.9 // indirect\n\tgithub.com/mitchellh/go-homedir v1.1.0 // indirect\n\tgithub.com/mitchellh/mapstructure v1.5.0 // indirect\n\tgithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect\n\tgithub.com/modern-go/reflect2 v1.0.2 // indirect\n\tgithub.com/olekukonko/tablewriter v0.0.1 // indirect\n\tgithub.com/pelletier/go-toml/v2 v2.2.2 // indirect\n\tgithub.com/pierrec/lz4/v4 v4.1.18 // indirect\n\tgithub.com/pjbgf/sha1cd v0.3.0 // indirect\n\tgithub.com/pkg/errors v0.9.1 // indirect\n\tgithub.com/robertkrimen/otto v0.0.0-20210614181706-373ff5438452 // indirect\n\tgithub.com/robfig/cron/v3 v3.0.0 // indirect\n\tgithub.com/russross/blackfriday/v2 v2.1.0 // indirect\n\tgithub.com/sagikazarmark/locafero v0.4.0 // indirect\n\tgithub.com/sagikazarmark/slog-shim v0.1.0 // indirect\n\tgithub.com/segmentio/fasthash v1.0.3 // indirect\n\tgithub.com/segmentio/kafka-go v0.4.39 // indirect\n\tgithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect\n\tgithub.com/shirou/gopsutil v3.21.11+incompatible // indirect\n\tgithub.com/skeema/knownhosts v1.2.2 // indirect\n\tgithub.com/sourcegraph/conc v0.3.0 // indirect\n\tgithub.com/spf13/afero v1.11.0 // indirect\n\tgithub.com/spf13/cast v1.6.0 // indirect\n\tgithub.com/spf13/cobra v1.3.0 // indirect\n\tgithub.com/spf13/pflag v1.0.5 // indirect\n\tgithub.com/spf13/viper v1.19.0 // indirect\n\tgithub.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect\n\tgithub.com/subosito/gotenv v1.6.0 // indirect\n\tgithub.com/thoas/go-funk v0.9.1 // indirect\n\tgithub.com/tklauser/go-sysconf v0.3.9 // indirect\n\tgithub.com/tklauser/numcpus v0.3.0 // indirect\n\tgithub.com/twitchyliquid64/golang-asm v0.15.1 // indirect\n\tgithub.com/ugorji/go/codec v1.2.11 // indirect\n\tgithub.com/upper/db/v4 v4.6.0 // indirect\n\tgithub.com/vanng822/css v0.0.0-20190504095207-a21e860bcd04 // indirect\n\tgithub.com/vanng822/go-premailer v0.0.0-20191214114701-be27abe028fe // indirect\n\tgithub.com/xanzy/ssh-agent v0.3.3 // indirect\n\tgithub.com/xdg-go/pbkdf2 v1.0.0 // indirect\n\tgithub.com/xdg-go/scram v1.1.2 // indirect\n\tgithub.com/xdg-go/stringprep v1.0.4 // indirect\n\tgithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect\n\tgithub.com/yusufpapurcu/wmi v1.2.2 // indirect\n\tgithub.com/ztrue/tracerr v0.4.0 // indirect\n\tgo.mongodb.org/mongo-driver v1.15.0 // indirect\n\tgo.opentelemetry.io/otel v1.24.0 // indirect\n\tgo.opentelemetry.io/otel/metric v1.24.0 // indirect\n\tgo.opentelemetry.io/otel/trace v1.24.0 // indirect\n\tgo.uber.org/atomic v1.9.0 // indirect\n\tgo.uber.org/dig v1.10.0 // indirect\n\tgo.uber.org/multierr v1.9.0 // indirect\n\tgolang.org/x/arch v0.3.0 // indirect\n\tgolang.org/x/crypto v0.23.0 // indirect\n\tgolang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect\n\tgolang.org/x/mod v0.17.0 // indirect\n\tgolang.org/x/net v0.25.0 // indirect\n\tgolang.org/x/sync v0.7.0 // indirect\n\tgolang.org/x/sys v0.20.0 // indirect\n\tgolang.org/x/text v0.15.0 // indirect\n\tgolang.org/x/tools v0.20.0 // indirect\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect\n\tgoogle.golang.org/grpc v1.64.0 // indirect\n\tgoogle.golang.org/protobuf v1.34.2 // indirect\n\tgopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect\n\tgopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect\n\tgopkg.in/ini.v1 v1.67.0 // indirect\n\tgopkg.in/sourcemap.v1 v1.0.5 // indirect\n\tgopkg.in/warnings.v0 v0.1.2 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "backend/go.mod.dev",
    "content": "module crawlab\n\ngo 1.16\n\nreplace (\n    github.com/crawlab-team/crawlab/core => ../../crawlab-core\n    github.com/crawlab-team/crawlab-vcs => ../../crawlab-vcs\n    github.com/crawlab-team/crawlab/fs => ../../crawlab-fs\n    github.com/crawlab-team/crawlab/db => ../../crawlab-db\n)\n\nrequire (\n\tgithub.com/apex/log v1.9.0\n\tgithub.com/crawlab-team/crawlab/core v0.6.0-beta.20211230.1200\n\tgithub.com/crawlab-team/crawlab/vcs v0.1.1\n\tgithub.com/gin-gonic/gin v1.7.1\n\tgithub.com/spf13/cobra v1.1.3\n\tgithub.com/spf13/viper v1.7.1\n\tgo.uber.org/dig v1.10.0\n)\n"
  },
  {
    "path": "backend/go.mod.local",
    "content": "module crawlab\n\ngo 1.16\n\nreplace (\n    github.com/crawlab-team/crawlab/core => /libs/crawlab-team/crawlab-core\n    github.com/crawlab-team/crawlab-vcs => /libs/crawlab-team/crawlab-vcs\n    github.com/crawlab-team/crawlab/fs => /libs/crawlab-team/crawlab-fs\n    github.com/crawlab-team/crawlab/db => /libs/crawlab-team/crawlab-db\n)\n\nrequire (\n\tgithub.com/apex/log v1.9.0\n    github.com/crawlab-team/crawlab/core v0.6.0-beta.20211230.1200\n    github.com/crawlab-team/crawlab/vcs v0.1.1\n    github.com/gin-gonic/gin v1.7.1\n    github.com/spf13/cobra v1.1.3\n    github.com/spf13/viper v1.7.1\n    go.uber.org/dig v1.10.0\n)\n"
  },
  {
    "path": "backend/go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=\ncloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=\ncloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=\ncloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=\ncloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=\ncloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=\ncloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=\ncloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=\ncloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=\ncloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=\ncloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=\ncloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=\ncloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=\ncloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=\ncloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=\ncloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=\ncloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=\ncloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=\ncloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=\ncloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=\ncloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=\ncloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=\ncloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=\ncloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=\ncloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=\ncloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM=\ncloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=\ncloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=\ncloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=\ncloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=\ncloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=\ncloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=\ncloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=\ncloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=\ncloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=\ncloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=\ncloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=\ncloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY=\ncloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=\ncloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=\ncloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=\ncloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=\ncloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=\ncloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=\ncloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=\ncloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=\ncloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=\ndario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=\ndario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=\ndmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=\ngithub.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=\ngithub.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=\ngithub.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=\ngithub.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=\ngithub.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=\ngithub.com/Masterminds/sprig v2.16.0+incompatible h1:QZbMUPxRQ50EKAq3LFMnxddMu88/EUUG3qmxwtDmPsY=\ngithub.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=\ngithub.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=\ngithub.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=\ngithub.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=\ngithub.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=\ngithub.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78=\ngithub.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=\ngithub.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg=\ngithub.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U=\ngithub.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=\ngithub.com/ReneKroon/ttlcache v1.7.0 h1:8BkjFfrzVFXyrqnMtezAaJ6AHPSsVV10m6w28N/Fgkk=\ngithub.com/ReneKroon/ttlcache v1.7.0/go.mod h1:8BGGzdumrIjWxdRx8zpK6L3oGMWvIXdvB2GD1cfvd+I=\ngithub.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 h1:ZBbLwSJqkHBuFDA6DUhhse0IGJ7T5bemHyNILUjvOq4=\ngithub.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2/go.mod h1:VSw57q4QFiWDbRnjdX8Cb3Ow0SFncRw+bA/ofY6Q83w=\ngithub.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=\ngithub.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=\ngithub.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=\ngithub.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=\ngithub.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=\ngithub.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=\ngithub.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=\ngithub.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=\ngithub.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=\ngithub.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=\ngithub.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=\ngithub.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=\ngithub.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg=\ngithub.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ=\ngithub.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0=\ngithub.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=\ngithub.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=\ngithub.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE=\ngithub.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=\ngithub.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=\ngithub.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=\ngithub.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=\ngithub.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=\ngithub.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=\ngithub.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=\ngithub.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=\ngithub.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=\ngithub.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=\ngithub.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=\ngithub.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=\ngithub.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=\ngithub.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=\ngithub.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=\ngithub.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=\ngithub.com/cenkalti/backoff/v4 v4.1.0 h1:c8LkOFQTzuO0WBM/ae5HdGQuZPfPxp7lqBRwQRm4fSc=\ngithub.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=\ngithub.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=\ngithub.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=\ngithub.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=\ngithub.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=\ngithub.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=\ngithub.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=\ngithub.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=\ngithub.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=\ngithub.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=\ngithub.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=\ngithub.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=\ngithub.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=\ngithub.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=\ngithub.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=\ngithub.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=\ngithub.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=\ngithub.com/crawlab-team/goseaweedfs v0.6.3 h1:f96H2QCLrZpof9na1mhIKouKrv8p32XRUyouSVm4YHU=\ngithub.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=\ngithub.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=\ngithub.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/denisenkom/go-mssqldb v0.11.0 h1:9rHa233rhdOyrz2GcP9NM+gi2psgJZ4GWDpL/7ND8HI=\ngithub.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=\ngithub.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=\ngithub.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA=\ngithub.com/elastic/go-elasticsearch/v8 v8.14.0 h1:1ywU8WFReLLcxE1WJqii3hTtbPUE2hc38ZK/j4mMFow=\ngithub.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=\ngithub.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=\ngithub.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=\ngithub.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=\ngithub.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=\ngithub.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=\ngithub.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=\ngithub.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ=\ngithub.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=\ngithub.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=\ngithub.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=\ngithub.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=\ngithub.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=\ngithub.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=\ngithub.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=\ngithub.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=\ngithub.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=\ngithub.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=\ngithub.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=\ngithub.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=\ngithub.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=\ngithub.com/gavv/httpexpect/v2 v2.16.0 h1:Ty2favARiTYTOkCRZGX7ojXXjGyNAIohM1lZ3vqaEwI=\ngithub.com/gavv/httpexpect/v2 v2.16.0/go.mod h1:uJLaO+hQ25ukBJtQi750PsztObHybNllN+t+MbbW8PY=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=\ngithub.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=\ngithub.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=\ngithub.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=\ngithub.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=\ngithub.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=\ngithub.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=\ngithub.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=\ngithub.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=\ngithub.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=\ngithub.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys=\ngithub.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY=\ngithub.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df/go.mod h1:GJr+FCSXshIwgHBtLglIg9M2l2kQSi6QjVAngtzI08Y=\ngithub.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=\ngithub.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=\ngithub.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=\ngithub.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=\ngithub.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=\ngithub.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=\ngithub.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=\ngithub.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=\ngithub.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=\ngithub.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=\ngithub.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=\ngithub.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=\ngithub.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=\ngithub.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=\ngithub.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=\ngithub.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=\ngithub.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=\ngithub.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=\ngithub.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=\ngithub.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=\ngithub.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=\ngithub.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=\ngithub.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=\ngithub.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=\ngithub.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=\ngithub.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=\ngithub.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=\ngithub.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=\ngithub.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=\ngithub.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=\ngithub.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=\ngithub.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=\ngithub.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=\ngithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=\ngithub.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=\ngithub.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=\ngithub.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=\ngithub.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=\ngithub.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=\ngithub.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=\ngithub.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=\ngithub.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=\ngithub.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=\ngithub.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=\ngithub.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=\ngithub.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=\ngithub.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=\ngithub.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=\ngithub.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=\ngithub.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=\ngithub.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=\ngithub.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=\ngithub.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=\ngithub.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=\ngithub.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=\ngithub.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=\ngithub.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=\ngithub.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=\ngithub.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=\ngithub.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=\ngithub.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=\ngithub.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=\ngithub.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=\ngithub.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=\ngithub.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=\ngithub.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=\ngithub.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=\ngithub.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=\ngithub.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=\ngithub.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=\ngithub.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=\ngithub.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=\ngithub.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=\ngithub.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=\ngithub.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=\ngithub.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=\ngithub.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=\ngithub.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY=\ngithub.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=\ngithub.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=\ngithub.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=\ngithub.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk=\ngithub.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0=\ngithub.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=\ngithub.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=\ngithub.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=\ngithub.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=\ngithub.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=\ngithub.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk=\ngithub.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=\ngithub.com/imroc/req v0.3.0 h1:3EioagmlSG+z+KySToa+Ylo3pTFZs+jh3Brl7ngU12U=\ngithub.com/imroc/req v0.3.0/go.mod h1:F+NZ+2EFSo6EFXdeIbpfE9hcC233id70kf0byW97Caw=\ngithub.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=\ngithub.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=\ngithub.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk=\ngithub.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps=\ngithub.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=\ngithub.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=\ngithub.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=\ngithub.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=\ngithub.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=\ngithub.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=\ngithub.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=\ngithub.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=\ngithub.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=\ngithub.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=\ngithub.com/jackc/pgconn v1.11.0 h1:HiHArx4yFbwl91X3qqIHtUFoiIfLNJXCQRsnzkiwwaQ=\ngithub.com/jackc/pgconn v1.11.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=\ngithub.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=\ngithub.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=\ngithub.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=\ngithub.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=\ngithub.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=\ngithub.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=\ngithub.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=\ngithub.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=\ngithub.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=\ngithub.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=\ngithub.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=\ngithub.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=\ngithub.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=\ngithub.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgproto3/v2 v2.2.0 h1:r7JypeP2D3onoQTCxWdTpCtJ4D+qpKr0TxvoyMhZ5ns=\ngithub.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=\ngithub.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=\ngithub.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=\ngithub.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=\ngithub.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=\ngithub.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=\ngithub.com/jackc/pgtype v1.10.0 h1:ILnBWrRMSXGczYvmkYD6PsYyVFUNLTnIUJHHDLmqk38=\ngithub.com/jackc/pgtype v1.10.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=\ngithub.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=\ngithub.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=\ngithub.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=\ngithub.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=\ngithub.com/jackc/pgx/v4 v4.15.0 h1:B7dTkXsdILD3MF987WGGCcg+tvLW6bZJdEcqVFeU//w=\ngithub.com/jackc/pgx/v4 v4.15.0/go.mod h1:D/zyOyXiaM1TmVWnOM18p0xdDtdakRBa0RsVGI3U3bw=\ngithub.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0 h1:xqgexXAGQgY3HAjNPSaCqn5Aahbo5TKsmhp8VRfr1iQ=\ngithub.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=\ngithub.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=\ngithub.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0=\ngithub.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=\ngithub.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=\ngithub.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=\ngithub.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=\ngithub.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=\ngithub.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=\ngithub.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=\ngithub.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=\ngithub.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=\ngithub.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=\ngithub.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4=\ngithub.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=\ngithub.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=\ngithub.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=\ngithub.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=\ngithub.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=\ngithub.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=\ngithub.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk=\ngithub.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=\ngithub.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=\ngithub.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=\ngithub.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=\ngithub.com/matcornic/hermes/v2 v2.1.0 h1:9TDYFBPFv6mcXanaDmRDEp/RTWj0dTTi+LpFnnnfNWc=\ngithub.com/matcornic/hermes/v2 v2.1.0/go.mod h1:2+ziJeoyRfaLiATIL8VZ7f9hpzH4oDHqTmn0bhrsgVI=\ngithub.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=\ngithub.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=\ngithub.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=\ngithub.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=\ngithub.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=\ngithub.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=\ngithub.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=\ngithub.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=\ngithub.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=\ngithub.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=\ngithub.com/mattn/go-runewidth v0.0.3 h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=\ngithub.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA=\ngithub.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=\ngithub.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=\ngithub.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=\ngithub.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=\ngithub.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=\ngithub.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=\ngithub.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=\ngithub.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=\ngithub.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=\ngithub.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=\ngithub.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=\ngithub.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=\ngithub.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=\ngithub.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=\ngithub.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=\ngithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0=\ngithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=\ngithub.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=\ngithub.com/olekukonko/tablewriter v0.0.1 h1:b3iUnf1v+ppJiOfNX4yxxqfWKMQPZR5yoh8urCTFX88=\ngithub.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=\ngithub.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=\ngithub.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=\ngithub.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=\ngithub.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=\ngithub.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=\ngithub.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ=\ngithub.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=\ngithub.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=\ngithub.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=\ngithub.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=\ngithub.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=\ngithub.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=\ngithub.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=\ngithub.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=\ngithub.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=\ngithub.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=\ngithub.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=\ngithub.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=\ngithub.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=\ngithub.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=\ngithub.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=\ngithub.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=\ngithub.com/robertkrimen/otto v0.0.0-20210614181706-373ff5438452 h1:ewTtJ72GFy2e0e8uyiDwMG3pKCS5mBh+hdSTYsPKEP8=\ngithub.com/robertkrimen/otto v0.0.0-20210614181706-373ff5438452/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY=\ngithub.com/robfig/cron/v3 v3.0.0 h1:kQ6Cb7aHOHTSzNVNEhmp8EcWKLb4CbiMW9h9VyIhO4E=\ngithub.com/robfig/cron/v3 v3.0.0/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=\ngithub.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=\ngithub.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=\ngithub.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=\ngithub.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=\ngithub.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=\ngithub.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=\ngithub.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=\ngithub.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig=\ngithub.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=\ngithub.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=\ngithub.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=\ngithub.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=\ngithub.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo=\ngithub.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U=\ngithub.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=\ngithub.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=\ngithub.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM=\ngithub.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=\ngithub.com/segmentio/kafka-go v0.4.39 h1:75smaomhvkYRwtuOwqLsdhgCG30B82NsbdkdDfFbvrw=\ngithub.com/segmentio/kafka-go v0.4.39/go.mod h1:T0MLgygYvmqmBvC+s8aCcbVNfJN4znVne5j0Pzowp/Q=\ngithub.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=\ngithub.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=\ngithub.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=\ngithub.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=\ngithub.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=\ngithub.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=\ngithub.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=\ngithub.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=\ngithub.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=\ngithub.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=\ngithub.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=\ngithub.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=\ngithub.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A=\ngithub.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=\ngithub.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8=\ngithub.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=\ngithub.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=\ngithub.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=\ngithub.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=\ngithub.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=\ngithub.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=\ngithub.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=\ngithub.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=\ngithub.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=\ngithub.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=\ngithub.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=\ngithub.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=\ngithub.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=\ngithub.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=\ngithub.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0=\ngithub.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4=\ngithub.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=\ngithub.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=\ngithub.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM=\ngithub.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=\ngithub.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=\ngithub.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo=\ngithub.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=\ngithub.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=\ngithub.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=\ngithub.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=\ngithub.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngithub.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=\ngithub.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=\ngithub.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=\ngithub.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=\ngithub.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=\ngithub.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=\ngithub.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=\ngithub.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=\ngithub.com/thoas/go-funk v0.9.1/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q=\ngithub.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=\ngithub.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk=\ngithub.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk=\ngithub.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc=\ngithub.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=\ngithub.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=\ngithub.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=\ngithub.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo=\ngithub.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=\ngithub.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ=\ngithub.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=\ngithub.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=\ngithub.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=\ngithub.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=\ngithub.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=\ngithub.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=\ngithub.com/upper/db/v4 v4.6.0 h1:0VmASnqrl/XN8Ehoq++HBgZ4zRD5j3GXygW8FhP0C5I=\ngithub.com/upper/db/v4 v4.6.0/go.mod h1:2mnRcPf+RcCXmVcD+o04LYlyu3UuF7ubamJia7CkN6s=\ngithub.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=\ngithub.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=\ngithub.com/valyala/fasthttp v1.34.0 h1:d3AAQJ2DRcxJYHm7OXNXtXt2as1vMDfxeIcFvhmGGm4=\ngithub.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0=\ngithub.com/vanng822/css v0.0.0-20190504095207-a21e860bcd04 h1:L0rPdfzq43+NV8rfIx2kA4iSSLRj2jN5ijYHoeXRwvQ=\ngithub.com/vanng822/css v0.0.0-20190504095207-a21e860bcd04/go.mod h1:tcnB1voG49QhCrwq1W0w5hhGasvOg+VQp9i9H1rCM1w=\ngithub.com/vanng822/go-premailer v0.0.0-20191214114701-be27abe028fe h1:9YnI5plmy+ad6BM+JCLJb2ZV7/TNiE5l7SNKfumYKgc=\ngithub.com/vanng822/go-premailer v0.0.0-20191214114701-be27abe028fe/go.mod h1:JTFJA/t820uFDoyPpErFQ3rb3amdZoPtxcKervG0OE4=\ngithub.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=\ngithub.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=\ngithub.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=\ngithub.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=\ngithub.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=\ngithub.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4=\ngithub.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=\ngithub.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=\ngithub.com/xdg/scram v1.0.5 h1:TuS0RFmt5Is5qm9Tm2SoD89OPqe4IRiFtyFY4iwWXsw=\ngithub.com/xdg/scram v1.0.5/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=\ngithub.com/xdg/stringprep v1.0.3 h1:cmL5Enob4W83ti/ZHuZLuKD/xqJfus4fVPwE+/BDm+4=\ngithub.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=\ngithub.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=\ngithub.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=\ngithub.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=\ngithub.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=\ngithub.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=\ngithub.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=\ngithub.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY=\ngithub.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI=\ngithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=\ngithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=\ngithub.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA=\ngithub.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=\ngithub.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M=\ngithub.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=\ngithub.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngithub.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=\ngithub.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=\ngithub.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=\ngithub.com/ztrue/tracerr v0.4.0 h1:vT5PFxwIGs7rCg9ZgJ/y0NmOpJkPCPFK8x0vVIYzd04=\ngithub.com/ztrue/tracerr v0.4.0/go.mod h1:PaFfYlas0DfmXNpo7Eay4MFhZUONqvXM+T2HyGPpngk=\ngo.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=\ngo.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs=\ngo.mongodb.org/mongo-driver v1.15.0 h1:rJCKC8eEliewXjZGf0ddURtl7tTVy1TK3bfl0gkUSLc=\ngo.mongodb.org/mongo-driver v1.15.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=\ngo.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=\ngo.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=\ngo.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=\ngo.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=\ngo.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=\ngo.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=\ngo.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=\ngo.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=\ngo.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=\ngo.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=\ngo.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/dig v1.10.0 h1:yLmDDj9/zuDjv3gz8GQGviXMs9TfysIUMUilCpgzUJY=\ngo.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw=\ngo.uber.org/goleak v0.10.0/go.mod h1:VCZuO8V8mFPlL0F5J5GK1rtHV3DrFcQ1R8ryq7FK0aI=\ngo.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=\ngo.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=\ngo.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=\ngo.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=\ngo.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=\ngo.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=\ngo.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=\ngo.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=\ngo.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=\ngo.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=\ngo.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=\ngolang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=\ngolang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=\ngolang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=\ngolang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20181029175232-7e6ffbd03851/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=\ngolang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=\ngolang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=\ngolang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=\ngolang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=\ngolang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=\ngolang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=\ngolang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=\ngolang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=\ngolang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=\ngolang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=\ngolang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=\ngolang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=\ngolang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=\ngolang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=\ngolang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=\ngolang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=\ngolang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=\ngolang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=\ngolang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=\ngolang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=\ngolang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=\ngolang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=\ngolang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=\ngolang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=\ngolang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=\ngolang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=\ngolang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=\ngolang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=\ngolang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190225065934-cc5685c2db12/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=\ngolang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=\ngolang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=\ngolang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=\ngolang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=\ngolang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=\ngolang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=\ngolang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=\ngolang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=\ngolang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=\ngolang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=\ngolang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=\ngolang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=\ngolang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=\ngolang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngoogle.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=\ngoogle.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=\ngoogle.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=\ngoogle.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=\ngoogle.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=\ngoogle.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=\ngoogle.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=\ngoogle.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=\ngoogle.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=\ngoogle.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=\ngoogle.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=\ngoogle.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=\ngoogle.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=\ngoogle.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=\ngoogle.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=\ngoogle.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=\ngoogle.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=\ngoogle.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=\ngoogle.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=\ngoogle.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=\ngoogle.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=\ngoogle.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=\ngoogle.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=\ngoogle.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=\ngoogle.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=\ngoogle.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=\ngoogle.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=\ngoogle.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=\ngoogle.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=\ngoogle.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=\ngoogle.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=\ngoogle.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=\ngoogle.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=\ngoogle.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=\ngoogle.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=\ngoogle.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=\ngoogle.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=\ngoogle.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=\ngoogle.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=\ngoogle.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=\ngoogle.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=\ngoogle.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=\ngoogle.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=\ngoogle.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=\ngoogle.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=\ngoogle.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=\ngoogle.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=\ngoogle.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=\ngoogle.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=\ngoogle.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=\ngoogle.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=\ngoogle.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=\ngoogle.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=\ngoogle.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=\ngoogle.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\ngoogle.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngoogle.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=\ngoogle.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngoogle.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngoogle.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=\ngoogle.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=\ngopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=\ngopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=\ngopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=\ngopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=\ngopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=\ngopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=\ngopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=\ngopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=\ngopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI=\ngopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=\ngopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=\nhonnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nhonnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nmodernc.org/b v1.0.2/go.mod h1:fVGfCIzkZw5RsuF2A2WHbJmY7FiMIq30nP4s52uWsoY=\nmodernc.org/db v1.0.3/go.mod h1:L4ltUg8tu2pkSJk+fKaRrXs/3EdW79ZKYQ5PfVDT53U=\nmodernc.org/file v1.0.3/go.mod h1:CNj/pwOfCtCbqiHcXDUlHBB2vWrzdaDCWdcnjtS1+XY=\nmodernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8=\nmodernc.org/golex v1.0.1/go.mod h1:QCA53QtsT1NdGkaZZkF5ezFwk4IXh4BGNafAARTC254=\nmodernc.org/internal v1.0.0/go.mod h1:VUD/+JAkhCpvkUitlEOnhpVxCgsBI90oTzSCRcqQVSM=\nmodernc.org/internal v1.0.2/go.mod h1:bycJAcev709ZU/47nil584PeBD+kbu8nv61ozeMso9E=\nmodernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk=\nmodernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk=\nmodernc.org/lldb v1.0.2/go.mod h1:ovbKqyzA9H/iPwHkAOH0qJbIQVT9rlijecenxDwVUi0=\nmodernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=\nmodernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=\nmodernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=\nmodernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=\nmodernc.org/ql v1.4.0/go.mod h1:q4c29Bgdx+iAtxx47ODW5Xo2X0PDkjSCK9NdQl6KFxc=\nmodernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k=\nmodernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw=\nmodernc.org/zappy v1.0.3/go.mod h1:w/Akq8ipfols/xZJdR5IYiQNOqC80qz2mVvsEwEbkiI=\nmoul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs=\nmoul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE=\nrsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=\nrsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=\nrsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=\nrsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=\n"
  },
  {
    "path": "backend/main.go",
    "content": "package main\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/cmd\"\n)\n\nfunc main() {\n\t_ = cmd.Execute()\n}\n"
  },
  {
    "path": "backend/test/config-master.json",
    "content": "{\n  \"key\": \"master\",\n  \"is_master\": true,\n  \"name\": \"Master Node\",\n  \"ip\": \"\",\n  \"mac\": \"\",\n  \"hostname\": \"\",\n  \"description\": \"\",\n  \"auth_key\": \"Crawlab2021!\"\n}"
  },
  {
    "path": "backend/test/config-worker-01.json",
    "content": "{\n  \"key\": \"worker-01\",\n  \"is_master\": false,\n  \"name\": \"Worker Node 01\",\n  \"ip\": \"\",\n  \"mac\": \"\",\n  \"hostname\": \"\",\n  \"description\": \"\",\n  \"auth_key\": \"Crawlab2021!\"\n}"
  },
  {
    "path": "backend/test/config-worker-02.json",
    "content": "{\n  \"key\": \"worker-02\",\n  \"is_master\": false,\n  \"name\": \"Worker Node 02\",\n  \"ip\": \"\",\n  \"mac\": \"\",\n  \"hostname\": \"\",\n  \"description\": \"\",\n  \"auth_key\": \"Crawlab2021!\"\n}"
  },
  {
    "path": "backend/test/config-worker-03.json",
    "content": "{\n  \"key\": \"worker-03\",\n  \"is_master\": false,\n  \"name\": \"Worker Node 03\",\n  \"ip\": \"\",\n  \"mac\": \"\",\n  \"hostname\": \"\",\n  \"description\": \"\",\n  \"auth_key\": \"Crawlab2021!\"\n}"
  },
  {
    "path": "backend/test/config-worker-invalid-auth-key.json",
    "content": "{\n  \"key\": \"worker-invalid-auth-key\",\n  \"is_master\": false,\n  \"name\": \"worker\",\n  \"ip\": \"\",\n  \"mac\": \"\",\n  \"hostname\": \"\",\n  \"description\": \"\",\n  \"auth_key\": \"invalid-auth-key\"\n}"
  },
  {
    "path": "bin/docker-init.sh",
    "content": "#!/bin/bash\n\n# replace default api path to new one\npython /app/bin/update_docker_js_api_address.py\n\ncrawlab-server server\n"
  },
  {
    "path": "bin/gen-ver.sh",
    "content": "#!/bin/bash\nCOMMIT_HASH=$(git rev-parse HEAD)\nTIMESTAMP=$(date +%Y%m%d%H%M%S)\necho \"v0.0.0-$TIMESTAMP-$COMMIT_HASH\""
  },
  {
    "path": "bin/update_docker_js_api_address.py",
    "content": "import os\n\ndir_path = '/app/dist/assets'\n\nfor file_name in os.listdir(dir_path):\n    if not file_name.endswith('.js'):\n        continue\n\n    file_path = os.path.join(dir_path, file_name)\n\n    api_url = 'http://localhost:8000'\n\n    with open(file_path, 'r') as f:\n        content = f.read()\n\n    if api_url not in content:\n        continue\n\n    content = content.replace(api_url, '/api')\n\n    with open(file_path, 'w') as f:\n        f.write(content)\n\n    print(f'replaced api url in file: {file_name}')\n"
  },
  {
    "path": "changelog/v0.6.0-zh.md",
    "content": "# 更新日志 (v0.6.0)\n\n## 概览\n\n作为一个重要版本发布，Crawlab v0.6.0 由一些重大的功能升级组成，包括性能、稳定性、健壮性、易用性方面的大量优化。本次 beta 版本理论上会比老版本更加健壮，特别是任务执行、文件同步、节点通信上面。但是，我们还是推荐用户在 Crawlab 新版本上更全面的测试不同的爬虫任务。\n\n## 升级优化\n\n#### 后端\n\n- **文件同步**. 将文件同步从原先的 MongoDB GridFS 迁移到分布式文件系统 SeaweedFS，以提升文件同步和爬虫部署的稳定性和健壮性。\n- **节点通信**. 将节点通信从原先基于 Redis 套壳的 RPC 迁移到 gRPC。工作节点通过向主节点发起 gRPC 请求来与 MongoDB 数据库间接交互。\n- **任务队列**. 将任务队列从 Redis 列表迁移到 MongoDB 集合，以提高灵活性，例如优先级队列。\n- **日志**. 将日志储存迁移到 SeaweedFS，以解决 MongoDB 数据库中的性能问题。\n- **SDK 集成**. 将结果数据储存从原生 SDK 迁移到了任务处理器集中导入到数据库。\n- **任务相关**. 将任务相关逻辑抽象为了任务调度器、任务处理器以及任务执行器，以减少系统耦合度，提升可扩展性和可维护性。\n- **组件化**. 引入依赖注入框架，将模块、服务以及子系统进行模块化。\n- **插件框架**. **Crawlab 插件框架 (CPF)** 已发布. 详情请参考 [这里](https://docs.crawlab.cn/zh/guide/plugin/).\n- **Git 集成**. Git 集成被作为内置功能.\n- **Scrapy 集成**. Scrapy 集成以插件形式存在，插件为 [spider-assistant](https://docs.crawlab.cn/zh/guide/plugin/plugin-spider-assistant.html).\n- **依赖集成**. Dependency 集成以插件形式存在，插件为 [dependency](https://docs.crawlab.cn/zh/guide/plugin/plugin-dependency).\n- **消息通知**. 消息通知功能以插件形式存在，插件为 [notification](https://docs.crawlab.cn/zh/guide/plugin/plugin-notification).\n\n#### 前端\n\n- **Vue 3**. 迁移到了最新的前端框架 Vue 3，以支持更高级的功能，例如组合式 API 和 TypeScript。\n- **UI 框架**. 从之前的 Vue-Element-Admin 迁移到了基于 Vue 3 的 UI 框架 Element-Plus，更多灵活性和功能性。\n- **高级文件编辑器**. 支持更高级的文件编辑器功能，包括拖砖操作、复制、移动、重命名、删除、文件编辑、代码高亮、导航标签等。\n- **可自定义表格**. 内置更多高级功能，包括自定义列、批量操作、搜索、过滤、排序等。\n- **导航标签**. 支持多导航标签查看不同的页面。\n- **批量创建**. 支持批量创建对象，包括爬虫、项目、定时任务等。\n- **详情导航**. 详情页里的侧边栏导航。\n- **更优化的仪表盘**. 主页仪表盘中更多的数据图表。\n\n#### 其他\n\n- **文档网站**. 升级 [文档网站](https://docs-next.crawlab.cn).\n- **官方插件**. 允许用户在 Crawlab 用户界面上安装 [官方插件](https://docs.crawlab.cn/zh/guide/plugin/)."
  },
  {
    "path": "changelog/v0.6.0.md",
    "content": "# Change Log (v0.6.0)\n\n## Overview\n\nAs a major release, v0.6.0 is consisted of a number of large changes to enhance the performance, scalability, robustness and usability of Crawlab. This beta version is theoretically more robust than older versions mainly in task execution, files synchronization and node management, yet we still recommend users to thoroughly run tests with various samples.\n\n## Enhancements\n\n#### Backend\n\n- **File Synchronization**. Migrated file sync from MongoDB GridFS to SeaweedFS for better stability and robustness.\n- **Node Communication**. Migrated node communication from Redis-based RPC to gRPC. Worker nodes indirectly interact with MongoDB by making gRPC calls to the master node.\n- **Task Queue**. Migrated task queue from Redis list to MongoDB collection to allow more flexibility (e.g. priority queue).\n- **Logging**. Migrated logging storage system to SeaweedFS to resolve performance issue in MongoDB.\n- **SDK Integration**. Migrated results data ingestion from native SDK to task handler side.\n- **Task Related**. Abstracted task related logics into Task Scheduler, Task Handler and Task Runners to increase decoupling and improve scalability and maintainability.\n- **Compotenization**. Introduced DI (dependency injection) framework and componentized modules, services and sub-systems.\n- **Plugin Framework**. **Crawlab Plugin Framework (CPF)** has been released. See more info [here](https://docs.crawlab.cn/en/guide/plugin/).\n- **Git Integration**. Git integration is implemented as a built-in feature.\n- **Scrapy Integration**. Scrapy integration is implemented as a plugin [spider-assistant](https://docs.crawlab.cn/en/guide/plugin/plugin-spider-assistant).\n- **Dependency Integration**. Dependency integration is implemented as a plugin [dependency](https://docs.crawlab.cn/en/guide/plugin/plugin-dependency).\n- **Notifications**. Notifications feature is implemented as a plugin [notification](https://docs.crawlab.cn/en/guide/plugin/plugin-notification).\n\n#### Frontend\n\n- **Vue 3**. Migrated to latest version of frontend framework Vue 3 to support more advanced features such as composition API and TypeScript.\n- **UI Framework**. Built with Vue 3-based UI framework Element-Plus from Vue-Element-Admin, more flexibility and functionality.\n- **Advanced File Editor**. Support more advanced file editor features including drag-and-drop copying/moving files, renaming, deleting, file editing, code highlight, nav tabs, etc.\n- **Customizable Table**. Support more advanced built-in operations such as columns adjustment, batch operation, searching, filtering, sorting, etc.\n- **Nav Tabs**. Support multiple nav tabs for viewing different pages.\n- **Batch Creation**. Support batch creating objects including spiders, projects, schedules, etc.\n- **Detail Navigation**. Sidebar navigation in detail pages.\n- **Enhanced Dashboard**. More stats charts in home page dashboard.\n\n#### Miscellaneous\n\n- **Documentation Site**. Upgraded [documentation site](https://docs.crawlab.cn/en).\n- **Official Plugins**. Allow users to install [official plugins](https://docs.crawlab.cn/en/guide/plugin/) on Crawlab web UI.\n"
  },
  {
    "path": "core/.editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = tab\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[{*.yaml,*.yml,package.json}]\nindent_size = 2\nindent_style = space\n"
  },
  {
    "path": "core/.github/workflows/test.yml",
    "content": "name: \"Test\"\n\non:\n  push:\n    branches: [ main, develop ]\n  pull_request:\n    # The branches below must be a subset of the branches above\n    branches: [ main, develop ]\n\njobs:\n  test:\n    name: Test\n    runs-on: ubuntu-20.04\n    services:\n      mongo:\n        image: mongo:5\n        ports:\n          - 27017:27017\n    env:\n      CRAWLAB_SERVER_PORT: 9999\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v2\n      - uses: actions/setup-go@v3\n        with:\n          go-version: '^1.22'\n      - name: Run unit tests\n        run: |\n          mods=(\\\n            \"github.com/crawlab-team/crawlab/core/controllers\" \\\n            \"github.com/crawlab-team/crawlab/core/models/client\" \\\n            \"github.com/crawlab-team/crawlab/core/models/service\" \\\n          )\n          for pkg in ${mods[@]}; do\n            go test ${pkg}\n          done\n"
  },
  {
    "path": "core/.gitignore",
    "content": ".idea\n.DS_Store\nvendor/\ntmp/\nbuild/\ndist/\n*.log\ngen/\n*.exe\n*.txt\n"
  },
  {
    "path": "core/LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "core/README.md",
    "content": "# crawlab-core\nBackend core modules for Crawlab\n"
  },
  {
    "path": "core/apps/api_v2.go",
    "content": "package apps\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/controllers\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/middlewares\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n)\n\nfunc init() {\n\t// set gin mode\n\tif viper.GetString(\"gin.mode\") == \"\" {\n\t\tgin.SetMode(gin.ReleaseMode)\n\t} else {\n\t\tgin.SetMode(viper.GetString(\"gin.mode\"))\n\t}\n}\n\ntype ApiV2 struct {\n\t// dependencies\n\tinterfaces.WithConfigPath\n\n\t// internals\n\tapp   *gin.Engine\n\tln    net.Listener\n\tsrv   *http.Server\n\tready bool\n}\n\nfunc (app *ApiV2) Init() {\n\t// initialize middlewares\n\t_ = app.initModuleWithApp(\"middlewares\", middlewares.InitMiddlewares)\n\n\t// initialize routes\n\t_ = app.initModuleWithApp(\"routes\", controllers.InitRoutes)\n}\n\nfunc (app *ApiV2) Start() {\n\t// address\n\thost := viper.GetString(\"server.host\")\n\tport := viper.GetString(\"server.port\")\n\taddress := net.JoinHostPort(host, port)\n\n\t// http server\n\tapp.srv = &http.Server{\n\t\tHandler: app.app,\n\t\tAddr:    address,\n\t}\n\n\t// listen\n\tvar err error\n\tapp.ln, err = net.Listen(\"tcp\", address)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tapp.ready = true\n\n\t// serve\n\tif err := http.Serve(app.ln, app.app); err != nil {\n\t\tif !errors.Is(err, http.ErrServerClosed) {\n\t\t\tlog.Error(\"run server error:\" + err.Error())\n\t\t} else {\n\t\t\tlog.Info(\"server graceful down\")\n\t\t}\n\t}\n}\n\nfunc (app *ApiV2) Wait() {\n\tutils.DefaultWait()\n}\n\nfunc (app *ApiV2) Stop() {\n\tctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)\n\tdefer cancel()\n\n\tif err := app.srv.Shutdown(ctx); err != nil {\n\t\tlog.Error(\"run server error:\" + err.Error())\n\t}\n}\n\nfunc (app *ApiV2) GetGinEngine() *gin.Engine {\n\treturn app.app\n}\n\nfunc (app *ApiV2) GetHttpServer() *http.Server {\n\treturn app.srv\n}\n\nfunc (app *ApiV2) Ready() (ok bool) {\n\treturn app.ready\n}\n\nfunc (app *ApiV2) initModuleWithApp(name string, fn func(app *gin.Engine) error) (err error) {\n\treturn initModule(name, func() error {\n\t\treturn fn(app.app)\n\t})\n}\n\nfunc NewApiV2() *ApiV2 {\n\tapi := &ApiV2{\n\t\tapp: gin.New(),\n\t}\n\tapi.Init()\n\treturn api\n}\n\nvar apiV2 *ApiV2\n\nfunc GetApiV2() *ApiV2 {\n\tif apiV2 != nil {\n\t\treturn apiV2\n\t}\n\tapiV2 = NewApiV2()\n\treturn apiV2\n}\n"
  },
  {
    "path": "core/apps/docker.go",
    "content": "package apps\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/sys_exec\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/imroc/req\"\n\t\"github.com/spf13/viper\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"time\"\n)\n\ntype Docker struct {\n\t// parent\n\tparent ServerApp\n\n\t// dependencies\n\tinterfaces.WithConfigPath\n\n\t// seaweedfs log\n\tfsLogFilePath string\n\tfsLogFile     *os.File\n\tfsReady       bool\n}\n\nfunc (app *Docker) Init() {\n\tvar err error\n\tapp.fsLogFile, err = os.OpenFile(app.fsLogFilePath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, os.FileMode(0777))\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\n\t// replace paths\n\tif err := app.replacePaths(); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// start nginx\n\tgo app.startNginx()\n\n\t// start seaweedfs\n\tgo app.startSeaweedFs()\n}\n\nfunc (app *Docker) Start() {\n\t// import demo\n\t//if utils.IsDemo() && utils.InitializedDemo() {\n\t//\tgo app.importDemo()\n\t//}\n}\n\nfunc (app *Docker) Wait() {\n\tDefaultWait()\n}\n\nfunc (app *Docker) Stop() {\n}\n\nfunc (app *Docker) GetParent() (parent ServerApp) {\n\treturn app.parent\n}\n\nfunc (app *Docker) SetParent(parent ServerApp) {\n\tapp.parent = parent\n}\n\nfunc (app *Docker) Ready() (ok bool) {\n\treturn app.fsReady &&\n\t\tapp.parent.GetApi().Ready()\n}\n\nfunc (app *Docker) replacePaths() (err error) {\n\t// read\n\tindexHtmlPath := \"/app/dist/index.html\"\n\tindexHtmlBytes, err := os.ReadFile(indexHtmlPath)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tindexHtml := string(indexHtmlBytes)\n\n\t// replace paths\n\tbaseUrl := viper.GetString(\"base.url\")\n\tif baseUrl != \"\" {\n\t\tindexHtml = app._replacePath(indexHtml, \"js\", baseUrl)\n\t\tindexHtml = app._replacePath(indexHtml, \"css\", baseUrl)\n\t\tindexHtml = app._replacePath(indexHtml, \"<link rel=\\\"stylesheet\\\" href=\\\"\", baseUrl)\n\t\tindexHtml = app._replacePath(indexHtml, \"<link rel=\\\"stylesheet\\\" href=\\\"\", baseUrl)\n\t\tindexHtml = app._replacePath(indexHtml, \"window.VUE_APP_API_BASE_URL = '\", baseUrl)\n\t}\n\n\t// replace path of baidu tongji\n\tinitBaiduTongji := viper.GetString(\"string\")\n\tif initBaiduTongji != \"\" {\n\t\tindexHtml = strings.ReplaceAll(indexHtml, \"window.VUE_APP_INIT_BAIDU_TONGJI = ''\", fmt.Sprintf(\"window.VUE_APP_INIT_BAIDU_TONGJI = '%s'\", initBaiduTongji))\n\t}\n\n\t// replace path of umeng\n\tinitUmeng := viper.GetString(\"string\")\n\tif initUmeng != \"\" {\n\t\tindexHtml = strings.ReplaceAll(indexHtml, \"window.VUE_APP_INIT_UMENG = ''\", fmt.Sprintf(\"window.VUE_APP_INIT_UMENG = '%s'\", initUmeng))\n\t}\n\n\t// write\n\tif err := os.WriteFile(indexHtmlPath, []byte(indexHtml), os.FileMode(0766)); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc (app *Docker) _replacePath(text, path, baseUrl string) (res string) {\n\ttext = strings.ReplaceAll(text, path, fmt.Sprintf(\"%s/%s\", baseUrl, path))\n\treturn text\n}\n\nfunc (app *Docker) startNginx() {\n\tcmd := exec.Command(\"service\", \"nginx\", \"start\")\n\tsys_exec.ConfigureCmdLogging(cmd, func(scanner *bufio.Scanner) {\n\t\tfor scanner.Scan() {\n\t\t\tline := fmt.Sprintf(\"[nginx] %s\\n\", scanner.Text())\n\t\t\t_, _ = os.Stdout.WriteString(line)\n\t\t}\n\t})\n\tif err := cmd.Run(); err != nil {\n\t\ttrace.PrintError(err)\n\t}\n}\n\nfunc (app *Docker) startSeaweedFs() {\n\tseaweedFsDataPath := \"/data/seaweedfs\"\n\tif !utils.Exists(seaweedFsDataPath) {\n\t\t_ = os.MkdirAll(seaweedFsDataPath, os.FileMode(0777))\n\t}\n\tcmd := exec.Command(\"weed\", \"server\",\n\t\t\"-dir\", \"/data\",\n\t\t\"-master.dir\", seaweedFsDataPath,\n\t\t\"-volume.dir.idx\", seaweedFsDataPath,\n\t\t\"-ip\", \"localhost\",\n\t\t\"-volume.port\", \"9999\",\n\t\t\"-volume.minFreeSpace\", \"1GiB\",\n\t\t\"-filer\",\n\t)\n\tsys_exec.ConfigureCmdLogging(cmd, func(scanner *bufio.Scanner) {\n\t\tfor scanner.Scan() {\n\t\t\tline := fmt.Sprintf(\"[seaweedfs] %s\\n\", scanner.Text())\n\t\t\t_, _ = app.fsLogFile.WriteString(line)\n\t\t}\n\t})\n\tgo func() {\n\t\tif err := cmd.Run(); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t}\n\t}()\n\tfor {\n\t\t_, err := req.Get(\"http://localhost:8888\")\n\t\tif err != nil {\n\t\t\ttime.Sleep(1 * time.Second)\n\t\t\tcontinue\n\t\t}\n\t\tapp.fsReady = true\n\t\treturn\n\t}\n}\n\nfunc (app *Docker) importDemo() {\n\tfor {\n\t\tif app.Ready() {\n\t\t\tbreak\n\t\t}\n\t\ttime.Sleep(1 * time.Second)\n\t}\n\t_ = utils.ImportDemo()\n}\n\nfunc NewDocker(svr ServerApp) *Docker {\n\tdck := &Docker{\n\t\tparent:        svr,\n\t\tfsLogFilePath: \"/var/log/weed.log\",\n\t}\n\n\tdck.Init()\n\n\treturn dck\n}\n\nvar dck *Docker\n\nfunc GetDocker(svr ServerApp) *Docker {\n\tif dck != nil {\n\t\treturn dck\n\t}\n\tdck = NewDocker(svr)\n\treturn dck\n}\n"
  },
  {
    "path": "core/apps/interfaces.go",
    "content": "package apps\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/gin-gonic/gin\"\n\t\"net/http\"\n)\n\ntype App interface {\n\tInit()\n\tStart()\n\tWait()\n\tStop()\n}\n\ntype ApiApp interface {\n\tApp\n\tGetGinEngine() (engine *gin.Engine)\n\tGetHttpServer() (svr *http.Server)\n\tReady() (ok bool)\n}\n\ntype NodeApp interface {\n\tApp\n\tinterfaces.WithConfigPath\n}\n\ntype ServerApp interface {\n\tNodeApp\n\tGetApi() (api ApiApp)\n\tGetNodeService() (masterSvc interfaces.NodeService)\n}\n\ntype DockerApp interface {\n\tApp\n\tGetParent() (parent NodeApp)\n\tSetParent(parent NodeApp)\n\tReady() (ok bool)\n}\n"
  },
  {
    "path": "core/apps/server_v2.go",
    "content": "package apps\n\nimport (\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/node/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/spf13/viper\"\n\t\"net/http\"\n\t_ \"net/http/pprof\"\n)\n\ntype ServerV2 struct {\n\t// settings\n\tgrpcAddress interfaces.Address\n\n\t// dependencies\n\tinterfaces.WithConfigPath\n\n\t// modules\n\tnodeSvc interfaces.NodeService\n\tapi     *ApiV2\n\tdck     *Docker\n\n\t// internals\n\tquit chan int\n}\n\nfunc (app *ServerV2) Init() {\n\t// log node info\n\tapp.logNodeInfo()\n\n\t// pprof\n\tapp.initPprof()\n}\n\nfunc (app *ServerV2) Start() {\n\tif utils.IsMaster() {\n\t\t// start docker app\n\t\tif utils.IsDocker() {\n\t\t\tgo app.dck.Start()\n\t\t}\n\n\t\t// start api\n\t\tgo app.api.Start()\n\t}\n\n\t// start node service\n\tgo app.nodeSvc.Start()\n}\n\nfunc (app *ServerV2) Wait() {\n\t<-app.quit\n}\n\nfunc (app *ServerV2) Stop() {\n\tapp.api.Stop()\n\tapp.quit <- 1\n}\n\nfunc (app *ServerV2) GetApi() ApiApp {\n\treturn app.api\n}\n\nfunc (app *ServerV2) GetNodeService() interfaces.NodeService {\n\treturn app.nodeSvc\n}\n\nfunc (app *ServerV2) logNodeInfo() {\n\tlog.Infof(\"current node type: %s\", utils.GetNodeType())\n\tif utils.IsDocker() {\n\t\tlog.Infof(\"running in docker container\")\n\t}\n}\n\nfunc (app *ServerV2) initPprof() {\n\tif viper.GetBool(\"pprof\") {\n\t\tgo func() {\n\t\t\tfmt.Println(http.ListenAndServe(\"0.0.0.0:6060\", nil))\n\t\t}()\n\t}\n}\n\nfunc NewServerV2() (app NodeApp) {\n\t// server\n\tsvr := &ServerV2{\n\t\tWithConfigPath: config.NewConfigPathService(),\n\t\tquit:           make(chan int, 1),\n\t}\n\n\t// master modules\n\tif utils.IsMaster() {\n\t\t// api\n\t\tsvr.api = GetApiV2()\n\n\t\t// docker\n\t\tif utils.IsDocker() {\n\t\t\tsvr.dck = GetDocker(svr)\n\t\t}\n\t}\n\n\t// node service\n\tvar err error\n\tif utils.IsMaster() {\n\t\tsvr.nodeSvc, err = service.GetMasterServiceV2()\n\t} else {\n\t\tsvr.nodeSvc, err = service.GetWorkerServiceV2()\n\t}\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn svr\n}\n\nvar serverV2 NodeApp\n\nfunc GetServerV2() NodeApp {\n\tif serverV2 != nil {\n\t\treturn serverV2\n\t}\n\tserverV2 = NewServerV2()\n\treturn serverV2\n}\n"
  },
  {
    "path": "core/apps/utils.go",
    "content": "package apps\n\nimport (\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\nfunc Start(app App) {\n\tstart(app)\n}\n\nfunc start(app App) {\n\tapp.Init()\n\tgo app.Start()\n\tapp.Wait()\n\tapp.Stop()\n}\n\nfunc DefaultWait() {\n\tutils.DefaultWait()\n}\n\nfunc initModule(name string, fn func() error) (err error) {\n\tif err := fn(); err != nil {\n\t\tlog.Error(fmt.Sprintf(\"init %s error: %s\", name, err.Error()))\n\t\t_ = trace.TraceError(err)\n\t\tpanic(err)\n\t}\n\tlog.Info(fmt.Sprintf(\"initialized %s successfully\", name))\n\treturn nil\n}\n"
  },
  {
    "path": "core/cmd/root.go",
    "content": "package cmd\n\nimport (\n\t\"github.com/spf13/cobra\"\n)\n\nvar (\n\t// Used for flags.\n\tcfgFile string\n\n\trootCmd = &cobra.Command{\n\t\tUse:   \"crawlab\",\n\t\tShort: \"CLI tool for Crawlab\",\n\t\tLong: `The CLI tool is for controlling against Crawlab.\nCrawlab is a distributed web crawler and task admin platform\naimed at making web crawling and task management easier.\n`,\n\t}\n)\n\n// Execute executes the root command.\nfunc Execute() error {\n\treturn rootCmd.Execute()\n}\n\nfunc init() {\n\trootCmd.PersistentFlags().StringVar(&cfgFile, \"c\", \"\", \"Use Custom Config File\")\n}\n"
  },
  {
    "path": "core/cmd/server.go",
    "content": "package cmd\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/apps\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc init() {\n\trootCmd.AddCommand(serverCmd)\n}\n\nvar serverCmd = &cobra.Command{\n\tUse:     \"server\",\n\tAliases: []string{\"s\"},\n\tShort:   \"Start Crawlab server\",\n\tLong:    `Start Crawlab node server that can serve as API, task scheduler, task runner, etc.`,\n\tRun: func(cmd *cobra.Command, args []string) {\n\t\t// app\n\t\tsvr := apps.GetServerV2()\n\n\t\t// start\n\t\tapps.Start(svr)\n\t},\n}\n"
  },
  {
    "path": "core/cmd/server_test.go",
    "content": "package cmd\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/apps\"\n\t\"os\"\n\t\"testing\"\n)\n\nfunc TestCmdServer(t *testing.T) {\n\t_ = os.Setenv(\"CRAWLAB_PPROF\", \"true\")\n\n\t// app\n\tsvr := apps.GetServerV2()\n\n\t// start\n\tapps.Start(svr)\n}\n"
  },
  {
    "path": "core/color/service.go",
    "content": "package color\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/data\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"math/rand\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc NewService() (svc interfaces.ColorService, err error) {\n\tvar cl []*entity.Color\n\tcm := map[string]*entity.Color{}\n\n\tif err := json.Unmarshal([]byte(data.ColorsDataText), &cl); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\tfor _, c := range cl {\n\t\tcm[c.Name] = c\n\t}\n\n\treturn &Service{\n\t\tcl: cl,\n\t\tcm: cm,\n\t}, nil\n}\n\ntype Service struct {\n\tcl []*entity.Color\n\tcm map[string]*entity.Color\n}\n\nfunc (svc *Service) Inject() (err error) {\n\treturn nil\n}\n\nfunc (svc *Service) GetByName(name string) (res interfaces.Color, err error) {\n\tres, ok := svc.cm[name]\n\tif !ok {\n\t\treturn res, errors.ErrorModelNotFound\n\t}\n\treturn res, err\n}\n\nfunc (svc *Service) GetRandom() (res interfaces.Color, err error) {\n\tif len(svc.cl) == 0 {\n\t\thexStr, err := svc.getRandomColorHex()\n\t\tif err != nil {\n\t\t\treturn res, err\n\t\t}\n\t\treturn &entity.Color{Hex: hexStr}, nil\n\t}\n\n\tidx := rand.Intn(len(svc.cl))\n\treturn svc.cl[idx], nil\n}\n\nfunc (svc *Service) getRandomColorHex() (res string, err error) {\n\tn := 6\n\tarr := make([]string, n)\n\tfor i := 0; i < n; i++ {\n\t\tarr[i], err = svc.getRandomHexChar()\n\t\tif err != nil {\n\t\t\treturn res, err\n\t\t}\n\t}\n\treturn strings.Join(arr, \"\"), nil\n}\n\nfunc (svc *Service) getRandomHexChar() (res string, err error) {\n\tn := rand.Intn(16)\n\tb := []byte(strconv.Itoa(n))\n\th := make([]byte, 1)\n\thex.Encode(h, b)\n\treturn string(h), nil\n}\n"
  },
  {
    "path": "core/config/base.go",
    "content": "package config\n\nimport (\n\t\"github.com/mitchellh/go-homedir\"\n\t\"github.com/spf13/viper\"\n\t\"path/filepath\"\n)\n\nvar HomeDirPath, _ = homedir.Dir()\n\nconst configDirName = \".crawlab\"\n\nconst configName = \"config.json\"\n\nfunc GetConfigPath() string {\n\tif viper.GetString(\"metadata\") != \"\" {\n\t\tMetadataPath := viper.GetString(\"metadata\")\n\t\treturn filepath.Join(MetadataPath, configName)\n\t}\n\treturn filepath.Join(HomeDirPath, configDirName, configName)\n}\n"
  },
  {
    "path": "core/config/config.go",
    "content": "package config\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/fsnotify/fsnotify\"\n\t\"github.com/spf13/viper\"\n\t\"strings\"\n)\n\nfunc init() {\n\t// config instance\n\tc := Config{Name: \"\"}\n\n\t// init config file\n\tif err := c.Init(); err != nil {\n\t\tlog.Warn(\"unable to init config\")\n\t\treturn\n\t}\n\n\t// watch config change and load responsively\n\tc.WatchConfig()\n\n\t// init log level\n\tc.initLogLevel()\n}\n\ntype Config struct {\n\tName string\n}\n\ntype InitConfigOptions struct {\n\tName string\n}\n\nfunc (c *Config) WatchConfig() {\n\tviper.WatchConfig()\n\tviper.OnConfigChange(func(e fsnotify.Event) {\n\t\tlog.Infof(\"Config file changed: %s\", e.Name)\n\t})\n}\n\nfunc (c *Config) Init() (err error) {\n\t// config\n\tif c.Name != \"\" {\n\t\tviper.SetConfigFile(c.Name) // if config file is set, load it accordingly\n\t} else {\n\t\tviper.AddConfigPath(\"./conf\") // if no config file is set, load by default\n\t\tviper.SetConfigName(\"config\")\n\t}\n\n\t// config type as yaml\n\tviper.SetConfigType(\"yaml\") // default yaml\n\n\t// auto env\n\tviper.AutomaticEnv() // load matched environment variables\n\n\t// env prefix\n\tviper.SetEnvPrefix(\"CRAWLAB\") // environment variable prefix as CRAWLAB\n\n\t// replacer\n\treplacer := strings.NewReplacer(\".\", \"_\")\n\tviper.SetEnvKeyReplacer(replacer)\n\n\t// read in config\n\tif err := viper.ReadInConfig(); err != nil {\n\t\tlog.Errorf(\"Error reading config file, %s\", err)\n\t\ttrace.PrintError(err)\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (c *Config) initLogLevel() {\n\t// set log level\n\tlogLevel := viper.GetString(\"log.level\")\n\tl, err := log.ParseLevel(logLevel)\n\tif err != nil {\n\t\tl = log.InfoLevel\n\t}\n\tlog.SetLevel(l)\n}\n"
  },
  {
    "path": "core/config/config_test.go",
    "content": "package config\n\nimport (\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n)\n\nfunc TestInitConfig(t *testing.T) {\n\terr := InitConfig()\n\trequire.Nil(t, err)\n}\n"
  },
  {
    "path": "core/config/path.go",
    "content": "package config\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n)\n\ntype PathService struct {\n\tcfgPath string\n}\n\nfunc (svc *PathService) GetConfigPath() (path string) {\n\treturn svc.cfgPath\n}\n\nfunc (svc *PathService) SetConfigPath(path string) {\n\tsvc.cfgPath = path\n}\n\nfunc NewConfigPathService() (svc interfaces.WithConfigPath) {\n\tsvc = &PathService{}\n\tsvc.SetConfigPath(GetConfigPath())\n\treturn svc\n}\n"
  },
  {
    "path": "core/constants/action.go",
    "content": "package constants\n\nconst (\n\tActionTypeVisit          = \"visit\"\n\tActionTypeInstallDep     = \"install_dep\"\n\tActionTypeInstallLang    = \"install_lang\"\n\tActionTypeViewDisclaimer = \"view_disclaimer\"\n)\n"
  },
  {
    "path": "core/constants/anchor.go",
    "content": "package constants\n\nconst (\n\tAnchorStartStage = \"START_STAGE\"\n\tAnchorStartUrl   = \"START_URL\"\n\tAnchorItems      = \"ITEMS\"\n\tAnchorParsers    = \"PARSERS\"\n)\n"
  },
  {
    "path": "core/constants/auth.go",
    "content": "package constants\n\nconst (\n\tOwnerTypeAll    = \"all\"\n\tOwnerTypeMe     = \"me\"\n\tOwnerTypePublic = \"public\"\n)\n"
  },
  {
    "path": "core/constants/cache.go",
    "content": "package constants\n\nconst (\n\tCacheColName  = \"cache\"\n\tCacheColKey   = \"k\"\n\tCacheColValue = \"v\"\n\tCacheColTime  = \"t\"\n)\n"
  },
  {
    "path": "core/constants/channels.go",
    "content": "package constants\n\nconst (\n\tChannelAllNode = \"nodes:public\"\n\n\tChannelWorkerNode = \"nodes:\"\n\n\tChannelMasterNode = \"nodes:master\"\n)\n"
  },
  {
    "path": "core/constants/common.go",
    "content": "package constants\n\nconst (\n\tASCENDING  = \"asc\"\n\tDESCENDING = \"dsc\"\n)\n"
  },
  {
    "path": "core/constants/config_spider.go",
    "content": "package constants\n\nconst (\n\tEngineScrapy = \"scrapy\"\n\tEngineColly  = \"colly\"\n)\n"
  },
  {
    "path": "core/constants/data_collection.go",
    "content": "package constants\n\nconst (\n\tDataCollectionKey = \"_col\"\n)\n"
  },
  {
    "path": "core/constants/data_field.go",
    "content": "package constants\n\nconst (\n\tDataFieldTypeGeneral  = \"general\"\n\tDataFieldTypeNumeric  = \"numeric\"\n\tDataFieldTypeDate     = \"date\"\n\tDataFieldTypeCurrency = \"currency\"\n\tDataFieldTypeUrl      = \"url\"\n\tDataFieldTypeImage    = \"image\"\n\tDataFieldTypeAudio    = \"audio\"\n\tDataFieldTypeVideo    = \"video\"\n)\n"
  },
  {
    "path": "core/constants/database.go",
    "content": "package constants\n\nconst (\n\tColJob = \"jobs\"\n)\n"
  },
  {
    "path": "core/constants/delegate.go",
    "content": "package constants\n"
  },
  {
    "path": "core/constants/ds.go",
    "content": "package constants\n\nconst (\n\tDataSourceTypeMongo         = \"mongo\"\n\tDataSourceTypeMysql         = \"mysql\"\n\tDataSourceTypePostgresql    = \"postgresql\"\n\tDataSourceTypeMssql         = \"mssql\"\n\tDataSourceTypeSqlite        = \"sqlite\"\n\tDataSourceTypeCockroachdb   = \"cockroachdb\"\n\tDataSourceTypeElasticSearch = \"elasticsearch\"\n\tDataSourceTypeKafka         = \"kafka\"\n)\n\nconst (\n\tDefaultHost = \"localhost\"\n)\n\nconst (\n\tDefaultMongoPort         = 27017\n\tDefaultMysqlPort         = 3306\n\tDefaultPostgresqlPort    = 5432\n\tDefaultMssqlPort         = 1433\n\tDefaultCockroachdbPort   = 26257\n\tDefaultElasticsearchPort = 9200\n\tDefaultKafkaPort         = 9092\n)\n\nconst (\n\tDataSourceStatusOnline  = \"on\"\n\tDataSourceStatusOffline = \"off\"\n)\n"
  },
  {
    "path": "core/constants/encrypt.go",
    "content": "package constants\n\nconst (\n\tDefaultEncryptServerKey = \"0123456789abcdef\"\n)\n"
  },
  {
    "path": "core/constants/errors.go",
    "content": "package constants\n\nimport (\n\t\"errors\"\n)\n\nvar (\n\t//ErrorMongoError                = e.NewSystemOPError(1001, \"system error:[mongo]%s\", http.StatusInternalServerError)\n\t//ErrorUserNotFound              = e.NewBusinessError(10001, \"user not found.\", http.StatusUnauthorized)\n\t//ErrorUsernameOrPasswordInvalid = e.NewBusinessError(11001, \"username or password invalid\", http.StatusUnauthorized)\n\tErrAlreadyExists    = errors.New(\"already exists\")\n\tErrNotExists        = errors.New(\"not exists\")\n\tErrForbidden        = errors.New(\"forbidden\")\n\tErrInvalidOperation = errors.New(\"invalid operation\")\n\tErrInvalidOptions   = errors.New(\"invalid options\")\n\tErrNoTasksAvailable = errors.New(\"no tasks available\")\n\tErrInvalidType      = errors.New(\"invalid type\")\n\tErrInvalidSignal    = errors.New(\"invalid signal\")\n\tErrEmptyValue       = errors.New(\"empty value\")\n\tErrTaskError        = errors.New(\"task error\")\n\tErrTaskLost         = errors.New(\"task lost\")\n\tErrTaskCancelled    = errors.New(\"task cancelled\")\n\tErrUnableToCancel   = errors.New(\"unable to cancel\")\n\tErrUnableToDispose  = errors.New(\"unable to dispose\")\n\tErrAlreadyDisposed  = errors.New(\"already disposed\")\n\tErrStopped          = errors.New(\"stopped\")\n\tErrMissingCol       = errors.New(\"missing col\")\n\tErrInvalidValue     = errors.New(\"invalid value\")\n\tErrInvalidCronSpec  = errors.New(\"invalid cron spec\")\n)\n"
  },
  {
    "path": "core/constants/event.go",
    "content": "package constants\n\nconst (\n\tGrpcEventServiceTypeRegister = \"register\"\n\tGrpcEventServiceTypeSend     = \"send\"\n)\n"
  },
  {
    "path": "core/constants/export.go",
    "content": "package constants\n\nconst (\n\tExportTypeCsv  = \"csv\"\n\tExportTypeJson = \"json\"\n)\n"
  },
  {
    "path": "core/constants/file.go",
    "content": "package constants\n\nconst EmptyFileData = \" \"\n\nconst FsKeepFileName = \".gitkeep\"\n"
  },
  {
    "path": "core/constants/filer.go",
    "content": "package constants\n\nconst (\n\tDefaultFilerAuthKey = \"Crawlab2021!\"\n)\n"
  },
  {
    "path": "core/constants/filter.go",
    "content": "package constants\n\nconst (\n\tFilterQueryFieldConditions = \"conditions\"\n\tFilterQueryFieldAll        = \"all\"\n)\n\nconst (\n\tFilterObjectTypeString  = \"string\"\n\tFilterObjectTypeNumber  = \"number\"\n\tFilterObjectTypeBoolean = \"boolean\"\n)\n\nconst (\n\tFilterOpNotSet           = \"ns\"\n\tFilterOpContains         = \"c\"\n\tFilterOpNotContains      = \"nc\"\n\tFilterOpRegex            = \"r\"\n\tFilterOpEqual            = \"eq\"\n\tFilterOpNotEqual         = \"ne\"\n\tFilterOpIn               = \"in\"\n\tFilterOpNotIn            = \"nin\"\n\tFilterOpGreaterThan      = \"gt\"\n\tFilterOpLessThan         = \"lt\"\n\tFilterOpGreaterThanEqual = \"gte\"\n\tFilterOpLessThanEqual    = \"lte\"\n\tFilterOpSearch           = \"s\"\n)\n"
  },
  {
    "path": "core/constants/git.go",
    "content": "package constants\n\nconst (\n\tGitAuthTypeHttp = \"http\"\n\tGitAuthTypeSsh  = \"ssh\"\n)\n\nconst (\n\tGitRemoteNameUpstream = \"upstream\"\n\tGitRemoteNameOrigin   = \"origin\"\n)\n\nconst (\n\tGitBranchMaster = \"master\"\n\tGitBranchMain   = \"main\"\n)\n"
  },
  {
    "path": "core/constants/grpc.go",
    "content": "package constants\n\nconst (\n\tDefaultGrpcServerHost       = \"\"\n\tDefaultGrpcServerPort       = \"9666\"\n\tDefaultGrpcClientRemoteHost = \"localhost\"\n\tDefaultGrpcClientRemotePort = DefaultGrpcServerPort\n\tDefaultGrpcAuthKey          = \"Crawlab2021!\"\n)\n\nconst (\n\tGrpcHeaderAuthorization = \"authorization\"\n)\n\nconst (\n\tGrpcSubscribeTypeNode = \"node\"\n)\n"
  },
  {
    "path": "core/constants/http.go",
    "content": "package constants\n\nconst (\n\tHttpResponseStatusOk       = \"ok\"\n\tHttpResponseMessageSuccess = \"success\"\n\tHttpResponseMessageError   = \"error\"\n)\n\nconst (\n\tHttpContentTypeApplicationJson = \"application/json\"\n)\n"
  },
  {
    "path": "core/constants/log.go",
    "content": "package constants\n\nconst (\n\tErrorRegexPattern = \"(?:[ :,.]|^)((?:error|exception|traceback)s?)(?:[ :,.]|$)\"\n)\n"
  },
  {
    "path": "core/constants/message.go",
    "content": "package constants\n\nconst (\n\tMsgTypeGetLog        = \"get-log\"\n\tMsgTypeGetSystemInfo = \"get-sys-info\"\n\tMsgTypeCancelTask    = \"cancel-task\"\n\tMsgTypeRemoveLog     = \"remove-log\"\n\tMsgTypeRemoveSpider  = \"remove-spider\"\n)\n"
  },
  {
    "path": "core/constants/node.go",
    "content": "package constants\n\nconst (\n\tNodeStatusUnregistered = \"u\"\n\tNodeStatusRegistered   = \"r\"\n\tNodeStatusOnline       = \"on\"\n\tNodeStatusOffline      = \"off\"\n)\n"
  },
  {
    "path": "core/constants/notification.go",
    "content": "package constants\n\nconst (\n\tNotificationTriggerPatternTask = \"^task\"\n\tNotificationTriggerPatternNode = \"^node\"\n)\n\nconst (\n\tNotificationTriggerTaskFinish       = \"task_finish\"\n\tNotificationTriggerTaskError        = \"task_error\"\n\tNotificationTriggerTaskEmptyResults = \"task_empty_results\"\n\tNotificationTriggerNodeStatusChange = \"node_status_change\"\n\tNotificationTriggerNodeOnline       = \"node_online\"\n\tNotificationTriggerNodeOffline      = \"node_offline\"\n\tNotificationTriggerAlert            = \"alert\"\n)\n\nconst (\n\tNotificationTemplateModeRichText = \"rich-text\"\n\tNotificationTemplateModeMarkdown = \"markdown\"\n)\n"
  },
  {
    "path": "core/constants/pagination.go",
    "content": "package constants\n\nvar PaginationDefaultPage = 1\nvar PaginationDefaultSize = 10\n"
  },
  {
    "path": "core/constants/register.go",
    "content": "package constants\n\nconst (\n\tRegisterTypeMac        = \"mac\"\n\tRegisterTypeIp         = \"ip\"\n\tRegisterTypeHostname   = \"hostname\"\n\tRegisterTypeCustomName = \"customName\"\n)\n"
  },
  {
    "path": "core/constants/results.go",
    "content": "package constants\n\nconst (\n\tHashKey = \"_h\"\n)\n\nconst (\n\tDedupTypeIgnore    = \"ignore\"\n\tDedupTypeOverwrite = \"overwrite\"\n)\n"
  },
  {
    "path": "core/constants/rpc.go",
    "content": "package constants\n\nconst (\n\tRpcInstallLang          = \"install_lang\"\n\tRpcInstallDep           = \"install_dep\"\n\tRpcUninstallDep         = \"uninstall_dep\"\n\tRpcGetInstalledDepList  = \"get_installed_dep_list\"\n\tRpcGetLang              = \"get_lang\"\n\tRpcCancelTask           = \"cancel_task\"\n\tRpcGetSystemInfoService = \"get_system_info\"\n\tRpcRemoveSpider         = \"remove_spider\"\n)\n"
  },
  {
    "path": "core/constants/schedule.go",
    "content": "package constants\n\nconst (\n\tScheduleStatusStop    = \"stopped\"\n\tScheduleStatusRunning = \"running\"\n\tScheduleStatusError   = \"error\"\n\n\tScheduleStatusErrorNotFoundNode   = \"Not Found Node\"\n\tScheduleStatusErrorNotFoundSpider = \"Not Found Spider\"\n)\n"
  },
  {
    "path": "core/constants/scrapy.go",
    "content": "package constants\n\nconst ScrapyProtectedStageNames = \"\"\n\nconst ScrapyProtectedFieldNames = \"_id,task_id,ts\"\n"
  },
  {
    "path": "core/constants/signal.go",
    "content": "package constants\n\nconst (\n\tSignalQuit = iota\n)\n"
  },
  {
    "path": "core/constants/sort.go",
    "content": "package constants\n\nconst (\n\tSortQueryField = \"sort\"\n)\n"
  },
  {
    "path": "core/constants/system.go",
    "content": "package constants\n\nconst (\n\tWindows = \"windows\"\n\tLinux   = \"linux\"\n\tDarwin  = \"darwin\"\n)\n\nconst (\n\tPython = \"python\"\n\tNodejs = \"node\"\n\tJava   = \"java\"\n)\n\nconst (\n\tInstallStatusNotInstalled    = \"not-installed\"\n\tInstallStatusInstalling      = \"installing\"\n\tInstallStatusInstallingOther = \"installing-other\"\n\tInstallStatusInstalled       = \"installed\"\n)\n\nconst (\n\tLangTypeLang      = \"lang\"\n\tLangTypeWebDriver = \"webdriver\"\n)\n"
  },
  {
    "path": "core/constants/task.go",
    "content": "package constants\n\nconst (\n\tTaskStatusPending   = \"pending\"\n\tTaskStatusRunning   = \"running\"\n\tTaskStatusFinished  = \"finished\"\n\tTaskStatusError     = \"error\"\n\tTaskStatusCancelled = \"cancelled\"\n\tTaskStatusAbnormal  = \"abnormal\"\n)\n\nconst (\n\tRunTypeAllNodes      = \"all-nodes\"\n\tRunTypeRandom        = \"random\"\n\tRunTypeSelectedNodes = \"selected-nodes\"\n)\n\nconst (\n\tTaskTypeSpider = \"spider\"\n\tTaskTypeSystem = \"system\"\n)\n\ntype TaskSignal int\n\nconst (\n\tTaskSignalFinish TaskSignal = iota\n\tTaskSignalCancel\n\tTaskSignalError\n\tTaskSignalLost\n)\n\nconst (\n\tTaskListQueuePrefixPublic = \"tasks:public\"\n\tTaskListQueuePrefixNodes  = \"tasks:nodes\"\n)\n\nconst (\n\tTaskKey = \"_tid\"\n)\n"
  },
  {
    "path": "core/constants/user.go",
    "content": "package constants\n\nconst (\n\tRoleAdmin  = \"admin\"\n\tRoleNormal = \"normal\"\n)\n\nconst (\n\tDefaultAdminUsername = \"admin\"\n\tDefaultAdminPassword = \"admin\"\n)\n\nconst (\n\tUserContextKey = \"user\"\n)\n"
  },
  {
    "path": "core/constants/variable.go",
    "content": "package constants\n\nconst (\n\tString  = \"string\"\n\tNumber  = \"number\"\n\tBoolean = \"boolean\"\n\tArray   = \"array\"\n\tObject  = \"object\"\n)\n"
  },
  {
    "path": "core/container/container.go",
    "content": "package container\n\nimport (\n\t\"go.uber.org/dig\"\n)\n\nvar c = dig.New()\n\nfunc GetContainer() *dig.Container {\n\treturn c\n}\n"
  },
  {
    "path": "core/controllers/base_file_v2.go",
    "content": "package controllers\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\tlog2 \"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/fs\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n)\n\nfunc GetBaseFileListDir(rootPath string, c *gin.Context) {\n\tpath := c.Query(\"path\")\n\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tfiles, err := fsSvc.List(path)\n\tif err != nil {\n\t\tif !errors.Is(err, os.ErrNotExist) {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\tHandleSuccessWithData(c, files)\n}\n\nfunc GetBaseFileFile(rootPath string, c *gin.Context) {\n\tpath := c.Query(\"path\")\n\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tdata, err := fsSvc.GetFile(path)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, string(data))\n}\n\nfunc GetBaseFileFileInfo(rootPath string, c *gin.Context) {\n\tpath := c.Query(\"path\")\n\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tinfo, err := fsSvc.GetFileInfo(path)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, info)\n}\n\nfunc PostBaseFileSaveFile(rootPath string, c *gin.Context) {\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tif c.GetHeader(\"Content-Type\") == \"application/json\" {\n\t\tvar payload struct {\n\t\t\tPath string `json:\"path\"`\n\t\t\tData string `json:\"data\"`\n\t\t}\n\t\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\t\tHandleErrorBadRequest(c, err)\n\t\t\treturn\n\t\t}\n\t\tif err := fsSvc.Save(payload.Path, []byte(payload.Data)); err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t} else {\n\t\tpath, ok := c.GetPostForm(\"path\")\n\t\tif !ok {\n\t\t\tHandleErrorBadRequest(c, errors.New(\"missing required field 'path'\"))\n\t\t\treturn\n\t\t}\n\t\tfile, err := c.FormFile(\"file\")\n\t\tif err != nil {\n\t\t\tHandleErrorBadRequest(c, err)\n\t\t\treturn\n\t\t}\n\t\tf, err := file.Open()\n\t\tif err != nil {\n\t\t\tHandleErrorBadRequest(c, err)\n\t\t\treturn\n\t\t}\n\t\tfileData, err := io.ReadAll(f)\n\t\tif err != nil {\n\t\t\tHandleErrorBadRequest(c, err)\n\t\t\treturn\n\t\t}\n\t\tif err := fsSvc.Save(path, fileData); err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc PostBaseFileSaveFiles(rootPath string, c *gin.Context) {\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tform, err := c.MultipartForm()\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\twg := sync.WaitGroup{}\n\twg.Add(len(form.File))\n\tfor path := range form.File {\n\t\tgo func(path string) {\n\t\t\tfile, err := c.FormFile(path)\n\t\t\tif err != nil {\n\t\t\t\tlog2.Warnf(\"invalid file header: %s\", path)\n\t\t\t\tlog2.Error(err.Error())\n\t\t\t\twg.Done()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tf, err := file.Open()\n\t\t\tif err != nil {\n\t\t\t\tlog2.Warnf(\"unable to open file: %s\", path)\n\t\t\t\tlog2.Error(err.Error())\n\t\t\t\twg.Done()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tfileData, err := io.ReadAll(f)\n\t\t\tif err != nil {\n\t\t\t\tlog2.Warnf(\"unable to read file: %s\", path)\n\t\t\t\tlog2.Error(err.Error())\n\t\t\t\twg.Done()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err := fsSvc.Save(path, fileData); err != nil {\n\t\t\t\tlog2.Warnf(\"unable to save file: %s\", path)\n\t\t\t\tlog2.Error(err.Error())\n\t\t\t\twg.Done()\n\t\t\t\treturn\n\t\t\t}\n\t\t\twg.Done()\n\t\t}(path)\n\t}\n\twg.Wait()\n\n\tHandleSuccess(c)\n}\n\nfunc PostBaseFileSaveDir(rootPath string, c *gin.Context) {\n\tvar payload struct {\n\t\tPath    string `json:\"path\"`\n\t\tNewPath string `json:\"new_path\"`\n\t\tData    string `json:\"data\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := fsSvc.CreateDir(payload.Path); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc PostBaseFileRenameFile(rootPath string, c *gin.Context) {\n\tvar payload struct {\n\t\tPath    string `json:\"path\"`\n\t\tNewPath string `json:\"new_path\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := fsSvc.Rename(payload.Path, payload.NewPath); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n}\n\nfunc DeleteBaseFileFile(rootPath string, c *gin.Context) {\n\tvar payload struct {\n\t\tPath string `json:\"path\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\tif payload.Path == \"~\" {\n\t\tpayload.Path = \".\"\n\t}\n\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := fsSvc.Delete(payload.Path); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\t_, err = fsSvc.GetFileInfo(\".\")\n\tif err != nil {\n\t\t_ = fsSvc.CreateDir(\"/\")\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc PostBaseFileCopyFile(rootPath string, c *gin.Context) {\n\tvar payload struct {\n\t\tPath    string `json:\"path\"`\n\t\tNewPath string `json:\"new_path\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := fsSvc.Copy(payload.Path, payload.NewPath); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc PostBaseFileExport(rootPath string, c *gin.Context) {\n\tfsSvc, err := getBaseFileFsSvc(rootPath)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// zip file path\n\tzipFilePath, err := fsSvc.Export()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// download\n\tc.Header(\"Content-Disposition\", fmt.Sprintf(\"attachment; filename=%s\", zipFilePath))\n\tc.File(zipFilePath)\n}\n\nfunc GetBaseFileFsSvc(rootPath string) (svc interfaces.FsServiceV2, err error) {\n\treturn getBaseFileFsSvc(rootPath)\n}\n\nfunc getBaseFileFsSvc(rootPath string) (svc interfaces.FsServiceV2, err error) {\n\tworkspacePath := viper.GetString(\"workspace\")\n\tfsSvc := fs.NewFsServiceV2(filepath.Join(workspacePath, rootPath))\n\n\treturn fsSvc, nil\n}\n"
  },
  {
    "path": "core/controllers/base_v2.go",
    "content": "package controllers\n\nimport (\n\t\"errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n)\n\ntype Action struct {\n\tMethod      string\n\tPath        string\n\tHandlerFunc gin.HandlerFunc\n}\n\ntype BaseControllerV2[T any] struct {\n\tmodelSvc *service.ModelServiceV2[T]\n\tactions  []Action\n}\n\nfunc (ctr *BaseControllerV2[T]) GetById(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tmodel, err := ctr.modelSvc.GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, model)\n}\n\nfunc (ctr *BaseControllerV2[T]) GetList(c *gin.Context) {\n\t// get all if query field \"all\" is set true\n\tall := MustGetFilterAll(c)\n\tif all {\n\t\tctr.getAll(c)\n\t\treturn\n\t}\n\n\t// get list\n\tctr.getList(c)\n}\n\nfunc (ctr *BaseControllerV2[T]) Post(c *gin.Context) {\n\tvar model T\n\tif err := c.ShouldBindJSON(&model); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\tu := GetUserFromContextV2(c)\n\tm := any(&model).(interfaces.ModelV2)\n\tm.SetId(primitive.NewObjectID())\n\tm.SetCreated(u.Id)\n\tm.SetUpdated(u.Id)\n\tcol := ctr.modelSvc.GetCol()\n\tres, err := col.GetCollection().InsertOne(col.GetContext(), m)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tresult, err := ctr.modelSvc.GetById(res.InsertedID.(primitive.ObjectID))\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, result)\n}\n\nfunc (ctr *BaseControllerV2[T]) PutById(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tvar model T\n\tif err := c.ShouldBindJSON(&model); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tu := GetUserFromContextV2(c)\n\tm := any(&model).(interfaces.ModelV2)\n\tm.SetUpdated(u.Id)\n\n\tif err := ctr.modelSvc.ReplaceById(id, model); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tresult, err := ctr.modelSvc.GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, result)\n}\n\nfunc (ctr *BaseControllerV2[T]) PatchList(c *gin.Context) {\n\ttype Payload struct {\n\t\tIds    []primitive.ObjectID `json:\"ids\"`\n\t\tUpdate bson.M               `json:\"update\"`\n\t}\n\n\tvar payload Payload\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// query\n\tquery := bson.M{\n\t\t\"_id\": bson.M{\n\t\t\t\"$in\": payload.Ids,\n\t\t},\n\t}\n\n\t// update\n\tif err := ctr.modelSvc.UpdateMany(query, bson.M{\"$set\": payload.Update}); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc (ctr *BaseControllerV2[T]) DeleteById(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := ctr.modelSvc.DeleteById(id); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc (ctr *BaseControllerV2[T]) DeleteList(c *gin.Context) {\n\ttype Payload struct {\n\t\tIds []primitive.ObjectID `json:\"ids\"`\n\t}\n\n\tvar payload Payload\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := ctr.modelSvc.DeleteMany(bson.M{\n\t\t\"_id\": bson.M{\n\t\t\t\"$in\": payload.Ids,\n\t\t},\n\t}); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc (ctr *BaseControllerV2[T]) getAll(c *gin.Context) {\n\tquery := MustGetFilterQuery(c)\n\tsort := MustGetSortOption(c)\n\tif sort == nil {\n\t\tsort = bson.D{{\"_id\", -1}}\n\t}\n\tmodels, err := ctr.modelSvc.GetMany(query, &mongo.FindOptions{\n\t\tSort: sort,\n\t})\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ttotal, err := ctr.modelSvc.Count(query)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tHandleSuccessWithListData(c, models, total)\n}\n\nfunc (ctr *BaseControllerV2[T]) getList(c *gin.Context) {\n\t// params\n\tpagination := MustGetPagination(c)\n\tquery := MustGetFilterQuery(c)\n\tsort := MustGetSortOption(c)\n\n\t// get list\n\tmodels, err := ctr.modelSvc.GetMany(query, &mongo.FindOptions{\n\t\tSort:  sort,\n\t\tSkip:  pagination.Size * (pagination.Page - 1),\n\t\tLimit: pagination.Size,\n\t})\n\tif err != nil {\n\t\tif errors.Is(err, mongo2.ErrNoDocuments) {\n\t\t\tHandleSuccessWithListData(c, nil, 0)\n\t\t} else {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t}\n\t\treturn\n\t}\n\n\t// total count\n\ttotal, err := ctr.modelSvc.Count(query)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// response\n\tHandleSuccessWithListData(c, models, total)\n}\n\nfunc NewControllerV2[T any](actions ...Action) *BaseControllerV2[T] {\n\tctr := &BaseControllerV2[T]{\n\t\tmodelSvc: service.NewModelServiceV2[T](),\n\t\tactions:  actions,\n\t}\n\treturn ctr\n}\n"
  },
  {
    "path": "core/controllers/base_v2_test.go",
    "content": "package controllers_test\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/controllers\"\n\t\"github.com/crawlab-team/crawlab/core/middlewares\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/user\"\n\t\"github.com/spf13/viper\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc init() {\n\n}\n\n// TestModel is a simple struct to be used as a model in tests\ntype TestModel models.TestModelV2\n\nvar TestToken string\n\n// SetupTestDB sets up the test database\nfunc SetupTestDB() {\n\tviper.Set(\"mongo.db\", \"testdb\")\n\tmodelSvc := service.NewModelServiceV2[models.UserV2]()\n\tu := models.UserV2{\n\t\tUsername: \"admin\",\n\t}\n\tid, err := modelSvc.InsertOne(u)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tu.SetId(id)\n\n\tuserSvc, err := user.GetUserServiceV2()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\ttoken, err := userSvc.MakeToken(&u)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tTestToken = token\n}\n\n// SetupRouter sets up the gin router for testing\nfunc SetupRouter() *gin.Engine {\n\trouter := gin.Default()\n\treturn router\n}\n\n// CleanupTestDB cleans up the test database\nfunc CleanupTestDB() {\n\tmongo.GetMongoDb(\"testdb\").Drop(context.Background())\n}\n\nfunc TestBaseControllerV2_GetById(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\t// Insert a test document\n\tid, err := service.NewModelServiceV2[TestModel]().InsertOne(TestModel{Name: \"test\"})\n\tassert.NoError(t, err)\n\n\t// Initialize the controller\n\tctr := controllers.NewControllerV2[TestModel]()\n\n\t// Set up the router\n\trouter := SetupRouter()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.GET(\"/testmodels/:id\", ctr.GetById)\n\n\t// Create a test request\n\treq, _ := http.NewRequest(\"GET\", \"/testmodels/\"+id.Hex(), nil)\n\treq.Header.Set(\"Authorization\", TestToken)\n\tw := httptest.NewRecorder()\n\n\t// Serve the request\n\trouter.ServeHTTP(w, req)\n\n\t// Check the response\n\tassert.Equal(t, http.StatusOK, w.Code)\n\n\tvar response controllers.Response[TestModel]\n\terr = json.Unmarshal(w.Body.Bytes(), &response)\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"test\", response.Data.Name)\n}\n\nfunc TestBaseControllerV2_Post(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\t// Initialize the controller\n\tctr := controllers.NewControllerV2[TestModel]()\n\n\t// Set up the router\n\trouter := SetupRouter()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.POST(\"/testmodels\", ctr.Post)\n\n\t// Create a test request\n\ttestModel := TestModel{Name: \"test\"}\n\tjsonValue, _ := json.Marshal(testModel)\n\treq, _ := http.NewRequest(\"POST\", \"/testmodels\", bytes.NewBuffer(jsonValue))\n\treq.Header.Set(\"Authorization\", TestToken)\n\tw := httptest.NewRecorder()\n\n\t// Serve the request\n\trouter.ServeHTTP(w, req)\n\n\t// Check the response\n\tassert.Equal(t, http.StatusOK, w.Code)\n\n\tvar response controllers.Response[TestModel]\n\terr := json.Unmarshal(w.Body.Bytes(), &response)\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"test\", response.Data.Name)\n\n\t// Check if the document was inserted into the database\n\tresult, err := service.NewModelServiceV2[TestModel]().GetById(response.Data.Id)\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"test\", result.Name)\n}\n\nfunc TestBaseControllerV2_DeleteById(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\t// Insert a test document\n\tid, err := service.NewModelServiceV2[TestModel]().InsertOne(TestModel{Name: \"test\"})\n\tassert.NoError(t, err)\n\n\t// Initialize the controller\n\tctr := controllers.NewControllerV2[TestModel]()\n\n\t// Set up the router\n\trouter := SetupRouter()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.DELETE(\"/testmodels/:id\", ctr.DeleteById)\n\n\t// Create a test request\n\treq, _ := http.NewRequest(\"DELETE\", \"/testmodels/\"+id.Hex(), nil)\n\treq.Header.Set(\"Authorization\", TestToken)\n\tw := httptest.NewRecorder()\n\n\t// Serve the request\n\trouter.ServeHTTP(w, req)\n\n\t// Check the response\n\tassert.Equal(t, http.StatusOK, w.Code)\n\n\t// Check if the document was deleted from the database\n\t_, err = service.NewModelServiceV2[TestModel]().GetById(id)\n\tassert.Error(t, err)\n}\n"
  },
  {
    "path": "core/controllers/export_v2.go",
    "content": "package controllers\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/export\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc PostExport(c *gin.Context) {\n\texportType := c.Param(\"type\")\n\texportTarget := c.Query(\"target\")\n\texportFilter, _ := GetFilter(c)\n\n\tvar exportId string\n\tvar err error\n\tswitch exportType {\n\tcase constants.ExportTypeCsv:\n\t\texportId, err = export.GetCsvService().Export(exportType, exportTarget, exportFilter)\n\tcase constants.ExportTypeJson:\n\t\texportId, err = export.GetJsonService().Export(exportType, exportTarget, exportFilter)\n\tdefault:\n\t\tHandleErrorBadRequest(c, errors.New(fmt.Sprintf(\"invalid export type: %s\", exportType)))\n\t\treturn\n\t}\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, exportId)\n}\n\nfunc GetExport(c *gin.Context) {\n\texportType := c.Param(\"type\")\n\texportId := c.Param(\"id\")\n\n\tvar exp interfaces.Export\n\tvar err error\n\tswitch exportType {\n\tcase constants.ExportTypeCsv:\n\t\texp, err = export.GetCsvService().GetExport(exportId)\n\tcase constants.ExportTypeJson:\n\t\texp, err = export.GetJsonService().GetExport(exportId)\n\tdefault:\n\t\tHandleErrorBadRequest(c, errors.New(fmt.Sprintf(\"invalid export type: %s\", exportType)))\n\t}\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, exp)\n}\n\nfunc GetExportDownload(c *gin.Context) {\n\texportType := c.Param(\"type\")\n\texportId := c.Param(\"id\")\n\n\tvar exp interfaces.Export\n\tvar err error\n\tswitch exportType {\n\tcase constants.ExportTypeCsv:\n\t\texp, err = export.GetCsvService().GetExport(exportId)\n\tcase constants.ExportTypeJson:\n\t\texp, err = export.GetJsonService().GetExport(exportId)\n\tdefault:\n\t\tHandleErrorBadRequest(c, errors.New(fmt.Sprintf(\"invalid export type: %s\", exportType)))\n\t}\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tswitch exportType {\n\tcase constants.ExportTypeCsv:\n\t\tc.Header(\"Content-Type\", \"text/csv\")\n\tcase constants.ExportTypeJson:\n\t\tc.Header(\"Content-Type\", \"text/plain\")\n\tdefault:\n\t\tHandleErrorBadRequest(c, errors.New(fmt.Sprintf(\"invalid export type: %s\", exportType)))\n\t}\n\tc.Header(\"Content-Disposition\", fmt.Sprintf(\"attachment; filename=%s\", exp.GetDownloadPath()))\n\tc.File(exp.GetDownloadPath())\n}\n"
  },
  {
    "path": "core/controllers/filter_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n)\n\nfunc GetFilterColFieldOptions(c *gin.Context) {\n\tcolName := c.Param(\"col\")\n\tvalue := c.Param(\"value\")\n\tif value == \"\" {\n\t\tvalue = \"_id\"\n\t}\n\tlabel := c.Param(\"label\")\n\tif label == \"\" {\n\t\tlabel = \"name\"\n\t}\n\tquery := MustGetFilterQuery(c)\n\tpipelines := mongo2.Pipeline{}\n\tif query != nil {\n\t\tpipelines = append(pipelines, bson.D{{\"$match\", query}})\n\t}\n\tpipelines = append(\n\t\tpipelines,\n\t\tbson.D{\n\t\t\t{\n\t\t\t\t\"$group\",\n\t\t\t\tbson.M{\n\t\t\t\t\t\"_id\": bson.M{\n\t\t\t\t\t\t\"value\": \"$\" + value,\n\t\t\t\t\t\t\"label\": \"$\" + label,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\tpipelines = append(\n\t\tpipelines,\n\t\tbson.D{\n\t\t\t{\n\t\t\t\t\"$project\",\n\t\t\t\tbson.M{\n\t\t\t\t\t\"value\": \"$_id.value\",\n\t\t\t\t\t\"label\": bson.M{\"$toString\": \"$_id.label\"},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\tpipelines = append(\n\t\tpipelines,\n\t\tbson.D{\n\t\t\t{\n\t\t\t\t\"$sort\",\n\t\t\t\tbson.D{\n\t\t\t\t\t{\"value\", 1},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\tvar options []entity.FilterSelectOption\n\tif err := mongo.GetMongoCol(colName).Aggregate(pipelines, nil).All(&options); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tHandleSuccessWithData(c, options)\n}\n"
  },
  {
    "path": "core/controllers/http.go",
    "content": "package controllers\n\ntype Response[T any] struct {\n\tStatus  string `json:\"status\"`\n\tMessage string `json:\"message\"`\n\tData    T      `json:\"data\"`\n\tError   string `json:\"error\"`\n}\n\ntype ListResponse[T any] struct {\n\tStatus  string `json:\"status\"`\n\tMessage string `json:\"message\"`\n\tTotal   int    `json:\"total\"`\n\tData    []T    `json:\"data\"`\n\tError   string `json:\"error\"`\n}\n"
  },
  {
    "path": "core/controllers/login_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/user\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc PostLogin(c *gin.Context) {\n\tvar payload struct {\n\t\tUsername string `json:\"username\"`\n\t\tPassword string `json:\"password\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\tuserSvc, err := user.GetUserServiceV2()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ttoken, loggedInUser, err := userSvc.Login(payload.Username, payload.Password)\n\tif err != nil {\n\t\tHandleErrorUnauthorized(c, errors.ErrorUserUnauthorized)\n\t\treturn\n\t}\n\tc.Set(constants.UserContextKey, loggedInUser)\n\tHandleSuccessWithData(c, token)\n}\n\nfunc PostLogout(c *gin.Context) {\n\tc.Set(constants.UserContextKey, nil)\n\tHandleSuccess(c)\n}\n"
  },
  {
    "path": "core/controllers/project_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n)\n\nfunc GetProjectList(c *gin.Context) {\n\t// get all list\n\tall := MustGetFilterAll(c)\n\tif all {\n\t\tNewControllerV2[models2.ProjectV2]().getAll(c)\n\t\treturn\n\t}\n\n\t// params\n\tpagination := MustGetPagination(c)\n\tquery := MustGetFilterQuery(c)\n\tsort := MustGetSortOption(c)\n\n\t// get list\n\tprojects, err := service.NewModelServiceV2[models2.ProjectV2]().GetMany(query, &mongo.FindOptions{\n\t\tSort:  sort,\n\t\tSkip:  pagination.Size * (pagination.Page - 1),\n\t\tLimit: pagination.Size,\n\t})\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t}\n\t\treturn\n\t}\n\tif len(projects) == 0 {\n\t\tHandleSuccessWithListData(c, []models2.ProjectV2{}, 0)\n\t\treturn\n\t}\n\n\t// total count\n\ttotal, err := service.NewModelServiceV2[models2.ProjectV2]().Count(query)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// project ids\n\tvar ids []primitive.ObjectID\n\n\t// count cache\n\tcache := map[primitive.ObjectID]int{}\n\n\t// iterate\n\tfor _, p := range projects {\n\t\tids = append(ids, p.Id)\n\t\tcache[p.Id] = 0\n\t}\n\n\t// spiders\n\tspiders, err := service.NewModelServiceV2[models2.SpiderV2]().GetMany(bson.M{\n\t\t\"project_id\": bson.M{\n\t\t\t\"$in\": ids,\n\t\t},\n\t}, nil)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tfor _, s := range spiders {\n\t\t_, ok := cache[s.ProjectId]\n\t\tif !ok {\n\t\t\tHandleErrorInternalServerError(c, errors.ErrorControllerMissingInCache)\n\t\t\treturn\n\t\t}\n\t\tcache[s.ProjectId]++\n\t}\n\n\t// assign\n\tvar data []models2.ProjectV2\n\tfor _, p := range projects {\n\t\tp.Spiders = cache[p.Id]\n\t\tdata = append(data, p)\n\t}\n\n\tHandleSuccessWithListData(c, data, total)\n}\n"
  },
  {
    "path": "core/controllers/result_v2.go",
    "content": "package controllers\n\nimport (\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/result\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n)\n\nfunc GetResultList(c *gin.Context) {\n\t// data collection id\n\tdcId, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// data source id\n\tvar dsId primitive.ObjectID\n\tdsIdStr := c.Query(\"data_source_id\")\n\tif dsIdStr != \"\" {\n\t\tdsId, err = primitive.ObjectIDFromHex(dsIdStr)\n\t\tif err != nil {\n\t\t\tHandleErrorBadRequest(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// data collection\n\tdc, err := service.NewModelServiceV2[models2.DataCollectionV2]().GetById(dcId)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// data source\n\tds, err := service.NewModelServiceV2[models2.DatabaseV2]().GetById(dsId)\n\tif err != nil {\n\t\tif err.Error() == mongo2.ErrNoDocuments.Error() {\n\t\t\tds = &models2.DatabaseV2{}\n\t\t} else {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// spider\n\tsq := bson.M{\n\t\t\"col_id\":         dc.Id,\n\t\t\"data_source_id\": ds.Id,\n\t}\n\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetOne(sq, nil)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// service\n\tsvc, err := result.GetResultService(s.Id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// params\n\tpagination := MustGetPagination(c)\n\tquery := getResultListQuery(c)\n\n\t// get results\n\tdata, err := svc.List(query, &generic.ListOptions{\n\t\tSort:  []generic.ListSort{{\"_id\", generic.SortDirectionDesc}},\n\t\tSkip:  pagination.Size * (pagination.Page - 1),\n\t\tLimit: pagination.Size,\n\t})\n\tif err != nil {\n\t\tif err.Error() == mongo2.ErrNoDocuments.Error() {\n\t\t\tHandleSuccessWithListData(c, nil, 0)\n\t\t\treturn\n\t\t}\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// validate results\n\tif len(data) == 0 {\n\t\tHandleSuccessWithListData(c, nil, 0)\n\t\treturn\n\t}\n\n\t// total count\n\ttotal, err := svc.Count(query)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// response\n\tHandleSuccessWithListData(c, data, total)\n}\n\nfunc getResultListQuery(c *gin.Context) (q generic.ListQuery) {\n\tf, err := GetFilter(c)\n\tif err != nil {\n\t\treturn q\n\t}\n\tfor _, cond := range f.Conditions {\n\t\tq = append(q, generic.ListQueryCondition{\n\t\t\tKey:   cond.Key,\n\t\t\tOp:    cond.Op,\n\t\t\tValue: utils.NormalizeObjectId(cond.Value),\n\t\t})\n\t}\n\treturn q\n}\n"
  },
  {
    "path": "core/controllers/router_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/middlewares\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/gin-gonic/gin\"\n\t\"net/http\"\n)\n\ntype RouterGroups struct {\n\tAuthGroup      *gin.RouterGroup\n\tAnonymousGroup *gin.RouterGroup\n}\n\nfunc NewRouterGroups(app *gin.Engine) (groups *RouterGroups) {\n\treturn &RouterGroups{\n\t\tAuthGroup:      app.Group(\"/\", middlewares.AuthorizationMiddlewareV2()),\n\t\tAnonymousGroup: app.Group(\"/\"),\n\t}\n}\n\nfunc RegisterController[T any](group *gin.RouterGroup, basePath string, ctr *BaseControllerV2[T]) {\n\tactionPaths := make(map[string]bool)\n\tfor _, action := range ctr.actions {\n\t\tgroup.Handle(action.Method, basePath+action.Path, action.HandlerFunc)\n\t\tpath := basePath + action.Path\n\t\tkey := action.Method + \" - \" + path\n\t\tactionPaths[key] = true\n\t}\n\tregisterBuiltinHandler(group, http.MethodGet, basePath+\"\", ctr.GetList, actionPaths)\n\tregisterBuiltinHandler(group, http.MethodGet, basePath+\"/:id\", ctr.GetById, actionPaths)\n\tregisterBuiltinHandler(group, http.MethodPost, basePath+\"\", ctr.Post, actionPaths)\n\tregisterBuiltinHandler(group, http.MethodPut, basePath+\"/:id\", ctr.PutById, actionPaths)\n\tregisterBuiltinHandler(group, http.MethodPatch, basePath+\"\", ctr.PatchList, actionPaths)\n\tregisterBuiltinHandler(group, http.MethodDelete, basePath+\"/:id\", ctr.DeleteById, actionPaths)\n\tregisterBuiltinHandler(group, http.MethodDelete, basePath+\"\", ctr.DeleteList, actionPaths)\n}\n\nfunc RegisterActions(group *gin.RouterGroup, basePath string, actions []Action) {\n\tfor _, action := range actions {\n\t\tgroup.Handle(action.Method, basePath+action.Path, action.HandlerFunc)\n\t}\n}\n\nfunc registerBuiltinHandler(group *gin.RouterGroup, method, path string, handlerFunc gin.HandlerFunc, existingActionPaths map[string]bool) {\n\tkey := method + \" - \" + path\n\t_, ok := existingActionPaths[key]\n\tif ok {\n\t\treturn\n\t}\n\tgroup.Handle(method, path, handlerFunc)\n}\n\nfunc InitRoutes(app *gin.Engine) (err error) {\n\t// routes groups\n\tgroups := NewRouterGroups(app)\n\n\tRegisterController(groups.AuthGroup, \"/data/collections\", NewControllerV2[models2.DataCollectionV2]())\n\tRegisterController(groups.AuthGroup, \"/environments\", NewControllerV2[models2.EnvironmentV2]())\n\tRegisterController(groups.AuthGroup, \"/nodes\", NewControllerV2[models2.NodeV2]())\n\tRegisterController(groups.AuthGroup, \"/projects\", NewControllerV2[models2.ProjectV2]([]Action{\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: GetProjectList,\n\t\t},\n\t}...))\n\tRegisterController(groups.AuthGroup, \"/schedules\", NewControllerV2[models2.ScheduleV2]([]Action{\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: PostSchedule,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPut,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: PutScheduleById,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/enable\",\n\t\t\tHandlerFunc: PostScheduleEnable,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/disable\",\n\t\t\tHandlerFunc: PostScheduleDisable,\n\t\t},\n\t}...))\n\tRegisterController(groups.AuthGroup, \"/spiders\", NewControllerV2[models2.SpiderV2]([]Action{\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: GetSpiderById,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: GetSpiderList,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: PostSpider,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPut,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: PutSpiderById,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodDelete,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: DeleteSpiderById,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodDelete,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: DeleteSpiderList,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id/files/list\",\n\t\t\tHandlerFunc: GetSpiderListDir,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id/files/get\",\n\t\t\tHandlerFunc: GetSpiderFile,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id/files/info\",\n\t\t\tHandlerFunc: GetSpiderFileInfo,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/files/save\",\n\t\t\tHandlerFunc: PostSpiderSaveFile,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/files/save/batch\",\n\t\t\tHandlerFunc: PostSpiderSaveFiles,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/files/save/dir\",\n\t\t\tHandlerFunc: PostSpiderSaveDir,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/files/rename\",\n\t\t\tHandlerFunc: PostSpiderRenameFile,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodDelete,\n\t\t\tPath:        \"/:id/files\",\n\t\t\tHandlerFunc: DeleteSpiderFile,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/files/copy\",\n\t\t\tHandlerFunc: PostSpiderCopyFile,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/files/export\",\n\t\t\tHandlerFunc: PostSpiderExport,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/run\",\n\t\t\tHandlerFunc: PostSpiderRun,\n\t\t},\n\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id/data-source\",\n\t\t\tHandlerFunc: GetSpiderDataSource,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/data-source/:ds_id\",\n\t\t\tHandlerFunc: PostSpiderDataSource,\n\t\t},\n\t}...))\n\tRegisterController(groups.AuthGroup, \"/tasks\", NewControllerV2[models2.TaskV2]([]Action{\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: GetTaskById,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: GetTaskList,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodDelete,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: DeleteTaskById,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodDelete,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: DeleteList,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/run\",\n\t\t\tHandlerFunc: PostTaskRun,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/restart\",\n\t\t\tHandlerFunc: PostTaskRestart,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/cancel\",\n\t\t\tHandlerFunc: PostTaskCancel,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id/logs\",\n\t\t\tHandlerFunc: GetTaskLogs,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id/data\",\n\t\t\tHandlerFunc: GetTaskData,\n\t\t},\n\t}...))\n\tRegisterController(groups.AuthGroup, \"/tokens\", NewControllerV2[models2.TokenV2]([]Action{\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: PostToken,\n\t\t},\n\t}...))\n\tRegisterController(groups.AuthGroup, \"/users\", NewControllerV2[models2.UserV2]([]Action{\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"\",\n\t\t\tHandlerFunc: PostUser,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id/change-password\",\n\t\t\tHandlerFunc: PostUserChangePassword,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/me\",\n\t\t\tHandlerFunc: GetUserMe,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPut,\n\t\t\tPath:        \"/me\",\n\t\t\tHandlerFunc: PutUserById,\n\t\t},\n\t}...))\n\n\tRegisterActions(groups.AuthGroup, \"/results\", []Action{\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: GetResultList,\n\t\t},\n\t})\n\tRegisterActions(groups.AuthGroup, \"/export\", []Action{\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:type\",\n\t\t\tHandlerFunc: PostExport,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:type/:id\",\n\t\t\tHandlerFunc: GetExport,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:type/:id/download\",\n\t\t\tHandlerFunc: GetExportDownload,\n\t\t},\n\t})\n\tRegisterActions(groups.AuthGroup, \"/filters\", []Action{\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:col\",\n\t\t\tHandlerFunc: GetFilterColFieldOptions,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:col/:value\",\n\t\t\tHandlerFunc: GetFilterColFieldOptions,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:col/:value/:label\",\n\t\t\tHandlerFunc: GetFilterColFieldOptions,\n\t\t},\n\t})\n\tRegisterActions(groups.AuthGroup, \"/settings\", []Action{\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: GetSetting,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: PostSetting,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPut,\n\t\t\tPath:        \"/:id\",\n\t\t\tHandlerFunc: PutSetting,\n\t\t},\n\t})\n\tRegisterActions(groups.AuthGroup, \"/stats\", []Action{\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/overview\",\n\t\t\tHandlerFunc: GetStatsOverview,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/daily\",\n\t\t\tHandlerFunc: GetStatsDaily,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/tasks\",\n\t\t\tHandlerFunc: GetStatsTasks,\n\t\t},\n\t})\n\n\tRegisterActions(groups.AnonymousGroup, \"/system-info\", []Action{\n\t\t{\n\t\t\tPath:        \"\",\n\t\t\tMethod:      http.MethodGet,\n\t\t\tHandlerFunc: GetSystemInfo,\n\t\t},\n\t})\n\tRegisterActions(groups.AnonymousGroup, \"/\", []Action{\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/login\",\n\t\t\tHandlerFunc: PostLogin,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodPost,\n\t\t\tPath:        \"/logout\",\n\t\t\tHandlerFunc: PostLogout,\n\t\t},\n\t})\n\tRegisterActions(groups.AnonymousGroup, \"/sync\", []Action{\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id/scan\",\n\t\t\tHandlerFunc: GetSyncScan,\n\t\t},\n\t\t{\n\t\t\tMethod:      http.MethodGet,\n\t\t\tPath:        \"/:id/download\",\n\t\t\tHandlerFunc: GetSyncDownload,\n\t\t},\n\t})\n\n\treturn nil\n}\n"
  },
  {
    "path": "core/controllers/router_v2_test.go",
    "content": "package controllers_test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/controllers\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"testing\"\n)\n\nfunc TestRouterGroups(t *testing.T) {\n\trouter := gin.Default()\n\tgroups := controllers.NewRouterGroups(router)\n\n\tassertions := []struct {\n\t\tgroup *gin.RouterGroup\n\t\tname  string\n\t}{\n\t\t{groups.AuthGroup, \"AuthGroup\"},\n\t\t{groups.AnonymousGroup, \"AnonymousGroup\"},\n\t}\n\n\tfor _, a := range assertions {\n\t\tassert.NotNil(t, a.group, a.name+\" should not be nil\")\n\t}\n}\n\nfunc TestRegisterController_Routes(t *testing.T) {\n\trouter := gin.Default()\n\tgroups := controllers.NewRouterGroups(router)\n\tctr := controllers.NewControllerV2[models.TestModelV2]()\n\tbasePath := \"/testmodels\"\n\n\tcontrollers.RegisterController(groups.AuthGroup, basePath, ctr)\n\n\t// Check if all routes are registered\n\troutes := router.Routes()\n\n\tvar methodPaths []string\n\tfor _, route := range routes {\n\t\tmethodPaths = append(methodPaths, route.Method+\" - \"+route.Path)\n\t}\n\n\texpectedRoutes := []gin.RouteInfo{\n\t\t{Method: \"GET\", Path: basePath},\n\t\t{Method: \"GET\", Path: basePath + \"/:id\"},\n\t\t{Method: \"POST\", Path: basePath},\n\t\t{Method: \"PUT\", Path: basePath + \"/:id\"},\n\t\t{Method: \"PATCH\", Path: basePath},\n\t\t{Method: \"DELETE\", Path: basePath + \"/:id\"},\n\t\t{Method: \"DELETE\", Path: basePath},\n\t}\n\n\tassert.Equal(t, len(expectedRoutes), len(routes))\n\tfor _, route := range expectedRoutes {\n\t\tassert.Contains(t, methodPaths, route.Method+\" - \"+route.Path)\n\t}\n}\n\nfunc TestInitRoutes_ProjectsRoute(t *testing.T) {\n\trouter := gin.Default()\n\n\tcontrollers.InitRoutes(router)\n\n\t// Check if the projects route is registered\n\troutes := router.Routes()\n\n\tvar methodPaths []string\n\tfor _, route := range routes {\n\t\tmethodPaths = append(methodPaths, route.Method+\" - \"+route.Path)\n\t}\n\n\texpectedRoutes := []gin.RouteInfo{\n\t\t{Method: \"GET\", Path: \"/projects\"},\n\t\t{Method: \"GET\", Path: \"/projects/:id\"},\n\t\t{Method: \"POST\", Path: \"/projects\"},\n\t\t{Method: \"PUT\", Path: \"/projects/:id\"},\n\t\t{Method: \"PATCH\", Path: \"/projects\"},\n\t\t{Method: \"DELETE\", Path: \"/projects/:id\"},\n\t\t{Method: \"DELETE\", Path: \"/projects\"},\n\t}\n\n\tfor _, route := range expectedRoutes {\n\t\tassert.Contains(t, methodPaths, route.Method+\" - \"+route.Path)\n\t}\n}\n\nfunc TestMain(m *testing.M) {\n\tgin.SetMode(gin.TestMode)\n\tm.Run()\n}\n"
  },
  {
    "path": "core/controllers/schedule_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/schedule\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc PostSchedule(c *gin.Context) {\n\tvar s models.ScheduleV2\n\tif err := c.ShouldBindJSON(&s); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tu := GetUserFromContextV2(c)\n\n\tmodelSvc := service.NewModelServiceV2[models.ScheduleV2]()\n\n\ts.SetCreated(u.Id)\n\ts.SetUpdated(u.Id)\n\tid, err := modelSvc.InsertOne(s)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ts.Id = id\n\n\tif s.Enabled {\n\t\tscheduleSvc, err := schedule.GetScheduleServiceV2()\n\t\tif err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t\tif err := scheduleSvc.Enable(s, u.Id); err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\tHandleSuccessWithData(c, s)\n}\n\nfunc PutScheduleById(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\tvar s models.ScheduleV2\n\tif err := c.ShouldBindJSON(&s); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\tif s.Id != id {\n\t\tHandleErrorBadRequest(c, errors.ErrorHttpBadRequest)\n\t\treturn\n\t}\n\n\tmodelSvc := service.NewModelServiceV2[models.ScheduleV2]()\n\terr = modelSvc.ReplaceById(id, s)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tscheduleSvc, err := schedule.GetScheduleServiceV2()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tu := GetUserFromContextV2(c)\n\n\tif s.Enabled {\n\t\tif err := scheduleSvc.Enable(s, u.Id); err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t} else {\n\t\tif err := scheduleSvc.Disable(s, u.Id); err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\tHandleSuccessWithData(c, s)\n}\n\nfunc PostScheduleEnable(c *gin.Context) {\n\tpostScheduleEnableDisableFunc(true)(c)\n}\n\nfunc PostScheduleDisable(c *gin.Context) {\n\tpostScheduleEnableDisableFunc(false)(c)\n}\n\nfunc postScheduleEnableDisableFunc(isEnable bool) func(c *gin.Context) {\n\treturn func(c *gin.Context) {\n\t\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\t\tif err != nil {\n\t\t\tHandleErrorBadRequest(c, err)\n\t\t\treturn\n\t\t}\n\t\tsvc, err := schedule.GetScheduleServiceV2()\n\t\tif err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t\ts, err := service.NewModelServiceV2[models.ScheduleV2]().GetById(id)\n\t\tif err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t\tu := GetUserFromContextV2(c)\n\t\tif isEnable {\n\t\t\terr = svc.Enable(*s, u.Id)\n\t\t} else {\n\t\t\terr = svc.Disable(*s, u.Id)\n\t\t}\n\t\tif err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t\tHandleSuccess(c)\n\t}\n}\n"
  },
  {
    "path": "core/controllers/setting_v2.go",
    "content": "package controllers\n\nimport (\n\t\"errors\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n)\n\nfunc GetSetting(c *gin.Context) {\n\t// key\n\tkey := c.Param(\"id\")\n\n\t// setting\n\ts, err := service.NewModelServiceV2[models.SettingV2]().GetOne(bson.M{\"key\": key}, nil)\n\tif err != nil {\n\t\tif errors.Is(err, mongo.ErrNoDocuments) {\n\t\t\tHandleSuccess(c)\n\t\t\treturn\n\t\t}\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, s)\n}\n\nfunc PostSetting(c *gin.Context) {\n\t// key\n\tkey := c.Param(\"id\")\n\n\t// settings\n\tvar s models.SettingV2\n\tif err := c.ShouldBindJSON(&s); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tif s.Key == \"\" {\n\t\ts.Key = key\n\t}\n\n\tu := GetUserFromContextV2(c)\n\n\ts.SetCreated(u.Id)\n\ts.SetUpdated(u.Id)\n\n\tid, err := service.NewModelServiceV2[models.SettingV2]().InsertOne(s)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ts.Id = id\n\n\tHandleSuccessWithData(c, s)\n}\n\nfunc PutSetting(c *gin.Context) {\n\t// key\n\tkey := c.Param(\"id\")\n\n\t// settings\n\tvar s models.SettingV2\n\tif err := c.ShouldBindJSON(&s); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tmodelSvc := service.NewModelServiceV2[models.SettingV2]()\n\n\t// setting\n\t_s, err := modelSvc.GetOne(bson.M{\"key\": key}, nil)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tu := GetUserFromContextV2(c)\n\n\t// save\n\t_s.Value = s.Value\n\t_s.SetUpdated(u.Id)\n\terr = modelSvc.ReplaceOne(bson.M{\"key\": key}, *_s)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccess(c)\n}\n"
  },
  {
    "path": "core/controllers/spider_v2.go",
    "content": "package controllers\n\nimport (\n\t\"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/fs\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/spider/admin\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"math\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n)\n\nfunc GetSpiderById(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\tif errors.Is(err, mongo2.ErrNoDocuments) {\n\t\tHandleErrorNotFound(c, err)\n\t\treturn\n\t}\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// stat\n\ts.Stat, err = service.NewModelServiceV2[models2.SpiderStatV2]().GetById(s.Id)\n\tif err != nil {\n\t\tif !errors.Is(err, mongo2.ErrNoDocuments) {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// data collection (compatible to old version) # TODO: remove in the future\n\tif s.ColName == \"\" && !s.ColId.IsZero() {\n\t\tcol, err := service.NewModelServiceV2[models2.DataCollectionV2]().GetById(s.ColId)\n\t\tif err != nil {\n\t\t\tif !errors.Is(err, mongo2.ErrNoDocuments) {\n\t\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t} else {\n\t\t\ts.ColName = col.Name\n\t\t}\n\t}\n\n\t// git\n\tif utils.IsPro() && !s.GitId.IsZero() {\n\t\ts.Git, err = service.NewModelServiceV2[models2.GitV2]().GetById(s.GitId)\n\t\tif err != nil {\n\t\t\tif !errors.Is(err, mongo2.ErrNoDocuments) {\n\t\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\tHandleSuccessWithData(c, s)\n}\n\nfunc GetSpiderList(c *gin.Context) {\n\t// get all list\n\tall := MustGetFilterAll(c)\n\tif all {\n\t\tNewControllerV2[models2.SpiderV2]().getAll(c)\n\t\treturn\n\t}\n\n\t// get list\n\twithStats := c.Query(\"stats\")\n\tif withStats == \"\" {\n\t\tNewControllerV2[models2.SpiderV2]().GetList(c)\n\t\treturn\n\t}\n\n\t// get list with stats\n\tgetSpiderListWithStats(c)\n}\n\nfunc getSpiderListWithStats(c *gin.Context) {\n\t// params\n\tpagination := MustGetPagination(c)\n\tquery := MustGetFilterQuery(c)\n\tsort := MustGetSortOption(c)\n\n\t// get list\n\tspiders, err := service.NewModelServiceV2[models2.SpiderV2]().GetMany(query, &mongo.FindOptions{\n\t\tSort:  sort,\n\t\tSkip:  pagination.Size * (pagination.Page - 1),\n\t\tLimit: pagination.Size,\n\t})\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t}\n\t\treturn\n\t}\n\tif len(spiders) == 0 {\n\t\tHandleSuccessWithListData(c, []models2.SpiderV2{}, 0)\n\t\treturn\n\t}\n\n\t// ids\n\tvar ids []primitive.ObjectID\n\tvar gitIds []primitive.ObjectID\n\tfor _, s := range spiders {\n\t\tids = append(ids, s.Id)\n\t\tif !s.GitId.IsZero() {\n\t\t\tgitIds = append(gitIds, s.GitId)\n\t\t}\n\t}\n\n\t// total count\n\ttotal, err := service.NewModelServiceV2[models2.SpiderV2]().Count(query)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// stat list\n\tspiderStats, err := service.NewModelServiceV2[models2.SpiderStatV2]().GetMany(bson.M{\"_id\": bson.M{\"$in\": ids}}, nil)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// cache stat list to dict\n\tdict := map[primitive.ObjectID]models2.SpiderStatV2{}\n\tvar taskIds []primitive.ObjectID\n\tfor _, st := range spiderStats {\n\t\tif st.Tasks > 0 {\n\t\t\ttaskCount := int64(st.Tasks)\n\t\t\tst.AverageWaitDuration = int64(math.Round(float64(st.WaitDuration) / float64(taskCount)))\n\t\t\tst.AverageRuntimeDuration = int64(math.Round(float64(st.RuntimeDuration) / float64(taskCount)))\n\t\t\tst.AverageTotalDuration = int64(math.Round(float64(st.TotalDuration) / float64(taskCount)))\n\t\t}\n\t\tdict[st.Id] = st\n\n\t\tif !st.LastTaskId.IsZero() {\n\t\t\ttaskIds = append(taskIds, st.LastTaskId)\n\t\t}\n\t}\n\n\t// task list and stats\n\tvar tasks []models2.TaskV2\n\tdictTask := map[primitive.ObjectID]models2.TaskV2{}\n\tdictTaskStat := map[primitive.ObjectID]models2.TaskStatV2{}\n\tif len(taskIds) > 0 {\n\t\t// task list\n\t\tqueryTask := bson.M{\n\t\t\t\"_id\": bson.M{\n\t\t\t\t\"$in\": taskIds,\n\t\t\t},\n\t\t}\n\t\ttasks, err = service.NewModelServiceV2[models2.TaskV2]().GetMany(queryTask, nil)\n\t\tif err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\n\t\t// task stats list\n\t\ttaskStats, err := service.NewModelServiceV2[models2.TaskStatV2]().GetMany(queryTask, nil)\n\t\tif err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\n\t\t// cache task stats to dict\n\t\tfor _, st := range taskStats {\n\t\t\tdictTaskStat[st.Id] = st\n\t\t}\n\n\t\t// cache task list to dict\n\t\tfor _, t := range tasks {\n\t\t\tst, ok := dictTaskStat[t.Id]\n\t\t\tif ok {\n\t\t\t\tt.Stat = &st\n\t\t\t}\n\t\t\tdictTask[t.SpiderId] = t\n\t\t}\n\t}\n\n\t// git list\n\tvar gits []models2.GitV2\n\tif len(gitIds) > 0 && utils.IsPro() {\n\t\tgits, err = service.NewModelServiceV2[models2.GitV2]().GetMany(bson.M{\"_id\": bson.M{\"$in\": gitIds}}, nil)\n\t\tif err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// cache git list to dict\n\tdictGit := map[primitive.ObjectID]models2.GitV2{}\n\tfor _, g := range gits {\n\t\tdictGit[g.Id] = g\n\t}\n\n\t// iterate list again\n\tvar data []models2.SpiderV2\n\tfor _, s := range spiders {\n\t\t// spider stat\n\t\tst, ok := dict[s.Id]\n\t\tif ok {\n\t\t\ts.Stat = &st\n\n\t\t\t// last task\n\t\t\tt, ok := dictTask[s.Id]\n\t\t\tif ok {\n\t\t\t\ts.Stat.LastTask = &t\n\t\t\t}\n\t\t}\n\n\t\t// git\n\t\tif !s.GitId.IsZero() && utils.IsPro() {\n\t\t\tg, ok := dictGit[s.GitId]\n\t\t\tif ok {\n\t\t\t\ts.Git = &g\n\t\t\t}\n\t\t}\n\n\t\t// add to list\n\t\tdata = append(data, s)\n\t}\n\n\t// response\n\tHandleSuccessWithListData(c, data, total)\n}\n\nfunc PostSpider(c *gin.Context) {\n\t// bind\n\tvar s models2.SpiderV2\n\tif err := c.ShouldBindJSON(&s); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// user\n\tu := GetUserFromContextV2(c)\n\n\t// add\n\ts.SetCreated(u.Id)\n\ts.SetUpdated(u.Id)\n\tid, err := service.NewModelServiceV2[models2.SpiderV2]().InsertOne(s)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ts.SetId(id)\n\n\t// add stat\n\tst := models2.SpiderStatV2{}\n\tst.SetId(id)\n\tst.SetCreated(u.Id)\n\tst.SetUpdated(u.Id)\n\t_, err = service.NewModelServiceV2[models2.SpiderStatV2]().InsertOne(st)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// create folder\n\tfsSvc, err := getSpiderFsSvcById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\terr = fsSvc.CreateDir(\".\")\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, s)\n}\n\nfunc PutSpiderById(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// bind\n\tvar s models2.SpiderV2\n\tif err := c.ShouldBindJSON(&s); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tu := GetUserFromContextV2(c)\n\n\tmodelSvc := service.NewModelServiceV2[models2.SpiderV2]()\n\n\t// save\n\ts.SetUpdated(u.Id)\n\terr = modelSvc.ReplaceById(id, s)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t_s, err := modelSvc.GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ts = *_s\n\n\tHandleSuccessWithData(c, s)\n}\n\nfunc DeleteSpiderById(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := mongo.RunTransaction(func(context mongo2.SessionContext) (err error) {\n\t\t// delete spider\n\t\terr = service.NewModelServiceV2[models2.SpiderV2]().DeleteById(id)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// delete spider stat\n\t\terr = service.NewModelServiceV2[models2.SpiderStatV2]().DeleteById(id)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// related tasks\n\t\ttasks, err := service.NewModelServiceV2[models2.TaskV2]().GetMany(bson.M{\"spider_id\": id}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif len(tasks) == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\t// task ids\n\t\tvar taskIds []primitive.ObjectID\n\t\tfor _, t := range tasks {\n\t\t\ttaskIds = append(taskIds, t.Id)\n\t\t}\n\n\t\t// delete related tasks\n\t\terr = service.NewModelServiceV2[models2.TaskV2]().DeleteMany(bson.M{\"_id\": bson.M{\"$in\": taskIds}})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// delete related task stats\n\t\terr = service.NewModelServiceV2[models2.TaskStatV2]().DeleteMany(bson.M{\"_id\": bson.M{\"$in\": taskIds}})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// delete tasks logs\n\t\twg := sync.WaitGroup{}\n\t\twg.Add(len(taskIds))\n\t\tfor _, id := range taskIds {\n\t\t\tgo func(id string) {\n\t\t\t\t// delete task logs\n\t\t\t\tlogPath := filepath.Join(viper.GetString(\"log.path\"), id)\n\t\t\t\tif err := os.RemoveAll(logPath); err != nil {\n\t\t\t\t\tlog.Warnf(\"failed to remove task log directory: %s\", logPath)\n\t\t\t\t}\n\t\t\t\twg.Done()\n\t\t\t}(id.Hex())\n\t\t}\n\t\twg.Wait()\n\n\t\treturn nil\n\t}); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tgo func() {\n\t\t// spider\n\t\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"failed to get spider: %s\", err.Error())\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\n\t\t// skip spider with git\n\t\tif !s.GitId.IsZero() {\n\t\t\treturn\n\t\t}\n\n\t\t// delete spider directory\n\t\tfsSvc, err := getSpiderFsSvcById(id)\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"failed to get spider fs service: %s\", err.Error())\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t\terr = fsSvc.Delete(\".\")\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"failed to delete spider directory: %s\", err.Error())\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t}()\n\n\tHandleSuccess(c)\n}\n\nfunc DeleteSpiderList(c *gin.Context) {\n\tvar payload struct {\n\t\tIds []primitive.ObjectID `json:\"ids\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := mongo.RunTransaction(func(context mongo2.SessionContext) (err error) {\n\t\t// delete spiders\n\t\tif err := service.NewModelServiceV2[models2.SpiderV2]().DeleteMany(bson.M{\n\t\t\t\"_id\": bson.M{\n\t\t\t\t\"$in\": payload.Ids,\n\t\t\t},\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// delete spider stats\n\t\tif err := service.NewModelServiceV2[models2.SpiderStatV2]().DeleteMany(bson.M{\n\t\t\t\"_id\": bson.M{\n\t\t\t\t\"$in\": payload.Ids,\n\t\t\t},\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// related tasks\n\t\ttasks, err := service.NewModelServiceV2[models2.TaskV2]().GetMany(bson.M{\"spider_id\": bson.M{\"$in\": payload.Ids}}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif len(tasks) == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\t// task ids\n\t\tvar taskIds []primitive.ObjectID\n\t\tfor _, t := range tasks {\n\t\t\ttaskIds = append(taskIds, t.Id)\n\t\t}\n\n\t\t// delete related tasks\n\t\tif err := service.NewModelServiceV2[models2.TaskV2]().DeleteMany(bson.M{\"_id\": bson.M{\"$in\": taskIds}}); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// delete related task stats\n\t\tif err := service.NewModelServiceV2[models2.TaskStatV2]().DeleteMany(bson.M{\"_id\": bson.M{\"$in\": taskIds}}); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// delete tasks logs\n\t\twg := sync.WaitGroup{}\n\t\twg.Add(len(taskIds))\n\t\tfor _, id := range taskIds {\n\t\t\tgo func(id string) {\n\t\t\t\t// delete task logs\n\t\t\t\tlogPath := filepath.Join(viper.GetString(\"log.path\"), id)\n\t\t\t\tif err := os.RemoveAll(logPath); err != nil {\n\t\t\t\t\tlog.Warnf(\"failed to remove task log directory: %s\", logPath)\n\t\t\t\t}\n\t\t\t\twg.Done()\n\t\t\t}(id.Hex())\n\t\t}\n\t\twg.Wait()\n\n\t\treturn nil\n\t}); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// delete spider directories\n\tgo func() {\n\t\twg := sync.WaitGroup{}\n\t\twg.Add(len(payload.Ids))\n\t\tfor _, id := range payload.Ids {\n\t\t\tgo func(id primitive.ObjectID) {\n\t\t\t\tdefer wg.Done()\n\n\t\t\t\t// spider\n\t\t\t\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Errorf(\"failed to get spider: %s\", err.Error())\n\t\t\t\t\ttrace.PrintError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// skip spider with git\n\t\t\t\tif !s.GitId.IsZero() {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// delete spider directory\n\t\t\t\tfsSvc, err := getSpiderFsSvcById(id)\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Errorf(\"failed to get spider fs service: %s\", err.Error())\n\t\t\t\t\ttrace.PrintError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\terr = fsSvc.Delete(\".\")\n\t\t\t\tif err != nil {\n\t\t\t\t\tlog.Errorf(\"failed to delete spider directory: %s\", err.Error())\n\t\t\t\t\ttrace.PrintError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}(id)\n\t\t}\n\t\twg.Wait()\n\t}()\n\n\tHandleSuccess(c)\n}\n\nfunc GetSpiderListDir(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tGetBaseFileListDir(rootPath, c)\n}\n\nfunc GetSpiderFile(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tGetBaseFileFile(rootPath, c)\n}\n\nfunc GetSpiderFileInfo(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tGetBaseFileFileInfo(rootPath, c)\n}\n\nfunc PostSpiderSaveFile(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tPostBaseFileSaveFile(rootPath, c)\n}\n\nfunc PostSpiderSaveFiles(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\ttargetDirectory := c.PostForm(\"targetDirectory\")\n\tPostBaseFileSaveFiles(filepath.Join(rootPath, targetDirectory), c)\n}\n\nfunc PostSpiderSaveDir(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tPostBaseFileSaveDir(rootPath, c)\n}\n\nfunc PostSpiderRenameFile(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tPostBaseFileRenameFile(rootPath, c)\n}\n\nfunc DeleteSpiderFile(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tDeleteBaseFileFile(rootPath, c)\n}\n\nfunc PostSpiderCopyFile(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tPostBaseFileCopyFile(rootPath, c)\n}\n\nfunc PostSpiderExport(c *gin.Context) {\n\trootPath, err := getSpiderRootPath(c)\n\tif err != nil {\n\t\tHandleErrorForbidden(c, err)\n\t\treturn\n\t}\n\tPostBaseFileExport(rootPath, c)\n}\n\nfunc PostSpiderRun(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// options\n\tvar opts interfaces.SpiderRunOptions\n\tif err := c.ShouldBindJSON(&opts); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// user\n\tif u := GetUserFromContext(c); u != nil {\n\t\topts.UserId = u.GetId()\n\t}\n\n\tadminSvc, err := admin.GetSpiderAdminServiceV2()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// schedule\n\ttaskIds, err := adminSvc.Schedule(id, &opts)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, taskIds)\n}\n\nfunc GetSpiderDataSource(c *gin.Context) {\n\t// spider id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// spider\n\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// data source\n\tds, err := service.NewModelServiceV2[models2.DatabaseV2]().GetById(s.DataSourceId)\n\tif err != nil {\n\t\tif err.Error() == mongo2.ErrNoDocuments.Error() {\n\t\t\tHandleSuccess(c)\n\t\t\treturn\n\t\t}\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, ds)\n}\n\nfunc PostSpiderDataSource(c *gin.Context) {\n\t// spider id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// data source id\n\tdsId, err := primitive.ObjectIDFromHex(c.Param(\"ds_id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// spider\n\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// data source\n\tif !dsId.IsZero() {\n\t\t_, err = service.NewModelServiceV2[models2.DatabaseV2]().GetById(dsId)\n\t\tif err != nil {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// save data source id\n\tu := GetUserFromContextV2(c)\n\ts.DataSourceId = dsId\n\ts.SetUpdatedBy(u.Id)\n\t_, err = service.NewModelServiceV2[models2.SpiderV2]().InsertOne(*s)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc getSpiderFsSvc(s *models2.SpiderV2) (svc interfaces.FsServiceV2, err error) {\n\tworkspacePath := viper.GetString(\"workspace\")\n\tfsSvc := fs.NewFsServiceV2(filepath.Join(workspacePath, s.Id.Hex()))\n\n\treturn fsSvc, nil\n}\n\nfunc getSpiderFsSvcById(id primitive.ObjectID) (svc interfaces.FsServiceV2, err error) {\n\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\tif err != nil {\n\t\tlog.Errorf(\"failed to get spider: %s\", err.Error())\n\t\ttrace.PrintError(err)\n\t\treturn nil, err\n\t}\n\treturn getSpiderFsSvc(s)\n}\n\nfunc getSpiderRootPath(c *gin.Context) (rootPath string, err error) {\n\t// spider id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// spider\n\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// check git permission\n\tif !utils.IsPro() && !s.GitId.IsZero() {\n\t\treturn \"\", errors.New(\"git is not allowed in the community version\")\n\t}\n\n\t// if git id is zero, return spider id as root path\n\tif s.GitId.IsZero() {\n\t\treturn id.Hex(), nil\n\t}\n\n\treturn filepath.Join(s.GitId.Hex(), s.GitRootPath), nil\n}\n"
  },
  {
    "path": "core/controllers/spider_v2_test.go",
    "content": "package controllers_test\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/controllers\"\n\t\"github.com/crawlab-team/crawlab/core/middlewares\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n)\n\nfunc TestCreateSpider(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\tgin.SetMode(gin.TestMode)\n\n\trouter := gin.Default()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.POST(\"/spiders\", controllers.PostSpider)\n\n\tpayload := models.SpiderV2{\n\t\tName:    \"Test Spider\",\n\t\tColName: \"test_spiders\",\n\t}\n\tjsonValue, _ := json.Marshal(payload)\n\treq, _ := http.NewRequest(\"POST\", \"/spiders\", bytes.NewBuffer(jsonValue))\n\treq.Header.Set(\"Authorization\", TestToken)\n\tresp := httptest.NewRecorder()\n\n\trouter.ServeHTTP(resp, req)\n\n\tassert.Equal(t, http.StatusOK, resp.Code)\n\n\tvar response controllers.Response[models.SpiderV2]\n\terr := json.Unmarshal(resp.Body.Bytes(), &response)\n\trequire.Nil(t, err)\n\tassert.False(t, response.Data.Id.IsZero())\n\tassert.Equal(t, payload.Name, response.Data.Name)\n\tassert.False(t, response.Data.ColId.IsZero())\n}\n\nfunc TestGetSpiderById(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\tgin.SetMode(gin.TestMode)\n\n\trouter := gin.Default()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.GET(\"/spiders/:id\", controllers.GetSpiderById)\n\n\tmodel := models.SpiderV2{\n\t\tName:    \"Test Spider\",\n\t\tColName: \"test_spiders\",\n\t}\n\tid, err := service.NewModelServiceV2[models.SpiderV2]().InsertOne(model)\n\trequire.Nil(t, err)\n\tts := models.SpiderStatV2{}\n\tts.SetId(id)\n\t_, err = service.NewModelServiceV2[models.SpiderStatV2]().InsertOne(ts)\n\trequire.Nil(t, err)\n\n\treq, _ := http.NewRequest(\"GET\", \"/spiders/\"+id.Hex(), nil)\n\treq.Header.Set(\"Authorization\", TestToken)\n\tresp := httptest.NewRecorder()\n\n\trouter.ServeHTTP(resp, req)\n\n\tassert.Equal(t, http.StatusOK, resp.Code)\n\n\tvar response controllers.Response[models.SpiderV2]\n\terr = json.Unmarshal(resp.Body.Bytes(), &response)\n\trequire.Nil(t, err)\n\tassert.Equal(t, model.Name, response.Data.Name)\n}\n\nfunc TestUpdateSpiderById(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\tgin.SetMode(gin.TestMode)\n\n\trouter := gin.Default()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.PUT(\"/spiders/:id\", controllers.PutSpiderById)\n\n\tmodel := models.SpiderV2{\n\t\tName:    \"Test Spider\",\n\t\tColName: \"test_spiders\",\n\t}\n\tid, err := service.NewModelServiceV2[models.SpiderV2]().InsertOne(model)\n\trequire.Nil(t, err)\n\tts := models.SpiderStatV2{}\n\tts.SetId(id)\n\t_, err = service.NewModelServiceV2[models.SpiderStatV2]().InsertOne(ts)\n\trequire.Nil(t, err)\n\n\tspiderId := id.Hex()\n\tpayload := models.SpiderV2{\n\t\tName:    \"Updated Spider\",\n\t\tColName: \"test_spider\",\n\t}\n\tpayload.SetId(id)\n\tjsonValue, _ := json.Marshal(payload)\n\treq, _ := http.NewRequest(\"PUT\", \"/spiders/\"+spiderId, bytes.NewBuffer(jsonValue))\n\treq.Header.Set(\"Authorization\", TestToken)\n\tresp := httptest.NewRecorder()\n\n\trouter.ServeHTTP(resp, req)\n\n\tassert.Equal(t, http.StatusOK, resp.Code)\n\n\tvar response controllers.Response[models.SpiderV2]\n\terr = json.Unmarshal(resp.Body.Bytes(), &response)\n\trequire.Nil(t, err)\n\tassert.Equal(t, payload.Name, response.Data.Name)\n\n\tsvc := service.NewModelServiceV2[models.SpiderV2]()\n\tresModel, err := svc.GetById(id)\n\trequire.Nil(t, err)\n\tassert.Equal(t, payload.Name, resModel.Name)\n}\n\nfunc TestDeleteSpiderById(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\tgin.SetMode(gin.TestMode)\n\n\trouter := gin.Default()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.DELETE(\"/spiders/:id\", controllers.DeleteSpiderById)\n\n\tmodel := models.SpiderV2{\n\t\tName:    \"Test Spider\",\n\t\tColName: \"test_spiders\",\n\t}\n\tid, err := service.NewModelServiceV2[models.SpiderV2]().InsertOne(model)\n\trequire.Nil(t, err)\n\tts := models.SpiderStatV2{}\n\tts.SetId(id)\n\t_, err = service.NewModelServiceV2[models.SpiderStatV2]().InsertOne(ts)\n\trequire.Nil(t, err)\n\ttask := models.TaskV2{}\n\ttask.SpiderId = id\n\ttaskId, err := service.NewModelServiceV2[models.TaskV2]().InsertOne(task)\n\trequire.Nil(t, err)\n\ttaskStat := models.TaskStatV2{}\n\ttaskStat.SetId(taskId)\n\t_, err = service.NewModelServiceV2[models.TaskStatV2]().InsertOne(taskStat)\n\trequire.Nil(t, err)\n\n\treq, _ := http.NewRequest(\"DELETE\", \"/spiders/\"+id.Hex(), nil)\n\treq.Header.Set(\"Authorization\", TestToken)\n\tresp := httptest.NewRecorder()\n\n\trouter.ServeHTTP(resp, req)\n\n\tassert.Equal(t, http.StatusOK, resp.Code)\n\n\t_, err = service.NewModelServiceV2[models.SpiderV2]().GetById(id)\n\tassert.NotNil(t, err)\n\t_, err = service.NewModelServiceV2[models.SpiderStatV2]().GetById(id)\n\tassert.NotNil(t, err)\n\ttaskCount, err := service.NewModelServiceV2[models.TaskV2]().Count(bson.M{\"spider_id\": id})\n\trequire.Nil(t, err)\n\tassert.Equal(t, 0, taskCount)\n\ttaskStatCount, err := service.NewModelServiceV2[models.TaskStatV2]().Count(bson.M{\"_id\": taskId})\n\trequire.Nil(t, err)\n\tassert.Equal(t, 0, taskStatCount)\n\n}\n\nfunc TestDeleteSpiderList(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\tgin.SetMode(gin.TestMode)\n\n\trouter := gin.Default()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.DELETE(\"/spiders\", controllers.DeleteSpiderList)\n\n\tmodelList := []models.SpiderV2{\n\t\t{\n\t\t\tName:    \"Test Name 1\",\n\t\t\tColName: \"test_spiders\",\n\t\t}, {\n\t\t\tName:    \"Test Name 2\",\n\t\t\tColName: \"test_spiders\",\n\t\t},\n\t}\n\tvar ids []primitive.ObjectID\n\tvar taskIds []primitive.ObjectID\n\tfor _, model := range modelList {\n\t\tid, err := service.NewModelServiceV2[models.SpiderV2]().InsertOne(model)\n\t\trequire.Nil(t, err)\n\t\tts := models.SpiderStatV2{}\n\t\tts.SetId(id)\n\t\t_, err = service.NewModelServiceV2[models.SpiderStatV2]().InsertOne(ts)\n\t\trequire.Nil(t, err)\n\t\ttask := models.TaskV2{}\n\t\ttask.SpiderId = id\n\t\ttaskId, err := service.NewModelServiceV2[models.TaskV2]().InsertOne(task)\n\t\trequire.Nil(t, err)\n\t\ttaskStat := models.TaskStatV2{}\n\t\ttaskStat.SetId(taskId)\n\t\t_, err = service.NewModelServiceV2[models.TaskStatV2]().InsertOne(taskStat)\n\t\trequire.Nil(t, err)\n\t\tids = append(ids, id)\n\t\ttaskIds = append(taskIds, taskId)\n\t}\n\n\tpayload := struct {\n\t\tIds []primitive.ObjectID `json:\"ids\"`\n\t}{\n\t\tIds: ids,\n\t}\n\tjsonValue, _ := json.Marshal(payload)\n\treq, _ := http.NewRequest(\"DELETE\", \"/spiders\", bytes.NewBuffer(jsonValue))\n\treq.Header.Set(\"Authorization\", TestToken)\n\tresp := httptest.NewRecorder()\n\n\trouter.ServeHTTP(resp, req)\n\n\tassert.Equal(t, http.StatusOK, resp.Code)\n\n\tspiderCount, err := service.NewModelServiceV2[models.SpiderV2]().Count(bson.M{\"_id\": bson.M{\"$in\": ids}})\n\trequire.Nil(t, err)\n\tassert.Equal(t, 0, spiderCount)\n\tspiderStatCount, err := service.NewModelServiceV2[models.SpiderStatV2]().Count(bson.M{\"_id\": bson.M{\"$in\": ids}})\n\trequire.Nil(t, err)\n\tassert.Equal(t, 0, spiderStatCount)\n\ttaskCount, err := service.NewModelServiceV2[models.TaskV2]().Count(bson.M{\"_id\": bson.M{\"$in\": taskIds}})\n\trequire.Nil(t, err)\n\tassert.Equal(t, 0, taskCount)\n\ttaskStatCount, err := service.NewModelServiceV2[models.TaskStatV2]().Count(bson.M{\"_id\": bson.M{\"$in\": taskIds}})\n\trequire.Nil(t, err)\n\tassert.Equal(t, 0, taskStatCount)\n}\n"
  },
  {
    "path": "core/controllers/stats_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/stats\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"time\"\n)\n\nvar statsDefaultQuery = bson.M{\n\t\"create_ts\": bson.M{\n\t\t\"$gte\": time.Now().Add(-30 * 24 * time.Hour),\n\t},\n}\n\nfunc GetStatsOverview(c *gin.Context) {\n\tdata, err := stats.GetStatsService().GetOverviewStats(statsDefaultQuery)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tHandleSuccessWithData(c, data)\n}\n\nfunc GetStatsDaily(c *gin.Context) {\n\tdata, err := stats.GetStatsService().GetDailyStats(statsDefaultQuery)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tHandleSuccessWithData(c, data)\n}\n\nfunc GetStatsTasks(c *gin.Context) {\n\tdata, err := stats.GetStatsService().GetTaskStats(statsDefaultQuery)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tHandleSuccessWithData(c, data)\n}\n"
  },
  {
    "path": "core/controllers/sync_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n\t\"net/http\"\n\t\"path/filepath\"\n)\n\nfunc GetSyncScan(c *gin.Context) {\n\tid := c.Param(\"id\")\n\tpath := c.Query(\"path\")\n\n\tworkspacePath := viper.GetString(\"workspace\")\n\tdirPath := filepath.Join(workspacePath, id, path)\n\tfiles, err := utils.ScanDirectory(dirPath)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tc.AbortWithStatusJSON(http.StatusOK, files)\n}\n\nfunc GetSyncDownload(c *gin.Context) {\n\tid := c.Param(\"id\")\n\tpath := c.Query(\"path\")\n\tworkspacePath := viper.GetString(\"workspace\")\n\tfilePath := filepath.Join(workspacePath, id, path)\n\tc.File(filePath)\n}\n"
  },
  {
    "path": "core/controllers/system_info_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n)\n\nfunc GetSystemInfo(c *gin.Context) {\n\tinfo := &entity.SystemInfo{\n\t\tEdition: viper.GetString(\"edition\"),\n\t\tVersion: viper.GetString(\"version\"),\n\t}\n\tHandleSuccessWithData(c, info)\n}\n"
  },
  {
    "path": "core/controllers/task_v2.go",
    "content": "package controllers\n\nimport (\n\t\"errors\"\n\tlog2 \"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/result\"\n\t\"github.com/crawlab-team/crawlab/core/spider/admin\"\n\t\"github.com/crawlab-team/crawlab/core/task/log\"\n\t\"github.com/crawlab-team/crawlab/core/task/scheduler\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n)\n\nfunc GetTaskById(c *gin.Context) {\n\t// id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// task\n\tt, err := service.NewModelServiceV2[models.TaskV2]().GetById(id)\n\tif errors.Is(err, mongo2.ErrNoDocuments) {\n\t\tHandleErrorNotFound(c, err)\n\t\treturn\n\t}\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// spider\n\tt.Spider, _ = service.NewModelServiceV2[models.SpiderV2]().GetById(t.SpiderId)\n\n\t// skip if task status is pending\n\tif t.Status == constants.TaskStatusPending {\n\t\tHandleSuccessWithData(c, t)\n\t\treturn\n\t}\n\n\t// task stat\n\tt.Stat, _ = service.NewModelServiceV2[models.TaskStatV2]().GetById(id)\n\n\tHandleSuccessWithData(c, t)\n}\n\nfunc GetTaskList(c *gin.Context) {\n\twithStats := c.Query(\"stats\")\n\tif withStats == \"\" {\n\t\tNewControllerV2[models.TaskV2]().GetList(c)\n\t\treturn\n\t}\n\n\t// params\n\tpagination := MustGetPagination(c)\n\tquery := MustGetFilterQuery(c)\n\tsort := MustGetSortOption(c)\n\n\t// get tasks\n\ttasks, err := service.NewModelServiceV2[models.TaskV2]().GetMany(query, &mongo.FindOptions{\n\t\tSort:  sort,\n\t\tSkip:  pagination.Size * (pagination.Page - 1),\n\t\tLimit: pagination.Size,\n\t})\n\tif err != nil {\n\t\tif errors.Is(err, mongo2.ErrNoDocuments) {\n\t\t\tHandleErrorNotFound(c, err)\n\t\t} else {\n\t\t\tHandleErrorInternalServerError(c, err)\n\t\t}\n\t\treturn\n\t}\n\n\t// check empty list\n\tif len(tasks) == 0 {\n\t\tHandleSuccessWithListData(c, nil, 0)\n\t\treturn\n\t}\n\n\t// ids\n\tvar taskIds []primitive.ObjectID\n\tvar spiderIds []primitive.ObjectID\n\tfor _, t := range tasks {\n\t\ttaskIds = append(taskIds, t.Id)\n\t\tspiderIds = append(spiderIds, t.SpiderId)\n\t}\n\n\t// total count\n\ttotal, err := service.NewModelServiceV2[models.TaskV2]().Count(query)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// stat list\n\tstats, err := service.NewModelServiceV2[models.TaskStatV2]().GetMany(bson.M{\n\t\t\"_id\": bson.M{\n\t\t\t\"$in\": taskIds,\n\t\t},\n\t}, nil)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// cache stat list to dict\n\tstatsDict := map[primitive.ObjectID]models.TaskStatV2{}\n\tfor _, s := range stats {\n\t\tstatsDict[s.Id] = s\n\t}\n\n\t// spider list\n\tspiders, err := service.NewModelServiceV2[models.SpiderV2]().GetMany(bson.M{\n\t\t\"_id\": bson.M{\n\t\t\t\"$in\": spiderIds,\n\t\t},\n\t}, nil)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// cache spider list to dict\n\tspiderDict := map[primitive.ObjectID]models.SpiderV2{}\n\tfor _, s := range spiders {\n\t\tspiderDict[s.Id] = s\n\t}\n\n\t// iterate list again\n\tfor i, t := range tasks {\n\t\t// task stat\n\t\tts, ok := statsDict[t.Id]\n\t\tif ok {\n\t\t\ttasks[i].Stat = &ts\n\t\t}\n\n\t\t// spider\n\t\ts, ok := spiderDict[t.SpiderId]\n\t\tif ok {\n\t\t\ttasks[i].Spider = &s\n\t\t}\n\t}\n\n\t// response\n\tHandleSuccessWithListData(c, tasks, total)\n}\n\nfunc DeleteTaskById(c *gin.Context) {\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// delete in db\n\tif err := mongo.RunTransaction(func(context mongo2.SessionContext) (err error) {\n\t\t// delete task\n\t\t_, err = service.NewModelServiceV2[models.TaskV2]().GetById(id)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = service.NewModelServiceV2[models.TaskV2]().DeleteById(id)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// delete task stat\n\t\t_, err = service.NewModelServiceV2[models.TaskStatV2]().GetById(id)\n\t\tif err != nil {\n\t\t\tlog2.Warnf(\"delete task stat error: %s\", err.Error())\n\t\t\treturn nil\n\t\t}\n\t\terr = service.NewModelServiceV2[models.TaskStatV2]().DeleteById(id)\n\t\tif err != nil {\n\t\t\tlog2.Warnf(\"delete task stat error: %s\", err.Error())\n\t\t\treturn nil\n\t\t}\n\n\t\treturn nil\n\t}); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// delete task logs\n\tlogPath := filepath.Join(viper.GetString(\"log.path\"), id.Hex())\n\tif err := os.RemoveAll(logPath); err != nil {\n\t\tlog2.Warnf(\"failed to remove task log directory: %s\", logPath)\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc DeleteList(c *gin.Context) {\n\tvar payload struct {\n\t\tIds []primitive.ObjectID `json:\"ids\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\tif err := mongo.RunTransaction(func(context mongo2.SessionContext) error {\n\t\t// delete tasks\n\t\tif err := service.NewModelServiceV2[models.TaskV2]().DeleteMany(bson.M{\n\t\t\t\"_id\": bson.M{\n\t\t\t\t\"$in\": payload.Ids,\n\t\t\t},\n\t\t}); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// delete task stats\n\t\tif err := service.NewModelServiceV2[models.TaskV2]().DeleteMany(bson.M{\n\t\t\t\"_id\": bson.M{\n\t\t\t\t\"$in\": payload.Ids,\n\t\t\t},\n\t\t}); err != nil {\n\t\t\tlog2.Warnf(\"delete task stat error: %s\", err.Error())\n\t\t\treturn nil\n\t\t}\n\n\t\treturn nil\n\t}); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// delete tasks logs\n\twg := sync.WaitGroup{}\n\twg.Add(len(payload.Ids))\n\tfor _, id := range payload.Ids {\n\t\tgo func(id string) {\n\t\t\t// delete task logs\n\t\t\tlogPath := filepath.Join(viper.GetString(\"log.path\"), id)\n\t\t\tif err := os.RemoveAll(logPath); err != nil {\n\t\t\t\tlog2.Warnf(\"failed to remove task log directory: %s\", logPath)\n\t\t\t}\n\t\t\twg.Done()\n\t\t}(id.Hex())\n\t}\n\twg.Wait()\n\n\tHandleSuccess(c)\n}\n\nfunc PostTaskRun(c *gin.Context) {\n\t// task\n\tvar t models.TaskV2\n\tif err := c.ShouldBindJSON(&t); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// validate spider id\n\tif t.SpiderId.IsZero() {\n\t\tHandleErrorBadRequest(c, errors.New(\"spider id is required\"))\n\t\treturn\n\t}\n\n\t// spider\n\ts, err := service.NewModelServiceV2[models.SpiderV2]().GetById(t.SpiderId)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// options\n\topts := &interfaces.SpiderRunOptions{\n\t\tMode:     t.Mode,\n\t\tNodeIds:  t.NodeIds,\n\t\tCmd:      t.Cmd,\n\t\tParam:    t.Param,\n\t\tPriority: t.Priority,\n\t}\n\n\t// user\n\tif u := GetUserFromContextV2(c); u != nil {\n\t\topts.UserId = u.Id\n\t}\n\n\t// run\n\tadminSvc, err := admin.GetSpiderAdminServiceV2()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ttaskIds, err := adminSvc.Schedule(s.Id, opts)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, taskIds)\n\n}\n\nfunc PostTaskRestart(c *gin.Context) {\n\t// id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// task\n\tt, err := service.NewModelServiceV2[models.TaskV2]().GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// options\n\topts := &interfaces.SpiderRunOptions{\n\t\tMode:     t.Mode,\n\t\tNodeIds:  t.NodeIds,\n\t\tCmd:      t.Cmd,\n\t\tParam:    t.Param,\n\t\tPriority: t.Priority,\n\t}\n\n\t// user\n\tif u := GetUserFromContextV2(c); u != nil {\n\t\topts.UserId = u.Id\n\t}\n\n\t// run\n\tadminSvc, err := admin.GetSpiderAdminServiceV2()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ttaskIds, err := adminSvc.Schedule(t.SpiderId, opts)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, taskIds)\n}\n\nfunc PostTaskCancel(c *gin.Context) {\n\t// id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// task\n\tt, err := service.NewModelServiceV2[models.TaskV2]().GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// validate\n\tif !utils.IsCancellable(t.Status) {\n\t\tHandleErrorInternalServerError(c, errors.New(\"task is not cancellable\"))\n\t\treturn\n\t}\n\n\tu := GetUserFromContextV2(c)\n\n\t// cancel\n\tschedulerSvc, err := scheduler.GetTaskSchedulerServiceV2()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tif err := schedulerSvc.Cancel(id, u.Id); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccess(c)\n}\n\nfunc GetTaskLogs(c *gin.Context) {\n\t// id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// pagination\n\tp, err := GetPagination(c)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// logs\n\tlogDriver, err := log.GetFileLogDriver()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tlogs, err := logDriver.Find(id.Hex(), \"\", (p.Page-1)*p.Size, p.Size)\n\tif err != nil {\n\t\tif strings.HasSuffix(err.Error(), \"Status:404 Not Found\") {\n\t\t\tHandleSuccess(c)\n\t\t\treturn\n\t\t}\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\ttotal, err := logDriver.Count(id.Hex(), \"\")\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithListData(c, logs, total)\n}\n\nfunc GetTaskData(c *gin.Context) {\n\t// id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// pagination\n\tp, err := GetPagination(c)\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// task\n\tt, err := service.NewModelServiceV2[models.TaskV2]().GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// result service\n\tresultSvc, err := result.GetResultService(t.SpiderId)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// query\n\tquery := generic.ListQuery{\n\t\tgeneric.ListQueryCondition{\n\t\t\tKey:   constants.TaskKey,\n\t\t\tOp:    generic.OpEqual,\n\t\t\tValue: t.Id,\n\t\t},\n\t}\n\n\t// list\n\tdata, err := resultSvc.List(query, &generic.ListOptions{\n\t\tSkip:  (p.Page - 1) * p.Size,\n\t\tLimit: p.Size,\n\t\tSort:  []generic.ListSort{{\"_id\", generic.SortDirectionDesc}},\n\t})\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// total\n\ttotal, err := resultSvc.Count(query)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithListData(c, data, total)\n}\n"
  },
  {
    "path": "core/controllers/token_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/user\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc PostToken(c *gin.Context) {\n\tvar t models.TokenV2\n\tif err := c.ShouldBindJSON(&t); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\tsvc, err := user.GetUserServiceV2()\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tu := GetUserFromContextV2(c)\n\tt.SetCreated(u.Id)\n\tt.SetUpdated(u.Id)\n\tt.Token, err = svc.MakeToken(u)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\t_, err = service.NewModelServiceV2[models.TokenV2]().InsertOne(t)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tHandleSuccess(c)\n}\n"
  },
  {
    "path": "core/controllers/user_v2.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc PostUser(c *gin.Context) {\n\tvar payload struct {\n\t\tUsername string `json:\"username\"`\n\t\tPassword string `json:\"password\"`\n\t\tRole     string `json:\"role\"`\n\t\tEmail    string `json:\"email\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\tu := GetUserFromContextV2(c)\n\tmodel := models.UserV2{\n\t\tUsername: payload.Username,\n\t\tPassword: utils.EncryptMd5(payload.Password),\n\t\tRole:     payload.Role,\n\t\tEmail:    payload.Email,\n\t}\n\tmodel.SetCreated(u.Id)\n\tmodel.SetUpdated(u.Id)\n\tid, err := service.NewModelServiceV2[models.UserV2]().InsertOne(model)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tresult, err := service.NewModelServiceV2[models.UserV2]().GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\tHandleSuccessWithData(c, result)\n\n}\n\nfunc PostUserChangePassword(c *gin.Context) {\n\t// get id\n\tid, err := primitive.ObjectIDFromHex(c.Param(\"id\"))\n\tif err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// get payload\n\tvar payload struct {\n\t\tPassword string `json:\"password\"`\n\t}\n\tif err := c.ShouldBindJSON(&payload); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// get user\n\tu := GetUserFromContextV2(c)\n\tmodelSvc := service.NewModelServiceV2[models.UserV2]()\n\n\t// update password\n\tuser, err := modelSvc.GetById(id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tuser.SetUpdated(u.Id)\n\tuser.Password = utils.EncryptMd5(payload.Password)\n\tif err := modelSvc.ReplaceById(user.Id, *user); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// handle success\n\tHandleSuccess(c)\n}\n\nfunc GetUserMe(c *gin.Context) {\n\tu := GetUserFromContextV2(c)\n\t_u, err := service.NewModelServiceV2[models.UserV2]().GetById(u.Id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tHandleSuccessWithData(c, _u)\n}\n\nfunc PutUserById(c *gin.Context) {\n\t// get payload\n\tvar user models.UserV2\n\tif err := c.ShouldBindJSON(&user); err != nil {\n\t\tHandleErrorBadRequest(c, err)\n\t\treturn\n\t}\n\n\t// get user\n\tu := GetUserFromContextV2(c)\n\n\tmodelSvc := service.NewModelServiceV2[models.UserV2]()\n\n\t// update user\n\tuserDb, err := modelSvc.GetById(u.Id)\n\tif err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\tuser.Password = userDb.Password\n\tuser.SetUpdated(u.Id)\n\tif user.Id.IsZero() {\n\t\tuser.Id = u.Id\n\t}\n\tif err := modelSvc.ReplaceById(u.Id, user); err != nil {\n\t\tHandleErrorInternalServerError(c, err)\n\t\treturn\n\t}\n\n\t// handle success\n\tHandleSuccess(c)\n}\n"
  },
  {
    "path": "core/controllers/user_v2_test.go",
    "content": "package controllers_test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/controllers\"\n\t\"github.com/crawlab-team/crawlab/core/middlewares\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestPostUserChangePassword_Success(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\tmodelSvc := service.NewModelServiceV2[models.UserV2]()\n\tu := models.UserV2{}\n\tid, err := modelSvc.InsertOne(u)\n\tassert.Nil(t, err)\n\tu.SetId(id)\n\n\trouter := gin.Default()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.POST(\"/users/:id/change-password\", controllers.PostUserChangePassword)\n\n\tpassword := \"newPassword\"\n\treqBody := strings.NewReader(`{\"password\":\"` + password + `\"}`)\n\treq, _ := http.NewRequest(http.MethodPost, \"/users/\"+id.Hex()+\"/change-password\", reqBody)\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\treq.Header.Set(\"Authorization\", TestToken)\n\n\tw := httptest.NewRecorder()\n\trouter.ServeHTTP(w, req)\n\n\tassert.Equal(t, http.StatusOK, w.Code)\n}\n\nfunc TestGetUserMe_Success(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\tmodelSvc := service.NewModelServiceV2[models.UserV2]()\n\tu := models.UserV2{}\n\tid, err := modelSvc.InsertOne(u)\n\tassert.Nil(t, err)\n\tu.SetId(id)\n\n\trouter := gin.Default()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.GET(\"/users/me\", controllers.GetUserMe)\n\n\treq, _ := http.NewRequest(http.MethodGet, \"/users/me\", nil)\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\treq.Header.Set(\"Authorization\", TestToken)\n\n\tw := httptest.NewRecorder()\n\trouter.ServeHTTP(w, req)\n\n\tassert.Equal(t, http.StatusOK, w.Code)\n}\n\nfunc TestPutUserById_Success(t *testing.T) {\n\tSetupTestDB()\n\tdefer CleanupTestDB()\n\n\tmodelSvc := service.NewModelServiceV2[models.UserV2]()\n\tu := models.UserV2{}\n\tid, err := modelSvc.InsertOne(u)\n\tassert.Nil(t, err)\n\tu.SetId(id)\n\n\trouter := gin.Default()\n\trouter.Use(middlewares.AuthorizationMiddlewareV2())\n\trouter.PUT(\"/users/me\", controllers.PutUserById)\n\n\treqBody := strings.NewReader(`{\"id\":\"` + id.Hex() + `\",\"username\":\"newUsername\",\"email\":\"newEmail@test.com\"}`)\n\treq, _ := http.NewRequest(http.MethodPut, \"/users/me\", reqBody)\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\treq.Header.Set(\"Authorization\", TestToken)\n\n\tw := httptest.NewRecorder()\n\trouter.ServeHTTP(w, req)\n\n\tassert.Equal(t, http.StatusOK, w.Code)\n}\n"
  },
  {
    "path": "core/controllers/utils_context.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc GetUserFromContext(c *gin.Context) (u interfaces.User) {\n\tvalue, ok := c.Get(constants.UserContextKey)\n\tif !ok {\n\t\treturn nil\n\t}\n\tu, ok = value.(interfaces.User)\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn u\n}\n\nfunc GetUserFromContextV2(c *gin.Context) (u *models.UserV2) {\n\tvalue, ok := c.Get(constants.UserContextKey)\n\tif !ok {\n\t\treturn nil\n\t}\n\tu, ok = value.(*models.UserV2)\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn u\n}\n"
  },
  {
    "path": "core/controllers/utils_filter.go",
    "content": "package controllers\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"reflect\"\n\t\"strings\"\n)\n\n// GetFilter Get entity.Filter from gin.Context\nfunc GetFilter(c *gin.Context) (f *entity.Filter, err error) {\n\t// bind\n\tcondStr := c.Query(constants.FilterQueryFieldConditions)\n\tvar conditions []*entity.Condition\n\tif err := json.Unmarshal([]byte(condStr), &conditions); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// attempt to convert object id\n\tfor i, cond := range conditions {\n\t\tv := reflect.ValueOf(cond.Value)\n\t\tswitch v.Kind() {\n\t\tcase reflect.String:\n\t\t\titem := cond.Value.(string)\n\t\t\tid, err := primitive.ObjectIDFromHex(item)\n\t\t\tif err == nil {\n\t\t\t\tconditions[i].Value = id\n\t\t\t} else {\n\t\t\t\tconditions[i].Value = item\n\t\t\t}\n\t\tcase reflect.Slice, reflect.Array:\n\t\t\tvar items []interface{}\n\t\t\tfor i := 0; i < v.Len(); i++ {\n\t\t\t\tvItem := v.Index(i)\n\t\t\t\titem := vItem.Interface()\n\n\t\t\t\t// string\n\t\t\t\tstringItem, ok := item.(string)\n\t\t\t\tif ok {\n\t\t\t\t\tid, err := primitive.ObjectIDFromHex(stringItem)\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\titems = append(items, id)\n\t\t\t\t\t} else {\n\t\t\t\t\t\titems = append(items, stringItem)\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// default\n\t\t\t\titems = append(items, item)\n\t\t\t}\n\t\t\tconditions[i].Value = items\n\t\t}\n\t}\n\n\treturn &entity.Filter{\n\t\tIsOr:       false,\n\t\tConditions: conditions,\n\t}, nil\n}\n\n// GetFilterQuery Get bson.M from gin.Context\nfunc GetFilterQuery(c *gin.Context) (q bson.M, err error) {\n\tf, err := GetFilter(c)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif f == nil {\n\t\treturn nil, nil\n\t}\n\n\t// TODO: implement logic OR\n\n\treturn utils.FilterToQuery(f)\n}\n\nfunc MustGetFilterQuery(c *gin.Context) (q bson.M) {\n\tq, err := GetFilterQuery(c)\n\tif err != nil {\n\t\treturn nil\n\t}\n\treturn q\n}\n\n// GetFilterAll Get all from gin.Context\nfunc GetFilterAll(c *gin.Context) (res bool, err error) {\n\tresStr := c.Query(constants.FilterQueryFieldAll)\n\tswitch strings.ToUpper(resStr) {\n\tcase \"1\":\n\t\treturn true, nil\n\tcase \"0\":\n\t\treturn false, nil\n\tcase \"Y\":\n\t\treturn true, nil\n\tcase \"N\":\n\t\treturn false, nil\n\tcase \"T\":\n\t\treturn true, nil\n\tcase \"F\":\n\t\treturn false, nil\n\tcase \"TRUE\":\n\t\treturn true, nil\n\tcase \"FALSE\":\n\t\treturn false, nil\n\tdefault:\n\t\treturn false, errors.ErrorFilterInvalidOperation\n\t}\n}\n\nfunc MustGetFilterAll(c *gin.Context) (res bool) {\n\tres, err := GetFilterAll(c)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/controllers/utils_http.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gin-gonic/gin\"\n\t\"net/http\"\n)\n\nfunc handleError(statusCode int, c *gin.Context, err error, print bool) {\n\tif print {\n\t\ttrace.PrintError(err)\n\t}\n\tc.AbortWithStatusJSON(statusCode, entity.Response{\n\t\tStatus:  constants.HttpResponseStatusOk,\n\t\tMessage: constants.HttpResponseMessageError,\n\t\tError:   err.Error(),\n\t})\n}\n\nfunc HandleError(statusCode int, c *gin.Context, err error) {\n\thandleError(statusCode, c, err, true)\n}\n\nfunc HandleErrorNoPrint(statusCode int, c *gin.Context, err error) {\n\thandleError(statusCode, c, err, false)\n}\n\nfunc HandleErrorBadRequest(c *gin.Context, err error) {\n\tHandleError(http.StatusBadRequest, c, err)\n}\n\nfunc HandleErrorForbidden(c *gin.Context, err error) {\n\tHandleError(http.StatusForbidden, c, err)\n}\n\nfunc HandleErrorUnauthorized(c *gin.Context, err error) {\n\tHandleError(http.StatusUnauthorized, c, err)\n}\n\nfunc HandleErrorNotFound(c *gin.Context, err error) {\n\tHandleError(http.StatusNotFound, c, err)\n}\n\nfunc HandleErrorNotFoundNoPrint(c *gin.Context, err error) {\n\tHandleErrorNoPrint(http.StatusNotFound, c, err)\n}\n\nfunc HandleErrorInternalServerError(c *gin.Context, err error) {\n\tHandleError(http.StatusInternalServerError, c, err)\n}\n\nfunc HandleSuccess(c *gin.Context) {\n\tc.AbortWithStatusJSON(http.StatusOK, entity.Response{\n\t\tStatus:  constants.HttpResponseStatusOk,\n\t\tMessage: constants.HttpResponseMessageSuccess,\n\t})\n}\n\nfunc HandleSuccessWithData(c *gin.Context, data interface{}) {\n\tc.AbortWithStatusJSON(http.StatusOK, entity.Response{\n\t\tStatus:  constants.HttpResponseStatusOk,\n\t\tMessage: constants.HttpResponseMessageSuccess,\n\t\tData:    data,\n\t})\n}\n\nfunc HandleSuccessWithListData(c *gin.Context, data interface{}, total int) {\n\tc.AbortWithStatusJSON(http.StatusOK, entity.ListResponse{\n\t\tStatus:  constants.HttpResponseStatusOk,\n\t\tMessage: constants.HttpResponseMessageSuccess,\n\t\tData:    data,\n\t\tTotal:   total,\n\t})\n}\n"
  },
  {
    "path": "core/controllers/utils_pagination.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc GetDefaultPagination() (p *entity.Pagination) {\n\treturn &entity.Pagination{\n\t\tPage: constants.PaginationDefaultPage,\n\t\tSize: constants.PaginationDefaultSize,\n\t}\n}\n\nfunc GetPagination(c *gin.Context) (p *entity.Pagination, err error) {\n\tvar _p entity.Pagination\n\tif err := c.ShouldBindQuery(&_p); err != nil {\n\t\treturn GetDefaultPagination(), err\n\t}\n\treturn &_p, nil\n}\n\nfunc MustGetPagination(c *gin.Context) (p *entity.Pagination) {\n\tp, err := GetPagination(c)\n\tif err != nil || p == nil {\n\t\treturn GetDefaultPagination()\n\t}\n\treturn p\n}\n"
  },
  {
    "path": "core/controllers/utils_sort.go",
    "content": "package controllers\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/gin-gonic/gin\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n)\n\n// GetSorts Get entity.Sort from gin.Context\nfunc GetSorts(c *gin.Context) (sorts []entity.Sort, err error) {\n\t// bind\n\tsortStr := c.Query(constants.SortQueryField)\n\tif err := json.Unmarshal([]byte(sortStr), &sorts); err != nil {\n\t\treturn nil, err\n\t}\n\treturn sorts, nil\n}\n\n// GetSortsOption Get entity.Sort from gin.Context\nfunc GetSortsOption(c *gin.Context) (sort bson.D, err error) {\n\tsorts, err := GetSorts(c)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif sorts == nil || len(sorts) == 0 {\n\t\treturn bson.D{{\"_id\", -1}}, nil\n\t}\n\n\treturn SortsToOption(sorts)\n}\n\nfunc MustGetSortOption(c *gin.Context) (sort bson.D) {\n\tsort, err := GetSortsOption(c)\n\tif err != nil {\n\t\treturn nil\n\t}\n\treturn sort\n}\n\n// SortsToOption Translate entity.Sort to bson.D\nfunc SortsToOption(sorts []entity.Sort) (sort bson.D, err error) {\n\tsort = bson.D{}\n\tfor _, s := range sorts {\n\t\tswitch s.Direction {\n\t\tcase constants.ASCENDING:\n\t\t\tsort = append(sort, bson.E{Key: s.Key, Value: 1})\n\t\tcase constants.DESCENDING:\n\t\t\tsort = append(sort, bson.E{Key: s.Key, Value: -1})\n\t\t}\n\t}\n\tif len(sort) == 0 {\n\t\tsort = bson.D{{\"_id\", -1}}\n\t}\n\treturn sort, nil\n}\n"
  },
  {
    "path": "core/controllers/ws_writer.go",
    "content": "package controllers\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/gorilla/websocket\"\n\t\"io\"\n\thttp2 \"net/http\"\n)\n\ntype WsWriter struct {\n\tio.Writer\n\tio.Closer\n\tconn *websocket.Conn\n}\n\nfunc (w *WsWriter) Write(data []byte) (n int, err error) {\n\tlog.Infof(\"websocket write: %s\", string(data))\n\terr = w.conn.WriteMessage(websocket.TextMessage, data)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn len(data), nil\n}\n\nfunc (w *WsWriter) Close() (err error) {\n\treturn w.conn.Close()\n}\n\nfunc (w *WsWriter) CloseWithText(text string) {\n\t_ = w.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, text))\n}\n\nfunc (w *WsWriter) CloseWithError(err error) {\n\t_ = w.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseInternalServerErr, err.Error()))\n}\n\nfunc NewWsWriter(c *gin.Context) (writer *WsWriter, err error) {\n\tupgrader := websocket.Upgrader{\n\t\tReadBufferSize:  1024,\n\t\tWriteBufferSize: 1024,\n\t\tCheckOrigin: func(r *http2.Request) bool {\n\t\t\treturn true\n\t\t},\n\t}\n\n\tconn, err := upgrader.Upgrade(c.Writer, c.Request, nil)\n\tif err != nil {\n\t\tlog.Errorf(\"websocket open connection error: %v\", err)\n\t\ttrace.PrintError(err)\n\t}\n\n\treturn &WsWriter{\n\t\tconn: conn,\n\t}, nil\n}\n"
  },
  {
    "path": "core/data/colors.go",
    "content": "package data\n\nconst ColorsDataText = `[\n  {\n    \"name\": \"Absolute Zero\",\n    \"hex\": \"#0048BA\"\n  },\n  {\n    \"name\": \"Acid Green\",\n    \"hex\": \"#B0BF1A\"\n  },\n  {\n    \"name\": \"Aero\",\n    \"hex\": \"#7CB9E8\"\n  },\n  {\n    \"name\": \"Aero Blue\",\n    \"hex\": \"#C9FFE5\"\n  },\n  {\n    \"name\": \"African Violet\",\n    \"hex\": \"#B284BE\"\n  },\n  {\n    \"name\": \"Air Force Blue (RAF)\",\n    \"hex\": \"#5D8AA8\"\n  },\n  {\n    \"name\": \"Air Force Blue (USAF)\",\n    \"hex\": \"#00308F\"\n  },\n  {\n    \"name\": \"Air Superiority Blue\",\n    \"hex\": \"#72A0C1\"\n  },\n  {\n    \"name\": \"Alabama Crimson\",\n    \"hex\": \"#AF002A\"\n  },\n  {\n    \"name\": \"Alabaster\",\n    \"hex\": \"#F2F0E6\"\n  },\n  {\n    \"name\": \"Alice Blue\",\n    \"hex\": \"#F0F8FF\"\n  },\n  {\n    \"name\": \"Alien Armpit\",\n    \"hex\": \"#84DE02\"\n  },\n  {\n    \"name\": \"Alizarin Crimson\",\n    \"hex\": \"#E32636\"\n  },\n  {\n    \"name\": \"Alloy Orange\",\n    \"hex\": \"#C46210\"\n  },\n  {\n    \"name\": \"Almond\",\n    \"hex\": \"#EFDECD\"\n  },\n  {\n    \"name\": \"Amaranth\",\n    \"hex\": \"#E52B50\"\n  },\n  {\n    \"name\": \"Amaranth Deep Purple\",\n    \"hex\": \"#9F2B68\"\n  },\n  {\n    \"name\": \"Amaranth Pink\",\n    \"hex\": \"#F19CBB\"\n  },\n  {\n    \"name\": \"Amaranth Purple\",\n    \"hex\": \"#AB274F\"\n  },\n  {\n    \"name\": \"Amaranth Red\",\n    \"hex\": \"#D3212D\"\n  },\n  {\n    \"name\": \"Amazon Store\",\n    \"hex\": \"#3B7A57\"\n  },\n  {\n    \"name\": \"Amazonite\",\n    \"hex\": \"#00C4B0\"\n  },\n  {\n    \"name\": \"Amber\",\n    \"hex\": \"#FFBF00\"\n  },\n  {\n    \"name\": \"Amber (SAE/ECE)\",\n    \"hex\": \"#FF7E00\"\n  },\n  {\n    \"name\": \"American Rose\",\n    \"hex\": \"#FF033E\"\n  },\n  {\n    \"name\": \"Amethyst\",\n    \"hex\": \"#9966CC\"\n  },\n  {\n    \"name\": \"Android Green\",\n    \"hex\": \"#A4C639\"\n  },\n  {\n    \"name\": \"Anti-Flash White\",\n    \"hex\": \"#F2F3F4\"\n  },\n  {\n    \"name\": \"Antique Brass\",\n    \"hex\": \"#CD9575\"\n  },\n  {\n    \"name\": \"Antique Bronze\",\n    \"hex\": \"#665D1E\"\n  },\n  {\n    \"name\": \"Antique Fuchsia\",\n    \"hex\": \"#915C83\"\n  },\n  {\n    \"name\": \"Antique Ruby\",\n    \"hex\": \"#841B2D\"\n  },\n  {\n    \"name\": \"Antique White\",\n    \"hex\": \"#FAEBD7\"\n  },\n  {\n    \"name\": \"Ao (English)\",\n    \"hex\": \"#008000\"\n  },\n  {\n    \"name\": \"Apple Green\",\n    \"hex\": \"#8DB600\"\n  },\n  {\n    \"name\": \"Apricot\",\n    \"hex\": \"#FBCEB1\"\n  },\n  {\n    \"name\": \"Aqua\",\n    \"hex\": \"#00FFFF\"\n  },\n  {\n    \"name\": \"Aquamarine\",\n    \"hex\": \"#7FFFD4\"\n  },\n  {\n    \"name\": \"Arctic Lime\",\n    \"hex\": \"#D0FF14\"\n  },\n  {\n    \"name\": \"Army Green\",\n    \"hex\": \"#4B5320\"\n  },\n  {\n    \"name\": \"Arsenic\",\n    \"hex\": \"#3B444B\"\n  },\n  {\n    \"name\": \"Artichoke\",\n    \"hex\": \"#8F9779\"\n  },\n  {\n    \"name\": \"Arylide Yellow\",\n    \"hex\": \"#E9D66B\"\n  },\n  {\n    \"name\": \"Ash Gray\",\n    \"hex\": \"#B2BEB5\"\n  },\n  {\n    \"name\": \"Asparagus\",\n    \"hex\": \"#87A96B\"\n  },\n  {\n    \"name\": \"Atomic Tangerine\",\n    \"hex\": \"#FF9966\"\n  },\n  {\n    \"name\": \"Auburn\",\n    \"hex\": \"#A52A2A\"\n  },\n  {\n    \"name\": \"Aureolin\",\n    \"hex\": \"#FDEE00\"\n  },\n  {\n    \"name\": \"AuroMetalSaurus\",\n    \"hex\": \"#6E7F80\"\n  },\n  {\n    \"name\": \"Avocado\",\n    \"hex\": \"#568203\"\n  },\n  {\n    \"name\": \"Awesome\",\n    \"hex\": \"#FF2052\"\n  },\n  {\n    \"name\": \"Aztec Gold\",\n    \"hex\": \"#C39953\"\n  },\n  {\n    \"name\": \"Azure\",\n    \"hex\": \"#007FFF\"\n  },\n  {\n    \"name\": \"Azure (Web Color)\",\n    \"hex\": \"#F0FFFF\"\n  },\n  {\n    \"name\": \"Azure Mist\",\n    \"hex\": \"#F0FFFF\"\n  },\n  {\n    \"name\": \"Azureish White\",\n    \"hex\": \"#DBE9F4\"\n  },\n  {\n    \"name\": \"Baby Blue\",\n    \"hex\": \"#89CFF0\"\n  },\n  {\n    \"name\": \"Baby Blue Eyes\",\n    \"hex\": \"#A1CAF1\"\n  },\n  {\n    \"name\": \"Baby Pink\",\n    \"hex\": \"#F4C2C2\"\n  },\n  {\n    \"name\": \"Baby Powder\",\n    \"hex\": \"#FEFEFA\"\n  },\n  {\n    \"name\": \"Baker-Miller Pink\",\n    \"hex\": \"#FF91AF\"\n  },\n  {\n    \"name\": \"Ball Blue\",\n    \"hex\": \"#21ABCD\"\n  },\n  {\n    \"name\": \"Banana Mania\",\n    \"hex\": \"#FAE7B5\"\n  },\n  {\n    \"name\": \"Banana Yellow\",\n    \"hex\": \"#FFE135\"\n  },\n  {\n    \"name\": \"Bangladesh Green\",\n    \"hex\": \"#006A4E\"\n  },\n  {\n    \"name\": \"Barbie Pink\",\n    \"hex\": \"#E0218A\"\n  },\n  {\n    \"name\": \"Barn Red\",\n    \"hex\": \"#7C0A02\"\n  },\n  {\n    \"name\": \"Battery Charged Blue\",\n    \"hex\": \"#1DACD6\"\n  },\n  {\n    \"name\": \"Battleship Grey\",\n    \"hex\": \"#848482\"\n  },\n  {\n    \"name\": \"Bazaar\",\n    \"hex\": \"#98777B\"\n  },\n  {\n    \"name\": \"Beau Blue\",\n    \"hex\": \"#BCD4E6\"\n  },\n  {\n    \"name\": \"Beaver\",\n    \"hex\": \"#9F8170\"\n  },\n  {\n    \"name\": \"Begonia\",\n    \"hex\": \"#FA6E79\"\n  },\n  {\n    \"name\": \"Beige\",\n    \"hex\": \"#F5F5DC\"\n  },\n  {\n    \"name\": \"B'dazzled Blue\",\n    \"hex\": \"#2E5894\"\n  },\n  {\n    \"name\": \"Big Dip O'ruby\",\n    \"hex\": \"#9C2542\"\n  },\n  {\n    \"name\": \"Big Foot Feet\",\n    \"hex\": \"#E88E5A\"\n  },\n  {\n    \"name\": \"Bisque\",\n    \"hex\": \"#FFE4C4\"\n  },\n  {\n    \"name\": \"Bistre\",\n    \"hex\": \"#3D2B1F\"\n  },\n  {\n    \"name\": \"Bistre Brown\",\n    \"hex\": \"#967117\"\n  },\n  {\n    \"name\": \"Bitter Lemon\",\n    \"hex\": \"#CAE00D\"\n  },\n  {\n    \"name\": \"Bitter Lime\",\n    \"hex\": \"#BFFF00\"\n  },\n  {\n    \"name\": \"Bittersweet\",\n    \"hex\": \"#FE6F5E\"\n  },\n  {\n    \"name\": \"Bittersweet Shimmer\",\n    \"hex\": \"#BF4F51\"\n  },\n  {\n    \"name\": \"Black\",\n    \"hex\": \"#000000\"\n  },\n  {\n    \"name\": \"Black Bean\",\n    \"hex\": \"#3D0C02\"\n  },\n  {\n    \"name\": \"Black Coral\",\n    \"hex\": \"#54626F\"\n  },\n  {\n    \"name\": \"Black Leather Jacket\",\n    \"hex\": \"#253529\"\n  },\n  {\n    \"name\": \"Black Olive\",\n    \"hex\": \"#3B3C36\"\n  },\n  {\n    \"name\": \"Black Shadows\",\n    \"hex\": \"#BFAFB2\"\n  },\n  {\n    \"name\": \"Blanched Almond\",\n    \"hex\": \"#FFEBCD\"\n  },\n  {\n    \"name\": \"Blast-Off Bronze\",\n    \"hex\": \"#A57164\"\n  },\n  {\n    \"name\": \"Bleu De France\",\n    \"hex\": \"#318CE7\"\n  },\n  {\n    \"name\": \"Blizzard Blue\",\n    \"hex\": \"#ACE5EE\"\n  },\n  {\n    \"name\": \"Blond\",\n    \"hex\": \"#FAF0BE\"\n  },\n  {\n    \"name\": \"Blue\",\n    \"hex\": \"#0000FF\"\n  },\n  {\n    \"name\": \"Blue (Crayola)\",\n    \"hex\": \"#1F75FE\"\n  },\n  {\n    \"name\": \"Blue (Munsell)\",\n    \"hex\": \"#0093AF\"\n  },\n  {\n    \"name\": \"Blue (NCS)\",\n    \"hex\": \"#0087BD\"\n  },\n  {\n    \"name\": \"Blue (Pantone)\",\n    \"hex\": \"#0018A8\"\n  },\n  {\n    \"name\": \"Blue (Pigment)\",\n    \"hex\": \"#333399\"\n  },\n  {\n    \"name\": \"Blue (RYB)\",\n    \"hex\": \"#0247FE\"\n  },\n  {\n    \"name\": \"Blue Bell\",\n    \"hex\": \"#A2A2D0\"\n  },\n  {\n    \"name\": \"Blue Bolt\",\n    \"hex\": \"#00B9FB\"\n  },\n  {\n    \"name\": \"Blue-Gray\",\n    \"hex\": \"#6699CC\"\n  },\n  {\n    \"name\": \"Blue-Green\",\n    \"hex\": \"#0D98BA\"\n  },\n  {\n    \"name\": \"Blue Jeans\",\n    \"hex\": \"#5DADEC\"\n  },\n  {\n    \"name\": \"Blue Lagoon\",\n    \"hex\": \"#ACE5EE\"\n  },\n  {\n    \"name\": \"Blue-Magenta Violet\",\n    \"hex\": \"#553592\"\n  },\n  {\n    \"name\": \"Blue Sapphire\",\n    \"hex\": \"#126180\"\n  },\n  {\n    \"name\": \"Blue-Violet\",\n    \"hex\": \"#8A2BE2\"\n  },\n  {\n    \"name\": \"Blue Yonder\",\n    \"hex\": \"#5072A7\"\n  },\n  {\n    \"name\": \"Blueberry\",\n    \"hex\": \"#4F86F7\"\n  },\n  {\n    \"name\": \"Bluebonnet\",\n    \"hex\": \"#1C1CF0\"\n  },\n  {\n    \"name\": \"Blush\",\n    \"hex\": \"#DE5D83\"\n  },\n  {\n    \"name\": \"Bole\",\n    \"hex\": \"#79443B\"\n  },\n  {\n    \"name\": \"Bondi Blue\",\n    \"hex\": \"#0095B6\"\n  },\n  {\n    \"name\": \"Bone\",\n    \"hex\": \"#E3DAC9\"\n  },\n  {\n    \"name\": \"Booger Buster\",\n    \"hex\": \"#DDE26A\"\n  },\n  {\n    \"name\": \"Boston University Red\",\n    \"hex\": \"#CC0000\"\n  },\n  {\n    \"name\": \"Bottle Green\",\n    \"hex\": \"#006A4E\"\n  },\n  {\n    \"name\": \"Boysenberry\",\n    \"hex\": \"#873260\"\n  },\n  {\n    \"name\": \"Brandeis Blue\",\n    \"hex\": \"#0070FF\"\n  },\n  {\n    \"name\": \"Brass\",\n    \"hex\": \"#B5A642\"\n  },\n  {\n    \"name\": \"Brick Red\",\n    \"hex\": \"#CB4154\"\n  },\n  {\n    \"name\": \"Bright Cerulean\",\n    \"hex\": \"#1DACD6\"\n  },\n  {\n    \"name\": \"Bright Green\",\n    \"hex\": \"#66FF00\"\n  },\n  {\n    \"name\": \"Bright Lavender\",\n    \"hex\": \"#BF94E4\"\n  },\n  {\n    \"name\": \"Bright Lilac\",\n    \"hex\": \"#D891EF\"\n  },\n  {\n    \"name\": \"Bright Maroon\",\n    \"hex\": \"#C32148\"\n  },\n  {\n    \"name\": \"Bright Navy Blue\",\n    \"hex\": \"#1974D2\"\n  },\n  {\n    \"name\": \"Bright Pink\",\n    \"hex\": \"#FF007F\"\n  },\n  {\n    \"name\": \"Bright Turquoise\",\n    \"hex\": \"#08E8DE\"\n  },\n  {\n    \"name\": \"Bright Ube\",\n    \"hex\": \"#D19FE8\"\n  },\n  {\n    \"name\": \"Bright Yellow (Crayola)\",\n    \"hex\": \"#FFAA1D\"\n  },\n  {\n    \"name\": \"Brilliant Azure\",\n    \"hex\": \"#3399FF\"\n  },\n  {\n    \"name\": \"Brilliant Lavender\",\n    \"hex\": \"#F4BBFF\"\n  },\n  {\n    \"name\": \"Brilliant Rose\",\n    \"hex\": \"#FF55A3\"\n  },\n  {\n    \"name\": \"Brink Pink\",\n    \"hex\": \"#FB607F\"\n  },\n  {\n    \"name\": \"British Racing Green\",\n    \"hex\": \"#004225\"\n  },\n  {\n    \"name\": \"Bronze\",\n    \"hex\": \"#CD7F32\"\n  },\n  {\n    \"name\": \"Bronze Yellow\",\n    \"hex\": \"#737000\"\n  },\n  {\n    \"name\": \"Brown (Traditional)\",\n    \"hex\": \"#964B00\"\n  },\n  {\n    \"name\": \"Brown (Web)\",\n    \"hex\": \"#A52A2A\"\n  },\n  {\n    \"name\": \"Brown-Nose\",\n    \"hex\": \"#6B4423\"\n  },\n  {\n    \"name\": \"Brown Sugar\",\n    \"hex\": \"#AF6E4D\"\n  },\n  {\n    \"name\": \"Brown Yellow\",\n    \"hex\": \"#cc9966\"\n  },\n  {\n    \"name\": \"Brunswick Green\",\n    \"hex\": \"#1B4D3E\"\n  },\n  {\n    \"name\": \"Bubble Gum\",\n    \"hex\": \"#FFC1CC\"\n  },\n  {\n    \"name\": \"Bubbles\",\n    \"hex\": \"#E7FEFF\"\n  },\n  {\n    \"name\": \"Bud Green\",\n    \"hex\": \"#7BB661\"\n  },\n  {\n    \"name\": \"Buff\",\n    \"hex\": \"#F0DC82\"\n  },\n  {\n    \"name\": \"Bulgarian Rose\",\n    \"hex\": \"#480607\"\n  },\n  {\n    \"name\": \"Burgundy\",\n    \"hex\": \"#800020\"\n  },\n  {\n    \"name\": \"Burlywood\",\n    \"hex\": \"#DEB887\"\n  },\n  {\n    \"name\": \"Burnished Brown\",\n    \"hex\": \"#A17A74\"\n  },\n  {\n    \"name\": \"Burnt Orange\",\n    \"hex\": \"#CC5500\"\n  },\n  {\n    \"name\": \"Burnt Sienna\",\n    \"hex\": \"#E97451\"\n  },\n  {\n    \"name\": \"Burnt Umber\",\n    \"hex\": \"#8A3324\"\n  },\n  {\n    \"name\": \"Button Blue\",\n    \"hex\": \"#24A0ED\"\n  },\n  {\n    \"name\": \"Byzantine\",\n    \"hex\": \"#BD33A4\"\n  },\n  {\n    \"name\": \"Byzantium\",\n    \"hex\": \"#702963\"\n  },\n  {\n    \"name\": \"Cadet\",\n    \"hex\": \"#536872\"\n  },\n  {\n    \"name\": \"Cadet Blue\",\n    \"hex\": \"#5F9EA0\"\n  },\n  {\n    \"name\": \"Cadet Grey\",\n    \"hex\": \"#91A3B0\"\n  },\n  {\n    \"name\": \"Cadmium Green\",\n    \"hex\": \"#006B3C\"\n  },\n  {\n    \"name\": \"Cadmium Orange\",\n    \"hex\": \"#ED872D\"\n  },\n  {\n    \"name\": \"Cadmium Red\",\n    \"hex\": \"#E30022\"\n  },\n  {\n    \"name\": \"Cadmium Yellow\",\n    \"hex\": \"#FFF600\"\n  },\n  {\n    \"name\": \"Cafe Au Lait\",\n    \"hex\": \"#A67B5B\"\n  },\n  {\n    \"name\": \"Cafe Noir\",\n    \"hex\": \"#4B3621\"\n  },\n  {\n    \"name\": \"Cal Poly Pomona Green\",\n    \"hex\": \"#1E4D2B\"\n  },\n  {\n    \"name\": \"Cambridge Blue\",\n    \"hex\": \"#A3C1AD\"\n  },\n  {\n    \"name\": \"Camel\",\n    \"hex\": \"#C19A6B\"\n  },\n  {\n    \"name\": \"Cameo Pink\",\n    \"hex\": \"#EFBBCC\"\n  },\n  {\n    \"name\": \"Camouflage Green\",\n    \"hex\": \"#78866B\"\n  },\n  {\n    \"name\": \"Canary\",\n    \"hex\": \"#FFFF99\"\n  },\n  {\n    \"name\": \"Canary Yellow\",\n    \"hex\": \"#FFEF00\"\n  },\n  {\n    \"name\": \"Candy Apple Red\",\n    \"hex\": \"#FF0800\"\n  },\n  {\n    \"name\": \"Candy Pink\",\n    \"hex\": \"#E4717A\"\n  },\n  {\n    \"name\": \"Capri\",\n    \"hex\": \"#00BFFF\"\n  },\n  {\n    \"name\": \"Caput Mortuum\",\n    \"hex\": \"#592720\"\n  },\n  {\n    \"name\": \"Cardinal\",\n    \"hex\": \"#C41E3A\"\n  },\n  {\n    \"name\": \"Caribbean Green\",\n    \"hex\": \"#00CC99\"\n  },\n  {\n    \"name\": \"Carmine\",\n    \"hex\": \"#960018\"\n  },\n  {\n    \"name\": \"Carmine (M&P)\",\n    \"hex\": \"#D70040\"\n  },\n  {\n    \"name\": \"Carmine Pink\",\n    \"hex\": \"#EB4C42\"\n  },\n  {\n    \"name\": \"Carmine Red\",\n    \"hex\": \"#FF0038\"\n  },\n  {\n    \"name\": \"Carnation Pink\",\n    \"hex\": \"#FFA6C9\"\n  },\n  {\n    \"name\": \"Carnelian\",\n    \"hex\": \"#B31B1B\"\n  },\n  {\n    \"name\": \"Carolina Blue\",\n    \"hex\": \"#56A0D3\"\n  },\n  {\n    \"name\": \"Carrot Orange\",\n    \"hex\": \"#ED9121\"\n  },\n  {\n    \"name\": \"Castleton Green\",\n    \"hex\": \"#00563F\"\n  },\n  {\n    \"name\": \"Catalina Blue\",\n    \"hex\": \"#062A78\"\n  },\n  {\n    \"name\": \"Catawba\",\n    \"hex\": \"#703642\"\n  },\n  {\n    \"name\": \"Cedar Chest\",\n    \"hex\": \"#C95A49\"\n  },\n  {\n    \"name\": \"Ceil\",\n    \"hex\": \"#92A1CF\"\n  },\n  {\n    \"name\": \"Celadon\",\n    \"hex\": \"#ACE1AF\"\n  },\n  {\n    \"name\": \"Celadon Blue\",\n    \"hex\": \"#007BA7\"\n  },\n  {\n    \"name\": \"Celadon Green\",\n    \"hex\": \"#2F847C\"\n  },\n  {\n    \"name\": \"Celeste\",\n    \"hex\": \"#B2FFFF\"\n  },\n  {\n    \"name\": \"Celestial Blue\",\n    \"hex\": \"#4997D0\"\n  },\n  {\n    \"name\": \"Cerise\",\n    \"hex\": \"#DE3163\"\n  },\n  {\n    \"name\": \"Cerise Pink\",\n    \"hex\": \"#EC3B83\"\n  },\n  {\n    \"name\": \"Cerulean\",\n    \"hex\": \"#007BA7\"\n  },\n  {\n    \"name\": \"Cerulean Blue\",\n    \"hex\": \"#2A52BE\"\n  },\n  {\n    \"name\": \"Cerulean Frost\",\n    \"hex\": \"#6D9BC3\"\n  },\n  {\n    \"name\": \"CG Blue\",\n    \"hex\": \"#007AA5\"\n  },\n  {\n    \"name\": \"CG Red\",\n    \"hex\": \"#E03C31\"\n  },\n  {\n    \"name\": \"Chamoisee\",\n    \"hex\": \"#A0785A\"\n  },\n  {\n    \"name\": \"Champagne\",\n    \"hex\": \"#F7E7CE\"\n  },\n  {\n    \"name\": \"Champagne Pink\",\n    \"hex\": \"#F1DDCF\"\n  },\n  {\n    \"name\": \"Charcoal\",\n    \"hex\": \"#36454F\"\n  },\n  {\n    \"name\": \"Charleston Green\",\n    \"hex\": \"#232B2B\"\n  },\n  {\n    \"name\": \"Charm Pink\",\n    \"hex\": \"#E68FAC\"\n  },\n  {\n    \"name\": \"Chartreuse (Traditional)\",\n    \"hex\": \"#DFFF00\"\n  },\n  {\n    \"name\": \"Chartreuse (Web)\",\n    \"hex\": \"#7FFF00\"\n  },\n  {\n    \"name\": \"Cherry\",\n    \"hex\": \"#DE3163\"\n  },\n  {\n    \"name\": \"Cherry Blossom Pink\",\n    \"hex\": \"#FFB7C5\"\n  },\n  {\n    \"name\": \"Chestnut\",\n    \"hex\": \"#954535\"\n  },\n  {\n    \"name\": \"China Pink\",\n    \"hex\": \"#DE6FA1\"\n  },\n  {\n    \"name\": \"China Rose\",\n    \"hex\": \"#A8516E\"\n  },\n  {\n    \"name\": \"Chinese Red\",\n    \"hex\": \"#AA381E\"\n  },\n  {\n    \"name\": \"Chinese Violet\",\n    \"hex\": \"#856088\"\n  },\n  {\n    \"name\": \"Chlorophyll Green\",\n    \"hex\": \"#4AFF00\"\n  },\n  {\n    \"name\": \"Chocolate (Traditional)\",\n    \"hex\": \"#7B3F00\"\n  },\n  {\n    \"name\": \"Chocolate (Web)\",\n    \"hex\": \"#D2691E\"\n  },\n  {\n    \"name\": \"Chrome Yellow\",\n    \"hex\": \"#FFA700\"\n  },\n  {\n    \"name\": \"Cinereous\",\n    \"hex\": \"#98817B\"\n  },\n  {\n    \"name\": \"Cinnabar\",\n    \"hex\": \"#E34234\"\n  },\n  {\n    \"name\": \"Cinnamon\",\n    \"hex\": \"#D2691E\"\n  },\n  {\n    \"name\": \"Cinnamon Satin\",\n    \"hex\": \"#CD607E\"\n  },\n  {\n    \"name\": \"Citrine\",\n    \"hex\": \"#E4D00A\"\n  },\n  {\n    \"name\": \"Citron\",\n    \"hex\": \"#9FA91F\"\n  },\n  {\n    \"name\": \"Claret\",\n    \"hex\": \"#7F1734\"\n  },\n  {\n    \"name\": \"Classic Rose\",\n    \"hex\": \"#FBCCE7\"\n  },\n  {\n    \"name\": \"Cobalt Blue\",\n    \"hex\": \"#0047AB\"\n  },\n  {\n    \"name\": \"Cocoa Brown\",\n    \"hex\": \"#D2691E\"\n  },\n  {\n    \"name\": \"Coconut\",\n    \"hex\": \"#965A3E\"\n  },\n  {\n    \"name\": \"Coffee\",\n    \"hex\": \"#6F4E37\"\n  },\n  {\n    \"name\": \"Columbia Blue\",\n    \"hex\": \"#C4D8E2\"\n  },\n  {\n    \"name\": \"Congo Pink\",\n    \"hex\": \"#F88379\"\n  },\n  {\n    \"name\": \"Cool Black\",\n    \"hex\": \"#002E63\"\n  },\n  {\n    \"name\": \"Cool Grey\",\n    \"hex\": \"#8C92AC\"\n  },\n  {\n    \"name\": \"Copper\",\n    \"hex\": \"#B87333\"\n  },\n  {\n    \"name\": \"Copper (Crayola)\",\n    \"hex\": \"#DA8A67\"\n  },\n  {\n    \"name\": \"Copper Penny\",\n    \"hex\": \"#AD6F69\"\n  },\n  {\n    \"name\": \"Copper Red\",\n    \"hex\": \"#CB6D51\"\n  },\n  {\n    \"name\": \"Copper Rose\",\n    \"hex\": \"#996666\"\n  },\n  {\n    \"name\": \"Coquelicot\",\n    \"hex\": \"#FF3800\"\n  },\n  {\n    \"name\": \"Coral\",\n    \"hex\": \"#FF7F50\"\n  },\n  {\n    \"name\": \"Coral Pink\",\n    \"hex\": \"#F88379\"\n  },\n  {\n    \"name\": \"Coral Red\",\n    \"hex\": \"#FF4040\"\n  },\n  {\n    \"name\": \"Coral Reef\",\n    \"hex\": \"#FD7C6E\"\n  },\n  {\n    \"name\": \"Cordovan\",\n    \"hex\": \"#893F45\"\n  },\n  {\n    \"name\": \"Corn\",\n    \"hex\": \"#FBEC5D\"\n  },\n  {\n    \"name\": \"Cornell Red\",\n    \"hex\": \"#B31B1B\"\n  },\n  {\n    \"name\": \"Cornflower Blue\",\n    \"hex\": \"#6495ED\"\n  },\n  {\n    \"name\": \"Cornsilk\",\n    \"hex\": \"#FFF8DC\"\n  },\n  {\n    \"name\": \"Cosmic Cobalt\",\n    \"hex\": \"#2E2D88\"\n  },\n  {\n    \"name\": \"Cosmic Latte\",\n    \"hex\": \"#FFF8E7\"\n  },\n  {\n    \"name\": \"Coyote Brown\",\n    \"hex\": \"#81613C\"\n  },\n  {\n    \"name\": \"Cotton Candy\",\n    \"hex\": \"#FFBCD9\"\n  },\n  {\n    \"name\": \"Cream\",\n    \"hex\": \"#FFFDD0\"\n  },\n  {\n    \"name\": \"Crimson\",\n    \"hex\": \"#DC143C\"\n  },\n  {\n    \"name\": \"Crimson Glory\",\n    \"hex\": \"#BE0032\"\n  },\n  {\n    \"name\": \"Crimson Red\",\n    \"hex\": \"#990000\"\n  },\n  {\n    \"name\": \"Cultured\",\n    \"hex\": \"#F5F5F5\"\n  },\n  {\n    \"name\": \"Cyan\",\n    \"hex\": \"#00FFFF\"\n  },\n  {\n    \"name\": \"Cyan Azure\",\n    \"hex\": \"#4E82B4\"\n  },\n  {\n    \"name\": \"Cyan-Blue Azure\",\n    \"hex\": \"#4682BF\"\n  },\n  {\n    \"name\": \"Cyan Cobalt Blue\",\n    \"hex\": \"#28589C\"\n  },\n  {\n    \"name\": \"Cyan Cornflower Blue\",\n    \"hex\": \"#188BC2\"\n  },\n  {\n    \"name\": \"Cyan (Process)\",\n    \"hex\": \"#00B7EB\"\n  },\n  {\n    \"name\": \"Cyber Grape\",\n    \"hex\": \"#58427C\"\n  },\n  {\n    \"name\": \"Cyber Yellow\",\n    \"hex\": \"#FFD300\"\n  },\n  {\n    \"name\": \"Cyclamen\",\n    \"hex\": \"#F56FA1\"\n  },\n  {\n    \"name\": \"Daffodil\",\n    \"hex\": \"#FFFF31\"\n  },\n  {\n    \"name\": \"Dandelion\",\n    \"hex\": \"#F0E130\"\n  },\n  {\n    \"name\": \"Dark Blue\",\n    \"hex\": \"#00008B\"\n  },\n  {\n    \"name\": \"Dark Blue-Gray\",\n    \"hex\": \"#666699\"\n  },\n  {\n    \"name\": \"Dark Brown\",\n    \"hex\": \"#654321\"\n  },\n  {\n    \"name\": \"Dark Brown-Tangelo\",\n    \"hex\": \"#88654E\"\n  },\n  {\n    \"name\": \"Dark Byzantium\",\n    \"hex\": \"#5D3954\"\n  },\n  {\n    \"name\": \"Dark Candy Apple Red\",\n    \"hex\": \"#A40000\"\n  },\n  {\n    \"name\": \"Dark Cerulean\",\n    \"hex\": \"#08457E\"\n  },\n  {\n    \"name\": \"Dark Chestnut\",\n    \"hex\": \"#986960\"\n  },\n  {\n    \"name\": \"Dark Coral\",\n    \"hex\": \"#CD5B45\"\n  },\n  {\n    \"name\": \"Dark Cyan\",\n    \"hex\": \"#008B8B\"\n  },\n  {\n    \"name\": \"Dark Electric Blue\",\n    \"hex\": \"#536878\"\n  },\n  {\n    \"name\": \"Dark Goldenrod\",\n    \"hex\": \"#B8860B\"\n  },\n  {\n    \"name\": \"Dark Gray (X11)\",\n    \"hex\": \"#A9A9A9\"\n  },\n  {\n    \"name\": \"Dark Green\",\n    \"hex\": \"#013220\"\n  },\n  {\n    \"name\": \"Dark Green (X11)\",\n    \"hex\": \"#006400\"\n  },\n  {\n    \"name\": \"Dark Gunmetal\",\n    \"hex\": \"#1F262A\"\n  },\n  {\n    \"name\": \"Dark Imperial Blue\",\n    \"hex\": \"#00416A\"\n  },\n  {\n    \"name\": \"Dark Imperial Blue\",\n    \"hex\": \"#00147E\"\n  },\n  {\n    \"name\": \"Dark Jungle Green\",\n    \"hex\": \"#1A2421\"\n  },\n  {\n    \"name\": \"Dark Khaki\",\n    \"hex\": \"#BDB76B\"\n  },\n  {\n    \"name\": \"Dark Lava\",\n    \"hex\": \"#483C32\"\n  },\n  {\n    \"name\": \"Dark Lavender\",\n    \"hex\": \"#734F96\"\n  },\n  {\n    \"name\": \"Dark Liver\",\n    \"hex\": \"#534B4F\"\n  },\n  {\n    \"name\": \"Dark Liver (Horses)\",\n    \"hex\": \"#543D37\"\n  },\n  {\n    \"name\": \"Dark Magenta\",\n    \"hex\": \"#8B008B\"\n  },\n  {\n    \"name\": \"Dark Medium Gray\",\n    \"hex\": \"#A9A9A9\"\n  },\n  {\n    \"name\": \"Dark Midnight Blue\",\n    \"hex\": \"#003366\"\n  },\n  {\n    \"name\": \"Dark Moss Green\",\n    \"hex\": \"#4A5D23\"\n  },\n  {\n    \"name\": \"Dark Olive Green\",\n    \"hex\": \"#556B2F\"\n  },\n  {\n    \"name\": \"Dark Orange\",\n    \"hex\": \"#FF8C00\"\n  },\n  {\n    \"name\": \"Dark Orchid\",\n    \"hex\": \"#9932CC\"\n  },\n  {\n    \"name\": \"Dark Pastel Blue\",\n    \"hex\": \"#779ECB\"\n  },\n  {\n    \"name\": \"Dark Pastel Green\",\n    \"hex\": \"#03C03C\"\n  },\n  {\n    \"name\": \"Dark Pastel Purple\",\n    \"hex\": \"#966FD6\"\n  },\n  {\n    \"name\": \"Dark Pastel Red\",\n    \"hex\": \"#C23B22\"\n  },\n  {\n    \"name\": \"Dark Pink\",\n    \"hex\": \"#E75480\"\n  },\n  {\n    \"name\": \"Dark Powder Blue\",\n    \"hex\": \"#003399\"\n  },\n  {\n    \"name\": \"Dark Puce\",\n    \"hex\": \"#4F3A3C\"\n  },\n  {\n    \"name\": \"Dark Purple\",\n    \"hex\": \"#301934\"\n  },\n  {\n    \"name\": \"Dark Raspberry\",\n    \"hex\": \"#872657\"\n  },\n  {\n    \"name\": \"Dark Red\",\n    \"hex\": \"#8B0000\"\n  },\n  {\n    \"name\": \"Dark Salmon\",\n    \"hex\": \"#E9967A\"\n  },\n  {\n    \"name\": \"Dark Scarlet\",\n    \"hex\": \"#560319\"\n  },\n  {\n    \"name\": \"Dark Sea Green\",\n    \"hex\": \"#8FBC8F\"\n  },\n  {\n    \"name\": \"Dark Sienna\",\n    \"hex\": \"#3C1414\"\n  },\n  {\n    \"name\": \"Dark Sky Blue\",\n    \"hex\": \"#8CBED6\"\n  },\n  {\n    \"name\": \"Dark Slate Blue\",\n    \"hex\": \"#483D8B\"\n  },\n  {\n    \"name\": \"Dark Slate Gray\",\n    \"hex\": \"#2F4F4F\"\n  },\n  {\n    \"name\": \"Dark Spring Green\",\n    \"hex\": \"#177245\"\n  },\n  {\n    \"name\": \"Dark Tan\",\n    \"hex\": \"#918151\"\n  },\n  {\n    \"name\": \"Dark Tangerine\",\n    \"hex\": \"#FFA812\"\n  },\n  {\n    \"name\": \"Dark Taupe\",\n    \"hex\": \"#483C32\"\n  },\n  {\n    \"name\": \"Dark Terra Cotta\",\n    \"hex\": \"#CC4E5C\"\n  },\n  {\n    \"name\": \"Dark Turquoise\",\n    \"hex\": \"#00CED1\"\n  },\n  {\n    \"name\": \"Dark Vanilla\",\n    \"hex\": \"#D1BEA8\"\n  },\n  {\n    \"name\": \"Dark Violet\",\n    \"hex\": \"#9400D3\"\n  },\n  {\n    \"name\": \"Dark Yellow\",\n    \"hex\": \"#9B870C\"\n  },\n  {\n    \"name\": \"Dartmouth Green\",\n    \"hex\": \"#00703C\"\n  },\n  {\n    \"name\": \"Davy's Grey\",\n    \"hex\": \"#555555\"\n  },\n  {\n    \"name\": \"Debian Red\",\n    \"hex\": \"#D70A53\"\n  },\n  {\n    \"name\": \"Deep Aquamarine\",\n    \"hex\": \"#40826D\"\n  },\n  {\n    \"name\": \"Deep Carmine\",\n    \"hex\": \"#A9203E\"\n  },\n  {\n    \"name\": \"Deep Carmine Pink\",\n    \"hex\": \"#EF3038\"\n  },\n  {\n    \"name\": \"Deep Carrot Orange\",\n    \"hex\": \"#E9692C\"\n  },\n  {\n    \"name\": \"Deep Cerise\",\n    \"hex\": \"#DA3287\"\n  },\n  {\n    \"name\": \"Deep Champagne\",\n    \"hex\": \"#FAD6A5\"\n  },\n  {\n    \"name\": \"Deep Chestnut\",\n    \"hex\": \"#B94E48\"\n  },\n  {\n    \"name\": \"Deep Coffee\",\n    \"hex\": \"#704241\"\n  },\n  {\n    \"name\": \"Deep Fuchsia\",\n    \"hex\": \"#C154C1\"\n  },\n  {\n    \"name\": \"Deep Green\",\n    \"hex\": \"#056608\"\n  },\n  {\n    \"name\": \"Deep Green-Cyan Turquoise\",\n    \"hex\": \"#0E7C61\"\n  },\n  {\n    \"name\": \"Deep Jungle Green\",\n    \"hex\": \"#004B49\"\n  },\n  {\n    \"name\": \"Deep Koamaru\",\n    \"hex\": \"#333366\"\n  },\n  {\n    \"name\": \"Deep Lemon\",\n    \"hex\": \"#F5C71A\"\n  },\n  {\n    \"name\": \"Deep Lilac\",\n    \"hex\": \"#9955BB\"\n  },\n  {\n    \"name\": \"Deep Magenta\",\n    \"hex\": \"#CC00CC\"\n  },\n  {\n    \"name\": \"Deep Maroon\",\n    \"hex\": \"#820000\"\n  },\n  {\n    \"name\": \"Deep Mauve\",\n    \"hex\": \"#D473D4\"\n  },\n  {\n    \"name\": \"Deep Moss Green\",\n    \"hex\": \"#355E3B\"\n  },\n  {\n    \"name\": \"Deep Peach\",\n    \"hex\": \"#FFCBA4\"\n  },\n  {\n    \"name\": \"Deep Pink\",\n    \"hex\": \"#FF1493\"\n  },\n  {\n    \"name\": \"Deep Puce\",\n    \"hex\": \"#A95C68\"\n  },\n  {\n    \"name\": \"Deep Red\",\n    \"hex\": \"#850101\"\n  },\n  {\n    \"name\": \"Deep Ruby\",\n    \"hex\": \"#843F5B\"\n  },\n  {\n    \"name\": \"Deep Saffron\",\n    \"hex\": \"#FF9933\"\n  },\n  {\n    \"name\": \"Deep Sky Blue\",\n    \"hex\": \"#00BFFF\"\n  },\n  {\n    \"name\": \"Deep Space Sparkle\",\n    \"hex\": \"#4A646C\"\n  },\n  {\n    \"name\": \"Deep Spring Bud\",\n    \"hex\": \"#556B2F\"\n  },\n  {\n    \"name\": \"Deep Taupe\",\n    \"hex\": \"#7E5E60\"\n  },\n  {\n    \"name\": \"Deep Tuscan Red\",\n    \"hex\": \"#66424D\"\n  },\n  {\n    \"name\": \"Deep Violet\",\n    \"hex\": \"#330066\"\n  },\n  {\n    \"name\": \"Deer\",\n    \"hex\": \"#BA8759\"\n  },\n  {\n    \"name\": \"Denim\",\n    \"hex\": \"#1560BD\"\n  },\n  {\n    \"name\": \"Denim Blue\",\n    \"hex\": \"#2243B6\"\n  },\n  {\n    \"name\": \"Desaturated Cyan\",\n    \"hex\": \"#669999\"\n  },\n  {\n    \"name\": \"Desert\",\n    \"hex\": \"#C19A6B\"\n  },\n  {\n    \"name\": \"Desert Sand\",\n    \"hex\": \"#EDC9AF\"\n  },\n  {\n    \"name\": \"Desire\",\n    \"hex\": \"#EA3C53\"\n  },\n  {\n    \"name\": \"Diamond\",\n    \"hex\": \"#B9F2FF\"\n  },\n  {\n    \"name\": \"Dim Gray\",\n    \"hex\": \"#696969\"\n  },\n  {\n    \"name\": \"Dingy Dungeon\",\n    \"hex\": \"#C53151\"\n  },\n  {\n    \"name\": \"Dirt\",\n    \"hex\": \"#9B7653\"\n  },\n  {\n    \"name\": \"Dodger Blue\",\n    \"hex\": \"#1E90FF\"\n  },\n  {\n    \"name\": \"Dodie Yellow\",\n    \"hex\": \"#FEF65B\"\n  },\n  {\n    \"name\": \"Dogwood Rose\",\n    \"hex\": \"#D71868\"\n  },\n  {\n    \"name\": \"Dollar Bill\",\n    \"hex\": \"#85BB65\"\n  },\n  {\n    \"name\": \"Dolphin Gray\",\n    \"hex\": \"#828E84\"\n  },\n  {\n    \"name\": \"Donkey Brown\",\n    \"hex\": \"#664C28\"\n  },\n  {\n    \"name\": \"Drab\",\n    \"hex\": \"#967117\"\n  },\n  {\n    \"name\": \"Duke Blue\",\n    \"hex\": \"#00009C\"\n  },\n  {\n    \"name\": \"Dust Storm\",\n    \"hex\": \"#E5CCC9\"\n  },\n  {\n    \"name\": \"Dutch White\",\n    \"hex\": \"#EFDFBB\"\n  },\n  {\n    \"name\": \"Earth Yellow\",\n    \"hex\": \"#E1A95F\"\n  },\n  {\n    \"name\": \"Ebony\",\n    \"hex\": \"#555D50\"\n  },\n  {\n    \"name\": \"Ecru\",\n    \"hex\": \"#C2B280\"\n  },\n  {\n    \"name\": \"Eerie Black\",\n    \"hex\": \"#1B1B1B\"\n  },\n  {\n    \"name\": \"Eggplant\",\n    \"hex\": \"#614051\"\n  },\n  {\n    \"name\": \"Eggshell\",\n    \"hex\": \"#F0EAD6\"\n  },\n  {\n    \"name\": \"Egyptian Blue\",\n    \"hex\": \"#1034A6\"\n  },\n  {\n    \"name\": \"Electric Blue\",\n    \"hex\": \"#7DF9FF\"\n  },\n  {\n    \"name\": \"Electric Crimson\",\n    \"hex\": \"#FF003F\"\n  },\n  {\n    \"name\": \"Electric Cyan\",\n    \"hex\": \"#00FFFF\"\n  },\n  {\n    \"name\": \"Electric Green\",\n    \"hex\": \"#00FF00\"\n  },\n  {\n    \"name\": \"Electric Indigo\",\n    \"hex\": \"#6F00FF\"\n  },\n  {\n    \"name\": \"Electric Lavender\",\n    \"hex\": \"#F4BBFF\"\n  },\n  {\n    \"name\": \"Electric Lime\",\n    \"hex\": \"#CCFF00\"\n  },\n  {\n    \"name\": \"Electric Purple\",\n    \"hex\": \"#BF00FF\"\n  },\n  {\n    \"name\": \"Electric Ultramarine\",\n    \"hex\": \"#3F00FF\"\n  },\n  {\n    \"name\": \"Electric Violet\",\n    \"hex\": \"#8F00FF\"\n  },\n  {\n    \"name\": \"Electric Yellow\",\n    \"hex\": \"#FFFF33\"\n  },\n  {\n    \"name\": \"Emerald\",\n    \"hex\": \"#50C878\"\n  },\n  {\n    \"name\": \"Eminence\",\n    \"hex\": \"#6C3082\"\n  },\n  {\n    \"name\": \"English Green\",\n    \"hex\": \"#1B4D3E\"\n  },\n  {\n    \"name\": \"English Lavender\",\n    \"hex\": \"#B48395\"\n  },\n  {\n    \"name\": \"English Red\",\n    \"hex\": \"#AB4B52\"\n  },\n  {\n    \"name\": \"English Vermillion\",\n    \"hex\": \"#CC474B\"\n  },\n  {\n    \"name\": \"English Violet\",\n    \"hex\": \"#563C5C\"\n  },\n  {\n    \"name\": \"Eton Blue\",\n    \"hex\": \"#96C8A2\"\n  },\n  {\n    \"name\": \"Eucalyptus\",\n    \"hex\": \"#44D7A8\"\n  },\n  {\n    \"name\": \"Fallow\",\n    \"hex\": \"#C19A6B\"\n  },\n  {\n    \"name\": \"Falu Red\",\n    \"hex\": \"#801818\"\n  },\n  {\n    \"name\": \"Fandango\",\n    \"hex\": \"#B53389\"\n  },\n  {\n    \"name\": \"Fandango Pink\",\n    \"hex\": \"#DE5285\"\n  },\n  {\n    \"name\": \"Fashion Fuchsia\",\n    \"hex\": \"#F400A1\"\n  },\n  {\n    \"name\": \"Fawn\",\n    \"hex\": \"#E5AA70\"\n  },\n  {\n    \"name\": \"Feldgrau\",\n    \"hex\": \"#4D5D53\"\n  },\n  {\n    \"name\": \"Feldspar\",\n    \"hex\": \"#FDD5B1\"\n  },\n  {\n    \"name\": \"Fern Green\",\n    \"hex\": \"#4F7942\"\n  },\n  {\n    \"name\": \"Ferrari Red\",\n    \"hex\": \"#FF2800\"\n  },\n  {\n    \"name\": \"Field Drab\",\n    \"hex\": \"#6C541E\"\n  },\n  {\n    \"name\": \"Fiery Rose\",\n    \"hex\": \"#FF5470\"\n  },\n  {\n    \"name\": \"Firebrick\",\n    \"hex\": \"#B22222\"\n  },\n  {\n    \"name\": \"Fire Engine Red\",\n    \"hex\": \"#CE2029\"\n  },\n  {\n    \"name\": \"Flame\",\n    \"hex\": \"#E25822\"\n  },\n  {\n    \"name\": \"Flamingo Pink\",\n    \"hex\": \"#FC8EAC\"\n  },\n  {\n    \"name\": \"Flattery\",\n    \"hex\": \"#6B4423\"\n  },\n  {\n    \"name\": \"Flavescent\",\n    \"hex\": \"#F7E98E\"\n  },\n  {\n    \"name\": \"Flax\",\n    \"hex\": \"#EEDC82\"\n  },\n  {\n    \"name\": \"Flirt\",\n    \"hex\": \"#A2006D\"\n  },\n  {\n    \"name\": \"Floral White\",\n    \"hex\": \"#FFFAF0\"\n  },\n  {\n    \"name\": \"Fluorescent Orange\",\n    \"hex\": \"#FFBF00\"\n  },\n  {\n    \"name\": \"Fluorescent Pink\",\n    \"hex\": \"#FF1493\"\n  },\n  {\n    \"name\": \"Fluorescent Yellow\",\n    \"hex\": \"#CCFF00\"\n  },\n  {\n    \"name\": \"Folly\",\n    \"hex\": \"#FF004F\"\n  },\n  {\n    \"name\": \"Forest Green (Traditional)\",\n    \"hex\": \"#014421\"\n  },\n  {\n    \"name\": \"Forest Green (Web)\",\n    \"hex\": \"#228B22\"\n  },\n  {\n    \"name\": \"French Beige\",\n    \"hex\": \"#A67B5B\"\n  },\n  {\n    \"name\": \"French Bistre\",\n    \"hex\": \"#856D4D\"\n  },\n  {\n    \"name\": \"French Blue\",\n    \"hex\": \"#0072BB\"\n  },\n  {\n    \"name\": \"French Fuchsia\",\n    \"hex\": \"#FD3F92\"\n  },\n  {\n    \"name\": \"French Lilac\",\n    \"hex\": \"#86608E\"\n  },\n  {\n    \"name\": \"French Lime\",\n    \"hex\": \"#9EFD38\"\n  },\n  {\n    \"name\": \"French Mauve\",\n    \"hex\": \"#D473D4\"\n  },\n  {\n    \"name\": \"French Pink\",\n    \"hex\": \"#FD6C9E\"\n  },\n  {\n    \"name\": \"French Plum\",\n    \"hex\": \"#811453\"\n  },\n  {\n    \"name\": \"French Puce\",\n    \"hex\": \"#4E1609\"\n  },\n  {\n    \"name\": \"French Raspberry\",\n    \"hex\": \"#C72C48\"\n  },\n  {\n    \"name\": \"French Rose\",\n    \"hex\": \"#F64A8A\"\n  },\n  {\n    \"name\": \"French Sky Blue\",\n    \"hex\": \"#77B5FE\"\n  },\n  {\n    \"name\": \"French Violet\",\n    \"hex\": \"#8806CE\"\n  },\n  {\n    \"name\": \"French Wine\",\n    \"hex\": \"#AC1E44\"\n  },\n  {\n    \"name\": \"Fresh Air\",\n    \"hex\": \"#A6E7FF\"\n  },\n  {\n    \"name\": \"Frogert\",\n    \"hex\": \"#E936A7\"\n  },\n  {\n    \"name\": \"Fuchsia\",\n    \"hex\": \"#FF00FF\"\n  },\n  {\n    \"name\": \"Fuchsia (Crayola)\",\n    \"hex\": \"#C154C1\"\n  },\n  {\n    \"name\": \"Fuchsia Pink\",\n    \"hex\": \"#FF77FF\"\n  },\n  {\n    \"name\": \"Fuchsia Purple\",\n    \"hex\": \"#CC397B\"\n  },\n  {\n    \"name\": \"Fuchsia Rose\",\n    \"hex\": \"#C74375\"\n  },\n  {\n    \"name\": \"Fulvous\",\n    \"hex\": \"#E48400\"\n  },\n  {\n    \"name\": \"Fuzzy Wuzzy\",\n    \"hex\": \"#CC6666\"\n  },\n  {\n    \"name\": \"Gainsboro\",\n    \"hex\": \"#DCDCDC\"\n  },\n  {\n    \"name\": \"Gamboge\",\n    \"hex\": \"#E49B0F\"\n  },\n  {\n    \"name\": \"Gamboge Orange (Brown)\",\n    \"hex\": \"#996600\"\n  },\n  {\n    \"name\": \"Gargoyle Gas\",\n    \"hex\": \"#FFDF46\"\n  },\n  {\n    \"name\": \"Generic Viridian\",\n    \"hex\": \"#007F66\"\n  },\n  {\n    \"name\": \"Ghost White\",\n    \"hex\": \"#F8F8FF\"\n  },\n  {\n    \"name\": \"Giant's Club\",\n    \"hex\": \"#B05C52\"\n  },\n  {\n    \"name\": \"Giants Orange\",\n    \"hex\": \"#FE5A1D\"\n  },\n  {\n    \"name\": \"Ginger\",\n    \"hex\": \"#B06500\"\n  },\n  {\n    \"name\": \"Glaucous\",\n    \"hex\": \"#6082B6\"\n  },\n  {\n    \"name\": \"Glitter\",\n    \"hex\": \"#E6E8FA\"\n  },\n  {\n    \"name\": \"Glossy Grape\",\n    \"hex\": \"#AB92B3\"\n  },\n  {\n    \"name\": \"GO Green\",\n    \"hex\": \"#00AB66\"\n  },\n  {\n    \"name\": \"Gold (Metallic)\",\n    \"hex\": \"#D4AF37\"\n  },\n  {\n    \"name\": \"Gold (Web) (Golden)\",\n    \"hex\": \"#FFD700\"\n  },\n  {\n    \"name\": \"Gold Fusion\",\n    \"hex\": \"#85754E\"\n  },\n  {\n    \"name\": \"Golden Brown\",\n    \"hex\": \"#996515\"\n  },\n  {\n    \"name\": \"Golden Poppy\",\n    \"hex\": \"#FCC200\"\n  },\n  {\n    \"name\": \"Golden Yellow\",\n    \"hex\": \"#FFDF00\"\n  },\n  {\n    \"name\": \"Goldenrod\",\n    \"hex\": \"#DAA520\"\n  },\n  {\n    \"name\": \"Granite Gray\",\n    \"hex\": \"#676767\"\n  },\n  {\n    \"name\": \"Granny Smith Apple\",\n    \"hex\": \"#A8E4A0\"\n  },\n  {\n    \"name\": \"Grape\",\n    \"hex\": \"#6F2DA8\"\n  },\n  {\n    \"name\": \"Gray\",\n    \"hex\": \"#808080\"\n  },\n  {\n    \"name\": \"Gray (HTML/CSS Gray)\",\n    \"hex\": \"#808080\"\n  },\n  {\n    \"name\": \"Gray (X11 Gray)\",\n    \"hex\": \"#BEBEBE\"\n  },\n  {\n    \"name\": \"Gray-Asparagus\",\n    \"hex\": \"#465945\"\n  },\n  {\n    \"name\": \"Gray-Blue\",\n    \"hex\": \"#8C92AC\"\n  },\n  {\n    \"name\": \"Green (Color Wheel) (X11 Green)\",\n    \"hex\": \"#00FF00\"\n  },\n  {\n    \"name\": \"Green (Crayola)\",\n    \"hex\": \"#1CAC78\"\n  },\n  {\n    \"name\": \"Green (HTML/CSS Color)\",\n    \"hex\": \"#008000\"\n  },\n  {\n    \"name\": \"Green (Munsell)\",\n    \"hex\": \"#00A877\"\n  },\n  {\n    \"name\": \"Green (NCS)\",\n    \"hex\": \"#009F6B\"\n  },\n  {\n    \"name\": \"Green (Pantone)\",\n    \"hex\": \"#00AD43\"\n  },\n  {\n    \"name\": \"Green (Pigment)\",\n    \"hex\": \"#00A550\"\n  },\n  {\n    \"name\": \"Green (RYB)\",\n    \"hex\": \"#66B032\"\n  },\n  {\n    \"name\": \"Green-Blue\",\n    \"hex\": \"#1164B4\"\n  },\n  {\n    \"name\": \"Green-Cyan\",\n    \"hex\": \"#009966\"\n  },\n  {\n    \"name\": \"Green Lizard\",\n    \"hex\": \"#A7F432\"\n  },\n  {\n    \"name\": \"Green Sheen\",\n    \"hex\": \"#6EAEA1\"\n  },\n  {\n    \"name\": \"Green-Yellow\",\n    \"hex\": \"#ADFF2F\"\n  },\n  {\n    \"name\": \"Grizzly\",\n    \"hex\": \"#885818\"\n  },\n  {\n    \"name\": \"Grullo\",\n    \"hex\": \"#A99A86\"\n  },\n  {\n    \"name\": \"Guppie Green\",\n    \"hex\": \"#00FF7F\"\n  },\n  {\n    \"name\": \"Gunmetal\",\n    \"hex\": \"#2a3439\"\n  },\n  {\n    \"name\": \"Halaya Ube\",\n    \"hex\": \"#663854\"\n  },\n  {\n    \"name\": \"Han Blue\",\n    \"hex\": \"#446CCF\"\n  },\n  {\n    \"name\": \"Han Purple\",\n    \"hex\": \"#5218FA\"\n  },\n  {\n    \"name\": \"Hansa Yellow\",\n    \"hex\": \"#E9D66B\"\n  },\n  {\n    \"name\": \"Harlequin\",\n    \"hex\": \"#3FFF00\"\n  },\n  {\n    \"name\": \"Harlequin Green\",\n    \"hex\": \"#46CB18\"\n  },\n  {\n    \"name\": \"Harvard Crimson\",\n    \"hex\": \"#C90016\"\n  },\n  {\n    \"name\": \"Harvest Gold\",\n    \"hex\": \"#DA9100\"\n  },\n  {\n    \"name\": \"Heart Gold\",\n    \"hex\": \"#808000\"\n  },\n  {\n    \"name\": \"Heat Wave\",\n    \"hex\": \"#FF7A00\"\n  },\n  {\n    \"name\": \"Heidelberg Red\",\n    \"hex\": \"#960018\"\n  },\n  {\n    \"name\": \"Heliotrope\",\n    \"hex\": \"#DF73FF\"\n  },\n  {\n    \"name\": \"Heliotrope Gray\",\n    \"hex\": \"#AA98A9\"\n  },\n  {\n    \"name\": \"Heliotrope Magenta\",\n    \"hex\": \"#AA00BB\"\n  },\n  {\n    \"name\": \"Hollywood Cerise\",\n    \"hex\": \"#F400A1\"\n  },\n  {\n    \"name\": \"Honeydew\",\n    \"hex\": \"#F0FFF0\"\n  },\n  {\n    \"name\": \"Honolulu Blue\",\n    \"hex\": \"#006DB0\"\n  },\n  {\n    \"name\": \"Hooker's Green\",\n    \"hex\": \"#49796B\"\n  },\n  {\n    \"name\": \"Hot Magenta\",\n    \"hex\": \"#FF1DCE\"\n  },\n  {\n    \"name\": \"Hot Pink\",\n    \"hex\": \"#FF69B4\"\n  },\n  {\n    \"name\": \"Hunter Green\",\n    \"hex\": \"#355E3B\"\n  },\n  {\n    \"name\": \"Iceberg\",\n    \"hex\": \"#71A6D2\"\n  },\n  {\n    \"name\": \"Icterine\",\n    \"hex\": \"#FCF75E\"\n  },\n  {\n    \"name\": \"Iguana Green\",\n    \"hex\": \"#71BC78\"\n  },\n  {\n    \"name\": \"Illuminating Emerald\",\n    \"hex\": \"#319177\"\n  },\n  {\n    \"name\": \"Imperial\",\n    \"hex\": \"#602F6B\"\n  },\n  {\n    \"name\": \"Imperial Blue\",\n    \"hex\": \"#002395\"\n  },\n  {\n    \"name\": \"Imperial Purple\",\n    \"hex\": \"#66023C\"\n  },\n  {\n    \"name\": \"Imperial Red\",\n    \"hex\": \"#ED2939\"\n  },\n  {\n    \"name\": \"Inchworm\",\n    \"hex\": \"#B2EC5D\"\n  },\n  {\n    \"name\": \"Independence\",\n    \"hex\": \"#4C516D\"\n  },\n  {\n    \"name\": \"India Green\",\n    \"hex\": \"#138808\"\n  },\n  {\n    \"name\": \"Indian Red\",\n    \"hex\": \"#CD5C5C\"\n  },\n  {\n    \"name\": \"Indian Yellow\",\n    \"hex\": \"#E3A857\"\n  },\n  {\n    \"name\": \"Indigo\",\n    \"hex\": \"#4B0082\"\n  },\n  {\n    \"name\": \"Indigo Dye\",\n    \"hex\": \"#091F92\"\n  },\n  {\n    \"name\": \"Indigo (Web)\",\n    \"hex\": \"#4B0082\"\n  },\n  {\n    \"name\": \"Infra Red\",\n    \"hex\": \"#FF496C\"\n  },\n  {\n    \"name\": \"Interdimensional Blue\",\n    \"hex\": \"#360CCC\"\n  },\n  {\n    \"name\": \"International Klein Blue\",\n    \"hex\": \"#002FA7\"\n  },\n  {\n    \"name\": \"International Orange (Aerospace)\",\n    \"hex\": \"#FF4F00\"\n  },\n  {\n    \"name\": \"International Orange (Engineering)\",\n    \"hex\": \"#BA160C\"\n  },\n  {\n    \"name\": \"International Orange (Golden Gate Bridge)\",\n    \"hex\": \"#C0362C\"\n  },\n  {\n    \"name\": \"Iris\",\n    \"hex\": \"#5A4FCF\"\n  },\n  {\n    \"name\": \"Irresistible\",\n    \"hex\": \"#B3446C\"\n  },\n  {\n    \"name\": \"Isabelline\",\n    \"hex\": \"#F4F0EC\"\n  },\n  {\n    \"name\": \"Islamic Green\",\n    \"hex\": \"#009000\"\n  },\n  {\n    \"name\": \"Italian Sky Blue\",\n    \"hex\": \"#B2FFFF\"\n  },\n  {\n    \"name\": \"Ivory\",\n    \"hex\": \"#FFFFF0\"\n  },\n  {\n    \"name\": \"Jade\",\n    \"hex\": \"#00A86B\"\n  },\n  {\n    \"name\": \"Japanese Carmine\",\n    \"hex\": \"#9D2933\"\n  },\n  {\n    \"name\": \"Japanese Indigo\",\n    \"hex\": \"#264348\"\n  },\n  {\n    \"name\": \"Japanese Violet\",\n    \"hex\": \"#5B3256\"\n  },\n  {\n    \"name\": \"Jasmine\",\n    \"hex\": \"#F8DE7E\"\n  },\n  {\n    \"name\": \"Jasper\",\n    \"hex\": \"#D73B3E\"\n  },\n  {\n    \"name\": \"Jazzberry Jam\",\n    \"hex\": \"#A50B5E\"\n  },\n  {\n    \"name\": \"Jelly Bean\",\n    \"hex\": \"#DA614E\"\n  },\n  {\n    \"name\": \"Jet\",\n    \"hex\": \"#343434\"\n  },\n  {\n    \"name\": \"Jonquil\",\n    \"hex\": \"#F4CA16\"\n  },\n  {\n    \"name\": \"Jordy Blue\",\n    \"hex\": \"#8AB9F1\"\n  },\n  {\n    \"name\": \"June Bud\",\n    \"hex\": \"#BDDA57\"\n  },\n  {\n    \"name\": \"Jungle Green\",\n    \"hex\": \"#29AB87\"\n  },\n  {\n    \"name\": \"Kelly Green\",\n    \"hex\": \"#4CBB17\"\n  },\n  {\n    \"name\": \"Kenyan Copper\",\n    \"hex\": \"#7C1C05\"\n  },\n  {\n    \"name\": \"Keppel\",\n    \"hex\": \"#3AB09E\"\n  },\n  {\n    \"name\": \"Key Lime\",\n    \"hex\": \"#E8F48C\"\n  },\n  {\n    \"name\": \"Khaki (HTML/CSS) (Khaki)\",\n    \"hex\": \"#C3B091\"\n  },\n  {\n    \"name\": \"Khaki (X11) (Light Khaki)\",\n    \"hex\": \"#F0E68C\"\n  },\n  {\n    \"name\": \"Kiwi\",\n    \"hex\": \"#8EE53F\"\n  },\n  {\n    \"name\": \"Kobe\",\n    \"hex\": \"#882D17\"\n  },\n  {\n    \"name\": \"Kobi\",\n    \"hex\": \"#E79FC4\"\n  },\n  {\n    \"name\": \"Kobicha\",\n    \"hex\": \"#6B4423\"\n  },\n  {\n    \"name\": \"Kombu Green\",\n    \"hex\": \"#354230\"\n  },\n  {\n    \"name\": \"KSU Purple\",\n    \"hex\": \"#512888\"\n  },\n  {\n    \"name\": \"KU Crimson\",\n    \"hex\": \"#E8000D\"\n  },\n  {\n    \"name\": \"La Salle Green\",\n    \"hex\": \"#087830\"\n  },\n  {\n    \"name\": \"Languid Lavender\",\n    \"hex\": \"#D6CADD\"\n  },\n  {\n    \"name\": \"Lapis Lazuli\",\n    \"hex\": \"#26619C\"\n  },\n  {\n    \"name\": \"Laser Lemon\",\n    \"hex\": \"#FFFF66\"\n  },\n  {\n    \"name\": \"Laurel Green\",\n    \"hex\": \"#A9BA9D\"\n  },\n  {\n    \"name\": \"Lava\",\n    \"hex\": \"#CF1020\"\n  },\n  {\n    \"name\": \"Lavender (Floral)\",\n    \"hex\": \"#B57EDC\"\n  },\n  {\n    \"name\": \"Lavender (Web)\",\n    \"hex\": \"#E6E6FA\"\n  },\n  {\n    \"name\": \"Lavender Blue\",\n    \"hex\": \"#CCCCFF\"\n  },\n  {\n    \"name\": \"Lavender Blush\",\n    \"hex\": \"#FFF0F5\"\n  },\n  {\n    \"name\": \"Lavender Gray\",\n    \"hex\": \"#C4C3D0\"\n  },\n  {\n    \"name\": \"Lavender Indigo\",\n    \"hex\": \"#9457EB\"\n  },\n  {\n    \"name\": \"Lavender Magenta\",\n    \"hex\": \"#EE82EE\"\n  },\n  {\n    \"name\": \"Lavender Mist\",\n    \"hex\": \"#E6E6FA\"\n  },\n  {\n    \"name\": \"Lavender Pink\",\n    \"hex\": \"#FBAED2\"\n  },\n  {\n    \"name\": \"Lavender Purple\",\n    \"hex\": \"#967BB6\"\n  },\n  {\n    \"name\": \"Lavender Rose\",\n    \"hex\": \"#FBA0E3\"\n  },\n  {\n    \"name\": \"Lawn Green\",\n    \"hex\": \"#7CFC00\"\n  },\n  {\n    \"name\": \"Lemon\",\n    \"hex\": \"#FFF700\"\n  },\n  {\n    \"name\": \"Lemon Chiffon\",\n    \"hex\": \"#FFFACD\"\n  },\n  {\n    \"name\": \"Lemon Curry\",\n    \"hex\": \"#CCA01D\"\n  },\n  {\n    \"name\": \"Lemon Glacier\",\n    \"hex\": \"#FDFF00\"\n  },\n  {\n    \"name\": \"Lemon Lime\",\n    \"hex\": \"#E3FF00\"\n  },\n  {\n    \"name\": \"Lemon Meringue\",\n    \"hex\": \"#F6EABE\"\n  },\n  {\n    \"name\": \"Lemon Yellow\",\n    \"hex\": \"#FFF44F\"\n  },\n  {\n    \"name\": \"Licorice\",\n    \"hex\": \"#1A1110\"\n  },\n  {\n    \"name\": \"Liberty\",\n    \"hex\": \"#545AA7\"\n  },\n  {\n    \"name\": \"Light Apricot\",\n    \"hex\": \"#FDD5B1\"\n  },\n  {\n    \"name\": \"Light Blue\",\n    \"hex\": \"#ADD8E6\"\n  },\n  {\n    \"name\": \"Light Brown\",\n    \"hex\": \"#B5651D\"\n  },\n  {\n    \"name\": \"Light Carmine Pink\",\n    \"hex\": \"#E66771\"\n  },\n  {\n    \"name\": \"Light Cobalt Blue\",\n    \"hex\": \"#88ACE0\"\n  },\n  {\n    \"name\": \"Light Coral\",\n    \"hex\": \"#F08080\"\n  },\n  {\n    \"name\": \"Light Cornflower Blue\",\n    \"hex\": \"#93CCEA\"\n  },\n  {\n    \"name\": \"Light Crimson\",\n    \"hex\": \"#F56991\"\n  },\n  {\n    \"name\": \"Light Cyan\",\n    \"hex\": \"#E0FFFF\"\n  },\n  {\n    \"name\": \"Light Deep Pink\",\n    \"hex\": \"#FF5CCD\"\n  },\n  {\n    \"name\": \"Light French Beige\",\n    \"hex\": \"#C8AD7F\"\n  },\n  {\n    \"name\": \"Light Fuchsia Pink\",\n    \"hex\": \"#F984EF\"\n  },\n  {\n    \"name\": \"Light Goldenrod Yellow\",\n    \"hex\": \"#FAFAD2\"\n  },\n  {\n    \"name\": \"Light Gray\",\n    \"hex\": \"#D3D3D3\"\n  },\n  {\n    \"name\": \"Light Grayish Magenta\",\n    \"hex\": \"#CC99CC\"\n  },\n  {\n    \"name\": \"Light Green\",\n    \"hex\": \"#90EE90\"\n  },\n  {\n    \"name\": \"Light Hot Pink\",\n    \"hex\": \"#FFB3DE\"\n  },\n  {\n    \"name\": \"Light Khaki\",\n    \"hex\": \"#F0E68C\"\n  },\n  {\n    \"name\": \"Light Medium Orchid\",\n    \"hex\": \"#D39BCB\"\n  },\n  {\n    \"name\": \"Light Moss Green\",\n    \"hex\": \"#ADDFAD\"\n  },\n  {\n    \"name\": \"Light Orange\",\n    \"hex\": \"#FED8B1\"\n  },\n  {\n    \"name\": \"Light Orchid\",\n    \"hex\": \"#E6A8D7\"\n  },\n  {\n    \"name\": \"Light Pastel Purple\",\n    \"hex\": \"#B19CD9\"\n  },\n  {\n    \"name\": \"Light Pink\",\n    \"hex\": \"#FFB6C1\"\n  },\n  {\n    \"name\": \"Light Red Ochre\",\n    \"hex\": \"#E97451\"\n  },\n  {\n    \"name\": \"Light Salmon\",\n    \"hex\": \"#FFA07A\"\n  },\n  {\n    \"name\": \"Light Salmon Pink\",\n    \"hex\": \"#FF9999\"\n  },\n  {\n    \"name\": \"Light Sea Green\",\n    \"hex\": \"#20B2AA\"\n  },\n  {\n    \"name\": \"Light Sky Blue\",\n    \"hex\": \"#87CEFA\"\n  },\n  {\n    \"name\": \"Light Slate Gray\",\n    \"hex\": \"#778899\"\n  },\n  {\n    \"name\": \"Light Steel Blue\",\n    \"hex\": \"#B0C4DE\"\n  },\n  {\n    \"name\": \"Light Taupe\",\n    \"hex\": \"#B38B6D\"\n  },\n  {\n    \"name\": \"Light Thulian Pink\",\n    \"hex\": \"#E68FAC\"\n  },\n  {\n    \"name\": \"Light Yellow\",\n    \"hex\": \"#FFFFE0\"\n  },\n  {\n    \"name\": \"Lilac\",\n    \"hex\": \"#C8A2C8\"\n  },\n  {\n    \"name\": \"Lilac Luster\",\n    \"hex\": \"#AE98AA\"\n  },\n  {\n    \"name\": \"Lime (Color Wheel)\",\n    \"hex\": \"#BFFF00\"\n  },\n  {\n    \"name\": \"Lime (Web) (X11 Green)\",\n    \"hex\": \"#00FF00\"\n  },\n  {\n    \"name\": \"Lime Green\",\n    \"hex\": \"#32CD32\"\n  },\n  {\n    \"name\": \"Limerick\",\n    \"hex\": \"#9DC209\"\n  },\n  {\n    \"name\": \"Lincoln Green\",\n    \"hex\": \"#195905\"\n  },\n  {\n    \"name\": \"Linen\",\n    \"hex\": \"#FAF0E6\"\n  },\n  {\n    \"name\": \"Loeen (Lopen) Look\",\n    \"hex\": \"#15F2FD\"\n  },\n  {\n    \"name\": \"Liseran Purple\",\n    \"hex\": \"#DE6FA1\"\n  },\n  {\n    \"name\": \"Little Boy Blue\",\n    \"hex\": \"#6CA0DC\"\n  },\n  {\n    \"name\": \"Liver\",\n    \"hex\": \"#674C47\"\n  },\n  {\n    \"name\": \"Liver (Dogs)\",\n    \"hex\": \"#B86D29\"\n  },\n  {\n    \"name\": \"Liver (Organ)\",\n    \"hex\": \"#6C2E1F\"\n  },\n  {\n    \"name\": \"Liver Chestnut\",\n    \"hex\": \"#987456\"\n  },\n  {\n    \"name\": \"Livid\",\n    \"hex\": \"#6699CC\"\n  },\n  {\n    \"name\": \"Lumber\",\n    \"hex\": \"#FFE4CD\"\n  },\n  {\n    \"name\": \"Lust\",\n    \"hex\": \"#E62020\"\n  },\n  {\n    \"name\": \"Maastricht Blue\",\n    \"hex\": \"#001C3D\"\n  },\n  {\n    \"name\": \"Macaroni And Cheese\",\n    \"hex\": \"#FFBD88\"\n  },\n  {\n    \"name\": \"Madder Lake\",\n    \"hex\": \"#CC3336\"\n  },\n  {\n    \"name\": \"Magenta\",\n    \"hex\": \"#FF00FF\"\n  },\n  {\n    \"name\": \"Magenta (Crayola)\",\n    \"hex\": \"#FF55A3\"\n  },\n  {\n    \"name\": \"Magenta (Dye)\",\n    \"hex\": \"#CA1F7B\"\n  },\n  {\n    \"name\": \"Magenta (Pantone)\",\n    \"hex\": \"#D0417E\"\n  },\n  {\n    \"name\": \"Magenta (Process)\",\n    \"hex\": \"#FF0090\"\n  },\n  {\n    \"name\": \"Magenta Haze\",\n    \"hex\": \"#9F4576\"\n  },\n  {\n    \"name\": \"Magenta-Pink\",\n    \"hex\": \"#CC338B\"\n  },\n  {\n    \"name\": \"Magic Mint\",\n    \"hex\": \"#AAF0D1\"\n  },\n  {\n    \"name\": \"Magic Potion\",\n    \"hex\": \"#FF4466\"\n  },\n  {\n    \"name\": \"Magnolia\",\n    \"hex\": \"#F8F4FF\"\n  },\n  {\n    \"name\": \"Mahogany\",\n    \"hex\": \"#C04000\"\n  },\n  {\n    \"name\": \"Maize\",\n    \"hex\": \"#FBEC5D\"\n  },\n  {\n    \"name\": \"Majorelle Blue\",\n    \"hex\": \"#6050DC\"\n  },\n  {\n    \"name\": \"Malachite\",\n    \"hex\": \"#0BDA51\"\n  },\n  {\n    \"name\": \"Manatee\",\n    \"hex\": \"#979AAA\"\n  },\n  {\n    \"name\": \"Mandarin\",\n    \"hex\": \"#F37A48\"\n  },\n  {\n    \"name\": \"Mango Tango\",\n    \"hex\": \"#FF8243\"\n  },\n  {\n    \"name\": \"Mantis\",\n    \"hex\": \"#74C365\"\n  },\n  {\n    \"name\": \"Mardi Gras\",\n    \"hex\": \"#880085\"\n  },\n  {\n    \"name\": \"Marigold\",\n    \"hex\": \"#EAA221\"\n  },\n  {\n    \"name\": \"Maroon (Crayola)\",\n    \"hex\": \"#C32148\"\n  },\n  {\n    \"name\": \"Maroon (HTML/CSS)\",\n    \"hex\": \"#800000\"\n  },\n  {\n    \"name\": \"Maroon (X11)\",\n    \"hex\": \"#B03060\"\n  },\n  {\n    \"name\": \"Mauve\",\n    \"hex\": \"#E0B0FF\"\n  },\n  {\n    \"name\": \"Mauve Taupe\",\n    \"hex\": \"#915F6D\"\n  },\n  {\n    \"name\": \"Mauvelous\",\n    \"hex\": \"#EF98AA\"\n  },\n  {\n    \"name\": \"Maximum Blue\",\n    \"hex\": \"#47ABCC\"\n  },\n  {\n    \"name\": \"Maximum Blue Green\",\n    \"hex\": \"#30BFBF\"\n  },\n  {\n    \"name\": \"Maximum Blue Purple\",\n    \"hex\": \"#ACACE6\"\n  },\n  {\n    \"name\": \"Maximum Green\",\n    \"hex\": \"#5E8C31\"\n  },\n  {\n    \"name\": \"Maximum Green Yellow\",\n    \"hex\": \"#D9E650\"\n  },\n  {\n    \"name\": \"Maximum Purple\",\n    \"hex\": \"#733380\"\n  },\n  {\n    \"name\": \"Maximum Red\",\n    \"hex\": \"#D92121\"\n  },\n  {\n    \"name\": \"Maximum Red Purple\",\n    \"hex\": \"#A63A79\"\n  },\n  {\n    \"name\": \"Maximum Yellow\",\n    \"hex\": \"#FAFA37\"\n  },\n  {\n    \"name\": \"Maximum Yellow Red\",\n    \"hex\": \"#F2BA49\"\n  },\n  {\n    \"name\": \"May Green\",\n    \"hex\": \"#4C9141\"\n  },\n  {\n    \"name\": \"Maya Blue\",\n    \"hex\": \"#73C2FB\"\n  },\n  {\n    \"name\": \"Meat Brown\",\n    \"hex\": \"#E5B73B\"\n  },\n  {\n    \"name\": \"Medium Aquamarine\",\n    \"hex\": \"#66DDAA\"\n  },\n  {\n    \"name\": \"Medium Blue\",\n    \"hex\": \"#0000CD\"\n  },\n  {\n    \"name\": \"Medium Candy Apple Red\",\n    \"hex\": \"#E2062C\"\n  },\n  {\n    \"name\": \"Medium Carmine\",\n    \"hex\": \"#AF4035\"\n  },\n  {\n    \"name\": \"Medium Champagne\",\n    \"hex\": \"#F3E5AB\"\n  },\n  {\n    \"name\": \"Medium Electric Blue\",\n    \"hex\": \"#035096\"\n  },\n  {\n    \"name\": \"Medium Jungle Green\",\n    \"hex\": \"#1C352D\"\n  },\n  {\n    \"name\": \"Medium Lavender Magenta\",\n    \"hex\": \"#DDA0DD\"\n  },\n  {\n    \"name\": \"Medium Orchid\",\n    \"hex\": \"#BA55D3\"\n  },\n  {\n    \"name\": \"Medium Persian Blue\",\n    \"hex\": \"#0067A5\"\n  },\n  {\n    \"name\": \"Medium Purple\",\n    \"hex\": \"#9370DB\"\n  },\n  {\n    \"name\": \"Medium Red-Violet\",\n    \"hex\": \"#BB3385\"\n  },\n  {\n    \"name\": \"Medium Ruby\",\n    \"hex\": \"#AA4069\"\n  },\n  {\n    \"name\": \"Medium Sea Green\",\n    \"hex\": \"#3CB371\"\n  },\n  {\n    \"name\": \"Medium Sky Blue\",\n    \"hex\": \"#80DAEB\"\n  },\n  {\n    \"name\": \"Medium Slate Blue\",\n    \"hex\": \"#7B68EE\"\n  },\n  {\n    \"name\": \"Medium Spring Bud\",\n    \"hex\": \"#C9DC87\"\n  },\n  {\n    \"name\": \"Medium Spring Green\",\n    \"hex\": \"#00FA9A\"\n  },\n  {\n    \"name\": \"Medium Taupe\",\n    \"hex\": \"#674C47\"\n  },\n  {\n    \"name\": \"Medium Turquoise\",\n    \"hex\": \"#48D1CC\"\n  },\n  {\n    \"name\": \"Medium Tuscan Red\",\n    \"hex\": \"#79443B\"\n  },\n  {\n    \"name\": \"Medium Vermilion\",\n    \"hex\": \"#D9603B\"\n  },\n  {\n    \"name\": \"Medium Violet-Red\",\n    \"hex\": \"#C71585\"\n  },\n  {\n    \"name\": \"Mellow Apricot\",\n    \"hex\": \"#F8B878\"\n  },\n  {\n    \"name\": \"Mellow Yellow\",\n    \"hex\": \"#F8DE7E\"\n  },\n  {\n    \"name\": \"Melon\",\n    \"hex\": \"#FDBCB4\"\n  },\n  {\n    \"name\": \"Metallic Seaweed\",\n    \"hex\": \"#0A7E8C\"\n  },\n  {\n    \"name\": \"Metallic Sunburst\",\n    \"hex\": \"#9C7C38\"\n  },\n  {\n    \"name\": \"Mexican Pink\",\n    \"hex\": \"#E4007C\"\n  },\n  {\n    \"name\": \"Middle Blue\",\n    \"hex\": \"#7ED4E6\"\n  },\n  {\n    \"name\": \"Middle Blue Green\",\n    \"hex\": \"#8DD9CC\"\n  },\n  {\n    \"name\": \"Middle Blue Purple\",\n    \"hex\": \"#8B72BE\"\n  },\n  {\n    \"name\": \"Middle Red Purple\",\n    \"hex\": \"#210837\"\n  },\n  {\n    \"name\": \"Middle Green\",\n    \"hex\": \"#4D8C57\"\n  },\n  {\n    \"name\": \"Middle Green Yellow\",\n    \"hex\": \"#ACBF60\"\n  },\n  {\n    \"name\": \"Middle Purple\",\n    \"hex\": \"#D982B5\"\n  },\n  {\n    \"name\": \"Middle Red\",\n    \"hex\": \"#E58E73\"\n  },\n  {\n    \"name\": \"Middle Red Purple\",\n    \"hex\": \"#A55353\"\n  },\n  {\n    \"name\": \"Middle Yellow\",\n    \"hex\": \"#FFEB00\"\n  },\n  {\n    \"name\": \"Middle Yellow Red\",\n    \"hex\": \"#ECB176\"\n  },\n  {\n    \"name\": \"Midnight\",\n    \"hex\": \"#702670\"\n  },\n  {\n    \"name\": \"Midnight Blue\",\n    \"hex\": \"#191970\"\n  },\n  {\n    \"name\": \"Midnight Green (Eagle Green)\",\n    \"hex\": \"#004953\"\n  },\n  {\n    \"name\": \"Mikado Yellow\",\n    \"hex\": \"#FFC40C\"\n  },\n  {\n    \"name\": \"Milk\",\n    \"hex\": \"#FDFFF5\"\n  },\n  {\n    \"name\": \"Mimi Pink\",\n    \"hex\": \"#FFDAE9\"\n  },\n  {\n    \"name\": \"Mindaro\",\n    \"hex\": \"#E3F988\"\n  },\n  {\n    \"name\": \"Ming\",\n    \"hex\": \"#36747D\"\n  },\n  {\n    \"name\": \"Minion Yellow\",\n    \"hex\": \"#F5E050\"\n  },\n  {\n    \"name\": \"Mint\",\n    \"hex\": \"#3EB489\"\n  },\n  {\n    \"name\": \"Mint Cream\",\n    \"hex\": \"#F5FFFA\"\n  },\n  {\n    \"name\": \"Mint Green\",\n    \"hex\": \"#98FF98\"\n  },\n  {\n    \"name\": \"Misty Moss\",\n    \"hex\": \"#BBB477\"\n  },\n  {\n    \"name\": \"Misty Rose\",\n    \"hex\": \"#FFE4E1\"\n  },\n  {\n    \"name\": \"Moccasin\",\n    \"hex\": \"#FAEBD7\"\n  },\n  {\n    \"name\": \"Mode Beige\",\n    \"hex\": \"#967117\"\n  },\n  {\n    \"name\": \"Moonstone Blue\",\n    \"hex\": \"#73A9C2\"\n  },\n  {\n    \"name\": \"Mordant Red 19\",\n    \"hex\": \"#AE0C00\"\n  },\n  {\n    \"name\": \"Morning Blue\",\n    \"hex\": \"#8DA399\"\n  },\n  {\n    \"name\": \"Moss Green\",\n    \"hex\": \"#8A9A5B\"\n  },\n  {\n    \"name\": \"Mountain Meadow\",\n    \"hex\": \"#30BA8F\"\n  },\n  {\n    \"name\": \"Mountbatten Pink\",\n    \"hex\": \"#997A8D\"\n  },\n  {\n    \"name\": \"MSU Green\",\n    \"hex\": \"#18453B\"\n  },\n  {\n    \"name\": \"Mughal Green\",\n    \"hex\": \"#306030\"\n  },\n  {\n    \"name\": \"Mulberry\",\n    \"hex\": \"#C54B8C\"\n  },\n  {\n    \"name\": \"Mummy's Tomb\",\n    \"hex\": \"#828E84\"\n  },\n  {\n    \"name\": \"Mustard\",\n    \"hex\": \"#FFDB58\"\n  },\n  {\n    \"name\": \"Myrtle Green\",\n    \"hex\": \"#317873\"\n  },\n  {\n    \"name\": \"Mystic\",\n    \"hex\": \"#D65282\"\n  },\n  {\n    \"name\": \"Mystic Maroon\",\n    \"hex\": \"#AD4379\"\n  },\n  {\n    \"name\": \"Nadeshiko Pink\",\n    \"hex\": \"#F6ADC6\"\n  },\n  {\n    \"name\": \"Napier Green\",\n    \"hex\": \"#2A8000\"\n  },\n  {\n    \"name\": \"Naples Yellow\",\n    \"hex\": \"#FADA5E\"\n  },\n  {\n    \"name\": \"Navajo White\",\n    \"hex\": \"#FFDEAD\"\n  },\n  {\n    \"name\": \"Navy\",\n    \"hex\": \"#000080\"\n  },\n  {\n    \"name\": \"Navy Purple\",\n    \"hex\": \"#9457EB\"\n  },\n  {\n    \"name\": \"Neon Carrot\",\n    \"hex\": \"#FFA343\"\n  },\n  {\n    \"name\": \"Neon Fuchsia\",\n    \"hex\": \"#FE4164\"\n  },\n  {\n    \"name\": \"Neon Green\",\n    \"hex\": \"#39FF14\"\n  },\n  {\n    \"name\": \"New Car\",\n    \"hex\": \"#214FC6\"\n  },\n  {\n    \"name\": \"New York Pink\",\n    \"hex\": \"#D7837F\"\n  },\n  {\n    \"name\": \"Nickel\",\n    \"hex\": \"#727472\"\n  },\n  {\n    \"name\": \"Non-Photo Blue\",\n    \"hex\": \"#A4DDED\"\n  },\n  {\n    \"name\": \"North Texas Green\",\n    \"hex\": \"#059033\"\n  },\n  {\n    \"name\": \"Nyanza\",\n    \"hex\": \"#E9FFDB\"\n  },\n  {\n    \"name\": \"Ocean Blue\",\n    \"hex\": \"#4F42B5\"\n  },\n  {\n    \"name\": \"Ocean Boat Blue\",\n    \"hex\": \"#0077BE\"\n  },\n  {\n    \"name\": \"Ocean Green\",\n    \"hex\": \"#48BF91\"\n  },\n  {\n    \"name\": \"Ochre\",\n    \"hex\": \"#CC7722\"\n  },\n  {\n    \"name\": \"Office Green\",\n    \"hex\": \"#008000\"\n  },\n  {\n    \"name\": \"Ogre Odor\",\n    \"hex\": \"#FD5240\"\n  },\n  {\n    \"name\": \"Old Burgundy\",\n    \"hex\": \"#43302E\"\n  },\n  {\n    \"name\": \"Old Gold\",\n    \"hex\": \"#CFB53B\"\n  },\n  {\n    \"name\": \"Old Heliotrope\",\n    \"hex\": \"#563C5C\"\n  },\n  {\n    \"name\": \"Old Lace\",\n    \"hex\": \"#FDF5E6\"\n  },\n  {\n    \"name\": \"Old Lavender\",\n    \"hex\": \"#796878\"\n  },\n  {\n    \"name\": \"Old Mauve\",\n    \"hex\": \"#673147\"\n  },\n  {\n    \"name\": \"Old Moss Green\",\n    \"hex\": \"#867E36\"\n  },\n  {\n    \"name\": \"Old Rose\",\n    \"hex\": \"#C08081\"\n  },\n  {\n    \"name\": \"Old Silver\",\n    \"hex\": \"#848482\"\n  },\n  {\n    \"name\": \"Olive\",\n    \"hex\": \"#808000\"\n  },\n  {\n    \"name\": \"Olive Drab (#3)\",\n    \"hex\": \"#6B8E23\"\n  },\n  {\n    \"name\": \"Olive Drab #7\",\n    \"hex\": \"#3C341F\"\n  },\n  {\n    \"name\": \"Olivine\",\n    \"hex\": \"#9AB973\"\n  },\n  {\n    \"name\": \"Onyx\",\n    \"hex\": \"#353839\"\n  },\n  {\n    \"name\": \"Opera Mauve\",\n    \"hex\": \"#B784A7\"\n  },\n  {\n    \"name\": \"Orange (Color Wheel)\",\n    \"hex\": \"#FF7F00\"\n  },\n  {\n    \"name\": \"Orange (Crayola)\",\n    \"hex\": \"#FF7538\"\n  },\n  {\n    \"name\": \"Orange (Pantone)\",\n    \"hex\": \"#FF5800\"\n  },\n  {\n    \"name\": \"Orange (RYB)\",\n    \"hex\": \"#FB9902\"\n  },\n  {\n    \"name\": \"Orange (Web)\",\n    \"hex\": \"#FFA500\"\n  },\n  {\n    \"name\": \"Orange Peel\",\n    \"hex\": \"#FF9F00\"\n  },\n  {\n    \"name\": \"Orange-Red\",\n    \"hex\": \"#FF4500\"\n  },\n  {\n    \"name\": \"Orange Soda\",\n    \"hex\": \"#FA5B3D\"\n  },\n  {\n    \"name\": \"Orange-Yellow\",\n    \"hex\": \"#F8D568\"\n  },\n  {\n    \"name\": \"Orchid\",\n    \"hex\": \"#DA70D6\"\n  },\n  {\n    \"name\": \"Orchid Pink\",\n    \"hex\": \"#F2BDCD\"\n  },\n  {\n    \"name\": \"Orioles Orange\",\n    \"hex\": \"#FB4F14\"\n  },\n  {\n    \"name\": \"Otter Brown\",\n    \"hex\": \"#654321\"\n  },\n  {\n    \"name\": \"Outer Space\",\n    \"hex\": \"#414A4C\"\n  },\n  {\n    \"name\": \"Outrageous Orange\",\n    \"hex\": \"#FF6E4A\"\n  },\n  {\n    \"name\": \"Oxford Blue\",\n    \"hex\": \"#002147\"\n  },\n  {\n    \"name\": \"OU Crimson Red\",\n    \"hex\": \"#990000\"\n  },\n  {\n    \"name\": \"Pacific Blue\",\n    \"hex\": \"#1CA9C9\"\n  },\n  {\n    \"name\": \"Pakistan Green\",\n    \"hex\": \"#006600\"\n  },\n  {\n    \"name\": \"Palatinate Blue\",\n    \"hex\": \"#273BE2\"\n  },\n  {\n    \"name\": \"Palatinate Purple\",\n    \"hex\": \"#682860\"\n  },\n  {\n    \"name\": \"Pale Aqua\",\n    \"hex\": \"#BCD4E6\"\n  },\n  {\n    \"name\": \"Pale Blue\",\n    \"hex\": \"#AFEEEE\"\n  },\n  {\n    \"name\": \"Pale Brown\",\n    \"hex\": \"#987654\"\n  },\n  {\n    \"name\": \"Pale Carmine\",\n    \"hex\": \"#AF4035\"\n  },\n  {\n    \"name\": \"Pale Cerulean\",\n    \"hex\": \"#9BC4E2\"\n  },\n  {\n    \"name\": \"Pale Chestnut\",\n    \"hex\": \"#DDADAF\"\n  },\n  {\n    \"name\": \"Pale Copper\",\n    \"hex\": \"#DA8A67\"\n  },\n  {\n    \"name\": \"Pale Cornflower Blue\",\n    \"hex\": \"#ABCDEF\"\n  },\n  {\n    \"name\": \"Pale Cyan\",\n    \"hex\": \"#87D3F8\"\n  },\n  {\n    \"name\": \"Pale Gold\",\n    \"hex\": \"#E6BE8A\"\n  },\n  {\n    \"name\": \"Pale Goldenrod\",\n    \"hex\": \"#EEE8AA\"\n  },\n  {\n    \"name\": \"Pale Green\",\n    \"hex\": \"#98FB98\"\n  },\n  {\n    \"name\": \"Pale Lavender\",\n    \"hex\": \"#DCD0FF\"\n  },\n  {\n    \"name\": \"Pale Magenta\",\n    \"hex\": \"#F984E5\"\n  },\n  {\n    \"name\": \"Pale Magenta-Pink\",\n    \"hex\": \"#FF99CC\"\n  },\n  {\n    \"name\": \"Pale Pink\",\n    \"hex\": \"#FADADD\"\n  },\n  {\n    \"name\": \"Pale Plum\",\n    \"hex\": \"#DDA0DD\"\n  },\n  {\n    \"name\": \"Pale Red-Violet\",\n    \"hex\": \"#DB7093\"\n  },\n  {\n    \"name\": \"Pale Robin Egg Blue\",\n    \"hex\": \"#96DED1\"\n  },\n  {\n    \"name\": \"Pale Silver\",\n    \"hex\": \"#C9C0BB\"\n  },\n  {\n    \"name\": \"Pale Spring Bud\",\n    \"hex\": \"#ECEBBD\"\n  },\n  {\n    \"name\": \"Pale Taupe\",\n    \"hex\": \"#BC987E\"\n  },\n  {\n    \"name\": \"Pale Turquoise\",\n    \"hex\": \"#AFEEEE\"\n  },\n  {\n    \"name\": \"Pale Violet\",\n    \"hex\": \"#CC99FF\"\n  },\n  {\n    \"name\": \"Pale Violet-Red\",\n    \"hex\": \"#DB7093\"\n  },\n  {\n    \"name\": \"Palm Leaf\",\n    \"hex\": \"#6F9940\"\n  },\n  {\n    \"name\": \"Pansy Purple\",\n    \"hex\": \"#78184A\"\n  },\n  {\n    \"name\": \"Paolo Veronese Green\",\n    \"hex\": \"#009B7D\"\n  },\n  {\n    \"name\": \"Papaya Whip\",\n    \"hex\": \"#FFEFD5\"\n  },\n  {\n    \"name\": \"Paradise Pink\",\n    \"hex\": \"#E63E62\"\n  },\n  {\n    \"name\": \"Paris Green\",\n    \"hex\": \"#50C878\"\n  },\n  {\n    \"name\": \"Parrot Pink\",\n    \"hex\": \"#D998A0\"\n  },\n  {\n    \"name\": \"Pastel Blue\",\n    \"hex\": \"#AEC6CF\"\n  },\n  {\n    \"name\": \"Pastel Brown\",\n    \"hex\": \"#836953\"\n  },\n  {\n    \"name\": \"Pastel Gray\",\n    \"hex\": \"#CFCFC4\"\n  },\n  {\n    \"name\": \"Pastel Green\",\n    \"hex\": \"#77DD77\"\n  },\n  {\n    \"name\": \"Pastel Magenta\",\n    \"hex\": \"#F49AC2\"\n  },\n  {\n    \"name\": \"Pastel Orange\",\n    \"hex\": \"#FFB347\"\n  },\n  {\n    \"name\": \"Pastel Pink\",\n    \"hex\": \"#DEA5A4\"\n  },\n  {\n    \"name\": \"Pastel Purple\",\n    \"hex\": \"#B39EB5\"\n  },\n  {\n    \"name\": \"Pastel Red\",\n    \"hex\": \"#FF6961\"\n  },\n  {\n    \"name\": \"Pastel Violet\",\n    \"hex\": \"#CB99C9\"\n  },\n  {\n    \"name\": \"Pastel Yellow\",\n    \"hex\": \"#FDFD96\"\n  },\n  {\n    \"name\": \"Patriarch\",\n    \"hex\": \"#800080\"\n  },\n  {\n    \"name\": \"Payne's Grey\",\n    \"hex\": \"#536878\"\n  },\n  {\n    \"name\": \"Peach\",\n    \"hex\": \"#FFE5B4\"\n  },\n  {\n    \"name\": \"Peach\",\n    \"hex\": \"#FFCBA4\"\n  },\n  {\n    \"name\": \"Peach-Orange\",\n    \"hex\": \"#FFCC99\"\n  },\n  {\n    \"name\": \"Peach Puff\",\n    \"hex\": \"#FFDAB9\"\n  },\n  {\n    \"name\": \"Peach-Yellow\",\n    \"hex\": \"#FADFAD\"\n  },\n  {\n    \"name\": \"Pear\",\n    \"hex\": \"#D1E231\"\n  },\n  {\n    \"name\": \"Pearl\",\n    \"hex\": \"#EAE0C8\"\n  },\n  {\n    \"name\": \"Pearl Aqua\",\n    \"hex\": \"#88D8C0\"\n  },\n  {\n    \"name\": \"Pearly Purple\",\n    \"hex\": \"#B768A2\"\n  },\n  {\n    \"name\": \"Peridot\",\n    \"hex\": \"#E6E200\"\n  },\n  {\n    \"name\": \"Periwinkle\",\n    \"hex\": \"#CCCCFF\"\n  },\n  {\n    \"name\": \"Permanent Geranium Lake\",\n    \"hex\": \"#E12C2C\"\n  },\n  {\n    \"name\": \"Persian Blue\",\n    \"hex\": \"#1C39BB\"\n  },\n  {\n    \"name\": \"Persian Green\",\n    \"hex\": \"#00A693\"\n  },\n  {\n    \"name\": \"Persian Indigo\",\n    \"hex\": \"#32127A\"\n  },\n  {\n    \"name\": \"Persian Orange\",\n    \"hex\": \"#D99058\"\n  },\n  {\n    \"name\": \"Persian Pink\",\n    \"hex\": \"#F77FBE\"\n  },\n  {\n    \"name\": \"Persian Plum\",\n    \"hex\": \"#701C1C\"\n  },\n  {\n    \"name\": \"Persian Red\",\n    \"hex\": \"#CC3333\"\n  },\n  {\n    \"name\": \"Persian Rose\",\n    \"hex\": \"#FE28A2\"\n  },\n  {\n    \"name\": \"Persimmon\",\n    \"hex\": \"#EC5800\"\n  },\n  {\n    \"name\": \"Peru\",\n    \"hex\": \"#CD853F\"\n  },\n  {\n    \"name\": \"Pewter Blue\",\n    \"hex\": \"#8BA8B7\"\n  },\n  {\n    \"name\": \"Phlox\",\n    \"hex\": \"#DF00FF\"\n  },\n  {\n    \"name\": \"Phthalo Blue\",\n    \"hex\": \"#000F89\"\n  },\n  {\n    \"name\": \"Phthalo Green\",\n    \"hex\": \"#123524\"\n  },\n  {\n    \"name\": \"Picton Blue\",\n    \"hex\": \"#45B1E8\"\n  },\n  {\n    \"name\": \"Pictorial Carmine\",\n    \"hex\": \"#C30B4E\"\n  },\n  {\n    \"name\": \"Piggy Pink\",\n    \"hex\": \"#FDDDE6\"\n  },\n  {\n    \"name\": \"Pine Green\",\n    \"hex\": \"#01796F\"\n  },\n  {\n    \"name\": \"Pineapple\",\n    \"hex\": \"#563C0D\"\n  },\n  {\n    \"name\": \"Pink\",\n    \"hex\": \"#FFC0CB\"\n  },\n  {\n    \"name\": \"Pink (Pantone)\",\n    \"hex\": \"#D74894\"\n  },\n  {\n    \"name\": \"Pink Flamingo\",\n    \"hex\": \"#FC74FD\"\n  },\n  {\n    \"name\": \"Pink Lace\",\n    \"hex\": \"#FFDDF4\"\n  },\n  {\n    \"name\": \"Pink Lavender\",\n    \"hex\": \"#D8B2D1\"\n  },\n  {\n    \"name\": \"Pink-Orange\",\n    \"hex\": \"#FF9966\"\n  },\n  {\n    \"name\": \"Pink Pearl\",\n    \"hex\": \"#E7ACCF\"\n  },\n  {\n    \"name\": \"Pink Raspberry\",\n    \"hex\": \"#980036\"\n  },\n  {\n    \"name\": \"Pink Sherbet\",\n    \"hex\": \"#F78FA7\"\n  },\n  {\n    \"name\": \"Pistachio\",\n    \"hex\": \"#93C572\"\n  },\n  {\n    \"name\": \"Pixie Powder\",\n    \"hex\": \"#391285\"\n  },\n  {\n    \"name\": \"Platinum\",\n    \"hex\": \"#E5E4E2\"\n  },\n  {\n    \"name\": \"Plum\",\n    \"hex\": \"#8E4585\"\n  },\n  {\n    \"name\": \"Plum (Web)\",\n    \"hex\": \"#DDA0DD\"\n  },\n  {\n    \"name\": \"Plump Purple\",\n    \"hex\": \"#5946B2\"\n  },\n  {\n    \"name\": \"Polished Pine\",\n    \"hex\": \"#5DA493\"\n  },\n  {\n    \"name\": \"Pomp And Power\",\n    \"hex\": \"#86608E\"\n  },\n  {\n    \"name\": \"Popstar\",\n    \"hex\": \"#BE4F62\"\n  },\n  {\n    \"name\": \"Portland Orange\",\n    \"hex\": \"#FF5A36\"\n  },\n  {\n    \"name\": \"Powder Blue\",\n    \"hex\": \"#B0E0E6\"\n  },\n  {\n    \"name\": \"Princess Perfume\",\n    \"hex\": \"#FF85CF\"\n  },\n  {\n    \"name\": \"Princeton Orange\",\n    \"hex\": \"#F58025\"\n  },\n  {\n    \"name\": \"Prune\",\n    \"hex\": \"#701C1C\"\n  },\n  {\n    \"name\": \"Prussian Blue\",\n    \"hex\": \"#003153\"\n  },\n  {\n    \"name\": \"Psychedelic Purple\",\n    \"hex\": \"#DF00FF\"\n  },\n  {\n    \"name\": \"Puce\",\n    \"hex\": \"#CC8899\"\n  },\n  {\n    \"name\": \"Puce Red\",\n    \"hex\": \"#722F37\"\n  },\n  {\n    \"name\": \"Pullman Brown (UPS Brown)\",\n    \"hex\": \"#644117\"\n  },\n  {\n    \"name\": \"Pullman Green\",\n    \"hex\": \"#3B331C\"\n  },\n  {\n    \"name\": \"Pumpkin\",\n    \"hex\": \"#FF7518\"\n  },\n  {\n    \"name\": \"Purple (HTML)\",\n    \"hex\": \"#800080\"\n  },\n  {\n    \"name\": \"Purple (Munsell)\",\n    \"hex\": \"#9F00C5\"\n  },\n  {\n    \"name\": \"Purple (X11)\",\n    \"hex\": \"#A020F0\"\n  },\n  {\n    \"name\": \"Purple Heart\",\n    \"hex\": \"#69359C\"\n  },\n  {\n    \"name\": \"Purple Mountain Majesty\",\n    \"hex\": \"#9678B6\"\n  },\n  {\n    \"name\": \"Purple Navy\",\n    \"hex\": \"#4E5180\"\n  },\n  {\n    \"name\": \"Purple Pizzazz\",\n    \"hex\": \"#FE4EDA\"\n  },\n  {\n    \"name\": \"Purple Plum\",\n    \"hex\": \"#9C51B6\"\n  },\n  {\n    \"name\": \"Purple Taupe\",\n    \"hex\": \"#50404D\"\n  },\n  {\n    \"name\": \"Purpureus\",\n    \"hex\": \"#9A4EAE\"\n  },\n  {\n    \"name\": \"Quartz\",\n    \"hex\": \"#51484F\"\n  },\n  {\n    \"name\": \"Queen Blue\",\n    \"hex\": \"#436B95\"\n  },\n  {\n    \"name\": \"Queen Pink\",\n    \"hex\": \"#E8CCD7\"\n  },\n  {\n    \"name\": \"Quick Silver\",\n    \"hex\": \"#A6A6A6\"\n  },\n  {\n    \"name\": \"Quinacridone Magenta\",\n    \"hex\": \"#8E3A59\"\n  },\n  {\n    \"name\": \"Rackley\",\n    \"hex\": \"#5D8AA8\"\n  },\n  {\n    \"name\": \"Radical Red\",\n    \"hex\": \"#FF355E\"\n  },\n  {\n    \"name\": \"Raisin Black\",\n    \"hex\": \"#242124\"\n  },\n  {\n    \"name\": \"Rajah\",\n    \"hex\": \"#FBAB60\"\n  },\n  {\n    \"name\": \"Raspberry\",\n    \"hex\": \"#E30B5D\"\n  },\n  {\n    \"name\": \"Raspberry Glace\",\n    \"hex\": \"#915F6D\"\n  },\n  {\n    \"name\": \"Raspberry Pink\",\n    \"hex\": \"#E25098\"\n  },\n  {\n    \"name\": \"Raspberry Rose\",\n    \"hex\": \"#B3446C\"\n  },\n  {\n    \"name\": \"Raw Sienna\",\n    \"hex\": \"#D68A59\"\n  },\n  {\n    \"name\": \"Raw Umber\",\n    \"hex\": \"#826644\"\n  },\n  {\n    \"name\": \"Razzle Dazzle Rose\",\n    \"hex\": \"#FF33CC\"\n  },\n  {\n    \"name\": \"Razzmatazz\",\n    \"hex\": \"#E3256B\"\n  },\n  {\n    \"name\": \"Razzmic Berry\",\n    \"hex\": \"#8D4E85\"\n  },\n  {\n    \"name\": \"Rebecca Purple\",\n    \"hex\": \"#663399\"\n  },\n  {\n    \"name\": \"Red\",\n    \"hex\": \"#FF0000\"\n  },\n  {\n    \"name\": \"Red (Crayola)\",\n    \"hex\": \"#EE204D\"\n  },\n  {\n    \"name\": \"Red (Munsell)\",\n    \"hex\": \"#F2003C\"\n  },\n  {\n    \"name\": \"Red (NCS)\",\n    \"hex\": \"#C40233\"\n  },\n  {\n    \"name\": \"Red (Pantone)\",\n    \"hex\": \"#ED2939\"\n  },\n  {\n    \"name\": \"Red (Pigment)\",\n    \"hex\": \"#ED1C24\"\n  },\n  {\n    \"name\": \"Red (RYB)\",\n    \"hex\": \"#FE2712\"\n  },\n  {\n    \"name\": \"Red-Brown\",\n    \"hex\": \"#A52A2A\"\n  },\n  {\n    \"name\": \"Red Devil\",\n    \"hex\": \"#860111\"\n  },\n  {\n    \"name\": \"Red-Orange\",\n    \"hex\": \"#FF5349\"\n  },\n  {\n    \"name\": \"Red-Purple\",\n    \"hex\": \"#E40078\"\n  },\n  {\n    \"name\": \"Red Salsa\",\n    \"hex\": \"#FD3A4A\"\n  },\n  {\n    \"name\": \"Red-Violet\",\n    \"hex\": \"#C71585\"\n  },\n  {\n    \"name\": \"Redwood\",\n    \"hex\": \"#A45A52\"\n  },\n  {\n    \"name\": \"Regalia\",\n    \"hex\": \"#522D80\"\n  },\n  {\n    \"name\": \"Registration Black\",\n    \"hex\": \"#000000\"\n  },\n  {\n    \"name\": \"Resolution Blue\",\n    \"hex\": \"#002387\"\n  },\n  {\n    \"name\": \"Rhythm\",\n    \"hex\": \"#777696\"\n  },\n  {\n    \"name\": \"Rich Black\",\n    \"hex\": \"#004040\"\n  },\n  {\n    \"name\": \"Rich Black (FOGRA29)\",\n    \"hex\": \"#010B13\"\n  },\n  {\n    \"name\": \"Rich Black (FOGRA39)\",\n    \"hex\": \"#010203\"\n  },\n  {\n    \"name\": \"Rich Brilliant Lavender\",\n    \"hex\": \"#F1A7FE\"\n  },\n  {\n    \"name\": \"Rich Carmine\",\n    \"hex\": \"#D70040\"\n  },\n  {\n    \"name\": \"Rich Electric Blue\",\n    \"hex\": \"#0892D0\"\n  },\n  {\n    \"name\": \"Rich Lavender\",\n    \"hex\": \"#A76BCF\"\n  },\n  {\n    \"name\": \"Rich Lilac\",\n    \"hex\": \"#B666D2\"\n  },\n  {\n    \"name\": \"Rich Maroon\",\n    \"hex\": \"#B03060\"\n  },\n  {\n    \"name\": \"Rifle Green\",\n    \"hex\": \"#444C38\"\n  },\n  {\n    \"name\": \"Roast Coffee\",\n    \"hex\": \"#704241\"\n  },\n  {\n    \"name\": \"Robin Egg Blue\",\n    \"hex\": \"#00CCCC\"\n  },\n  {\n    \"name\": \"Rocket Metallic\",\n    \"hex\": \"#8A7F80\"\n  },\n  {\n    \"name\": \"Roman Silver\",\n    \"hex\": \"#838996\"\n  },\n  {\n    \"name\": \"Rose\",\n    \"hex\": \"#FF007F\"\n  },\n  {\n    \"name\": \"Rose Bonbon\",\n    \"hex\": \"#F9429E\"\n  },\n  {\n    \"name\": \"Rose Dust\",\n    \"hex\": \"#9E5E6F\"\n  },\n  {\n    \"name\": \"Rose Ebony\",\n    \"hex\": \"#674846\"\n  },\n  {\n    \"name\": \"Rose Gold\",\n    \"hex\": \"#B76E79\"\n  },\n  {\n    \"name\": \"Rose Madder\",\n    \"hex\": \"#E32636\"\n  },\n  {\n    \"name\": \"Rose Pink\",\n    \"hex\": \"#FF66CC\"\n  },\n  {\n    \"name\": \"Rose Quartz\",\n    \"hex\": \"#AA98A9\"\n  },\n  {\n    \"name\": \"Rose Red\",\n    \"hex\": \"#C21E56\"\n  },\n  {\n    \"name\": \"Rose Taupe\",\n    \"hex\": \"#905D5D\"\n  },\n  {\n    \"name\": \"Rose Vale\",\n    \"hex\": \"#AB4E52\"\n  },\n  {\n    \"name\": \"Rosewood\",\n    \"hex\": \"#65000B\"\n  },\n  {\n    \"name\": \"Rosso Corsa\",\n    \"hex\": \"#D40000\"\n  },\n  {\n    \"name\": \"Rosy Brown\",\n    \"hex\": \"#BC8F8F\"\n  },\n  {\n    \"name\": \"Royal Azure\",\n    \"hex\": \"#0038A8\"\n  },\n  {\n    \"name\": \"Royal Blue\",\n    \"hex\": \"#002366\"\n  },\n  {\n    \"name\": \"Royal Blue\",\n    \"hex\": \"#4169E1\"\n  },\n  {\n    \"name\": \"Royal Fuchsia\",\n    \"hex\": \"#CA2C92\"\n  },\n  {\n    \"name\": \"Royal Purple\",\n    \"hex\": \"#7851A9\"\n  },\n  {\n    \"name\": \"Royal Yellow\",\n    \"hex\": \"#FADA5E\"\n  },\n  {\n    \"name\": \"Ruber\",\n    \"hex\": \"#CE4676\"\n  },\n  {\n    \"name\": \"Rubine Red\",\n    \"hex\": \"#D10056\"\n  },\n  {\n    \"name\": \"Ruby\",\n    \"hex\": \"#E0115F\"\n  },\n  {\n    \"name\": \"Ruby Red\",\n    \"hex\": \"#9B111E\"\n  },\n  {\n    \"name\": \"Ruddy\",\n    \"hex\": \"#FF0028\"\n  },\n  {\n    \"name\": \"Ruddy Brown\",\n    \"hex\": \"#BB6528\"\n  },\n  {\n    \"name\": \"Ruddy Pink\",\n    \"hex\": \"#E18E96\"\n  },\n  {\n    \"name\": \"Rufous\",\n    \"hex\": \"#A81C07\"\n  },\n  {\n    \"name\": \"Russet\",\n    \"hex\": \"#80461B\"\n  },\n  {\n    \"name\": \"Russian Green\",\n    \"hex\": \"#679267\"\n  },\n  {\n    \"name\": \"Russian Violet\",\n    \"hex\": \"#32174D\"\n  },\n  {\n    \"name\": \"Rust\",\n    \"hex\": \"#B7410E\"\n  },\n  {\n    \"name\": \"Rusty Red\",\n    \"hex\": \"#DA2C43\"\n  },\n  {\n    \"name\": \"Sacramento State Green\",\n    \"hex\": \"#00563F\"\n  },\n  {\n    \"name\": \"Saddle Brown\",\n    \"hex\": \"#8B4513\"\n  },\n  {\n    \"name\": \"Safety Orange\",\n    \"hex\": \"#FF7800\"\n  },\n  {\n    \"name\": \"Safety Orange (Blaze Orange)\",\n    \"hex\": \"#FF6700\"\n  },\n  {\n    \"name\": \"Safety Yellow\",\n    \"hex\": \"#EED202\"\n  },\n  {\n    \"name\": \"Saffron\",\n    \"hex\": \"#F4C430\"\n  },\n  {\n    \"name\": \"Sage\",\n    \"hex\": \"#BCB88A\"\n  },\n  {\n    \"name\": \"St. Patrick's Blue\",\n    \"hex\": \"#23297A\"\n  },\n  {\n    \"name\": \"Salmon\",\n    \"hex\": \"#FA8072\"\n  },\n  {\n    \"name\": \"Salmon Pink\",\n    \"hex\": \"#FF91A4\"\n  },\n  {\n    \"name\": \"Sand\",\n    \"hex\": \"#C2B280\"\n  },\n  {\n    \"name\": \"Sand Dune\",\n    \"hex\": \"#967117\"\n  },\n  {\n    \"name\": \"Sandstorm\",\n    \"hex\": \"#ECD540\"\n  },\n  {\n    \"name\": \"Sandy Brown\",\n    \"hex\": \"#F4A460\"\n  },\n  {\n    \"name\": \"Sandy Tan\",\n    \"hex\": \"#FDD9B5\"\n  },\n  {\n    \"name\": \"Sandy Taupe\",\n    \"hex\": \"#967117\"\n  },\n  {\n    \"name\": \"Sangria\",\n    \"hex\": \"#92000A\"\n  },\n  {\n    \"name\": \"Sap Green\",\n    \"hex\": \"#507D2A\"\n  },\n  {\n    \"name\": \"Sapphire\",\n    \"hex\": \"#0F52BA\"\n  },\n  {\n    \"name\": \"Sapphire Blue\",\n    \"hex\": \"#0067A5\"\n  },\n  {\n    \"name\": \"Sasquatch Socks\",\n    \"hex\": \"#FF4681\"\n  },\n  {\n    \"name\": \"Satin Sheen Gold\",\n    \"hex\": \"#CBA135\"\n  },\n  {\n    \"name\": \"Scarlet\",\n    \"hex\": \"#FF2400\"\n  },\n  {\n    \"name\": \"Scarlet\",\n    \"hex\": \"#FD0E35\"\n  },\n  {\n    \"name\": \"Schauss Pink\",\n    \"hex\": \"#FF91AF\"\n  },\n  {\n    \"name\": \"School Bus Yellow\",\n    \"hex\": \"#FFD800\"\n  },\n  {\n    \"name\": \"Screamin' Green\",\n    \"hex\": \"#66FF66\"\n  },\n  {\n    \"name\": \"Sea Blue\",\n    \"hex\": \"#006994\"\n  },\n  {\n    \"name\": \"Sea Foam Green\",\n    \"hex\": \"#9FE2BF\"\n  },\n  {\n    \"name\": \"Sea Green\",\n    \"hex\": \"#2E8B57\"\n  },\n  {\n    \"name\": \"Sea Serpent\",\n    \"hex\": \"#4BC7CF\"\n  },\n  {\n    \"name\": \"Seal Brown\",\n    \"hex\": \"#59260B\"\n  },\n  {\n    \"name\": \"Seashell\",\n    \"hex\": \"#FFF5EE\"\n  },\n  {\n    \"name\": \"Selective Yellow\",\n    \"hex\": \"#FFBA00\"\n  },\n  {\n    \"name\": \"Sepia\",\n    \"hex\": \"#704214\"\n  },\n  {\n    \"name\": \"Shadow\",\n    \"hex\": \"#8A795D\"\n  },\n  {\n    \"name\": \"Shadow Blue\",\n    \"hex\": \"#778BA5\"\n  },\n  {\n    \"name\": \"Shampoo\",\n    \"hex\": \"#FFCFF1\"\n  },\n  {\n    \"name\": \"Shamrock Green\",\n    \"hex\": \"#009E60\"\n  },\n  {\n    \"name\": \"Sheen Green\",\n    \"hex\": \"#8FD400\"\n  },\n  {\n    \"name\": \"Shimmering Blush\",\n    \"hex\": \"#D98695\"\n  },\n  {\n    \"name\": \"Shiny Shamrock\",\n    \"hex\": \"#5FA778\"\n  },\n  {\n    \"name\": \"Shocking Pink\",\n    \"hex\": \"#FC0FC0\"\n  },\n  {\n    \"name\": \"Shocking Pink (Crayola)\",\n    \"hex\": \"#FF6FFF\"\n  },\n  {\n    \"name\": \"Sienna\",\n    \"hex\": \"#882D17\"\n  },\n  {\n    \"name\": \"Silver\",\n    \"hex\": \"#C0C0C0\"\n  },\n  {\n    \"name\": \"Silver Chalice\",\n    \"hex\": \"#ACACAC\"\n  },\n  {\n    \"name\": \"Silver Lake Blue\",\n    \"hex\": \"#5D89BA\"\n  },\n  {\n    \"name\": \"Silver Pink\",\n    \"hex\": \"#C4AEAD\"\n  },\n  {\n    \"name\": \"Silver Sand\",\n    \"hex\": \"#BFC1C2\"\n  },\n  {\n    \"name\": \"Sinopia\",\n    \"hex\": \"#CB410B\"\n  },\n  {\n    \"name\": \"Sizzling Red\",\n    \"hex\": \"#FF3855\"\n  },\n  {\n    \"name\": \"Sizzling Sunrise\",\n    \"hex\": \"#FFDB00\"\n  },\n  {\n    \"name\": \"Skobeloff\",\n    \"hex\": \"#007474\"\n  },\n  {\n    \"name\": \"Sky Blue\",\n    \"hex\": \"#87CEEB\"\n  },\n  {\n    \"name\": \"Sky Magenta\",\n    \"hex\": \"#CF71AF\"\n  },\n  {\n    \"name\": \"Slate Blue\",\n    \"hex\": \"#6A5ACD\"\n  },\n  {\n    \"name\": \"Slate Gray\",\n    \"hex\": \"#708090\"\n  },\n  {\n    \"name\": \"Smalt (Dark Powder Blue)\",\n    \"hex\": \"#003399\"\n  },\n  {\n    \"name\": \"Slimy Green\",\n    \"hex\": \"#299617\"\n  },\n  {\n    \"name\": \"Smashed Pumpkin\",\n    \"hex\": \"#FF6D3A\"\n  },\n  {\n    \"name\": \"Smitten\",\n    \"hex\": \"#C84186\"\n  },\n  {\n    \"name\": \"Smoke\",\n    \"hex\": \"#738276\"\n  },\n  {\n    \"name\": \"Smokey Topaz\",\n    \"hex\": \"#832A0D\"\n  },\n  {\n    \"name\": \"Smoky Black\",\n    \"hex\": \"#100C08\"\n  },\n  {\n    \"name\": \"Smoky Topaz\",\n    \"hex\": \"#933D41\"\n  },\n  {\n    \"name\": \"Snow\",\n    \"hex\": \"#FFFAFA\"\n  },\n  {\n    \"name\": \"Soap\",\n    \"hex\": \"#CEC8EF\"\n  },\n  {\n    \"name\": \"Solid Pink\",\n    \"hex\": \"#893843\"\n  },\n  {\n    \"name\": \"Sonic Silver\",\n    \"hex\": \"#757575\"\n  },\n  {\n    \"name\": \"Spartan Crimson\",\n    \"hex\": \"#9E1316\"\n  },\n  {\n    \"name\": \"Space Cadet\",\n    \"hex\": \"#1D2951\"\n  },\n  {\n    \"name\": \"Spanish Bistre\",\n    \"hex\": \"#807532\"\n  },\n  {\n    \"name\": \"Spanish Blue\",\n    \"hex\": \"#0070B8\"\n  },\n  {\n    \"name\": \"Spanish Carmine\",\n    \"hex\": \"#D10047\"\n  },\n  {\n    \"name\": \"Spanish Crimson\",\n    \"hex\": \"#E51A4C\"\n  },\n  {\n    \"name\": \"Spanish Gray\",\n    \"hex\": \"#989898\"\n  },\n  {\n    \"name\": \"Spanish Green\",\n    \"hex\": \"#009150\"\n  },\n  {\n    \"name\": \"Spanish Orange\",\n    \"hex\": \"#E86100\"\n  },\n  {\n    \"name\": \"Spanish Pink\",\n    \"hex\": \"#F7BFBE\"\n  },\n  {\n    \"name\": \"Spanish Red\",\n    \"hex\": \"#E60026\"\n  },\n  {\n    \"name\": \"Spanish Sky Blue\",\n    \"hex\": \"#00FFFF\"\n  },\n  {\n    \"name\": \"Spanish Violet\",\n    \"hex\": \"#4C2882\"\n  },\n  {\n    \"name\": \"Spanish Viridian\",\n    \"hex\": \"#007F5C\"\n  },\n  {\n    \"name\": \"Spicy Mix\",\n    \"hex\": \"#8B5f4D\"\n  },\n  {\n    \"name\": \"Spiro Disco Ball\",\n    \"hex\": \"#0FC0FC\"\n  },\n  {\n    \"name\": \"Spring Bud\",\n    \"hex\": \"#A7FC00\"\n  },\n  {\n    \"name\": \"Spring Frost\",\n    \"hex\": \"#87FF2A\"\n  },\n  {\n    \"name\": \"Spring Green\",\n    \"hex\": \"#00FF7F\"\n  },\n  {\n    \"name\": \"Star Command Blue\",\n    \"hex\": \"#007BB8\"\n  },\n  {\n    \"name\": \"Steel Blue\",\n    \"hex\": \"#4682B4\"\n  },\n  {\n    \"name\": \"Steel Pink\",\n    \"hex\": \"#CC33CC\"\n  },\n  {\n    \"name\": \"Steel Teal\",\n    \"hex\": \"#5F8A8B\"\n  },\n  {\n    \"name\": \"Stil De Grain Yellow\",\n    \"hex\": \"#FADA5E\"\n  },\n  {\n    \"name\": \"Stizza\",\n    \"hex\": \"#990000\"\n  },\n  {\n    \"name\": \"Stormcloud\",\n    \"hex\": \"#4F666A\"\n  },\n  {\n    \"name\": \"Straw\",\n    \"hex\": \"#E4D96F\"\n  },\n  {\n    \"name\": \"Strawberry\",\n    \"hex\": \"#FC5A8D\"\n  },\n  {\n    \"name\": \"Sugar Plum\",\n    \"hex\": \"#914E75\"\n  },\n  {\n    \"name\": \"Sunburnt Cyclops\",\n    \"hex\": \"#FF404C\"\n  },\n  {\n    \"name\": \"Sunglow\",\n    \"hex\": \"#FFCC33\"\n  },\n  {\n    \"name\": \"Sunny\",\n    \"hex\": \"#F2F27A\"\n  },\n  {\n    \"name\": \"Sunray\",\n    \"hex\": \"#E3AB57\"\n  },\n  {\n    \"name\": \"Sunset\",\n    \"hex\": \"#FAD6A5\"\n  },\n  {\n    \"name\": \"Sunset Orange\",\n    \"hex\": \"#FD5E53\"\n  },\n  {\n    \"name\": \"Super Pink\",\n    \"hex\": \"#CF6BA9\"\n  },\n  {\n    \"name\": \"Sweet Brown\",\n    \"hex\": \"#A83731\"\n  },\n  {\n    \"name\": \"Tan\",\n    \"hex\": \"#D2B48C\"\n  },\n  {\n    \"name\": \"Tangelo\",\n    \"hex\": \"#F94D00\"\n  },\n  {\n    \"name\": \"Tangerine\",\n    \"hex\": \"#F28500\"\n  },\n  {\n    \"name\": \"Tangerine Yellow\",\n    \"hex\": \"#FFCC00\"\n  },\n  {\n    \"name\": \"Tango Pink\",\n    \"hex\": \"#E4717A\"\n  },\n  {\n    \"name\": \"Tart Orange\",\n    \"hex\": \"#FB4D46\"\n  },\n  {\n    \"name\": \"Taupe\",\n    \"hex\": \"#483C32\"\n  },\n  {\n    \"name\": \"Taupe Gray\",\n    \"hex\": \"#8B8589\"\n  },\n  {\n    \"name\": \"Tea Green\",\n    \"hex\": \"#D0F0C0\"\n  },\n  {\n    \"name\": \"Tea Rose\",\n    \"hex\": \"#F88379\"\n  },\n  {\n    \"name\": \"Tea Rose\",\n    \"hex\": \"#F4C2C2\"\n  },\n  {\n    \"name\": \"Teal\",\n    \"hex\": \"#008080\"\n  },\n  {\n    \"name\": \"Teal Blue\",\n    \"hex\": \"#367588\"\n  },\n  {\n    \"name\": \"Teal Deer\",\n    \"hex\": \"#99E6B3\"\n  },\n  {\n    \"name\": \"Teal Green\",\n    \"hex\": \"#00827F\"\n  },\n  {\n    \"name\": \"Telemagenta\",\n    \"hex\": \"#CF3476\"\n  },\n  {\n    \"name\": \"Tenne (Tawny)\",\n    \"hex\": \"#CD5700\"\n  },\n  {\n    \"name\": \"Terra Cotta\",\n    \"hex\": \"#E2725B\"\n  },\n  {\n    \"name\": \"Thistle\",\n    \"hex\": \"#D8BFD8\"\n  },\n  {\n    \"name\": \"Thulian Pink\",\n    \"hex\": \"#DE6FA1\"\n  },\n  {\n    \"name\": \"Tickle Me Pink\",\n    \"hex\": \"#FC89AC\"\n  },\n  {\n    \"name\": \"Tiffany Blue\",\n    \"hex\": \"#0ABAB5\"\n  },\n  {\n    \"name\": \"Tiger's Eye\",\n    \"hex\": \"#E08D3C\"\n  },\n  {\n    \"name\": \"Timberwolf\",\n    \"hex\": \"#DBD7D2\"\n  },\n  {\n    \"name\": \"Titanium Yellow\",\n    \"hex\": \"#EEE600\"\n  },\n  {\n    \"name\": \"Tomato\",\n    \"hex\": \"#FF6347\"\n  },\n  {\n    \"name\": \"Toolbox\",\n    \"hex\": \"#746CC0\"\n  },\n  {\n    \"name\": \"Topaz\",\n    \"hex\": \"#FFC87C\"\n  },\n  {\n    \"name\": \"Tractor Red\",\n    \"hex\": \"#FD0E35\"\n  },\n  {\n    \"name\": \"Trolley Grey\",\n    \"hex\": \"#808080\"\n  },\n  {\n    \"name\": \"Tropical Rain Forest\",\n    \"hex\": \"#00755E\"\n  },\n  {\n    \"name\": \"Tropical Violet\",\n    \"hex\": \"#CDA4DE\"\n  },\n  {\n    \"name\": \"True Blue\",\n    \"hex\": \"#0073CF\"\n  },\n  {\n    \"name\": \"Tufts Blue\",\n    \"hex\": \"#3E8EDE\"\n  },\n  {\n    \"name\": \"Tulip\",\n    \"hex\": \"#FF878D\"\n  },\n  {\n    \"name\": \"Tumbleweed\",\n    \"hex\": \"#DEAA88\"\n  },\n  {\n    \"name\": \"Turkish Rose\",\n    \"hex\": \"#B57281\"\n  },\n  {\n    \"name\": \"Turquoise\",\n    \"hex\": \"#40E0D0\"\n  },\n  {\n    \"name\": \"Turquoise Blue\",\n    \"hex\": \"#00FFEF\"\n  },\n  {\n    \"name\": \"Turquoise Green\",\n    \"hex\": \"#A0D6B4\"\n  },\n  {\n    \"name\": \"Turquoise Surf\",\n    \"hex\": \"#00C5CD\"\n  },\n  {\n    \"name\": \"Turtle Green\",\n    \"hex\": \"#8A9A5B\"\n  },\n  {\n    \"name\": \"Tuscan\",\n    \"hex\": \"#FAD6A5\"\n  },\n  {\n    \"name\": \"Tuscan Brown\",\n    \"hex\": \"#6F4E37\"\n  },\n  {\n    \"name\": \"Tuscan Red\",\n    \"hex\": \"#7C4848\"\n  },\n  {\n    \"name\": \"Tuscan Tan\",\n    \"hex\": \"#A67B5B\"\n  },\n  {\n    \"name\": \"Tuscany\",\n    \"hex\": \"#C09999\"\n  },\n  {\n    \"name\": \"Twilight Lavender\",\n    \"hex\": \"#8A496B\"\n  },\n  {\n    \"name\": \"Tyrian Purple\",\n    \"hex\": \"#66023C\"\n  },\n  {\n    \"name\": \"UA Blue\",\n    \"hex\": \"#0033AA\"\n  },\n  {\n    \"name\": \"UA Red\",\n    \"hex\": \"#D9004C\"\n  },\n  {\n    \"name\": \"Ube\",\n    \"hex\": \"#8878C3\"\n  },\n  {\n    \"name\": \"UCLA Blue\",\n    \"hex\": \"#536895\"\n  },\n  {\n    \"name\": \"UCLA Gold\",\n    \"hex\": \"#FFB300\"\n  },\n  {\n    \"name\": \"UFO Green\",\n    \"hex\": \"#3CD070\"\n  },\n  {\n    \"name\": \"Ultramarine\",\n    \"hex\": \"#3F00FF\"\n  },\n  {\n    \"name\": \"Ultramarine Blue\",\n    \"hex\": \"#4166F5\"\n  },\n  {\n    \"name\": \"Ultra Pink\",\n    \"hex\": \"#FF6FFF\"\n  },\n  {\n    \"name\": \"Ultra Red\",\n    \"hex\": \"#FC6C85\"\n  },\n  {\n    \"name\": \"Umber\",\n    \"hex\": \"#635147\"\n  },\n  {\n    \"name\": \"Unbleached Silk\",\n    \"hex\": \"#FFDDCA\"\n  },\n  {\n    \"name\": \"United Nations Blue\",\n    \"hex\": \"#5B92E5\"\n  },\n  {\n    \"name\": \"University Of California Gold\",\n    \"hex\": \"#B78727\"\n  },\n  {\n    \"name\": \"Unmellow Yellow\",\n    \"hex\": \"#FFFF66\"\n  },\n  {\n    \"name\": \"UP Forest Green\",\n    \"hex\": \"#014421\"\n  },\n  {\n    \"name\": \"UP Maroon\",\n    \"hex\": \"#7B1113\"\n  },\n  {\n    \"name\": \"Upsdell Red\",\n    \"hex\": \"#AE2029\"\n  },\n  {\n    \"name\": \"Urobilin\",\n    \"hex\": \"#E1AD21\"\n  },\n  {\n    \"name\": \"USAFA Blue\",\n    \"hex\": \"#004F98\"\n  },\n  {\n    \"name\": \"USC Cardinal\",\n    \"hex\": \"#990000\"\n  },\n  {\n    \"name\": \"USC Gold\",\n    \"hex\": \"#FFCC00\"\n  },\n  {\n    \"name\": \"University Of Tennessee Orange\",\n    \"hex\": \"#F77F00\"\n  },\n  {\n    \"name\": \"Utah Crimson\",\n    \"hex\": \"#D3003F\"\n  },\n  {\n    \"name\": \"Van Dyke Brown\",\n    \"hex\": \"#664228\"\n  },\n  {\n    \"name\": \"Vanilla\",\n    \"hex\": \"#F3E5AB\"\n  },\n  {\n    \"name\": \"Vanilla Ice\",\n    \"hex\": \"#F38FA9\"\n  },\n  {\n    \"name\": \"Vegas Gold\",\n    \"hex\": \"#C5B358\"\n  },\n  {\n    \"name\": \"Venetian Red\",\n    \"hex\": \"#C80815\"\n  },\n  {\n    \"name\": \"Verdigris\",\n    \"hex\": \"#43B3AE\"\n  },\n  {\n    \"name\": \"Vermilion\",\n    \"hex\": \"#E34234\"\n  },\n  {\n    \"name\": \"Vermilion\",\n    \"hex\": \"#D9381E\"\n  },\n  {\n    \"name\": \"Veronica\",\n    \"hex\": \"#A020F0\"\n  },\n  {\n    \"name\": \"Very Light Azure\",\n    \"hex\": \"#74BBFB\"\n  },\n  {\n    \"name\": \"Very Light Blue\",\n    \"hex\": \"#6666FF\"\n  },\n  {\n    \"name\": \"Very Light Malachite Green\",\n    \"hex\": \"#64E986\"\n  },\n  {\n    \"name\": \"Very Light Tangelo\",\n    \"hex\": \"#FFB077\"\n  },\n  {\n    \"name\": \"Very Pale Orange\",\n    \"hex\": \"#FFDFBF\"\n  },\n  {\n    \"name\": \"Very Pale Yellow\",\n    \"hex\": \"#FFFFBF\"\n  },\n  {\n    \"name\": \"Violet\",\n    \"hex\": \"#8F00FF\"\n  },\n  {\n    \"name\": \"Violet (Color Wheel)\",\n    \"hex\": \"#7F00FF\"\n  },\n  {\n    \"name\": \"Violet (RYB)\",\n    \"hex\": \"#8601AF\"\n  },\n  {\n    \"name\": \"Violet (Web)\",\n    \"hex\": \"#EE82EE\"\n  },\n  {\n    \"name\": \"Violet-Blue\",\n    \"hex\": \"#324AB2\"\n  },\n  {\n    \"name\": \"Violet-Red\",\n    \"hex\": \"#F75394\"\n  },\n  {\n    \"name\": \"Viridian\",\n    \"hex\": \"#40826D\"\n  },\n  {\n    \"name\": \"Viridian Green\",\n    \"hex\": \"#009698\"\n  },\n  {\n    \"name\": \"Vista Blue\",\n    \"hex\": \"#7C9ED9\"\n  },\n  {\n    \"name\": \"Vivid Amber\",\n    \"hex\": \"#CC9900\"\n  },\n  {\n    \"name\": \"Vivid Auburn\",\n    \"hex\": \"#922724\"\n  },\n  {\n    \"name\": \"Vivid Burgundy\",\n    \"hex\": \"#9F1D35\"\n  },\n  {\n    \"name\": \"Vivid Cerise\",\n    \"hex\": \"#DA1D81\"\n  },\n  {\n    \"name\": \"Vivid Cerulean\",\n    \"hex\": \"#00AAEE\"\n  },\n  {\n    \"name\": \"Vivid Crimson\",\n    \"hex\": \"#CC0033\"\n  },\n  {\n    \"name\": \"Vivid Gamboge\",\n    \"hex\": \"#FF9900\"\n  },\n  {\n    \"name\": \"Vivid Lime Green\",\n    \"hex\": \"#A6D608\"\n  },\n  {\n    \"name\": \"Vivid Malachite\",\n    \"hex\": \"#00CC33\"\n  },\n  {\n    \"name\": \"Vivid Mulberry\",\n    \"hex\": \"#B80CE3\"\n  },\n  {\n    \"name\": \"Vivid Orange\",\n    \"hex\": \"#FF5F00\"\n  },\n  {\n    \"name\": \"Vivid Orange Peel\",\n    \"hex\": \"#FFA000\"\n  },\n  {\n    \"name\": \"Vivid Orchid\",\n    \"hex\": \"#CC00FF\"\n  },\n  {\n    \"name\": \"Vivid Raspberry\",\n    \"hex\": \"#FF006C\"\n  },\n  {\n    \"name\": \"Vivid Red\",\n    \"hex\": \"#F70D1A\"\n  },\n  {\n    \"name\": \"Vivid Red-Tangelo\",\n    \"hex\": \"#DF6124\"\n  },\n  {\n    \"name\": \"Vivid Sky Blue\",\n    \"hex\": \"#00CCFF\"\n  },\n  {\n    \"name\": \"Vivid Tangelo\",\n    \"hex\": \"#F07427\"\n  },\n  {\n    \"name\": \"Vivid Tangerine\",\n    \"hex\": \"#FFA089\"\n  },\n  {\n    \"name\": \"Vivid Vermilion\",\n    \"hex\": \"#E56024\"\n  },\n  {\n    \"name\": \"Vivid Violet\",\n    \"hex\": \"#9F00FF\"\n  },\n  {\n    \"name\": \"Vivid Yellow\",\n    \"hex\": \"#FFE302\"\n  },\n  {\n    \"name\": \"Volt\",\n    \"hex\": \"#CEFF00\"\n  },\n  {\n    \"name\": \"Wageningen Green\",\n    \"hex\": \"#34B233\"\n  },\n  {\n    \"name\": \"Warm Black\",\n    \"hex\": \"#004242\"\n  },\n  {\n    \"name\": \"Waterspout\",\n    \"hex\": \"#A4F4F9\"\n  },\n  {\n    \"name\": \"Weldon Blue\",\n    \"hex\": \"#7C98AB\"\n  },\n  {\n    \"name\": \"Wenge\",\n    \"hex\": \"#645452\"\n  },\n  {\n    \"name\": \"Wheat\",\n    \"hex\": \"#F5DEB3\"\n  },\n  {\n    \"name\": \"White\",\n    \"hex\": \"#FFFFFF\"\n  },\n  {\n    \"name\": \"White Smoke\",\n    \"hex\": \"#F5F5F5\"\n  },\n  {\n    \"name\": \"Wild Blue Yonder\",\n    \"hex\": \"#A2ADD0\"\n  },\n  {\n    \"name\": \"Wild Orchid\",\n    \"hex\": \"#D470A2\"\n  },\n  {\n    \"name\": \"Wild Strawberry\",\n    \"hex\": \"#FF43A4\"\n  },\n  {\n    \"name\": \"Wild Watermelon\",\n    \"hex\": \"#FC6C85\"\n  },\n  {\n    \"name\": \"Willpower Orange\",\n    \"hex\": \"#FD5800\"\n  },\n  {\n    \"name\": \"Windsor Tan\",\n    \"hex\": \"#A75502\"\n  },\n  {\n    \"name\": \"Wine\",\n    \"hex\": \"#722F37\"\n  },\n  {\n    \"name\": \"Wine Dregs\",\n    \"hex\": \"#673147\"\n  },\n  {\n    \"name\": \"Winter Sky\",\n    \"hex\": \"#FF007C\"\n  },\n  {\n    \"name\": \"Winter Wizard\",\n    \"hex\": \"#A0E6FF\"\n  },\n  {\n    \"name\": \"Wintergreen Dream\",\n    \"hex\": \"#56887D\"\n  },\n  {\n    \"name\": \"Wisteria\",\n    \"hex\": \"#C9A0DC\"\n  },\n  {\n    \"name\": \"Wood Brown\",\n    \"hex\": \"#C19A6B\"\n  },\n  {\n    \"name\": \"Xanadu\",\n    \"hex\": \"#738678\"\n  },\n  {\n    \"name\": \"Yale Blue\",\n    \"hex\": \"#0F4D92\"\n  },\n  {\n    \"name\": \"Yankees Blue\",\n    \"hex\": \"#1C2841\"\n  },\n  {\n    \"name\": \"Yellow\",\n    \"hex\": \"#FFFF00\"\n  },\n  {\n    \"name\": \"Yellow (Crayola)\",\n    \"hex\": \"#FCE883\"\n  },\n  {\n    \"name\": \"Yellow (Munsell)\",\n    \"hex\": \"#EFCC00\"\n  },\n  {\n    \"name\": \"Yellow (NCS)\",\n    \"hex\": \"#FFD300\"\n  },\n  {\n    \"name\": \"Yellow (Pantone)\",\n    \"hex\": \"#FEDF00\"\n  },\n  {\n    \"name\": \"Yellow (Process)\",\n    \"hex\": \"#FFEF00\"\n  },\n  {\n    \"name\": \"Yellow (RYB)\",\n    \"hex\": \"#FEFE33\"\n  },\n  {\n    \"name\": \"Yellow-Green\",\n    \"hex\": \"#9ACD32\"\n  },\n  {\n    \"name\": \"Yellow Orange\",\n    \"hex\": \"#FFAE42\"\n  },\n  {\n    \"name\": \"Yellow Rose\",\n    \"hex\": \"#FFF000\"\n  },\n  {\n    \"name\": \"Yellow Sunshine\",\n    \"hex\": \"#FFF700\"\n  },\n  {\n    \"name\": \"Zaffre\",\n    \"hex\": \"#0014A8\"\n  },\n  {\n    \"name\": \"Zinnwaldite Brown\",\n    \"hex\": \"#2C1608\"\n  },\n  {\n    \"name\": \"Zomp\",\n    \"hex\": \"#39A78E\"\n  }\n]`\n"
  },
  {
    "path": "core/database/entity/database.go",
    "content": "package entity\n\ntype DatabaseMetadata struct {\n\tDatabases []Database `json:\"databases\"`\n}\n\ntype Database struct {\n\tName   string          `json:\"name\"`\n\tTables []DatabaseTable `json:\"tables\"`\n}\n\ntype DatabaseTable struct {\n\tName    string           `json:\"name\"`\n\tColumns []DatabaseColumn `json:\"columns\"`\n\tIndexes []DatabaseIndex  `json:\"indexes\"`\n}\n\ntype DatabaseColumn struct {\n\tName          string           `json:\"name\"`\n\tType          string           `json:\"type\"`\n\tPrimary       bool             `json:\"primary,omitempty\"`\n\tNotNull       bool             `json:\"not_null,omitempty\"`\n\tKey           string           `json:\"key,omitempty\"`\n\tDefault       string           `json:\"default,omitempty\"`\n\tExtra         string           `json:\"extra,omitempty\"`\n\tAutoIncrement bool             `json:\"auto_increment,omitempty\"`\n\tChildren      []DatabaseColumn `json:\"children,omitempty\"`\n\tHash          string           `json:\"hash,omitempty\"`\n\tOriginalName  string           `json:\"original_name,omitempty\"`\n\tStatus        string           `json:\"status,omitempty\"`\n}\n\ntype DatabaseIndex struct {\n\tName         string                `json:\"name\"`\n\tType         string                `json:\"type,omitempty\"`\n\tColumns      []DatabaseIndexColumn `json:\"columns\"`\n\tUnique       bool                  `json:\"unique\"`\n\tHash         string                `json:\"hash,omitempty\"`\n\tOriginalName string                `json:\"original_name,omitempty\"`\n\tStatus       string                `json:\"status,omitempty\"`\n}\n\ntype DatabaseIndexColumn struct {\n\tName  string `json:\"name\"`\n\tOrder int    `json:\"order\"`\n}\n\nfunc (col *DatabaseIndexColumn) OrderString() string {\n\tif col.Order < 0 {\n\t\treturn \"DESC\"\n\t} else {\n\t\treturn \"ASC\"\n\t}\n}\n\ntype DatabaseQueryResults struct {\n\tColumns []DatabaseColumn         `json:\"columns,omitempty\"`\n\tRows    []map[string]interface{} `json:\"rows,omitempty\"`\n\tOutput  string                   `json:\"output,omitempty\"`\n\tError   string                   `json:\"error,omitempty\"`\n}\n"
  },
  {
    "path": "core/database/interfaces/database_registry_service.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype DatabaseRegistryService interface {\n\tStart()\n\tCheckStatus()\n\tGetDatabaseService(id primitive.ObjectID) (res DatabaseService, err error)\n}\n"
  },
  {
    "path": "core/database/interfaces/database_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/database/entity\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype DatabaseService interface {\n\tTestConnection(id primitive.ObjectID) (err error)\n\tGetMetadata(id primitive.ObjectID) (m *entity.DatabaseMetadata, err error)\n\tGetMetadataAllDb(id primitive.ObjectID) (m *entity.DatabaseMetadata, err error)\n\tCreateDatabase(id primitive.ObjectID, databaseName string) (err error)\n\tDropDatabase(id primitive.ObjectID, databaseName string) (err error)\n\tGetTableMetadata(id primitive.ObjectID, databaseName, tableName string) (table *entity.DatabaseTable, err error)\n\tCreateTable(id primitive.ObjectID, databaseName string, table *entity.DatabaseTable) (err error)\n\tModifyTable(id primitive.ObjectID, databaseName string, table *entity.DatabaseTable) (err error)\n\tDropTable(id primitive.ObjectID, databaseName, tableName string) (err error)\n\tRenameTable(id primitive.ObjectID, databaseName, oldTableName, newTableName string) (err error)\n\tGetColumnTypes(query string) (types []string)\n\tReadRows(id primitive.ObjectID, databaseName, tableName string, filter map[string]interface{}, skip, limit int) ([]map[string]interface{}, int64, error)\n\tCreateRow(id primitive.ObjectID, databaseName, tableName string, row map[string]interface{}) error\n\tUpdateRow(id primitive.ObjectID, databaseName, tableName string, filter map[string]interface{}, update map[string]interface{}) error\n\tDeleteRow(id primitive.ObjectID, databaseName, tableName string, filter map[string]interface{}) error\n\tQuery(id primitive.ObjectID, databaseName, query string) (results *entity.DatabaseQueryResults, err error)\n\tGetCurrentMetric(id primitive.ObjectID) (m *models.DatabaseMetricV2, err error)\n}\n"
  },
  {
    "path": "core/database/registry_service.go",
    "content": "package database\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/database/interfaces\"\n)\n\nvar serviceInstance interfaces.DatabaseRegistryService\n\nfunc SetDatabaseRegistryService(svc interfaces.DatabaseRegistryService) {\n\tserviceInstance = svc\n}\n\nfunc GetDatabaseRegistryService() interfaces.DatabaseRegistryService {\n\treturn serviceInstance\n}\n"
  },
  {
    "path": "core/docker-compose.yml",
    "content": "version: '3.3'\nservices:\n    mongo:\n        image: mongo:latest\n        container_name: mongo\n        restart: always\n        ports:\n            - \"27017:27017\"\n    redis:\n        image: redis:latest\n        container_name: redis\n        restart: always\n        ports:\n            - \"6379:6379\"\n"
  },
  {
    "path": "core/docs/.gitignore",
    "content": ".idea\nnode_modules\ndist\nbuild\ntmp\nyarn.lock\n"
  },
  {
    "path": "core/docs/api/index.html",
    "content": "<!doctype html> <!-- Important: must specify -->\n<html>\n<head>\n\t<meta charset=\"utf-8\"> <!-- Important: rapi-doc uses utf8 characters -->\n\t<script type=\"module\" src=\"https://unpkg.com/rapidoc/dist/rapidoc-min.js\"></script>\n</head>\n<body>\n<rapi-doc spec-url=\"./openapi.yaml\"></rapi-doc>\n</body>\n</html>\n"
  },
  {
    "path": "core/docs/api/openapi.yaml",
    "content": "openapi: 3.0.0\ninfo:\n  title: Crawlab API\n  version: 0.6.0\n  description: Crawlab API\n  license:\n    name: BSD-3-Clause\n    url: https://github.com/crawlab-team/crawlab-pro/blob/main/LICENSE\n\nservers:\n  - url: http://localhost:8000\n    description: Local API\n  - url: http://localhost:8080/api\n    description: Docker API\n  - url: https://demo-pro.crawlab.cn/api\n    description: Demo API\n\ntags:\n  - name: login\n    description: Login related\n    x-displayName: Login\n  - name: version\n    description: Version related\n    x-displayName: Version\n  - name: node\n    description: Node related\n    x-displayName: Node\n  - name: project\n    description: Project related\n    x-displayName: Project\n\nx-tagGroups:\n  - name: Anomalous\n    tags:\n      - login\n      - version\n  - name: Auth Required\n    tags:\n      - node\n      - project\n\npaths:\n  # login\n  /login:\n    post:\n      tags: [ login ]\n      operationId: postLogin\n      summary: Login\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                username:\n                  type: string\n                password:\n                  type: string\n            example:\n              username: admin\n              password: admin\n      responses:\n        200:\n          description: Login successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/PostLoginResponse'\n        401:\n          description: Login failed\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UnauthorizedErrorResponse'\n  /logout:\n    post:\n      tags: [ login ]\n      operationId: postLogout\n      summary: Logout\n      responses:\n        200:\n          description: Logout successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n\n  # version\n  /version:\n    get:\n      tags: [ version ]\n      operationId: getVersion\n      summary: Get version\n      responses:\n        200:\n          description: Get version successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetVersionResponse'\n              example:\n                status: ok\n                data: v0.6.0\n\n  # node\n  /nodes:\n    get:\n      tags: [ node ]\n      operationId: getNodes\n      summary: Get nodes\n      security:\n        - apiToken: [ ]\n      parameters:\n        - in: query\n          name: page\n          description: Page number\n          required: false\n          schema:\n            type: integer\n            default: 1\n        - in: query\n          name: page_size\n          description: Page size\n          required: false\n          schema:\n            type: integer\n            default: 10\n      responses:\n        200:\n          description: Get nodes successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetNodesResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ node ]\n      operationId: putNode\n      summary: Update node\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BatchRequestPayloadWithStringData'\n      responses:\n        200:\n          description: Update node successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ node ]\n      operationId: deleteNodes\n      summary: Delete nodes\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BatchRequestPayload'\n      responses:\n        200:\n          description: Delete node successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /nodes/{id}:\n    get:\n      tags: [ node ]\n      operationId: getNode\n      summary: Get node\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Node ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get node successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetNodeResponse'\n        404:\n          description: Node not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ node ]\n      operationId: putNode\n      summary: Update node\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Node ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Node'\n      responses:\n        200:\n          description: Update node successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Node not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n\n  # project\n  /projects:\n    get:\n      tags: [ project ]\n      operationId: getProjects\n      summary: Get projects\n      security:\n        - apiToken: [ ]\n      parameters:\n        - in: query\n          name: page\n          schema:\n            type: integer\n        - in: query\n          name: size\n          schema:\n            type: integer\n      responses:\n        200:\n          description: Get projects successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetProjectsResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    post:\n      tags: [ project ]\n      operationId: postProject\n      summary: Create project\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostProjectRequest'\n      responses:\n        200:\n          description: Create project successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ project ]\n      operationId: putProjects\n      summary: Update projects\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BatchRequestPayloadWithStringData'\n      responses:\n        200:\n          description: Update project successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Project not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ project ]\n      operationId: deleteProjects\n      summary: Delete projects\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BatchRequestPayload'\n      responses:\n        200:\n          description: Delete project successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Project not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /projects/batch:\n    post:\n      tags: [ project ]\n      operationId: postProjects\n      summary: Create projects\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: array\n              items:\n                $ref: '#/components/schemas/PostProjectRequest'\n      responses:\n        200:\n          description: Update project successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /projects/{id}:\n    get:\n      tags: [ project ]\n      operationId: getProject\n      summary: Get project\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Project ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get project successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetProjectResponse'\n        404:\n          description: Project not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    post:\n      tags: [ project ]\n      operationId: postProject\n      summary: Update project\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Project ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Project'\n      responses:\n        200:\n          description: Update project successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Project not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ project ]\n      operationId: deleteProject\n      summary: Delete project\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Project ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Delete project successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Project not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n\n  # spider\n  /spiders:\n    get:\n      tags: [ spider ]\n      operationId: getSpiders\n      summary: Get spiders\n      security:\n        - apiToken: [ ]\n      parameters:\n        - in: query\n          name: page\n          schema:\n            type: integer\n        - in: query\n          name: size\n          schema:\n            type: integer\n      responses:\n        200:\n          description: Get spiders successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSpidersResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    post:\n      tags: [ spider ]\n      operationId: postSpiders\n      summary: Create spiders\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BatchRequestPayloadWithStringData'\n      responses:\n        200:\n          description: Create spiders successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/batch:\n    post:\n      tags: [ spider ]\n      operationId: postSpiders\n      summary: Update spiders\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: array\n              items:\n                $ref: '#/components/schemas/PostSpiderRequest'\n      responses:\n        200:\n          description: Update spiders successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}:\n    get:\n      tags: [ spider ]\n      operationId: getSpider\n      summary: Get spider\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get spider successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSpiderResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    post:\n      tags: [ spider ]\n      operationId: postSpider\n      summary: Update spider\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Spider'\n      responses:\n        200:\n          description: Update spider successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ spider ]\n      operationId: deleteSpider\n      summary: Delete spider\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n  /spiders/{id}/files/list:\n    get:\n      tags: [ spider ]\n      operationId: getSpiderFilesList\n      summary: Get spider files list\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get spider files list successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSpiderFilesListResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/files/get:\n    get:\n      tags: [ spider ]\n      operationId: getSpiderFile\n      summary: Get spider file\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n        - name: path\n          in: query\n          description: File path\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get spider file successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSpiderFileResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/files/info:\n    get:\n      tags: [ spider ]\n      operationId: getSpiderFileInfo\n      summary: Get spider file info\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n        - name: path\n          in: query\n          description: File path\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get spider file info successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSpiderFileInfoResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/files/save:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderFile\n      summary: Save spider file\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n        - name: path\n          in: query\n          description: File path\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostSpiderFileRequest'\n      responses:\n        200:\n          description: Save spider file successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/files/save/dir:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderFileDir\n      summary: Save spider file dir\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n        - name: path\n          in: query\n          description: File path\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostSpiderFileDirRequest'\n      responses:\n        200:\n          description: Save spider file dir successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/files/renameFile:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderFileRenameFile\n      summary: Rename spider file\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n        - name: path\n          in: query\n          description: File path\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostSpiderFileRenameFileRequest'\n      responses:\n        200:\n          description: Rename spider file successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/files/delete:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderFileDelete\n      summary: Delete spider file\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n        - name: path\n          in: query\n          description: File path\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Delete spider file successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/files/copy:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderFileCopy\n      summary: Copy spider file\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n        - name: path\n          in: query\n          description: File path\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostSpiderFileCopyRequest'\n      responses:\n        200:\n          description: Copy spider file successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/run:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderRun\n      summary: Run spider\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostSpiderRunRequest'\n      responses:\n        200:\n          description: Run spider successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/git:\n    get:\n      tags: [ spider ]\n      operationId: getSpiderGit\n      summary: Get spider git\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get spider git successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSpiderGitResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/git/remote-refs:\n    get:\n      tags: [ spider ]\n      operationId: getSpiderGitRemoteRefs\n      summary: Get spider git remote refs\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get spider git remote refs successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSpiderGitRemoteRefsResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/git/pull:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderGitPull\n      summary: Pull spider git\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostSpiderGitPullRequest'\n      responses:\n        200:\n          description: Pull spider git successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/git/commit:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderGitCommit\n      summary: Commit spider git\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostSpiderGitCommitRequest'\n      responses:\n        200:\n          description: Commit spider git successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/data-source:\n    get:\n      tags: [ spider ]\n      operationId: getSpiderDataSource\n      summary: Get spider data source\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get spider data source successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSpiderDataSourceResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /spiders/{id}/data-source/{ds_id}:\n    post:\n      tags: [ spider ]\n      operationId: postSpiderDataSource\n      summary: Create spider data source\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Spider ID\n          required: true\n          schema:\n            type: string\n        - name: ds_id\n          in: path\n          description: Data source ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Create spider data source successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Spider not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n\n  # schedule\n  /schedules:\n    get:\n      tags: [ schedule ]\n      operationId: getSchedules\n      summary: Get schedules\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: page\n          in: query\n          description: Page number\n          required: false\n          schema:\n            type: integer\n        - name: page_size\n          in: query\n          description: Page size\n          required: false\n          schema:\n            type: integer\n      responses:\n        200:\n          description: Get schedules successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetSchedulesResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    post:\n      tags: [ schedule ]\n      operationId: postSchedule\n      summary: Create schedule\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostScheduleRequest'\n      responses:\n        200:\n          description: Create schedule successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ schedule ]\n      operationId: putSchedule\n      summary: Update schedule\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Schedule ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BatchRequestPayloadWithStringData'\n      responses:\n        200:\n          description: Update schedule successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Schedule not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ schedule ]\n      operationId: deleteSchedules\n      summary: Delete schedules\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BatchRequestPayload'\n      responses:\n        200:\n          description: Delete schedule successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Schedule not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /schedules/batch:\n    post:\n      tags: [ schedule ]\n      operationId: postSchedulesBatch\n      summary: Create schedules\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostSchedulesBatchRequest'\n      responses:\n        200:\n          description: Create schedules successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /schedules/{id}:\n    get:\n      tags: [ schedule ]\n      operationId: getSchedule\n      summary: Get schedule\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Schedule ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get schedule successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetScheduleResponse'\n        404:\n          description: Schedule not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ schedule ]\n      operationId: putSchedule\n      summary: Update schedule\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Schedule ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PutScheduleRequest'\n      responses:\n        200:\n          description: Update schedule successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Schedule not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ schedule ]\n      operationId: deleteSchedule\n      summary: Delete schedule\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Schedule ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Delete schedule successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Schedule not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /schedules/{id}/enabled:\n    post:\n      tags: [ schedule ]\n      operationId: postScheduleEnabled\n      summary: Enable schedule\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Schedule ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Enable schedule successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Schedule not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /schedules/{id}/disabled:\n    post:\n      tags: [ schedule ]\n      operationId: postScheduleDisabled\n      summary: Disable schedule\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Schedule ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Disable schedule successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Schedule not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n\n  # task\n  /tasks:\n    get:\n      tags: [ task ]\n      operationId: getTasks\n      summary: Get tasks\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: page\n          in: query\n          description: Page number\n          required: false\n          schema:\n            type: integer\n        - name: size\n          in: query\n          description: Page size number\n          required: false\n          schema:\n            type: integer\n      responses:\n        200:\n          description: Get tasks successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetTasksResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ task ]\n      operationId: deleteTasks\n      summary: Delete tasks\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: ids\n          in: query\n          description: Task IDs\n          required: true\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        200:\n          description: Delete tasks successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /tasks/run:\n    post:\n      tags: [ task ]\n      operationId: postTaskRun\n      summary: Run task\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostTaskRunRequest'\n      responses:\n        200:\n          description: Run task successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /tasks/{id}:\n    get:\n      tags: [ task ]\n      operationId: getTask\n      summary: Get task\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Task ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get task successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetTaskResponse'\n        404:\n          description: Task not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ task ]\n      operationId: deleteTask\n      summary: Delete task\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Task ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Delete task successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Task not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /tasks/{id}/restart:\n    post:\n      tags: [ task ]\n      operationId: postTaskRestart\n      summary: Restart task\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Task ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Restart task successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Task not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /tasks/{id}/cancel:\n    post:\n      tags: [ task ]\n      operationId: postTaskCancel\n      summary: Cancel task\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Task ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Cancel task successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Task not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /tasks/{id}/logs:\n    get:\n      tags: [ task ]\n      operationId: getTaskLogs\n      summary: Get task logs\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Task ID\n          required: true\n          schema:\n            type: string\n        - name: page\n          in: query\n          description: Page number\n          required: false\n          schema:\n            type: integer\n        - name: size\n          in: query\n          description: Page size number\n          required: false\n          schema:\n            type: integer\n      responses:\n        200:\n          description: Get task logs successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetTaskLogsResponse'\n        404:\n          description: Task not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /tasks/{id}/data:\n    get:\n      tags: [ task ]\n      operationId: getTaskData\n      summary: Get task data\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Task ID\n          required: true\n          schema:\n            type: string\n        - name: page\n          in: query\n          description: Page number\n          required: false\n          schema:\n            type: integer\n        - name: size\n          in: query\n          description: Page size number\n          required: false\n          schema:\n            type: integer\n      responses:\n        200:\n          description: Get task data successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetTaskDataResponse'\n        404:\n          description: Task not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n\n  # user\n  /users:\n    get:\n      tags: [ user ]\n      operationId: getUsers\n      summary: Get users\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: page\n          in: query\n          description: Page number\n          required: false\n          schema:\n            type: integer\n          example: 1\n        - name: size\n          in: query\n          description: Page size number\n          required: false\n          schema:\n            type: integer\n          example: 10\n      responses:\n        200:\n          description: Get users successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetUsersResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    post:\n      tags: [ user ]\n      operationId: postUser\n      summary: Create user\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostUserRequest'\n      responses:\n        200:\n          description: Create user successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ user ]\n      operationId: putUser\n      summary: Update user\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BatchRequestPayloadWithStringData'\n      responses:\n        200:\n          description: Update user successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: User not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ user ]\n      operationId: deleteUser\n      summary: Delete user\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Delete user successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: User not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /users/{id}:\n    get:\n      tags: [ user ]\n      operationId: getUser\n      summary: Get user\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get user successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetUserResponse'\n        404:\n          description: User not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ user ]\n      operationId: putUser\n      summary: Update user\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PutUserRequest'\n      responses:\n        200:\n          description: Update user successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: User not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ user ]\n      operationId: deleteUser\n      summary: Delete user\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Delete user successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: User not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /users/{id}/change-password:\n    post:\n      tags: [ user ]\n      operationId: changePassword\n      summary: Change password\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: User ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostUserChangePasswordRequest'\n      responses:\n        200:\n          description: Change password successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: User not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /users/me:\n    get:\n      tags: [ user ]\n      operationId: getMe\n      summary: Get me\n      security:\n        - apiToken: [ ]\n      responses:\n        200:\n          description: Get me successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetUserResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ user ]\n      operationId: putMe\n      summary: Update me\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PutUserRequest'\n      responses:\n        200:\n          description: Update me successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n\n  # token\n  /tokens:\n    get:\n      tags: [ token ]\n      operationId: getTokens\n      summary: Get tokens\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: page\n          in: query\n          description: Page number\n          required: false\n          schema:\n            type: integer\n          example: 1\n        - name: size\n          in: query\n          description: Page size\n          required: false\n          schema:\n            type: integer\n          example: 10\n      responses:\n        200:\n          description: Get tokens successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetTokensResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    post:\n      tags: [ token ]\n      operationId: postToken\n      summary: Create token\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostTokenRequest'\n      responses:\n        200:\n          description: Create token successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /tokens/{id}:\n    get:\n      tags: [ token ]\n      operationId: getToken\n      summary: Get token\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Token ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get token successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetTokenResponse'\n        404:\n          description: Token not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    put:\n      tags: [ token ]\n      operationId: putToken\n      summary: Update token\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Token ID\n          required: true\n          schema:\n            type: string\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PutTokenRequest'\n      responses:\n        200:\n          description: Update token successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Token not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    delete:\n      tags: [ token ]\n      operationId: deleteToken\n      summary: Delete token\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Token ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Delete token successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Token not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n\n  # plugin\n  /plugins:\n    get:\n      tags: [ plugin ]\n      operationId: getPlugins\n      summary: Get plugins\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: page\n          in: query\n          description: Page number\n          required: false\n          schema:\n            type: integer\n          example: 1\n        - name: size\n          in: query\n          description: Page size\n          required: false\n          schema:\n            type: integer\n          example: 10\n      responses:\n        200:\n          description: Get plugins successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetPluginsResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n    post:\n      tags: [ plugin ]\n      operationId: postPlugin\n      summary: Create plugin\n      security:\n        - apiToken: [ ]\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/PostPluginRequest'\n      responses:\n        200:\n          description: Create plugin successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /plugins/{id}:\n    get:\n      tags: [ plugin ]\n      operationId: getPlugin\n      summary: Get plugin\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Plugin ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get plugin successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetPluginResponse'\n        404:\n          description: Plugin not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /plugins/{id}/start:\n    post:\n      tags: [ plugin ]\n      operationId: startPlugin\n      summary: Start plugin\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Plugin ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Start plugin successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Plugin not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /plugins/{id}/stop:\n    post:\n      tags: [ plugin ]\n      operationId: stopPlugin\n      summary: Stop plugin\n      security:\n        - apiToken: [ ]\n      parameters:\n        - name: id\n          in: path\n          description: Plugin ID\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Stop plugin successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/EmptyResponse'\n        404:\n          description: Plugin not found\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/NotFoundErrorResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /plugins/public:\n    get:\n      tags: [ plugin ]\n      operationId: getPublicPlugins\n      summary: Get public plugins\n      security:\n        - apiToken: [ ]\n      responses:\n        200:\n          description: Get public plugins successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetPublicPluginsResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n  /plugins/public/info:\n    get:\n      tags: [ plugin ]\n      operationId: getPublicPluginsInfo\n      summary: Get public plugins info\n      security:\n        - apiToken: [ ]\n      parameters:\n        - in: query\n          name: full_name\n          description: Plugin full name\n          required: true\n          schema:\n            type: string\n      responses:\n        200:\n          description: Get public plugins info successful\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetPublicPluginsInfoResponse'\n        400:\n          description: Bad request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BadRequestErrorResponse'\n\ncomponents:\n  schemas:\n    # base request bodies\n    BatchRequestPayload:\n      description: Batch request payload\n      properties:\n        ids:\n          type: array\n          description: Model IDs to operate\n          items:\n            type: string\n    BatchRequestPayloadWithStringData:\n      description: Batch request payload with string data\n      properties:\n        ids:\n          type: array\n          description: Model IDs to operate\n          items:\n            type: string\n        data:\n          type: string\n          description: JSON marshalled model fields data to operate\n        fields:\n          type: array\n          description: Fields to operate\n          items:\n            type: string\n\n    # request bodies\n    PostProjectRequest:\n      description: Put project request body\n      properties:\n        name:\n          type: string\n          description: Project name\n        description:\n          type: string\n          description: Project description\n    PostSpiderRequest:\n      description: Put project request body\n      properties:\n        name:\n          type: string\n          description: Spider name\n        description:\n          type: string\n          description: Spider description\n        type:\n          type: string\n          description: Spider type\n        params:\n          type: string\n          description: Default spider task params\n        col_name:\n          type: string\n          description: Spider collection name\n        project_id:\n          type: string\n          description: Spider project ID\n        mode:\n          type: string\n          enum:\n            - random\n            - all-nodes\n            - selected-nodes\n          description: Default spider task mode\n    PostSpiderFileRequest:\n      description: Post spider file request body\n      properties:\n        path:\n          type: string\n          description: File path\n        data:\n          type: string\n          description: File data\n    PostSpiderFileDirRequest:\n      description: Post spider file dir request body\n      properties:\n        path:\n          type: string\n          description: File path\n    PostSpiderFileRenameFileRequest:\n      description: Post spider file rename file request body\n      properties:\n        path:\n          type: string\n          description: File path\n        new_path:\n          type: string\n          description: New file path\n    PostSpiderFileCopyRequest:\n      description: Post spider file copy request body\n      properties:\n        path:\n          type: string\n          description: File path\n        new_path:\n          type: string\n          description: New file path\n    PostSpiderRunRequest:\n      description: Post spider run request body\n      properties:\n        params:\n          type: string\n          description: Spider task params\n        mode:\n          type: string\n          enum:\n            - random\n            - all-nodes\n            - selected-nodes\n          description: Spider task mode\n      example:\n        mode: random\n    PostSpiderGitPullRequest:\n      description: Post spider git pull request body\n      properties:\n        branch:\n          type: string\n          description: Git branch\n        commit:\n          type: string\n          description: Git commit\n        remote:\n          type: string\n          description: Git remote\n        ref:\n          type: string\n          description: Git ref\n    PostSpiderGitCommitRequest:\n      description: Post spider git commit request body\n      $ref: '#/components/schemas/GitPayload'\n    PostScheduleRequest:\n      description: Post schedule request body\n      properties:\n        name:\n          type: string\n          description: Schedule name\n        description:\n          type: string\n          description: Schedule description\n        spider_id:\n          type: string\n          description: Schedule spider ID\n        cron:\n          type: string\n          description: Cron expression\n        cmd:\n          type: string\n          description: Execute Command\n        params:\n          type: string\n          description: Schedule params\n        mode:\n          $ref: '#/components/schemas/TaskMode'\n    PostSchedulesBatchRequest:\n      description: Post schedules batch request body\n      properties:\n        data:\n          type: array\n          description: Schedules data\n          items:\n            $ref: '#/components/schemas/PostScheduleRequest'\n    PutScheduleRequest:\n      description: Put schedule request body\n      properties:\n        name:\n          type: string\n          description: Schedule name\n        description:\n          type: string\n          description: Schedule description\n        project_id:\n          type: string\n          description: Schedule project ID\n        spider_id:\n          type: string\n          description: Schedule spider ID\n        cron:\n          type: string\n          description: Cron expression\n        params:\n          type: string\n          description: Schedule params\n        mode:\n          $ref: '#/components/schemas/TaskMode'\n    PostTaskRunRequest:\n      description: Post task run request body\n      properties:\n        spider_id:\n          type: string\n          description: Task spider ID\n        cmd:\n          type: string\n          description: Task command\n        params:\n          type: string\n          description: Task params\n        mode:\n          $ref: '#/components/schemas/TaskMode'\n        priority:\n          type: integer\n          description: Task priority\n    PostUserRequest:\n      description: Post user request body\n      properties:\n        username:\n          type: string\n          description: User username\n        password:\n          type: string\n          description: User password\n        email:\n          type: string\n          description: User email\n        role:\n          type: string\n          enum:\n            - admin\n            - user\n          description: User role\n    PutUserRequest:\n      description: Put user request body\n      properties:\n        username:\n          type: string\n          description: User username\n        email:\n          type: string\n          description: User email\n        role:\n          type: string\n          enum:\n            - admin\n            - user\n          description: User role\n    PostUserChangePasswordRequest:\n      description: Post user change password request body\n      properties:\n        password:\n          type: string\n          description: New password\n    PostTokenRequest:\n      description: Post token request body\n      properties:\n        name:\n          type: string\n          description: Token name\n    PutTokenRequest:\n      description: Put token request body\n      properties:\n        name:\n          type: string\n          description: Token name\n    PostPluginRequest:\n      description: Post plugin request body\n      properties:\n        name:\n          type: string\n          description: Plugin name\n        full_name:\n          type: string\n          description: Plugin full name\n\n    # base responses\n    BaseResponse:\n      type: object\n      properties:\n        status:\n          type: string\n          description: Status of the response\n        message:\n          type: string\n          description: Message of the response\n    EmptyResponse:\n      description: Empty response body\n      $ref: '#/components/schemas/BaseResponse'\n      example:\n        status: ok\n        message: success\n    Response:\n      description: Response body\n      allOf:\n        - $ref: '#/components/schemas/BaseResponse'\n        - type: object\n          properties:\n            data:\n              type: object\n    ListResponse:\n      description: List response body\n      allOf:\n        - $ref: '#/components/schemas/BaseResponse'\n        - type: object\n          properties:\n            data:\n              type: array\n            total:\n              type: integer\n    ErrorResponse:\n      description: Error response body\n      allOf:\n        - $ref: '#/components/schemas/BaseResponse'\n        - type: object\n          properties:\n            error:\n              type: string\n\n    # error response\n    NotFoundErrorResponse:\n      description: Not found error response body\n      $ref: '#/components/schemas/ErrorResponse'\n      example:\n        status: error\n        message: not found\n    BadRequestErrorResponse:\n      description: Bad request error response\n      $ref: '#/components/schemas/ErrorResponse'\n      example:\n        status: error\n        message: bad request\n    UnauthorizedErrorResponse:\n      description: Unauthorized error response\n      $ref: '#/components/schemas/ErrorResponse'\n      example:\n        status: error\n        message: unauthorized\n\n    # success response\n    PostLoginResponse:\n      type: object\n      properties:\n        data:\n          type: string\n          description: API token\n    GetVersionResponse:\n      type: object\n      properties:\n        data:\n          type: string\n          description: Version\n    GetNodesResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n              type: array\n              items:\n                $ref: '#/components/schemas/Node'\n    GetNodeResponse:\n      type: object\n      properties:\n        data:\n          $ref: '#/components/schemas/Node'\n    GetProjectsResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n              type: array\n              items:\n                $ref: '#/components/schemas/Project'\n    GetProjectResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n              $ref: '#/components/schemas/Project'\n    GetSpidersResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n              $ref: '#/components/schemas/Spider'\n    GetSpiderResponse:\n      type: object\n      properties:\n        data:\n          $ref: '#/components/schemas/Spider'\n    GetSpiderFilesListResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n              type: array\n              items:\n                $ref: '#/components/schemas/SpiderFile'\n      example:\n        {\n          \"status\": \"ok\",\n          \"message\": \"success\",\n          \"data\": [\n            {\n              \"name\": \"scrapy_baidu\",\n              \"path\": \"/scrapy_baidu\",\n              \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu\",\n              \"extension\": \"\",\n              \"md5\": \"\",\n              \"is_dir\": true,\n              \"file_size\": 0,\n              \"children\": [\n                {\n                  \"name\": \"spiders\",\n                  \"path\": \"/scrapy_baidu/spiders\",\n                  \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu/spiders\",\n                  \"extension\": \"\",\n                  \"md5\": \"\",\n                  \"is_dir\": true,\n                  \"file_size\": 0,\n                  \"children\": [\n                    {\n                      \"name\": \"__init__.py\",\n                      \"path\": \"/scrapy_baidu/spiders/__init__.py\",\n                      \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu/spiders/__init__.py\",\n                      \"extension\": \"py\",\n                      \"md5\": \"EoqQSUWYa98Uwyno4FRZYw==\",\n                      \"is_dir\": false,\n                      \"file_size\": 161,\n                      \"children\": null\n                    },\n                    {\n                      \"name\": \"baidu.py\",\n                      \"path\": \"/scrapy_baidu/spiders/baidu.py\",\n                      \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu/spiders/baidu.py\",\n                      \"extension\": \"py\",\n                      \"md5\": \"AhySHuGyj88CEA1ZbUJ19g==\",\n                      \"is_dir\": false,\n                      \"file_size\": 791,\n                      \"children\": null\n                    }\n                  ]\n                },\n                {\n                  \"name\": \"__init__.py\",\n                  \"path\": \"/scrapy_baidu/__init__.py\",\n                  \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu/__init__.py\",\n                  \"extension\": \"py\",\n                  \"md5\": \"chXunH2dwinSkhpA6JnsXw==\",\n                  \"is_dir\": false,\n                  \"file_size\": 1,\n                  \"children\": null\n                },\n                {\n                  \"name\": \"items.py\",\n                  \"path\": \"/scrapy_baidu/items.py\",\n                  \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu/items.py\",\n                  \"extension\": \"py\",\n                  \"md5\": \"Zg9KIbCe1h/coLSkQcQ9Sg==\",\n                  \"is_dir\": false,\n                  \"file_size\": 311,\n                  \"children\": null\n                },\n                {\n                  \"name\": \"middlewares.py\",\n                  \"path\": \"/scrapy_baidu/middlewares.py\",\n                  \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu/middlewares.py\",\n                  \"extension\": \"py\",\n                  \"md5\": \"4FQr2+wt4ALcuRYxzjsUdQ==\",\n                  \"is_dir\": false,\n                  \"file_size\": 3658,\n                  \"children\": null\n                },\n                {\n                  \"name\": \"pipelines.py\",\n                  \"path\": \"/scrapy_baidu/pipelines.py\",\n                  \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu/pipelines.py\",\n                  \"extension\": \"py\",\n                  \"md5\": \"q8MuuuJwvuV0gcE42Mg2oQ==\",\n                  \"is_dir\": false,\n                  \"file_size\": 259,\n                  \"children\": null\n                },\n                {\n                  \"name\": \"settings.py\",\n                  \"path\": \"/scrapy_baidu/settings.py\",\n                  \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy_baidu/settings.py\",\n                  \"extension\": \"py\",\n                  \"md5\": \"hh/13eHBaVrLNtB27duOZQ==\",\n                  \"is_dir\": false,\n                  \"file_size\": 3201,\n                  \"children\": null\n                }\n              ]\n            },\n            {\n              \"name\": \"__init__.py\",\n              \"path\": \"/__init__.py\",\n              \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/__init__.py\",\n              \"extension\": \"py\",\n              \"md5\": \"chXunH2dwinSkhpA6JnsXw==\",\n              \"is_dir\": false,\n              \"file_size\": 1,\n              \"children\": null\n            },\n            {\n              \"name\": \"crawlab.json\",\n              \"path\": \"/crawlab.json\",\n              \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/crawlab.json\",\n              \"extension\": \"json\",\n              \"md5\": \"jQ5qto4lYSEzWNF77h11gw==\",\n              \"is_dir\": false,\n              \"file_size\": 169,\n              \"children\": null\n            },\n            {\n              \"name\": \"scrapy.cfg\",\n              \"path\": \"/scrapy.cfg\",\n              \"full_path\": \"/fs/62c66a8ef9dce6fe4caa58e5/scrapy.cfg\",\n              \"extension\": \"cfg\",\n              \"md5\": \"UAALAu5OkhbTVtwQeFXpQA==\",\n              \"is_dir\": false,\n              \"file_size\": 267,\n              \"children\": null\n            }\n          ],\n          \"error\": \"\"\n        }\n    GetSpiderFileResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n              type: string\n              description: Spider file content\n      example:\n        {\n          \"status\": \"ok\",\n          \"message\": \"success\",\n          \"data\": \"# Automatically created by: scrapy startproject\\n#\\n# For more information about the [deploy] section see:\\n# https://scrapyd.readthedocs.io/en/latest/deploy.html\\n\\n[settings]\\ndefault = scrapy_baidu.settings\\n\\n[deploy]\\n#url = http://localhost:6800/\\nproject = scrapy_baidu\\n\",\n          \"error\": \"\"\n        }\n    GetSpiderFileInfoResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n              $ref: '#/components/schemas/SpiderFile'\n      example:\n        {\n          \"status\": \"ok\",\n          \"message\": \"success\",\n          \"data\": {\n            \"name\": \"openapi.yaml\",\n            \"path\": \"/openapi.yaml\",\n            \"full_path\": \"/fs/62c66a8af9dce6fe4caa58e3/openapi.yaml\",\n            \"extension\": \"yaml\",\n            \"md5\": \"1UUumcDmYtVAUOZZNegjJA==\",\n            \"is_dir\": false,\n            \"file_size\": 27698,\n            \"children\": null\n          },\n          \"error\": \"\"\n        }\n    GetSpiderGitResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n              type: object\n              description: Spider git content\n              properties:\n                current_branch:\n                  type: string\n                  description: Current git branch\n                branches:\n                  type: array\n                  description: Git branches\n                  items:\n                    type: string\n                changes:\n                  type: array\n                  description: Git changes\n                  items:\n                    $ref: '#/components/schemas/GitFileStatus'\n                logs:\n                  type: array\n                  description: Git logs\n                  items:\n                    $ref: '#/components/schemas/GitLog'\n                ignore:\n                  type: array\n                  description: Git ignore files\n                  items:\n                    type: string\n                git:\n                  type: object\n                  description: Git url\n                  $ref: '#/components/schemas/Git'\n    GetSpiderGitRemoteRefsResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n              type: object\n              description: Spider git remote refs\n              properties:\n                refs:\n                  type: array\n                  description: Git remote refs\n                  items:\n                    $ref: '#/components/schemas/GitRef'\n    GetSpiderDataSourceResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n              type: array\n              description: Spider data source\n              items:\n                $ref: '#/components/schemas/DataSource'\n    GetScheduleResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n            type: array\n            description: Schedules\n            items:\n              $ref: '#/components/schemas/Schedule'\n    GetSchedulesResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n            type: array\n            description: Schedules\n            items:\n              $ref: '#/components/schemas/Schedule'\n    GetTasksResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n            type: array\n            description: Tasks\n            items:\n            $ref: '#/components/schemas/Task'\n    GetTaskResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n            $ref: '#/components/schemas/Task'\n    GetTaskLogsResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n          data:\n            type: array\n            description: Task logs\n            items:\n              type: string\n    GetTaskDataResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n              type: array\n              items:\n                type: object\n    GetUsersResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n              type: array\n              items:\n                $ref: '#/components/schemas/User'\n      example:\n        {\n          \"status\": \"ok\",\n          \"message\": \"success\",\n          \"total\": 1,\n          \"data\": [\n            {\n              \"_id\": \"62c665fb6e54352bf1b279e2\",\n              \"username\": \"admin\",\n              \"role\": \"admin\",\n              \"email\": \"\"\n            }\n          ],\n          \"error\": \"\"\n        }\n    GetUserResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n            $ref: '#/components/schemas/User'\n      example:\n        {\n          \"status\": \"ok\",\n          \"message\": \"success\",\n          \"data\": {\n            \"_id\": \"62c665fb6e54352bf1b279e2\",\n            \"username\": \"admin\",\n            \"role\": \"admin\",\n            \"email\": \"\"\n          },\n          \"error\": \"\"\n        }\n    GetTokensResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n              type: array\n              items:\n                $ref: '#/components/schemas/Token'\n      example:\n        {\n          \"status\": \"ok\",\n          \"message\": \"success\",\n          \"total\": 1,\n          \"data\": [\n            {\n              \"_id\": \"62c8e9e7f23518fd080f04aa\",\n              \"name\": \"my token\",\n              \"token\": \"xxxxxxxxxx\"\n            }\n          ],\n          \"error\": \"\"\n        }\n    GetTokenResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n            $ref: '#/components/schemas/Token'\n      example:\n        {\n          \"status\": \"ok\",\n          \"message\": \"success\",\n          \"data\": {\n            \"_id\": \"62c8e9e7f23518fd080f04aa\",\n            \"name\": \"my token\",\n            \"token\": \"xxxxxxxxxx\"\n          },\n          \"error\": \"\"\n        }\n    GetPluginsResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ListResponse'\n        - properties:\n            data:\n              type: array\n              items:\n                $ref: '#/components/schemas/Plugin'\n      example:\n        {\n          \"status\": \"ok\",\n          \"message\": \"success\",\n          \"total\": 3,\n          \"data\": [\n            {\n              \"_id\": \"62a88b02112099e6932808a8\",\n              \"name\": \"spider-assistant\",\n              \"short_name\": \"plugin-spider-assistant\",\n              \"full_name\": \"crawlab-team/plugin-spider-assistant\",\n              \"description\": \"Spider assistant plugin for Crawlab\",\n              \"proto\": \"http\",\n              \"active\": false,\n              \"endpoint\": \"localhost:9997\",\n              \"cmd\": \"sh ./bin/start.sh\",\n              \"docker_cmd\": \"/app/plugins/bin/plugin-spider-assistant\",\n              \"docker_dir\": \"/app/plugins/plugin-spider-assistant\",\n              \"event_key\": {\n                \"include\": \"^model:\",\n                \"exclude\": \"artifact\"\n              },\n              \"install_type\": \"public\",\n              \"install_url\": \"/app/plugins/plugin-spider-assistant\",\n              \"install_cmd\": \"\",\n              \"deploy_mode\": \"master\",\n              \"auto_start\": true,\n              \"ui_components\": [\n                {\n                  \"name\": \"assistant\",\n                  \"title\": \"assistant.detail.tabs.title\",\n                  \"src\": \"ui/src/AssistantDetail.vue\",\n                  \"type\": \"tab\",\n                  \"path\": \"assistant\",\n                  \"parent_paths\": [\n                    \"/spiders/:id\"\n                  ]\n                }\n              ],\n              \"ui_sidebar_navs\": [ ],\n              \"ui_assets\": [ ],\n              \"lang_url\": \"ui/lang\",\n              \"status\": null\n            },\n            {\n              \"_id\": \"62a88b04112099e6932808aa\",\n              \"name\": \"notification\",\n              \"short_name\": \"plugin-notification\",\n              \"full_name\": \"crawlab-team/plugin-notification\",\n              \"description\": \"A plugin for handling notifications\",\n              \"proto\": \"http\",\n              \"active\": false,\n              \"endpoint\": \"localhost:39999\",\n              \"cmd\": \"sh ./bin/start.sh\",\n              \"docker_cmd\": \"/app/plugins/bin/plugin-notification\",\n              \"docker_dir\": \"/app/plugins/plugin-notification\",\n              \"event_key\": {\n                \"include\": \"^model:\",\n                \"exclude\": \"artifact\"\n              },\n              \"install_type\": \"public\",\n              \"install_url\": \"/app/plugins/plugin-notification\",\n              \"install_cmd\": \"\",\n              \"deploy_mode\": \"master_only\",\n              \"auto_start\": true,\n              \"ui_components\": [\n                {\n                  \"name\": \"notification-list\",\n                  \"title\": \"Notifications\",\n                  \"src\": \"ui/src/NotificationList.vue\",\n                  \"type\": \"view\",\n                  \"path\": \"notifications\",\n                  \"parent_paths\": null\n                },\n                {\n                  \"name\": \"notification-detail\",\n                  \"title\": \"Notifications\",\n                  \"src\": \"ui/src/NotificationDetail.vue\",\n                  \"type\": \"view\",\n                  \"path\": \"notifications/:id\",\n                  \"parent_paths\": null\n                }\n              ],\n              \"ui_sidebar_navs\": [\n                {\n                  \"path\": \"/notifications\",\n                  \"title\": \"plugins.notification.ui_sidebar_navs.title.notifications\",\n                  \"icon\": [\n                    \"fa\",\n                    \"envelope\"\n                  ]\n                }\n              ],\n              \"ui_assets\": [\n                {\n                  \"path\": \"ui/public/simplemde/simplemde.js\",\n                  \"type\": \"js\"\n                },\n                {\n                  \"path\": \"ui/public/simplemde/simplemde.css\",\n                  \"type\": \"css\"\n                },\n                {\n                  \"path\": \"ui/public/css/style.css\",\n                  \"type\": \"css\"\n                }\n              ],\n              \"lang_url\": \"ui/lang\",\n              \"status\": null\n            },\n            {\n              \"_id\": \"62c390ab5853635d26cf76c7\",\n              \"name\": \"dependency\",\n              \"short_name\": \"plugin-dependency\",\n              \"full_name\": \"crawlab-team/plugin-dependency\",\n              \"description\": \"A plugin for managing dependencies\",\n              \"proto\": \"http\",\n              \"active\": false,\n              \"endpoint\": \"localhost:9998\",\n              \"cmd\": \"sh ./bin/start.sh\",\n              \"docker_cmd\": \"/app/plugins/bin/plugin-dependency\",\n              \"docker_dir\": \"/app/plugins/plugin-dependency\",\n              \"event_key\": {\n                \"include\": \"^model:\",\n                \"exclude\": \"artifact\"\n              },\n              \"install_type\": \"public\",\n              \"install_url\": \"/app/plugins/plugin-dependency\",\n              \"install_cmd\": \"\",\n              \"deploy_mode\": \"all\",\n              \"auto_start\": true,\n              \"ui_components\": [\n                {\n                  \"name\": \"dependency-settings\",\n                  \"title\": \"Dependencies Settings\",\n                  \"src\": \"ui/src/setting/DependencySettings.vue\",\n                  \"type\": \"view\",\n                  \"path\": \"dependencies/settings\",\n                  \"parent_paths\": null\n                },\n                {\n                  \"name\": \"dependency-python\",\n                  \"title\": \"Dependencies Python\",\n                  \"src\": \"ui/src/python/DependencyPython.vue\",\n                  \"type\": \"view\",\n                  \"path\": \"dependencies/python\",\n                  \"parent_paths\": null\n                },\n                {\n                  \"name\": \"dependency-node\",\n                  \"title\": \"Dependencies Node\",\n                  \"src\": \"ui/src/node/DependencyNode.vue\",\n                  \"type\": \"view\",\n                  \"path\": \"dependencies/node\",\n                  \"parent_paths\": null\n                },\n                {\n                  \"name\": \"dependencies\",\n                  \"title\": \"ui_components.title.dependencies\",\n                  \"src\": \"ui/src/spider/DependencySpiderTab.vue\",\n                  \"type\": \"tab\",\n                  \"path\": \"dependencies\",\n                  \"parent_paths\": [\n                    \"/spiders/:id\"\n                  ]\n                }\n              ],\n              \"ui_sidebar_navs\": [\n                {\n                  \"path\": \"/dependencies\",\n                  \"title\": \"plugins.dependency.ui_sidebar_navs.title.dependencies\",\n                  \"icon\": [\n                    \"fa\",\n                    \"puzzle-piece\"\n                  ],\n                  \"children\": [\n                    {\n                      \"path\": \"/dependencies/python\",\n                      \"title\": \"plugins.dependency.ui_sidebar_navs.title.python\",\n                      \"icon\": [\n                        \"fab\",\n                        \"python\"\n                      ]\n                    },\n                    {\n                      \"path\": \"/dependencies/node\",\n                      \"title\": \"plugins.dependency.ui_sidebar_navs.title.node\",\n                      \"icon\": [\n                        \"fab\",\n                        \"node-js\"\n                      ]\n                    },\n                    {\n                      \"path\": \"/dependencies/settings\",\n                      \"title\": \"plugins.dependency.ui_sidebar_navs.title.settings\",\n                      \"icon\": [\n                        \"fa\",\n                        \"cog\"\n                      ]\n                    }\n                  ]\n                }\n              ],\n              \"ui_assets\": [ ],\n              \"lang_url\": \"ui/lang\",\n              \"status\": null\n            }\n          ],\n          \"error\": \"\"\n        }\n    GetPluginResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n              $ref: '#/components/schemas/Plugin'\n    GetPublicPluginsResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n              type: array\n              items:\n                $ref: '#/components/schemas/PublicPlugin'\n    GetPublicPluginsInfoResponse:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Response'\n        - properties:\n            data:\n            type: array\n            items:\n              type: object\n\n    # models\n    Model:\n      description: Base model\n      type: object\n      properties:\n        _id:\n          type: string\n          description: ID of the model (MongoDB ObjectID)\n    ModelWithNameDescription:\n      allOf:\n        - $ref: '#/components/schemas/Model'\n        - properties:\n            name:\n              type: string\n              description: Name of the model\n            description:\n              type: string\n              description: Description of the model\n    ModelWithKey:\n      allOf:\n        - $ref: '#/components/schemas/Model'\n        - properties:\n            key:\n              type: string\n              description: Key of the model\n    Node:\n      description: Node model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithKey'\n        - $ref: '#/components/schemas/ModelWithNameDescription'\n        - properties:\n            ip:\n              description: Node IP\n              type: string\n            port:\n              description: Node port\n              type: string\n            mac:\n              description: Node MAC\n              type: string\n            hostname:\n              description: Node hostname\n              type: string\n            is_master:\n              description: Whether the node is master\n              type: boolean\n            status:\n              description: Node current status\n              type: string\n              enum:\n                - online\n                - offline\n            enabled:\n              description: Node enabled\n              type: boolean\n            active:\n              description: Node active\n              type: boolean\n            active_ts:\n              description: Node active timestamp\n              type: string\n              format: date-time\n            available_runners:\n              description: Available number of available runners of the node\n              type: integer\n            max_runners:\n              description: Max number of runners of the node\n              type: integer\n    Project:\n      description: Project model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithNameDescription'\n        - properties:\n            spiders:\n              description: Spiders of the project\n              type: integer\n    TaskStat:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Model'\n        - properties:\n            create_ts:\n              type: string\n              format: date-time\n            start_ts:\n              type: string\n              format: date-time\n            end_ts:\n              type: string\n              format: date-time\n            wait_duration:\n              type: integer\n            runtime_duration:\n              type: integer\n            total_duration:\n              type: integer\n            result_count:\n              type: integer\n            error_log_count:\n              type: integer\n    Task:\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Model'\n        - properties:\n            spider_id:\n              type: string\n            status:\n              type: string\n            node_id:\n              type: string\n            cmd:\n              type: string\n            param:\n              type: string\n            error:\n              type: string\n            pid:\n              description: Process ID\n              type: integer\n            schedule_id:\n              type: string\n            type:\n              type: string\n            mode:\n              $ref: '#/components/schemas/TaskMode'\n            node_ids:\n              type: array\n              items:\n                type: string\n            parent_id:\n              type: string\n            priority:\n              type: integer\n            stat:\n              $ref: '#/components/schemas/TaskStat'\n            has_sub:\n              type: boolean\n            sub_tasks:\n              type: array\n              items:\n                $ref: '#/components/schemas/Task'\n            user_id:\n              type: string\n    TaskMode:\n      type: string\n      enum:\n        - random\n        - all-nodes\n        - selected-nodes\n    SpiderStat:\n      description: Spider stat\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Model'\n        - properties:\n            type:\n              description: Last task ID\n              type: string\n            task:\n              description: Last task\n              $ref: '#/components/schemas/Task'\n    Spider:\n      description: Spider model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithNameDescription'\n        - properties:\n            type:\n              description: Spider type\n              type: string\n            col_id:\n              description: Spider collection ID\n              type: string\n            col_name:\n              description: Spider collection name\n              type: string\n            data_source_id:\n              description: Spider data source id\n              type: string\n            data_source_name:\n              description: Spider data source name\n              type: string\n            project_id:\n              description: Spider project id\n              type: string\n            mode:\n              description: Spider task mode\n              $ref: '#/components/schemas/TaskMode'\n            node_ids:\n              description: Spider task selected node IDs\n              type: array\n              items:\n                type: string\n            stat:\n              description: Spider stat\n              $ref: '#/components/schemas/SpiderStat'\n    SpiderFile:\n      description: Spider file model\n      type: object\n      properties:\n        name:\n          description: File name\n          type: string\n        path:\n          description: File path\n          type: string\n        full_path:\n          description: Full file path\n          type: string\n        extension:\n          description: File extension\n          type: string\n        md5:\n          description: File MD5 hash\n          type: string\n        is_dir:\n          description: Whether the file is directory\n          type: string\n        fileSize:\n          description: File size\n          type: integer\n        children:\n          description: Children files\n          type: array\n          items:\n            $ref: '#/components/schemas/SpiderFile'\n    GitFileStatus:\n      description: Git file status\n      type: object\n      properties:\n        path:\n          description: File path\n          type: string\n        name:\n          description: File name\n          type: string\n        is_dir:\n          description: Whether the file is directory\n          type: boolean\n        staging:\n          description: Staging\n          type: string\n        worktree:\n          description: Worktree\n          type: string\n        extra:\n          description: Extra\n          type: string\n        children:\n          description: Children files\n          type: array\n          items:\n            $ref: '#/components/schemas/GitFileStatus'\n    GitRef:\n      description: Git ref\n      type: object\n      properties:\n        type:\n          description: Ref type\n          type: string\n        name:\n          description: Ref name\n          type: string\n        full_name:\n          description: Ref full name\n          type: string\n        hash:\n          description: Ref hash\n          type: string\n        timestamp:\n          description: Ref timestamp\n          type: string\n          format: date-time\n    GitLog:\n      description: Git log\n      type: object\n      properties:\n        hash:\n          description: Commit hash\n          type: string\n        msg:\n          description: Commit message\n          type: string\n        author_name:\n          description: Author name\n          type: string\n        author_email:\n          description: Author email\n          type: string\n        timestamp:\n          description: Commit timestamp\n          type: string\n          format: date-time\n        refs:\n          description: Commit refs\n          type: array\n          items:\n            $ref: '#/components/schemas/GitRef'\n    Git:\n      description: Git model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithKey'\n        - properties:\n          url:\n            description: Git url\n            type: string\n          branch:\n            description: Git branch\n            type: string\n          changes:\n            description: Git changes\n            type: array\n            items:\n              $ref: '#/components/schemas/GitFileStatus'\n          logs:\n            description: Git logs\n            type: array\n            items:\n              $ref: '#/components/schemas/GitLog'\n          ignore:\n            description: Git ignore files\n            type: array\n            items:\n              type: string\n          git:\n            description: Git url\n            type: string\n    GitPayload:\n      description: Git payload\n      type: object\n      properties:\n        paths:\n          description: Git paths\n          type: array\n          items:\n            type: string\n        commit_message:\n          description: Commit message\n          type: string\n        branch:\n          description: Branch\n          type: string\n        tag:\n          description: Tag\n          type: string\n    DataSource:\n      description: Data source model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithKey'\n        - properties:\n            name:\n              description: Data source name\n              type: string\n            description:\n              description: Data source description\n              type: string\n            type:\n              description: Data source type\n              type: string\n            host:\n              description: Data source host\n              type: string\n            port:\n              description: Data source port\n              type: string\n            url:\n              description: Data source url\n              type: string\n            hosts:\n              description: Data source hosts\n              type: array\n              items:\n                type: string\n            database:\n              description: Data source database\n              type: string\n            username:\n              description: Data source username\n              type: string\n            password:\n              description: Data source password\n              type: string\n            enabled:\n              description: Data source enabled\n              type: boolean\n            connect_type:\n              description: Data source connect type\n              type: string\n            status:\n              description: Data source status\n              type: string\n            error:\n              description: Data source error\n              type: string\n            extra:\n              description: Data source extra\n              type: object\n    Schedule:\n      description: Schedule model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithKey'\n        - properties:\n            spider_id:\n              description: Schedule spider ID\n              type: string\n            cron:\n              description: Schedule cron\n              type: string\n              example: \"* * * * *\"\n            entry_id:\n              description: Schedule entry ID\n              type: string\n              example: 1\n            cmd:\n              description: Schedule execute command\n              type: string\n              example: scrapy crawl spider\n            param:\n              description: Schedule execute command param\n              type: string\n              example: -a param1=value1 -a param2=value2\n            mode:\n              description: Schedule task mode\n              type: string\n              example: random\n            node_ids:\n            enabled:\n              description: Schedule enabled\n              type: boolean\n              example: true\n            user_id:\n              description: Schedule user ID\n              type: string\n    User:\n      description: User model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Model'\n        - properties:\n          username:\n            description: User username\n            type: string\n          email:\n            description: User email\n            type: string\n          role:\n            description: User role\n            type: string\n    Token:\n      description: Token model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Model'\n        - properties:\n            name:\n              description: Token name\n              type: string\n            token:\n              description: Token\n              type: string\n    Plugin:\n      description: Plugin model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/ModelWithNameDescription'\n        - properties:\n            short_name:\n              description: Plugin short name\n              type: string\n            full_name:\n              description: Plugin full name\n              type: string\n            proto:\n              description: Plugin protocol\n              type: string\n            active:\n              description: Plugin active\n              type: boolean\n            endpoint:\n              description: Plugin endpoint\n              type: string\n            cmd:\n              description: Plugin cmd\n              type: string\n            docker_cmd:\n              description: Plugin docker cmd\n              type: string\n            docker_dir:\n              description: Plugin docker directory\n              type: string\n            event_key:\n              description: Plugin event key\n              $ref: '#/components/schemas/PluginEventKey'\n            install_type:\n              description: Plugin install type\n              type: string\n            install_url:\n              description: Plugin install url\n              type: string\n            install_cmd:\n              description: Plugin install cmd\n              type: string\n            deploy_mode:\n              description: Plugin deploy mode\n              type: string\n            auto_start:\n              description: Plugin auto start\n              type: boolean\n            ui_components:\n              description: Plugin ui components\n              type: array\n              items:\n                $ref: '#/components/schemas/PluginUIComponent'\n            ui_sidebar_navs:\n              description: Plugin ui sidebar navs\n              type: array\n              items:\n                $ref: '#/components/schemas/PluginUINav'\n            ui_assets:\n              description: Plugin ui assets\n              type: array\n              items:\n                $ref: '#/components/schemas/PluginUIAsset'\n            lang_url:\n              description: Plugin language url\n              type: string\n            status:\n              description: Plugin status\n              $ref: '#/components/schemas/PluginStatus'\n    PluginEventKey:\n      description: Plugin event key model\n      type: object\n      properties:\n        include:\n          description: Plugin included event key\n          type: array\n          items:\n            type: string\n        exclude:\n          description: Plugin excluded event key\n          type: array\n          items:\n            type: string\n    PluginUIComponent:\n      description: Plugin ui component model\n      type: object\n      properties:\n        name:\n          description: Plugin ui component name\n          type: string\n        title:\n          description: Plugin ui component title\n          type: string\n        src:\n          description: Plugin ui component src\n          type: string\n        type:\n          description: Plugin ui component type\n          type: string\n        path:\n          description: Plugin ui component path\n          type: string\n        parent_paths:\n          description: Plugin ui component parent paths\n          type: array\n          items:\n            type: string\n    PluginUINav:\n      description: Plugin ui nav model\n      type: object\n      properties:\n        path:\n          description: Plugin ui nav path\n          type: string\n        title:\n          description: Plugin ui nav title\n          type: string\n        icon:\n          description: Plugin ui nav icon\n          type: array\n          items:\n            type: string\n        children:\n          description: Plugin ui nav children\n          type: array\n          items:\n            $ref: '#/components/schemas/PluginUINav'\n    PluginUIAsset:\n      description: Plugin ui asset model\n      type: object\n      properties:\n        path:\n          description: Plugin ui asset path\n          type: string\n        type:\n          description: Plugin ui asset type\n          type: string\n    PluginStatus:\n      description: Plugin status model\n      type: object\n      allOf:\n        - $ref: '#/components/schemas/Model'\n        - properties:\n            plugin_id:\n              description: Plugin ID\n              type: string\n            node_id:\n              description: Node ID\n              type: string\n            status:\n              description: Plugin status\n              type: string\n            pid:\n              description: Plugin process ID\n              type: integer\n            error:\n              description: Plugin error\n              type: string\n            node:\n              description: Node model\n              $ref: '#/components/schemas/Node'\n    PublicPlugin:\n      description: Public plugin model\n      type: object\n      properties:\n        id:\n          description: Public plugin ID\n          type: string\n        name:\n          description: Public plugin name\n          type: string\n        full_name:\n          description: Public plugin full name\n          type: string\n        description:\n          description: Public plugin description\n          type: string\n        html_url:\n          description: Public plugin html url\n          type: string\n        pushed_at:\n          description: Public plugin pushed at\n          type: string\n        created_at:\n          description: Public plugin created at\n          type: string\n        updated_at:\n          description: Public plugin updated at\n          type: string\n\n  securitySchemes:\n    apiToken:\n      type: apiKey\n      in: header\n      name: Authorization\n      description: API Token\n      x-displayName: API Token\n"
  },
  {
    "path": "core/docs/package.json",
    "content": "{\n  \"name\": \"docs\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"publish\": \"node scripts/publish.js\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"devDependencies\": {\n    \"chalk\": \"^4.1.2\",\n    \"qiniu\": \"^7.4.0\",\n    \"walk-sync\": \"^3.0.0\"\n  }\n}\n"
  },
  {
    "path": "core/docs/scripts/publish.js",
    "content": "const path = require('path')\nconst qiniu = require('qiniu')\nconst walkSync = require('walk-sync')\nconst chalk = require('chalk')\n\n// target directory\nconst targetDir = './api'\n\n// access key\nconst accessKey = process.env.QINIU_ACCESS_KEY\n\n// secret key\nconst secretKey = process.env.QINIU_SECRET_KEY\n\n// bucket\nconst bucket = process.env.QINIU_BUCKET\n\n// config\nconst config = new qiniu.conf.Config()\n\n// zone\nconfig.zone = qiniu.zone[process.env.QINIU_ZONE]\n\nfunction uploadFile(localFile, key) {\n\t// options\n\tconst options = {\n\t\tscope: `${bucket}:${key}`,\n\t}\n\n\t// mac\n\tconst mac = new qiniu.auth.digest.Mac(accessKey, secretKey)\n\n\t// put policy\n\tconst putPolicy = new qiniu.rs.PutPolicy(options)\n\n\t// upload token\n\tconst uploadToken = putPolicy.uploadToken(mac)\n\n\treturn new Promise((resolve, reject) => {\n\t\tconst formUploader = new qiniu.form_up.FormUploader(config)\n\t\tconst putExtra = new qiniu.form_up.PutExtra()\n\t\tformUploader.putFile(uploadToken, key, localFile, putExtra, function (respErr, respBody, respInfo) {\n\t\t\tif (respErr) {\n\t\t\t\tthrow respErr\n\t\t\t}\n\t\t\tif (respInfo.statusCode === 200) {\n\t\t\t\tconsole.log(`${chalk.green('uploaded')} ${localFile} => ${key}`)\n\t\t\t\tresolve()\n\t\t\t} else if (respInfo.statusCode === 614) {\n\t\t\t\tconsole.log(`${chalk.yellow('exists')} ${localFile} => ${key}`)\n\t\t\t\tresolve()\n\t\t\t} else {\n\t\t\t\tconst errMsg = `${chalk.red('error[' + respInfo.statusCode + ']')} ${localFile} => ${key}`\n\t\t\t\tconsole.error(errMsg)\n\t\t\t\treject(new Error(respBody))\n\t\t\t}\n\t\t})\n\t})\n}\n\nasync function main() {\n\t// paths\n\tconst paths = walkSync(targetDir, {\n\t\tincludeBasePath: true, directories: false,\n\t})\n\n\t// iterate paths\n\tfor (const filePath of paths) {\n\t\tconst localFile = path.resolve(filePath)\n\t\tconst key = filePath.replace(targetDir + '/', '')\n\t\ttry {\n\t\t\tawait uploadFile(localFile, key)\n\t\t} finally {\n\t\t\t// do nothing\n\t\t}\n\t}\n}\n\n(async () => {\n\tawait main()\n})()\n"
  },
  {
    "path": "core/ds/cockroachdb.go",
    "content": "package ds\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype CockroachdbService struct {\n\tSqlService\n}\n\nfunc NewDataSourceCockroachdbService(colId primitive.ObjectID, dsId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &CockroachdbService{}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// data source\n\tif dsId.IsZero() {\n\t\tsvc.ds = &models.DataSource{}\n\t} else {\n\t\tsvc.ds, err = svc.modelSvc.GetDataSourceById(dsId)\n\t\tif err != nil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t}\n\n\t// data source defaults\n\tif svc.ds.Host == \"\" {\n\t\tsvc.ds.Host = constants.DefaultHost\n\t}\n\tif svc.ds.Port == 0 {\n\t\tsvc.ds.Port = constants.DefaultCockroachdbPort\n\t}\n\n\t// data source password\n\tpwd, err := svc.modelSvc.GetPasswordById(svc.ds.Id)\n\tif err == nil {\n\t\tsvc.ds.Password, err = utils.DecryptAES(pwd.Password)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data collection\n\tsvc.dc, err = svc.modelSvc.GetDataCollectionById(colId)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// session\n\tsvc.s, err = utils.GetCockroachdbSession(svc.ds)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// collection\n\tsvc.col = svc.s.Collection(svc.dc.Name)\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/ds/default.go",
    "content": "package ds\n"
  },
  {
    "path": "core/ds/es.go",
    "content": "package ds\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\tconstants2 \"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\tentity2 \"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/elastic/go-elasticsearch/v8\"\n\t\"github.com/elastic/go-elasticsearch/v8/esapi\"\n\t\"github.com/google/uuid\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype ElasticsearchService struct {\n\t// dependencies\n\tmodelSvc service.ModelService\n\n\t// internals\n\tdc *models.DataCollection // models.DataCollection\n\tds *models.DataSource     // models.DataSource\n\tc  *elasticsearch.Client  // elasticsearch.Client\n\tt  time.Time\n}\n\nfunc (svc *ElasticsearchService) Insert(records ...interface{}) (err error) {\n\t// wait group\n\tvar wg sync.WaitGroup\n\twg.Add(len(records))\n\n\t// iterate records\n\tfor _, r := range records {\n\t\t// async operation\n\t\tgo func(r interface{}) {\n\t\t\tswitch r.(type) {\n\t\t\tcase entity.Result:\n\t\t\t\t// convert type to entity.Result\n\t\t\t\td := r.(entity.Result)\n\n\t\t\t\t// get document id\n\t\t\t\tid := d.GetValue(\"id\")\n\t\t\t\tvar docId string\n\t\t\t\tswitch id.(type) {\n\t\t\t\tcase string:\n\t\t\t\t\tdocId = id.(string)\n\t\t\t\t}\n\t\t\t\tif docId == \"\" {\n\t\t\t\t\tdocId = uuid.New().String() // generate new uuid if id is empty\n\t\t\t\t}\n\n\t\t\t\t// collection\n\t\t\t\td[constants2.DataCollectionKey] = svc.dc.Name\n\n\t\t\t\t// index request\n\t\t\t\treq := esapi.IndexRequest{\n\t\t\t\t\tIndex:      svc.getIndexName(),\n\t\t\t\t\tDocumentID: docId,\n\t\t\t\t\tBody:       strings.NewReader(d.String()),\n\t\t\t\t}\n\n\t\t\t\t// perform request\n\t\t\t\tres, err := req.Do(context.Background(), svc.c)\n\t\t\t\tif err != nil {\n\t\t\t\t\ttrace.PrintError(err)\n\t\t\t\t\twg.Done()\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tdefer res.Body.Close()\n\t\t\t\tif res.IsError() {\n\t\t\t\t\ttrace.PrintError(errors.New(fmt.Sprintf(\"[ElasticsearchService] [%s] error inserting record: %v\", res.Status(), r)))\n\t\t\t\t}\n\n\t\t\t\t// release\n\t\t\t\twg.Done()\n\t\t\tdefault:\n\t\t\t\twg.Done()\n\t\t\t\treturn\n\t\t\t}\n\t\t}(r)\n\t}\n\n\t// wait\n\twg.Wait()\n\n\treturn nil\n}\n\nfunc (svc *ElasticsearchService) List(query generic.ListQuery, opts *generic.ListOptions) (results []interface{}, err error) {\n\tdata, err := svc.getListResponse(query, opts, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, hit := range data.Hits.Hits {\n\t\tresults = append(results, hit.Source)\n\t}\n\treturn results, nil\n}\n\nfunc (svc *ElasticsearchService) Count(query generic.ListQuery) (n int, err error) {\n\tdata, err := svc.getListResponse(query, nil, true)\n\tif err != nil {\n\t\treturn n, err\n\t}\n\treturn int(data.Hits.Total.Value), nil\n}\n\nfunc (svc *ElasticsearchService) getListResponse(query generic.ListQuery, opts *generic.ListOptions, trackTotalHits bool) (data *entity2.ElasticsearchResponseData, err error) {\n\tif opts == nil {\n\t\topts = &generic.ListOptions{}\n\t}\n\tquery = append(query, generic.ListQueryCondition{\n\t\tKey:   constants2.DataCollectionKey,\n\t\tOp:    constants2.FilterOpEqual,\n\t\tValue: svc.dc.Name,\n\t})\n\tres, err := svc.c.Search(\n\t\tsvc.c.Search.WithContext(context.Background()),\n\t\tsvc.c.Search.WithIndex(svc.getIndexName()),\n\t\tsvc.c.Search.WithBody(utils.GetElasticsearchQueryWithOptions(query, opts)),\n\t\tsvc.c.Search.WithTrackTotalHits(trackTotalHits),\n\t)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tdefer res.Body.Close()\n\tif res.IsError() {\n\t\terr = errors.New(fmt.Sprintf(\"[ElasticsearchService] [%s] error listing records: response=%s, query=%v opts=%v\", res.Status(), res.String(), query, opts))\n\t\ttrace.PrintError(err)\n\t\treturn nil, err\n\t}\n\tdata = &entity2.ElasticsearchResponseData{}\n\tif err := json.NewDecoder(res.Body).Decode(data); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\treturn data, nil\n}\n\nfunc (svc *ElasticsearchService) getIndexName() (index string) {\n\tif svc.ds.Database == \"\" {\n\t\treturn svc.dc.Name\n\t} else {\n\t\treturn svc.ds.Name\n\t}\n}\n\nfunc NewDataSourceElasticsearchService(colId primitive.ObjectID, dsId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &ElasticsearchService{}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// data source\n\tif dsId.IsZero() {\n\t\tsvc.ds = &models.DataSource{}\n\t} else {\n\t\tsvc.ds, err = svc.modelSvc.GetDataSourceById(dsId)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data source defaults\n\tif svc.ds.Host == \"\" {\n\t\tsvc.ds.Host = constants.DefaultHost\n\t}\n\tif svc.ds.Port == 0 {\n\t\tsvc.ds.Port = constants.DefaultElasticsearchPort\n\t}\n\n\t// data source password\n\tpwd, err := svc.modelSvc.GetPasswordById(svc.ds.Id)\n\tif err == nil {\n\t\tsvc.ds.Password, err = utils.DecryptAES(pwd.Password)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data collection\n\tsvc.dc, err = svc.modelSvc.GetDataCollectionById(colId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// client\n\tsvc.c, err = utils.GetElasticsearchClient(svc.ds)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nfunc (svc *ElasticsearchService) Index(fields []string) {\n\t// TODO: implement me\n}\n\nfunc (svc *ElasticsearchService) SetTime(t time.Time) {\n\tsvc.t = t\n}\n\nfunc (svc *ElasticsearchService) GetTime() (t time.Time) {\n\treturn svc.t\n}\n"
  },
  {
    "path": "core/ds/kafka.go",
    "content": "package ds\n\nimport (\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/segmentio/kafka-go\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype KafkaService struct {\n\t// dependencies\n\tmodelSvc service.ModelService\n\n\t// internals\n\tdc *models.DataCollection // models.DataCollection\n\tds *models.DataSource     // models.DataSource\n\tc  *kafka.Conn            // kafka.Conn\n\trb backoff.BackOff\n\tt  time.Time\n}\n\nfunc (svc *KafkaService) Insert(records ...interface{}) (err error) {\n\tvar messages []kafka.Message\n\tfor _, r := range records {\n\t\tswitch r.(type) {\n\t\tcase entity.Result:\n\t\t\td := r.(entity.Result)\n\t\t\tmessages = append(messages, kafka.Message{\n\t\t\t\tTopic: svc.ds.Database,\n\t\t\t\tKey:   []byte(d.GetTaskId().Hex()),\n\t\t\t\tValue: d.Bytes(),\n\t\t\t})\n\t\t}\n\t}\n\t_, err = svc.c.WriteMessages(messages...)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (svc *KafkaService) List(query generic.ListQuery, opts *generic.ListOptions) (results []interface{}, err error) {\n\t// N/A\n\treturn nil, nil\n}\n\nfunc (svc *KafkaService) Count(query generic.ListQuery) (n int, err error) {\n\t// N/A\n\treturn 0, nil\n}\n\nfunc NewDataSourceKafkaService(colId primitive.ObjectID, dsId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &KafkaService{}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// data source\n\tif dsId.IsZero() {\n\t\tsvc.ds = &models.DataSource{}\n\t} else {\n\t\tsvc.ds, err = svc.modelSvc.GetDataSourceById(dsId)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data source defaults\n\tif svc.ds.Host == \"\" {\n\t\tsvc.ds.Host = constants.DefaultHost\n\t}\n\tif svc.ds.Port == 0 {\n\t\tsvc.ds.Port = constants.DefaultKafkaPort\n\t}\n\n\t// data source password\n\tpwd, err := svc.modelSvc.GetPasswordById(svc.ds.Id)\n\tif err == nil {\n\t\tsvc.ds.Password, err = utils.DecryptAES(pwd.Password)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data collection\n\tsvc.dc, err = svc.modelSvc.GetDataCollectionById(colId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nfunc (svc *KafkaService) Index(fields []string) {\n\t// TODO: implement me\n}\n\nfunc (svc *KafkaService) SetTime(t time.Time) {\n\tsvc.t = t\n}\n\nfunc (svc *KafkaService) GetTime() (t time.Time) {\n\treturn svc.t\n}\n"
  },
  {
    "path": "core/ds/mongo.go",
    "content": "package ds\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tutils2 \"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"time\"\n)\n\ntype MongoService struct {\n\t// dependencies\n\tmodelSvc service.ModelService\n\n\t// internals\n\tdc  *models.DataCollection // models.DataCollection\n\tds  *models.DataSource     // models.DataSource\n\tc   *mongo2.Client\n\tdb  *mongo2.Database\n\tcol *mongo.Col\n\tt   time.Time\n}\n\nfunc (svc *MongoService) Insert(records ...interface{}) (err error) {\n\t_, err = svc.col.InsertMany(records)\n\treturn err\n}\n\nfunc (svc *MongoService) List(query generic.ListQuery, opts *generic.ListOptions) (results []interface{}, err error) {\n\tvar docs []models.Result\n\tif err := svc.col.Find(utils.GetMongoQuery(query), utils.GetMongoOpts(opts)).All(&docs); err != nil {\n\t\treturn nil, err\n\t}\n\tfor i := range docs {\n\t\tresults = append(results, &docs[i])\n\t}\n\treturn results, nil\n}\n\nfunc (svc *MongoService) Count(query generic.ListQuery) (n int, err error) {\n\treturn svc.col.Count(utils.GetMongoQuery(query))\n}\n\nfunc NewDataSourceMongoService(colId primitive.ObjectID, dsId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &MongoService{}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// data source\n\tif dsId.IsZero() {\n\t\tsvc.ds = &models.DataSource{}\n\t} else {\n\t\tsvc.ds, err = svc.modelSvc.GetDataSourceById(dsId)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data source defaults\n\tif svc.ds.Host == \"\" {\n\t\tsvc.ds.Host = constants.DefaultHost\n\t}\n\tif svc.ds.Port == 0 {\n\t\tsvc.ds.Port = constants.DefaultMongoPort\n\t}\n\n\t// data source password\n\tpwd, err := svc.modelSvc.GetPasswordById(svc.ds.Id)\n\tif err == nil {\n\t\tsvc.ds.Password, err = utils.DecryptAES(pwd.Password)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data collection\n\tsvc.dc, err = svc.modelSvc.GetDataCollectionById(colId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// mongo client\n\tsvc.c, err = utils2.GetMongoClient(svc.ds)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// mongo database\n\tsvc.db = mongo.GetMongoDb(svc.ds.Database, mongo.WithDbClient(svc.c))\n\n\t// mongo col\n\tsvc.col = mongo.GetMongoColWithDb(svc.dc.Name, svc.db)\n\n\treturn svc, nil\n}\n\nfunc (svc *MongoService) Index(fields []string) {\n\t// TODO: implement me\n}\n\nfunc (svc *MongoService) SetTime(t time.Time) {\n\tsvc.t = t\n}\n\nfunc (svc *MongoService) GetTime() (t time.Time) {\n\treturn svc.t\n}\n"
  },
  {
    "path": "core/ds/mssql.go",
    "content": "package ds\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tutils2 \"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype MssqlService struct {\n\tSqlService\n}\n\nfunc NewDataSourceMssqlService(colId primitive.ObjectID, dsId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &MssqlService{}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// data source\n\tif dsId.IsZero() {\n\t\tsvc.ds = &models.DataSource{}\n\t} else {\n\t\tsvc.ds, err = svc.modelSvc.GetDataSourceById(dsId)\n\t\tif err != nil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t}\n\n\t// data source defaults\n\tif svc.ds.Host == \"\" {\n\t\tsvc.ds.Host = constants.DefaultHost\n\t}\n\tif svc.ds.Port == 0 {\n\t\tsvc.ds.Port = constants.DefaultMssqlPort\n\t}\n\n\t// data source password\n\tpwd, err := svc.modelSvc.GetPasswordById(svc.ds.Id)\n\tif err == nil {\n\t\tsvc.ds.Password, err = utils.DecryptAES(pwd.Password)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data collection\n\tsvc.dc, err = svc.modelSvc.GetDataCollectionById(colId)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// session\n\tsvc.s, err = utils2.GetMssqlSession(svc.ds)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// collection\n\tsvc.col = svc.s.Collection(svc.dc.Name)\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/ds/mssql_test.go",
    "content": "package ds\n\nimport \"testing\"\n\nfunc TestNewDataSourceMssqlService(t *testing.T) {\n\tt.Run(\"insert\", func(t *testing.T) {\n\t})\n}\n"
  },
  {
    "path": "core/ds/mysql.go",
    "content": "package ds\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tutils2 \"github.com/crawlab-team/crawlab/core/utils\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype MysqlService struct {\n\tSqlService\n}\n\nfunc NewDataSourceMysqlService(colId primitive.ObjectID, dsId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &MysqlService{}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// data source\n\tif dsId.IsZero() {\n\t\tsvc.ds = &models.DataSource{}\n\t} else {\n\t\tsvc.ds, err = svc.modelSvc.GetDataSourceById(dsId)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data source defaults\n\tif svc.ds.Host == \"\" {\n\t\tsvc.ds.Host = constants.DefaultHost\n\t}\n\tif svc.ds.Port == 0 {\n\t\tsvc.ds.Port = constants.DefaultMysqlPort\n\t}\n\n\t// data source password\n\tpwd, err := svc.modelSvc.GetPasswordById(svc.ds.Id)\n\tif err == nil {\n\t\tsvc.ds.Password, err = utils.DecryptAES(pwd.Password)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\t// data collection\n\tsvc.dc, err = svc.modelSvc.GetDataCollectionById(colId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// session\n\tsvc.s, err = utils2.GetMysqlSession(svc.ds)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// collection\n\tsvc.col = svc.s.Collection(svc.dc.Name)\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/ds/options.go",
    "content": "package ds\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype DataSourceServiceOption func(svc interfaces.DataSourceService)\n\nfunc WithMonitorInterval(duration time.Duration) DataSourceServiceOption {\n\treturn func(svc interfaces.DataSourceService) {\n\t\tsvc.SetMonitorInterval(duration)\n\t}\n}\n"
  },
  {
    "path": "core/ds/postgresql.go",
    "content": "package ds\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tutils2 \"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype PostgresqlService struct {\n\tSqlService\n}\n\nfunc NewDataSourcePostgresqlService(colId primitive.ObjectID, dsId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &PostgresqlService{}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// data source\n\tif dsId.IsZero() {\n\t\tsvc.ds = &models.DataSource{}\n\t} else {\n\t\tsvc.ds, err = svc.modelSvc.GetDataSourceById(dsId)\n\t\tif err != nil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t}\n\n\t// data source defaults\n\tif svc.ds.Host == \"\" {\n\t\tsvc.ds.Host = constants.DefaultHost\n\t}\n\tif svc.ds.Port == 0 {\n\t\tsvc.ds.Port = constants.DefaultPostgresqlPort\n\t}\n\n\t// data source password\n\tpwd, err := svc.modelSvc.GetPasswordById(svc.ds.Id)\n\tif err == nil {\n\t\tsvc.ds.Password, err = utils.DecryptAES(pwd.Password)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// data collection\n\tsvc.dc, err = svc.modelSvc.GetDataCollectionById(colId)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// session\n\tsvc.s, err = utils2.GetPostgresqlSession(svc.ds)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// collection\n\tsvc.col = svc.s.Collection(svc.dc.Name)\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/ds/service.go",
    "content": "package ds\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\tconstants2 \"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/result\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tutils2 \"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype Service struct {\n\t// dependencies\n\tmodelSvc service.ModelService\n\n\t// internals\n\ttimeout         time.Duration\n\tmonitorInterval time.Duration\n\tstopped         bool\n}\n\nfunc (svc *Service) Init() {\n\t// result service registry\n\treg := result.GetResultServiceRegistry()\n\n\t// register result services\n\treg.Register(constants.DataSourceTypeMongo, NewDataSourceMongoService)\n\treg.Register(constants.DataSourceTypeMysql, NewDataSourceMysqlService)\n\treg.Register(constants.DataSourceTypePostgresql, NewDataSourcePostgresqlService)\n\treg.Register(constants.DataSourceTypeMssql, NewDataSourceMssqlService)\n\treg.Register(constants.DataSourceTypeSqlite, NewDataSourceSqliteService)\n\treg.Register(constants.DataSourceTypeCockroachdb, NewDataSourceCockroachdbService)\n\treg.Register(constants.DataSourceTypeElasticSearch, NewDataSourceElasticsearchService)\n\treg.Register(constants.DataSourceTypeKafka, NewDataSourceKafkaService)\n}\n\nfunc (svc *Service) Start() {\n\t// start monitoring\n\tgo svc.Monitor()\n}\n\nfunc (svc *Service) Wait() {\n\tutils.DefaultWait()\n}\n\nfunc (svc *Service) Stop() {\n\tsvc.stopped = true\n}\n\nfunc (svc *Service) ChangePassword(id primitive.ObjectID, password string) (err error) {\n\tp, err := svc.modelSvc.GetPasswordById(id)\n\tif err == nil {\n\t\t// exists, save\n\t\tencryptedPassword, err := utils.EncryptAES(password)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp.Password = encryptedPassword\n\t\tif err := delegate.NewModelDelegate(p).Save(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t} else if err.Error() == mongo.ErrNoDocuments.Error() {\n\t\t// not exists, add\n\t\tencryptedPassword, err := utils.EncryptAES(password)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp = &models.Password{\n\t\t\tId:       id,\n\t\t\tPassword: encryptedPassword,\n\t\t}\n\t\tif err := delegate.NewModelDelegate(p).Add(); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t} else {\n\t\t// error\n\t\treturn err\n\t}\n}\n\nfunc (svc *Service) Monitor() {\n\tfor {\n\t\t// return if stopped\n\t\tif svc.stopped {\n\t\t\treturn\n\t\t}\n\n\t\t// monitor\n\t\tif err := svc.monitor(); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t}\n\n\t\t// wait\n\t\ttime.Sleep(svc.monitorInterval)\n\t}\n}\n\nfunc (svc *Service) CheckStatus(id primitive.ObjectID) (err error) {\n\tds, err := svc.modelSvc.GetDataSourceById(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn svc.checkStatus(ds, true)\n}\n\nfunc (svc *Service) SetTimeout(duration time.Duration) {\n\tsvc.timeout = duration\n}\n\nfunc (svc *Service) SetMonitorInterval(duration time.Duration) {\n\tsvc.monitorInterval = duration\n}\n\nfunc (svc *Service) monitor() (err error) {\n\t// start\n\ttic := time.Now()\n\tlog.Debugf(\"[DataSourceService] start monitoring\")\n\n\t// data source list\n\tdsList, err := svc.modelSvc.GetDataSourceList(nil, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// waiting group\n\twg := sync.WaitGroup{}\n\twg.Add(len(dsList))\n\n\t// iterate data source list\n\tfor _, ds := range dsList {\n\t\t// async operation\n\t\tgo func(ds models.DataSource) {\n\t\t\t// check status and save\n\t\t\t_ = svc.checkStatus(&ds, true)\n\n\t\t\t// release\n\t\t\twg.Done()\n\t\t}(ds)\n\t}\n\n\t// wait\n\twg.Wait()\n\n\t// finish\n\ttoc := time.Now()\n\tlog.Debugf(\"[DataSourceService] finished monitoring. elapsed: %d ms\", (toc.Sub(tic)).Milliseconds())\n\n\treturn nil\n}\n\nfunc (svc *Service) checkStatus(ds *models.DataSource, save bool) (err error) {\n\t// password\n\tif ds.Password == \"\" {\n\t\tpwd, err := svc.modelSvc.GetPasswordById(ds.Id)\n\t\tif err == nil {\n\t\t\tds.Password, err = utils.DecryptAES(pwd.Password)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else if err.Error() != mongo.ErrNoDocuments.Error() {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\t// check status\n\tif err := svc._checkStatus(ds); err != nil {\n\t\tds.Status = constants2.DataSourceStatusOffline\n\t\tds.Error = err.Error()\n\t} else {\n\t\tds.Status = constants2.DataSourceStatusOnline\n\t\tds.Error = \"\"\n\t}\n\n\t// save\n\tif save {\n\t\treturn svc._save(ds)\n\t}\n\n\treturn nil\n}\n\nfunc (svc *Service) _save(ds *models.DataSource) (err error) {\n\tlog.Debugf(\"[DataSourceService] saving data source: name=%s, type=%s, status=%s, error=%s\", ds.Name, ds.Type, ds.Status, ds.Error)\n\treturn delegate.NewModelDelegate(ds).Save()\n}\n\nfunc (svc *Service) _checkStatus(ds *models.DataSource) (err error) {\n\tswitch ds.Type {\n\tcase constants.DataSourceTypeMongo:\n\t\t_, err := utils2.GetMongoClientWithTimeout(ds, svc.timeout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\tcase constants.DataSourceTypeMysql:\n\t\ts, err := utils2.GetMysqlSessionWithTimeout(ds, svc.timeout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif s != nil {\n\t\t\ts.Close()\n\t\t}\n\tcase constants.DataSourceTypePostgresql:\n\t\ts, err := utils2.GetPostgresqlSessionWithTimeout(ds, svc.timeout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif s != nil {\n\t\t\ts.Close()\n\t\t}\n\tcase constants.DataSourceTypeMssql:\n\t\ts, err := utils2.GetMssqlSessionWithTimeout(ds, svc.timeout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif s != nil {\n\t\t\ts.Close()\n\t\t}\n\tcase constants.DataSourceTypeSqlite:\n\t\ts, err := utils2.GetSqliteSessionWithTimeout(ds, svc.timeout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif s != nil {\n\t\t\ts.Close()\n\t\t}\n\tcase constants.DataSourceTypeCockroachdb:\n\t\ts, err := utils2.GetCockroachdbSessionWithTimeout(ds, svc.timeout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif s != nil {\n\t\t\ts.Close()\n\t\t}\n\tcase constants.DataSourceTypeElasticSearch:\n\t\t_, err := utils2.GetElasticsearchClientWithTimeout(ds, svc.timeout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\tcase constants.DataSourceTypeKafka:\n\t\tc, err := utils2.GetKafkaConnectionWithTimeout(ds, svc.timeout)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif c != nil {\n\t\t\tc.Close()\n\t\t}\n\tdefault:\n\t\tlog.Warnf(\"[DataSourceService] invalid data source type: %s\", ds.Type)\n\t}\n\treturn nil\n}\n\nfunc NewDataSourceService(opts ...DataSourceServiceOption) (svc2 interfaces.DataSourceService, err error) {\n\t// service\n\tsvc := &Service{\n\t\tmonitorInterval: 15 * time.Second,\n\t\ttimeout:         10 * time.Second,\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(svc)\n\t}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(modelSvc service.ModelService) {\n\t\tsvc.modelSvc = modelSvc\n\t}); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// initialize\n\tsvc.Init()\n\n\t// start\n\tsvc.Start()\n\n\treturn svc, nil\n}\n\nvar _dsSvc interfaces.DataSourceService\n\nfunc GetDataSourceService() (svc interfaces.DataSourceService, err error) {\n\tif _dsSvc != nil {\n\t\treturn _dsSvc, nil\n\t}\n\tsvc, err = NewDataSourceService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t_dsSvc = svc\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/ds/sql.go",
    "content": "package ds\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tutils2 \"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/upper/db/v4\"\n\t\"time\"\n)\n\ntype SqlService struct {\n\t// dependencies\n\tmodelSvc service.ModelService\n\n\t// internals\n\tds  *models.DataSource\n\tdc  *models.DataCollection\n\ts   db.Session\n\tcol db.Collection\n\tt   time.Time\n}\n\nfunc (svc *SqlService) Insert(records ...interface{}) (err error) {\n\tfor _, d := range records {\n\t\tvar r entity.Result\n\t\tswitch d.(type) {\n\t\tcase entity.Result:\n\t\t\tr = d.(entity.Result)\n\t\tdefault:\n\t\t\tcontinue\n\t\t}\n\t\t_r := r.Flatten()\n\t\tif _, err = svc.col.Insert(_r); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\tcontinue\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (svc *SqlService) List(query generic.ListQuery, opts *generic.ListOptions) (results []interface{}, err error) {\n\tvar docs []entity.Result\n\tif err := svc.col.Find(utils2.GetSqlQuery(query)).\n\t\tOffset(opts.Skip).\n\t\tLimit(opts.Limit).All(&docs); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tfor i := range docs {\n\t\td := docs[i].ToJSON()\n\t\tresults = append(results, &d)\n\t}\n\treturn results, nil\n}\n\nfunc (svc *SqlService) Count(query generic.ListQuery) (n int, err error) {\n\tnInt64, err := svc.col.Find(utils2.GetSqlQuery(query)).Count()\n\tif err != nil {\n\t\treturn n, err\n\t}\n\treturn int(nInt64), nil\n}\n\nfunc (svc *SqlService) Index(fields []string) {\n\t// TODO: implement me\n}\n\nfunc (svc *SqlService) SetTime(t time.Time) {\n\tsvc.t = t\n}\n\nfunc (svc *SqlService) GetTime() (t time.Time) {\n\treturn svc.t\n}\n"
  },
  {
    "path": "core/ds/sql_options.go",
    "content": "package ds\n\ntype SqlOptions struct {\n\tDefaultHost string\n\tDefaultPort string\n}\n"
  },
  {
    "path": "core/ds/sqlite.go",
    "content": "package ds\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tutils2 \"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype SqliteService struct {\n\tSqlService\n}\n\nfunc NewDataSourceSqliteService(colId primitive.ObjectID, dsId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &SqliteService{}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// data source\n\tif dsId.IsZero() {\n\t\tsvc.ds = &models.DataSource{}\n\t} else {\n\t\tsvc.ds, err = svc.modelSvc.GetDataSourceById(dsId)\n\t\tif err != nil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t}\n\n\t// data collection\n\tsvc.dc, err = svc.modelSvc.GetDataCollectionById(colId)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// session\n\tsvc.s, err = utils2.GetSqliteSession(svc.ds)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// collection\n\tsvc.col = svc.s.Collection(svc.dc.Name)\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/entity/address.go",
    "content": "package entity\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype Address struct {\n\tHost string\n\tPort string\n}\n\nfunc (a *Address) String() (res string) {\n\treturn fmt.Sprintf(\"%s:%s\", a.Host, a.Port)\n}\n\nfunc (a *Address) IsEmpty() (res bool) {\n\treturn a.Host == \"\" || a.Port == \"\"\n}\n\nfunc (a *Address) Value() (res interface{}) {\n\treturn a\n}\n\ntype AddressOptions struct {\n\tHost string\n\tPort string\n}\n\nfunc NewAddress(opts *AddressOptions) (res *Address) {\n\tif opts == nil {\n\t\topts = &AddressOptions{}\n\t}\n\t//if opts.Host == \"\" {\n\t//\topts.Host = \"localhost\"\n\t//}\n\tif opts.Port == \"\" {\n\t\topts.Port = \"9666\"\n\t}\n\treturn &Address{\n\t\tHost: opts.Host,\n\t\tPort: opts.Port,\n\t}\n}\n\nfunc NewAddressFromString(address string) (res *Address, err error) {\n\tparts := strings.Split(address, \":\")\n\tif len(parts) == 1 {\n\t\treturn NewAddress(&AddressOptions{Host: parts[0]}), nil\n\t} else if len(parts) == 2 {\n\t\treturn NewAddress(&AddressOptions{Host: parts[0], Port: parts[1]}), nil\n\t} else {\n\t\treturn nil, errors.New(fmt.Sprintf(\"parsing address error: %v\", err))\n\t}\n}\n"
  },
  {
    "path": "core/entity/color.go",
    "content": "package entity\n\ntype Color struct {\n\tName string `json:\"name\"`\n\tHex  string `json:\"hex\"`\n}\n\nfunc (c *Color) GetHex() string {\n\treturn c.Hex\n}\n\nfunc (c *Color) GetName() string {\n\treturn c.Name\n}\n\nfunc (c *Color) Value() interface{} {\n\treturn c\n}\n"
  },
  {
    "path": "core/entity/common.go",
    "content": "package entity\n\nimport \"strconv\"\n\ntype Page struct {\n\tSkip     int\n\tLimit    int\n\tPageNum  int\n\tPageSize int\n}\n\nfunc (p *Page) GetPage(pageNum string, pageSize string) {\n\tp.PageNum, _ = strconv.Atoi(pageNum)\n\tp.PageSize, _ = strconv.Atoi(pageSize)\n\tp.Skip = p.PageSize * (p.PageNum - 1)\n\tp.Limit = p.PageSize\n}\n"
  },
  {
    "path": "core/entity/config_spider.go",
    "content": "package entity\n\ntype ConfigSpiderData struct {\n\t// 通用\n\tName        string `yaml:\"name\" json:\"name\"`\n\tDisplayName string `yaml:\"display_name\" json:\"display_name\"`\n\tCol         string `yaml:\"col\" json:\"col\"`\n\tRemark      string `yaml:\"remark\" json:\"remark\"`\n\tType        string `yaml:\"type\" bson:\"type\"`\n\n\t// 可配置爬虫\n\tEngine     string            `yaml:\"engine\" json:\"engine\"`\n\tStartUrl   string            `yaml:\"start_url\" json:\"start_url\"`\n\tStartStage string            `yaml:\"start_stage\" json:\"start_stage\"`\n\tStages     []Stage           `yaml:\"stages\" json:\"stages\"`\n\tSettings   map[string]string `yaml:\"settings\" json:\"settings\"`\n\n\t// 自定义爬虫\n\tCmd string `yaml:\"cmd\" json:\"cmd\"`\n}\n\ntype Stage struct {\n\tName      string  `yaml:\"name\" json:\"name\"`\n\tIsList    bool    `yaml:\"is_list\" json:\"is_list\"`\n\tListCss   string  `yaml:\"list_css\" json:\"list_css\"`\n\tListXpath string  `yaml:\"list_xpath\" json:\"list_xpath\"`\n\tPageCss   string  `yaml:\"page_css\" json:\"page_css\"`\n\tPageXpath string  `yaml:\"page_xpath\" json:\"page_xpath\"`\n\tPageAttr  string  `yaml:\"page_attr\" json:\"page_attr\"`\n\tFields    []Field `yaml:\"fields\" json:\"fields\"`\n}\n\ntype Field struct {\n\tName      string `yaml:\"name\" json:\"name\"`\n\tCss       string `yaml:\"css\" json:\"css\"`\n\tXpath     string `yaml:\"xpath\" json:\"xpath\"`\n\tAttr      string `yaml:\"attr\" json:\"attr\"`\n\tNextStage string `yaml:\"next_stage\" json:\"next_stage\"`\n\tRemark    string `yaml:\"remark\" json:\"remark\"`\n}\n"
  },
  {
    "path": "core/entity/data_field.go",
    "content": "package entity\n\ntype DataField struct {\n\tKey  string `json:\"key\" bson:\"key\"`\n\tType string `json:\"type\" bson:\"type\"`\n}\n"
  },
  {
    "path": "core/entity/dependency.go",
    "content": "package entity\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype DependencyResult struct {\n\tName          string               `json:\"name,omitempty\" bson:\"name,omitempty\"`\n\tNodeIds       []primitive.ObjectID `json:\"node_ids,omitempty\" bson:\"node_ids,omitempty\"`\n\tVersions      []string             `json:\"versions,omitempty\" bson:\"versions,omitempty\"`\n\tLatestVersion string               `json:\"latest_version\" bson:\"latest_version\"`\n\tCount         int                  `json:\"count,omitempty\" bson:\"count,omitempty\"`\n\tUpgradable    bool                 `json:\"upgradable\" bson:\"upgradable\"`\n\tDowngradable  bool                 `json:\"downgradable\" bson:\"downgradable\"`\n\tInstallable   bool                 `json:\"installable\" bson:\"installable\"`\n}\n"
  },
  {
    "path": "core/entity/doc.go",
    "content": "package entity\n\ntype DocItem struct {\n\tTitle    string    `json:\"title\"`\n\tUrl      string    `json:\"url\"`\n\tPath     string    `json:\"path\"`\n\tChildren []DocItem `json:\"children\"`\n}\n"
  },
  {
    "path": "core/entity/es.go",
    "content": "package entity\n\n/* ElasticsearchResponseData JSON format\n{\n  \"took\" : 6,\n  \"timed_out\" : false,\n  \"_shards\" : {\n    \"total\" : 1,\n    \"successful\" : 1,\n    \"skipped\" : 0,\n    \"failed\" : 0\n  },\n  \"hits\" : {\n    \"total\" : {\n      \"value\" : 60,\n      \"relation\" : \"eq\"\n    },\n    \"max_score\" : 1.0,\n    \"hits\" : [\n      {\n        \"_index\" : \"test_table\",\n        \"_id\" : \"c39ad9a2-9a37-49fb-b7ea-f1b55913e0af\",\n        \"_score\" : 1.0,\n        \"_source\" : {\n          \"_tid\" : \"62524ac7f5f99e7ef594de64\",\n          \"author\" : \"James Baldwin\",\n          \"tags\" : [\n            \"love\"\n          ],\n          \"text\" : \"“Love does not begin and end the way we seem to think it does. Love is a battle, love is a war; love is a growing up.”\"\n        }\n      }\n    ]\n  }\n}\n*/\n\ntype ElasticsearchResponseData struct {\n\tTook    int64 `json:\"took\"`\n\tTimeout bool  `json:\"timeout\"`\n\tHits    struct {\n\t\tTotal struct {\n\t\t\tValue    int64  `json:\"value\"`\n\t\t\tRelation string `json:\"relation\"`\n\t\t} `json:\"total\"`\n\t\tMaxScore float64 `json:\"max_score\"`\n\t\tHits     []struct {\n\t\t\tIndex  string      `json:\"_index\"`\n\t\t\tId     string      `json:\"_id\"`\n\t\t\tScore  float64     `json:\"_score\"`\n\t\t\tSource interface{} `json:\"_source\"`\n\t\t} `json:\"hits\"`\n\t} `json:\"hits\"`\n}\n"
  },
  {
    "path": "core/entity/event.go",
    "content": "package entity\n\ntype EventData struct {\n\tEvent string\n\tData  interface{}\n}\n\nfunc (d *EventData) GetEvent() string {\n\treturn d.Event\n}\n\nfunc (d *EventData) GetData() interface{} {\n\treturn d.Data\n}\n"
  },
  {
    "path": "core/entity/export.go",
    "content": "package entity\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype Export struct {\n\tId           string            `json:\"id\"`\n\tType         string            `json:\"type\"`\n\tTarget       string            `json:\"target\"`\n\tFilter       interfaces.Filter `json:\"filter\"`\n\tStatus       string            `json:\"status\"`\n\tStartTs      time.Time         `json:\"start_ts\"`\n\tEndTs        time.Time         `json:\"end_ts\"`\n\tFileName     string            `json:\"file_name\"`\n\tDownloadPath string            `json:\"-\"`\n\tLimit        int               `json:\"-\"`\n}\n\nfunc (e *Export) GetId() string {\n\treturn e.Id\n}\n\nfunc (e *Export) GetType() string {\n\treturn e.Type\n}\n\nfunc (e *Export) GetTarget() string {\n\treturn e.Target\n}\n\nfunc (e *Export) GetFilter() interfaces.Filter {\n\treturn e.Filter\n}\n\nfunc (e *Export) GetStatus() string {\n\treturn e.Status\n}\n\nfunc (e *Export) GetStartTs() time.Time {\n\treturn e.StartTs\n}\n\nfunc (e *Export) GetEndTs() time.Time {\n\treturn e.EndTs\n}\n\nfunc (e *Export) GetDownloadPath() string {\n\treturn e.DownloadPath\n}\n"
  },
  {
    "path": "core/entity/filter.go",
    "content": "package entity\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"reflect\"\n)\n\ntype Condition struct {\n\tKey   string      `json:\"key\"`\n\tOp    string      `json:\"op\"`\n\tValue interface{} `json:\"value\"`\n}\n\nfunc (c *Condition) GetKey() (key string) {\n\treturn c.Key\n}\n\nfunc (c *Condition) SetKey(key string) {\n\tc.Key = key\n}\n\nfunc (c *Condition) GetOp() (op string) {\n\treturn c.Op\n}\n\nfunc (c *Condition) SetOp(op string) {\n\tc.Op = op\n}\n\nfunc (c *Condition) GetValue() (value interface{}) {\n\treturn c.Value\n}\n\nfunc (c *Condition) SetValue(value interface{}) {\n\tc.Value = value\n}\n\ntype Filter struct {\n\tIsOr       bool         `form:\"is_or\" url:\"is_or\"`\n\tConditions []*Condition `json:\"conditions\"`\n}\n\nfunc (f *Filter) GetIsOr() (isOr bool) {\n\treturn f.IsOr\n}\n\nfunc (f *Filter) SetIsOr(isOr bool) {\n\tf.IsOr = isOr\n}\n\nfunc (f *Filter) GetConditions() (conditions []interfaces.FilterCondition) {\n\tfor _, c := range f.Conditions {\n\t\tconditions = append(conditions, c)\n\t}\n\treturn conditions\n}\n\nfunc (f *Filter) SetConditions(conditions []interfaces.FilterCondition) {\n\tf.Conditions = make([]*Condition, len(conditions))\n\tfor _, c := range conditions {\n\t\tf.Conditions = append(f.Conditions, c.(*Condition))\n\t}\n}\n\nfunc (f *Filter) IsNil() (ok bool) {\n\tval := reflect.ValueOf(f)\n\treturn val.IsNil()\n}\n"
  },
  {
    "path": "core/entity/filter_select_option.go",
    "content": "package entity\n\ntype FilterSelectOption struct {\n\tValue interface{} `json:\"value\" bson:\"value\"`\n\tLabel string      `json:\"label\" bson:\"label\"`\n}\n"
  },
  {
    "path": "core/entity/fs_file_info.go",
    "content": "package entity\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"os\"\n\t\"time\"\n)\n\ntype FsFileInfo struct {\n\tName      string                  `json:\"name\"`      // file name\n\tPath      string                  `json:\"path\"`      // file path\n\tFullPath  string                  `json:\"full_path\"` // file full path\n\tExtension string                  `json:\"extension\"` // file extension\n\tIsDir     bool                    `json:\"is_dir\"`    // whether it is directory\n\tFileSize  int64                   `json:\"file_size\"` // file size (bytes)\n\tChildren  []interfaces.FsFileInfo `json:\"children\"`  // children for sub-directory\n\tModTime   time.Time               `json:\"mod_time\"`  // modification time\n\tMode      os.FileMode             `json:\"mode\"`      // file mode\n\tHash      string                  `json:\"hash\"`      // file hash\n}\n\nfunc (f *FsFileInfo) GetName() string {\n\treturn f.Name\n}\n\nfunc (f *FsFileInfo) GetPath() string {\n\treturn f.Path\n}\n\nfunc (f *FsFileInfo) GetFullPath() string {\n\treturn f.FullPath\n}\n\nfunc (f *FsFileInfo) GetExtension() string {\n\treturn f.Extension\n}\n\nfunc (f *FsFileInfo) GetIsDir() bool {\n\treturn f.IsDir\n}\n\nfunc (f *FsFileInfo) GetFileSize() int64 {\n\treturn f.FileSize\n}\n\nfunc (f *FsFileInfo) GetModTime() time.Time {\n\treturn f.ModTime\n}\n\nfunc (f *FsFileInfo) GetMode() os.FileMode {\n\treturn f.Mode\n}\n\nfunc (f *FsFileInfo) GetHash() string {\n\treturn f.Hash\n}\n\nfunc (f *FsFileInfo) GetChildren() []interfaces.FsFileInfo {\n\treturn f.Children\n}\n"
  },
  {
    "path": "core/entity/git.go",
    "content": "package entity\n\ntype GitPayload struct {\n\tPaths         []string `json:\"paths\"`\n\tCommitMessage string   `json:\"commit_message\"`\n\tBranch        string   `json:\"branch\"`\n\tTag           string   `json:\"tag\"`\n}\n\ntype GitConfig struct {\n\tUrl string `json:\"url\" bson:\"url\"`\n}\n"
  },
  {
    "path": "core/entity/grpc_base_service_message.go",
    "content": "package entity\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\ntype GrpcBaseServiceMessage struct {\n\tModelId interfaces.ModelId `json:\"id\"`\n\tData    []byte             `json:\"d\"`\n}\n\nfunc (msg *GrpcBaseServiceMessage) GetModelId() interfaces.ModelId {\n\treturn msg.ModelId\n}\n\nfunc (msg *GrpcBaseServiceMessage) GetData() []byte {\n\treturn msg.Data\n}\n\nfunc (msg *GrpcBaseServiceMessage) ToBytes() (data []byte) {\n\tdata, err := json.Marshal(*msg)\n\tif err != nil {\n\t\t_ = trace.TraceError(err)\n\t\treturn data\n\t}\n\treturn data\n}\n"
  },
  {
    "path": "core/entity/grpc_base_service_params.go",
    "content": "package entity\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype GrpcBaseServiceParams struct {\n\tQuery       bson.M             `json:\"q\"`\n\tId          primitive.ObjectID `json:\"id\"`\n\tUpdate      bson.M             `json:\"u\"`\n\tDoc         interfaces.Model   `json:\"d\"`\n\tFields      []string           `json:\"f\"`\n\tFindOptions *mongo.FindOptions `json:\"o\"`\n\tDocs        []interface{}      `json:\"dl\"`\n\tUser        interfaces.User    `json:\"U\"`\n}\n\nfunc (params *GrpcBaseServiceParams) Value() interface{} {\n\treturn params\n}\n"
  },
  {
    "path": "core/entity/grpc_delegate_message.go",
    "content": "package entity\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\ntype GrpcDelegateMessage struct {\n\tModelId interfaces.ModelId             `json:\"id\"`\n\tMethod  interfaces.ModelDelegateMethod `json:\"m\"`\n\tData    []byte                         `json:\"d\"`\n}\n\nfunc (msg *GrpcDelegateMessage) GetModelId() interfaces.ModelId {\n\treturn msg.ModelId\n}\n\nfunc (msg *GrpcDelegateMessage) GetMethod() interfaces.ModelDelegateMethod {\n\treturn msg.Method\n}\n\nfunc (msg *GrpcDelegateMessage) GetData() []byte {\n\treturn msg.Data\n}\n\nfunc (msg *GrpcDelegateMessage) ToBytes() (data []byte) {\n\tdata, err := json.Marshal(*msg)\n\tif err != nil {\n\t\t_ = trace.TraceError(err)\n\t\treturn data\n\t}\n\treturn data\n}\n"
  },
  {
    "path": "core/entity/grpc_event_service_message.go",
    "content": "package entity\n\ntype GrpcEventServiceMessage struct {\n\tType   string   `json:\"type\"`\n\tEvents []string `json:\"events\"`\n\tKey    string   `json:\"key\"`\n\tData   []byte   `json:\"data\"`\n}\n"
  },
  {
    "path": "core/entity/grpc_subscribe.go",
    "content": "package entity\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n)\n\ntype GrpcSubscribe struct {\n\tStream   interfaces.GrpcStream\n\tFinished chan bool\n}\n\nfunc (sub *GrpcSubscribe) GetStream() interfaces.GrpcStream {\n\treturn sub.Stream\n}\n\nfunc (sub *GrpcSubscribe) GetStreamBidirectional() interfaces.GrpcStreamBidirectional {\n\tstream, ok := sub.Stream.(interfaces.GrpcStreamBidirectional)\n\tif !ok {\n\t\treturn nil\n\t}\n\treturn stream\n}\n\nfunc (sub *GrpcSubscribe) GetFinished() chan bool {\n\treturn sub.Finished\n}\n"
  },
  {
    "path": "core/entity/http.go",
    "content": "package entity\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype Response struct {\n\tStatus  string      `json:\"status\"`\n\tMessage string      `json:\"message\"`\n\tData    interface{} `json:\"data\"`\n\tError   string      `json:\"error\"`\n}\n\ntype ListResponse struct {\n\tStatus  string      `json:\"status\"`\n\tMessage string      `json:\"message\"`\n\tTotal   int         `json:\"total\"`\n\tData    interface{} `json:\"data\"`\n\tError   string      `json:\"error\"`\n}\n\ntype ListRequestData struct {\n\tPageNum  int    `form:\"page_num\" json:\"page_num\"`\n\tPageSize int    `form:\"page_size\" json:\"page_size\"`\n\tSortKey  string `form:\"sort_key\" json:\"sort_key\"`\n\tStatus   string `form:\"status\" json:\"status\"`\n\tKeyword  string `form:\"keyword\" json:\"keyword\"`\n}\n\ntype BatchRequestPayload struct {\n\tIds []primitive.ObjectID `form:\"ids\" json:\"ids\"`\n}\n\ntype BatchRequestPayloadWithStringData struct {\n\tIds    []primitive.ObjectID `form:\"ids\" json:\"ids\"`\n\tData   string               `form:\"data\" json:\"data\"`\n\tFields []string             `form:\"fields\" json:\"fields\"`\n}\n\ntype FileRequestPayload struct {\n\tPath    string `json:\"path\" form:\"path\"`\n\tNewPath string `json:\"new_path\" form:\"new_path\"`\n\tData    string `json:\"data\" form:\"data\"`\n}\n"
  },
  {
    "path": "core/entity/model_delegate.go",
    "content": "package entity\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\ntype ModelDelegate struct {\n\tId       interfaces.ModelId       `json:\"id\"`\n\tColName  string                   `json:\"col_name\"`\n\tDoc      interfaces.Model         `json:\"doc\"`\n\tArtifact interfaces.ModelArtifact `json:\"a\"`\n\tUser     interfaces.User          `json:\"u\"`\n}\n"
  },
  {
    "path": "core/entity/model_info.go",
    "content": "package entity\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\ntype ModelInfo struct {\n\tId      interfaces.ModelId\n\tColName string\n}\n"
  },
  {
    "path": "core/entity/node.go",
    "content": "package entity\n\ntype NodeInfo struct {\n\tKey         string `json:\"key\"`\n\tIsMaster    bool   `json:\"is_master\"`\n\tName        string `json:\"name\"`\n\tIp          string `json:\"ip\"`\n\tMac         string `json:\"mac\"`\n\tHostname    string `json:\"hostname\"`\n\tDescription string `json:\"description\"`\n\tAuthKey     string `json:\"auth_key\"`\n\tMaxRunners  int    `json:\"max_runners\"`\n}\n\nfunc (n NodeInfo) Value() interface{} {\n\treturn n\n}\n"
  },
  {
    "path": "core/entity/notification_variable.go",
    "content": "package entity\n\nimport \"fmt\"\n\ntype NotificationVariable struct {\n\tCategory string `json:\"category\"`\n\tName     string `json:\"name\"`\n}\n\nfunc (v *NotificationVariable) GetKey() string {\n\treturn fmt.Sprintf(\"${%s:%s}\", v.Category, v.Name)\n}\n"
  },
  {
    "path": "core/entity/pagination.go",
    "content": "package entity\n\nimport \"github.com/crawlab-team/crawlab/core/constants\"\n\ntype Pagination struct {\n\tPage int `form:\"page\" url:\"page\"`\n\tSize int `form:\"size\" url:\"size\"`\n}\n\nfunc (p *Pagination) IsZero() (ok bool) {\n\treturn p.Page == 0 &&\n\t\tp.Size == 0\n}\n\nfunc (p *Pagination) IsDefault() (ok bool) {\n\treturn p.Page == constants.PaginationDefaultPage &&\n\t\tp.Size == constants.PaginationDefaultSize\n}\n"
  },
  {
    "path": "core/entity/result.go",
    "content": "package entity\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Result map[string]interface{}\n\nfunc (r Result) Value() map[string]interface{} {\n\treturn r\n}\n\nfunc (r Result) SetValue(key string, value interface{}) {\n\tr[key] = value\n}\n\nfunc (r Result) GetValue(key string) (value interface{}) {\n\tvalue, _ = r[key]\n\treturn value\n}\n\nfunc (r Result) GetTaskId() (id primitive.ObjectID) {\n\t_tid, ok := r[constants.TaskKey]\n\tif !ok {\n\t\treturn id\n\t}\n\tswitch _tid.(type) {\n\tcase string:\n\t\toid, err := primitive.ObjectIDFromHex(_tid.(string))\n\t\tif err != nil {\n\t\t\treturn id\n\t\t}\n\t\treturn oid\n\tdefault:\n\t\treturn id\n\t}\n}\n\nfunc (r Result) SetTaskId(id primitive.ObjectID) {\n\tr[constants.TaskKey] = id\n}\n\nfunc (r Result) DenormalizeObjectId() (res Result) {\n\tfor k, v := range r {\n\t\tswitch v.(type) {\n\t\tcase primitive.ObjectID:\n\t\t\tr[k] = v.(primitive.ObjectID).Hex()\n\t\tcase Result:\n\t\t\tr[k] = v.(Result).DenormalizeObjectId()\n\t\t}\n\t}\n\treturn r\n}\n\nfunc (r Result) ToJSON() (res Result) {\n\tr = r.DenormalizeObjectId()\n\tfor k, v := range r {\n\t\tswitch v.(type) {\n\t\tcase []byte:\n\t\t\tr[k] = string(v.([]byte))\n\t\t}\n\t}\n\treturn r\n}\n\nfunc (r Result) Flatten() (res Result) {\n\tr = r.ToJSON()\n\tfor k, v := range r {\n\t\tswitch v.(type) {\n\t\tcase string,\n\t\t\tbool,\n\t\t\tuint, uint8, uint16, uint32, uint64,\n\t\t\tint, int8, int16, int32, int64,\n\t\t\tfloat32, float64:\n\t\tdefault:\n\t\t\tbytes, err := json.Marshal(v)\n\t\t\tif err != nil {\n\t\t\t\ttrace.PrintError(err)\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tr[k] = string(bytes)\n\t\t}\n\t}\n\treturn r\n}\n\nfunc (r Result) String() (s string) {\n\treturn string(r.Bytes())\n}\n\nfunc (r Result) Bytes() (bytes []byte) {\n\tbytes, err := json.Marshal(r.ToJSON())\n\tif err != nil {\n\t\treturn bytes\n\t}\n\treturn bytes\n}\n"
  },
  {
    "path": "core/entity/rpc.go",
    "content": "package entity\n\ntype RpcMessage struct {\n\tId      string            `json:\"id\"`      // 消息ID\n\tMethod  string            `json:\"method\"`  // 消息方法\n\tNodeId  string            `json:\"node_id\"` // 节点ID\n\tParams  map[string]string `json:\"params\"`  // 参数\n\tTimeout int               `json:\"timeout\"` // 超时\n\tResult  string            `json:\"result\"`  // 结果\n\tError   string            `json:\"error\"`   // 错误\n}\n"
  },
  {
    "path": "core/entity/sort.go",
    "content": "package entity\n\ntype Sort struct {\n\tKey       string `json:\"key\"`\n\tDirection string `json:\"d\"`\n}\n"
  },
  {
    "path": "core/entity/spider.go",
    "content": "package entity\n\ntype SpiderType struct {\n\tType  string `json:\"type\" bson:\"_id\"`\n\tCount int    `json:\"count\" bson:\"count\"`\n}\n\ntype ScrapySettingParam struct {\n\tKey   string      `json:\"key\"`\n\tValue interface{} `json:\"value\"`\n\tType  string      `json:\"type\"`\n}\n\ntype ScrapyItem struct {\n\tName   string   `json:\"name\"`\n\tFields []string `json:\"fields\"`\n}\n"
  },
  {
    "path": "core/entity/stats.go",
    "content": "package entity\n\ntype StatsDailyItem struct {\n\tDate    string `json:\"date\" bson:\"_id\"`\n\tTasks   int64  `json:\"tasks\" bson:\"tasks\"`\n\tResults int64  `json:\"results\" bson:\"results\"`\n}\n\ntype StatsTasksByStatusItem struct {\n\tStatus string `json:\"status\" bson:\"_id\"`\n\tTasks  int64  `json:\"tasks\" bson:\"tasks\"`\n}\n"
  },
  {
    "path": "core/entity/system_info.go",
    "content": "package entity\n\ntype SystemInfo struct {\n\tEdition string `json:\"edition\"` // edition. e.g. community / pro\n\tVersion string `json:\"version\"` // version. e.g. v0.6.0\n}\n"
  },
  {
    "path": "core/entity/task.go",
    "content": "package entity\n\nimport (\n\t\"encoding/json\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype TaskMessage struct {\n\tId    primitive.ObjectID `json:\"id\"`\n\tKey   string             `json:\"key\"`\n\tCmd   string             `json:\"cmd\"`\n\tParam string             `json:\"param\"`\n}\n\nfunc (m *TaskMessage) ToString() (string, error) {\n\tdata, err := json.Marshal(&m)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn string(data), err\n}\n\ntype TaskRunOptions struct {\n}\n\ntype StreamMessageTaskData struct {\n\tTaskId  primitive.ObjectID `json:\"task_id\"`\n\tRecords []Result           `json:\"data\"`\n\tLogs    []string           `json:\"logs\"`\n}\n"
  },
  {
    "path": "core/entity/translation.go",
    "content": "package entity\n\ntype Translation struct {\n\tLang  string `json:\"lang\"`\n\tKey   string `json:\"key\"`\n\tValue string `json:\"value\"`\n}\n\nfunc (t Translation) GetLang() (l string) {\n\treturn t.Lang\n}\n"
  },
  {
    "path": "core/entity/ttl_map.go",
    "content": "package entity\n\nimport (\n\t\"sync\"\n\t\"time\"\n)\n\ntype TTLMap struct {\n\tTTL time.Duration\n\n\tdata sync.Map\n}\n\ntype expireEntry struct {\n\tExpiresAt time.Time\n\tValue     interface{}\n}\n\nfunc (t *TTLMap) Store(key string, val interface{}) {\n\tt.data.Store(key, expireEntry{\n\t\tExpiresAt: time.Now().Add(t.TTL),\n\t\tValue:     val,\n\t})\n}\n\nfunc (t *TTLMap) Load(key string) (val interface{}) {\n\tentry, ok := t.data.Load(key)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\texpireEntry := entry.(expireEntry)\n\tif expireEntry.ExpiresAt.After(time.Now()) {\n\t\treturn nil\n\t}\n\n\treturn expireEntry.Value\n}\n\nfunc NewTTLMap(ttl time.Duration) (m *TTLMap) {\n\tm = &TTLMap{\n\t\tTTL: ttl,\n\t}\n\n\tgo func() {\n\t\tfor now := range time.Tick(time.Second) {\n\t\t\tm.data.Range(func(k, v interface{}) bool {\n\t\t\t\texpiresAt := v.(expireEntry).ExpiresAt\n\t\t\t\tif expiresAt.Before(now) {\n\t\t\t\t\tm.data.Delete(k)\n\t\t\t\t}\n\t\t\t\treturn true\n\t\t\t})\n\t\t}\n\t}()\n\n\treturn\n}\n"
  },
  {
    "path": "core/entity/version.go",
    "content": "package entity\n\ntype Release struct {\n\tName        string `json:\"name\"`\n\tDraft       bool   `json:\"draft\"`\n\tPreRelease  bool   `json:\"pre_release\"`\n\tPublishedAt string `json:\"published_at\"`\n\tBody        string `json:\"body\"`\n}\n\ntype ReleaseSlices []Release\n\nfunc (r ReleaseSlices) Len() int {\n\treturn len(r)\n}\n\nfunc (r ReleaseSlices) Less(i, j int) bool {\n\treturn r[i].PublishedAt < r[j].PublishedAt\n}\n\nfunc (r ReleaseSlices) Swap(i, j int) {\n\tr[i], r[j] = r[j], r[i]\n}\n"
  },
  {
    "path": "core/errors/base.go",
    "content": "package errors\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nconst (\n\tErrorPrefixController = \"controller\"\n\tErrorPrefixModel      = \"model\"\n\tErrorPrefixFilter     = \"filter\"\n\tErrorPrefixHttp       = \"http\"\n\tErrorPrefixGrpc       = \"grpc\"\n\tErrorPrefixNode       = \"node\"\n\tErrorPrefixInject     = \"inject\"\n\tErrorPrefixSpider     = \"spider\"\n\tErrorPrefixFs         = \"fs\"\n\tErrorPrefixTask       = \"task\"\n\tErrorPrefixSchedule   = \"schedule\"\n\tErrorPrefixUser       = \"user\"\n\tErrorPrefixStats      = \"stats\"\n\tErrorPrefixEvent      = \"event\"\n\tErrorPrefixProcess    = \"process\"\n\tErrorPrefixGit        = \"git\"\n\tErrorPrefixResult     = \"result\"\n\tErrorPrefixDataSource = \"data_source\"\n)\n\ntype ErrorPrefix string\n\nfunc NewError(prefix ErrorPrefix, msg string) (err error) {\n\treturn errors.New(fmt.Sprintf(\"%s error: %s\", prefix, msg))\n}\n"
  },
  {
    "path": "core/errors/controller.go",
    "content": "package errors\n\nfunc NewControllerError(msg string) (err error) {\n\treturn NewError(ErrorPrefixController, msg)\n}\n\nvar ErrorControllerInvalidControllerId = NewControllerError(\"invalid controller id\")\nvar ErrorControllerInvalidType = NewControllerError(\"invalid type\")\nvar ErrorControllerAddError = NewControllerError(\"add error\")\nvar ErrorControllerUpdateError = NewControllerError(\"update error\")\nvar ErrorControllerDeleteError = NewControllerError(\"delete error\")\nvar ErrorControllerNotImplemented = NewControllerError(\"not implemented\")\nvar ErrorControllerNoModelService = NewControllerError(\"no model service\")\nvar ErrorControllerRequestPayloadInvalid = NewControllerError(\"request payload invalid\")\nvar ErrorControllerMissingInCache = NewControllerError(\"missing in cache\")\nvar ErrorControllerNotCancellable = NewControllerError(\"not cancellable\")\nvar ErrorControllerMissingRequestFields = NewControllerError(\"missing request fields\")\nvar ErrorControllerEmptyResponse = NewControllerError(\"empty response\")\nvar ErrorControllerFilerNotFound = NewControllerError(\"filer not found\")\n"
  },
  {
    "path": "core/errors/ds.go",
    "content": "package errors\n\nfunc NewDataSourceError(msg string) (err error) {\n\treturn NewError(ErrorPrefixDataSource, msg)\n}\n\nvar (\n\tErrorDataSourceInvalidType           = NewDataSourceError(\"invalid type\")\n\tErrorDataSourceNotExists             = NewDataSourceError(\"not exists\")\n\tErrorDataSourceNotExistsInContext    = NewDataSourceError(\"not exists in context\")\n\tErrorDataSourceAlreadyExists         = NewDataSourceError(\"already exists\")\n\tErrorDataSourceMismatch              = NewDataSourceError(\"mismatch\")\n\tErrorDataSourceMissingRequiredFields = NewDataSourceError(\"missing required fields\")\n\tErrorDataSourceUnauthorized          = NewDataSourceError(\"unauthorized\")\n)\n"
  },
  {
    "path": "core/errors/event.go",
    "content": "package errors\n\nfunc NewEventError(msg string) (err error) {\n\treturn NewError(ErrorPrefixEvent, msg)\n}\n\nvar ErrorEventNotFound = NewEventError(\"not found\")\nvar ErrorEventInvalidType = NewEventError(\"invalid type\")\nvar ErrorEventAlreadyExists = NewEventError(\"already exists\")\nvar ErrorEventUnknownAction = NewEventError(\"unknown action\")\n"
  },
  {
    "path": "core/errors/filter.go",
    "content": "package errors\n\nfunc NewFilterError(msg string) (err error) {\n\treturn NewError(ErrorPrefixFilter, msg)\n}\n\nvar ErrorFilterInvalidOperation = NewFilterError(\"invalid operation\")\nvar ErrorFilterUnableToParseQuery = NewFilterError(\"unable to parse query\")\n"
  },
  {
    "path": "core/errors/fs.go",
    "content": "package errors\n\nfunc NewFsError(msg string) (err error) {\n\treturn NewError(ErrorPrefixFs, msg)\n}\n\nvar ErrorFsForbidden = NewFsError(\"forbidden\")\nvar ErrorFsEmptyWorkspacePath = NewFsError(\"empty workspace path\")\nvar ErrorFsInvalidType = NewFsError(\"invalid type\")\nvar ErrorFsAlreadyExists = NewFsError(\"already exists\")\nvar ErrorFsInvalidContent = NewFsError(\"invalid content\")\n"
  },
  {
    "path": "core/errors/git.go",
    "content": "package errors\n\nfunc NewGitError(msg string) (err error) {\n\treturn NewError(ErrorPrefixGit, msg)\n}\n\nvar (\n\tErrorGitInvalidAuthType = NewGitError(\"invalid auth type\")\n\tErrorGitNoMainBranch    = NewGitError(\"no main branch\")\n)\n"
  },
  {
    "path": "core/errors/grpc.go",
    "content": "package errors\n\nfunc NewGrpcError(msg string) (err error) {\n\treturn NewError(ErrorPrefixGrpc, msg)\n}\n\nvar (\n\tErrorGrpcClientFailedToStart  = NewGrpcError(\"client failed to start\")\n\tErrorGrpcServerFailedToListen = NewGrpcError(\"server failed to listen\")\n\tErrorGrpcServerFailedToServe  = NewGrpcError(\"server failed to serve\")\n\tErrorGrpcClientNotExists      = NewGrpcError(\"client not exists\")\n\tErrorGrpcClientAlreadyExists  = NewGrpcError(\"client already exists\")\n\tErrorGrpcInvalidType          = NewGrpcError(\"invalid type\")\n\tErrorGrpcNotAllowed           = NewGrpcError(\"not allowed\")\n\tErrorGrpcSubscribeNotExists   = NewGrpcError(\"subscribe not exists\")\n\tErrorGrpcStreamNotFound       = NewGrpcError(\"stream not found\")\n\tErrorGrpcInvalidCode          = NewGrpcError(\"invalid code\")\n\tErrorGrpcUnauthorized         = NewGrpcError(\"unauthorized\")\n\tErrorGrpcInvalidNodeKey       = NewGrpcError(\"invalid node key\")\n)\n"
  },
  {
    "path": "core/errors/http.go",
    "content": "package errors\n\nfunc NewHttpError(msg string) (err error) {\n\treturn NewError(ErrorPrefixHttp, msg)\n}\n\nvar ErrorHttpBadRequest = NewHttpError(\"bad request\")\nvar ErrorHttpUnauthorized = NewHttpError(\"unauthorized\")\nvar ErrorHttpNotFound = NewHttpError(\"not found\")\n"
  },
  {
    "path": "core/errors/model.go",
    "content": "package errors\n\nimport \"errors\"\n\nfunc NewModelError(msg string) (err error) {\n\treturn NewError(ErrorPrefixModel, msg)\n}\n\nvar ErrorModelInvalidType = NewModelError(\"invalid type\")\nvar ErrorModelInvalidModelId = NewModelError(\"invalid model id\")\nvar ErrorModelNotImplemented = NewModelError(\"not implemented\")\nvar ErrorModelNotFound = NewModelError(\"not found\")\nvar ErrorModelAlreadyExists = NewModelError(\"already exists\")\nvar ErrorModelNotExists = NewModelError(\"not exists\")\nvar ErrorModelMissingRequiredData = NewModelError(\"missing required data\")\nvar ErrorModelMissingId = errors.New(\"missing _id\")\nvar ErrorModelNotAllowed = NewModelError(\"not allowed\")\nvar ErrorModelDeleteListError = NewModelError(\"delete list error\")\nvar ErrorModelNilPointer = NewModelError(\"nil pointer\")\n"
  },
  {
    "path": "core/errors/node.go",
    "content": "package errors\n\nfunc NewNodeError(msg string) (err error) {\n\treturn NewError(ErrorPrefixNode, msg)\n}\n\nvar ErrorNodeUnregistered = NewNodeError(\"unregistered\")\nvar ErrorNodeServiceNotExists = NewNodeError(\"service not exists\")\nvar ErrorNodeInvalidType = NewNodeError(\"invalid type\")\nvar ErrorNodeInvalidStatus = NewNodeError(\"invalid status\")\nvar ErrorNodeInvalidCode = NewNodeError(\"invalid code\")\nvar ErrorNodeInvalidNodeKey = NewNodeError(\"invalid node key\")\nvar ErrorNodeMonitorError = NewNodeError(\"monitor error\")\nvar ErrorNodeNotExists = NewNodeError(\"not exists\")\n"
  },
  {
    "path": "core/errors/process.go",
    "content": "package errors\n\nfunc NewProcessError(msg string) (err error) {\n\treturn NewError(ErrorPrefixProcess, msg)\n}\n\nvar (\n\tErrorProcessReachedMaxErrors    = NewProcessError(\"reached max errors\")\n\tErrorProcessDaemonProcessExited = NewProcessError(\"daemon process exited\")\n)\n"
  },
  {
    "path": "core/errors/result.go",
    "content": "package errors\n\nfunc NewResultError(msg string) (err error) {\n\treturn NewError(ErrorPrefixResult, msg)\n}\n"
  },
  {
    "path": "core/errors/schedule.go",
    "content": "package errors\n\nfunc NewScheduleError(msg string) (err error) {\n\treturn NewError(ErrorPrefixSchedule, msg)\n}\n\n//var ErrorSchedule = NewScheduleError(\"unregistered\")\n"
  },
  {
    "path": "core/errors/spider.go",
    "content": "package errors\n\nfunc NewSpiderError(msg string) (err error) {\n\treturn NewError(ErrorPrefixSpider, msg)\n}\n\nvar (\n\tErrorSpiderMissingRequiredOption = NewSpiderError(\"missing required option\")\n\tErrorSpiderForbidden             = NewSpiderError(\"forbidden\")\n)\n"
  },
  {
    "path": "core/errors/stats.go",
    "content": "package errors\n\nfunc NewStatsError(msg string) (err error) {\n\treturn NewError(ErrorPrefixStats, msg)\n}\n\nvar ErrorStatsInvalidType = NewStatsError(\"invalid type\")\n"
  },
  {
    "path": "core/errors/store.go",
    "content": "package errors\n\nfunc NewInjectError(msg string) (err error) {\n\treturn NewError(ErrorPrefixInject, msg)\n}\n\nvar ErrorInjectEmptyValue = NewInjectError(\"empty value\")\nvar ErrorInjectNotExists = NewInjectError(\"not exists\")\nvar ErrorInjectInvalidType = NewInjectError(\"invalid type\")\n"
  },
  {
    "path": "core/errors/task.go",
    "content": "package errors\n\nfunc NewTaskError(msg string) (err error) {\n\treturn NewError(ErrorPrefixTask, msg)\n}\n\nvar (\n\tErrorTaskNotExists             = NewTaskError(\"not exists\")\n\tErrorTaskAlreadyExists         = NewTaskError(\"already exists\")\n\tErrorTaskInvalidType           = NewTaskError(\"invalid type\")\n\tErrorTaskProcessStillExists    = NewTaskError(\"process still exists\")\n\tErrorTaskUnableToCancel        = NewTaskError(\"unable to cancel\")\n\tErrorTaskForbidden             = NewTaskError(\"forbidden\")\n\tErrorTaskNoAvailableRunners    = NewTaskError(\"no available runner\")\n\tErrorTaskEmptySpiderId         = NewTaskError(\"empty spider id\")\n\tErrorTaskNoNodeId              = NewTaskError(\"no node id\")\n\tErrorTaskNodeNotFound          = NewTaskError(\"node not found\")\n\tErrorTaskMissingRequiredOption = NewSpiderError(\"missing required option\")\n)\n"
  },
  {
    "path": "core/errors/user.go",
    "content": "package errors\n\nfunc NewUserError(msg string) (err error) {\n\treturn NewError(ErrorPrefixUser, msg)\n}\n\nvar (\n\tErrorUserInvalidType           = NewUserError(\"invalid type\")\n\tErrorUserInvalidToken          = NewUserError(\"invalid token\")\n\tErrorUserNotExists             = NewUserError(\"not exists\")\n\tErrorUserNotExistsInContext    = NewUserError(\"not exists in context\")\n\tErrorUserAlreadyExists         = NewUserError(\"already exists\")\n\tErrorUserMismatch              = NewUserError(\"mismatch\")\n\tErrorUserMissingRequiredFields = NewUserError(\"missing required fields\")\n\tErrorUserUnauthorized          = NewUserError(\"unauthorized\")\n\tErrorUserInvalidPassword       = NewUserError(\"invalid password (length must be no less than 5)\")\n)\n"
  },
  {
    "path": "core/event/func.go",
    "content": "package event\n\nfunc SendEvent(eventName string, data ...interface{}) {\n\tsvc := NewEventService()\n\tsvc.SendEvent(eventName, data...)\n}\n"
  },
  {
    "path": "core/event/options.go",
    "content": "package event\n"
  },
  {
    "path": "core/event/service.go",
    "content": "package event\n\nimport (\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/thoas/go-funk\"\n\t\"regexp\"\n)\n\nvar S interfaces.EventService\n\ntype Service struct {\n\tkeys     []string\n\tincludes []string\n\texcludes []string\n\tchs      []*chan interfaces.EventData\n}\n\nfunc (svc *Service) Register(key, include, exclude string, ch *chan interfaces.EventData) {\n\tsvc.keys = append(svc.keys, key)\n\tsvc.includes = append(svc.includes, include)\n\tsvc.excludes = append(svc.excludes, exclude)\n\tsvc.chs = append(svc.chs, ch)\n}\n\nfunc (svc *Service) Unregister(key string) {\n\tidx := funk.IndexOfString(svc.keys, key)\n\tif idx != -1 {\n\t\tsvc.keys = append(svc.keys[:idx], svc.keys[(idx+1):]...)\n\t\tsvc.includes = append(svc.includes[:idx], svc.includes[(idx+1):]...)\n\t\tsvc.excludes = append(svc.excludes[:idx], svc.excludes[(idx+1):]...)\n\t\tsvc.chs = append(svc.chs[:idx], svc.chs[(idx+1):]...)\n\t\tlog.Infof(\"[EventService] unregistered %s\", key)\n\t}\n}\n\nfunc (svc *Service) SendEvent(eventName string, data ...interface{}) {\n\tfor i, key := range svc.keys {\n\t\t// include\n\t\tinclude := svc.includes[i]\n\t\tmatchedInclude, err := regexp.MatchString(include, eventName)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\tcontinue\n\t\t}\n\t\tif !matchedInclude {\n\t\t\tcontinue\n\t\t}\n\n\t\t// exclude\n\t\texclude := svc.excludes[i]\n\t\tmatchedExclude, err := regexp.MatchString(exclude, eventName)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\tcontinue\n\t\t}\n\t\tif matchedExclude {\n\t\t\tcontinue\n\t\t}\n\n\t\t// send event\n\t\tutils.LogDebug(fmt.Sprintf(\"key %s matches event %s\", key, eventName))\n\t\tch := svc.chs[i]\n\t\tgo func(ch *chan interfaces.EventData) {\n\t\t\tfor _, d := range data {\n\t\t\t\t*ch <- &entity.EventData{\n\t\t\t\t\tEvent: eventName,\n\t\t\t\t\tData:  d,\n\t\t\t\t}\n\t\t\t}\n\t\t}(ch)\n\t}\n}\n\nfunc NewEventService() (svc interfaces.EventService) {\n\tif S != nil {\n\t\treturn S\n\t}\n\n\tsvc = &Service{\n\t\tchs:  []*chan interfaces.EventData{},\n\t\tkeys: []string{},\n\t}\n\n\tS = svc\n\n\treturn svc\n}\n"
  },
  {
    "path": "core/export/csv_service.go",
    "content": "package export\n\nimport (\n\t\"context\"\n\t\"encoding/csv\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/ReneKroon/ttlcache\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/hashicorp/go-uuid\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"os\"\n\t\"path\"\n\t\"sort\"\n\t\"strconv\"\n\t\"time\"\n)\n\ntype CsvService struct {\n\tcache *ttlcache.Cache\n}\n\nfunc (svc *CsvService) GenerateId() (exportId string, err error) {\n\texportId, err = uuid.GenerateUUID()\n\tif err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\treturn exportId, nil\n}\n\nfunc (svc *CsvService) Export(exportType, target string, filter interfaces.Filter) (exportId string, err error) {\n\t// generate export id\n\texportId, err = svc.GenerateId()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// export\n\texport := &entity.Export{\n\t\tId:           exportId,\n\t\tType:         exportType,\n\t\tTarget:       target,\n\t\tFilter:       filter,\n\t\tStatus:       constants.TaskStatusRunning,\n\t\tStartTs:      time.Now(),\n\t\tFileName:     svc.getFileName(exportId),\n\t\tDownloadPath: svc.getDownloadPath(exportId),\n\t\tLimit:        100,\n\t}\n\n\t// save to cache\n\tsvc.cache.Set(exportId, export)\n\n\t// execute export\n\tgo svc.export(export)\n\n\treturn exportId, nil\n}\n\nfunc (svc *CsvService) GetExport(exportId string) (export interfaces.Export, err error) {\n\t// get export from cache\n\tres, ok := svc.cache.Get(exportId)\n\tif !ok {\n\t\treturn nil, trace.TraceError(errors.New(\"export not found\"))\n\t}\n\texport = res.(interfaces.Export)\n\treturn export, nil\n}\n\nfunc (svc *CsvService) export(export *entity.Export) {\n\t// check empty\n\tif export.Target == \"\" {\n\t\terr := errors.New(\"empty target\")\n\t\texport.Status = constants.TaskStatusError\n\t\texport.EndTs = time.Now()\n\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\ttrace.PrintError(err)\n\t\tsvc.cache.Set(export.Id, export)\n\t\treturn\n\t}\n\n\t// mongo collection\n\tcol := mongo.GetMongoCol(export.Target)\n\n\t// mongo query\n\tquery, err := utils.FilterToQuery(export.Filter)\n\tif err != nil {\n\t\texport.Status = constants.TaskStatusError\n\t\texport.EndTs = time.Now()\n\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\ttrace.PrintError(err)\n\t\tsvc.cache.Set(export.Id, export)\n\t\treturn\n\t}\n\n\t// mongo cursor\n\tcur := col.Find(query, nil).GetCursor()\n\n\t// csv writer\n\tcsvWriter, csvFile, err := svc.getCsvWriter(export)\n\tdefer func() {\n\t\tcsvWriter.Flush()\n\t\t_ = csvFile.Close()\n\t}()\n\tif err != nil {\n\t\texport.Status = constants.TaskStatusError\n\t\texport.EndTs = time.Now()\n\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\ttrace.PrintError(err)\n\t\tsvc.cache.Set(export.Id, export)\n\t\treturn\n\t}\n\n\t// write bom\n\tbom := []byte{0xEF, 0xBB, 0xBF}\n\t_, err = csvFile.Write(bom)\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\n\t// write csv header row\n\tcolumns, err := svc.getColumns(query, export)\n\terr = csvWriter.Write(columns)\n\tif err != nil {\n\t\texport.Status = constants.TaskStatusError\n\t\texport.EndTs = time.Now()\n\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\ttrace.PrintError(err)\n\t\tsvc.cache.Set(export.Id, export)\n\t\treturn\n\t}\n\tcsvWriter.Flush()\n\n\t// iterate cursor\n\ti := 0\n\tfor {\n\t\t// increment counter\n\t\ti++\n\n\t\t// check error\n\t\terr := cur.Err()\n\t\tif err != nil {\n\t\t\tif err != mongo2.ErrNoDocuments {\n\t\t\t\t// error\n\t\t\t\texport.Status = constants.TaskStatusError\n\t\t\t\texport.EndTs = time.Now()\n\t\t\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\t\t\ttrace.PrintError(err)\n\t\t\t} else {\n\t\t\t\t// no more data\n\t\t\t\texport.Status = constants.TaskStatusFinished\n\t\t\t\texport.EndTs = time.Now()\n\t\t\t\tlog.Infof(\"export finished (id: %s)\", export.Id)\n\t\t\t}\n\t\t\tsvc.cache.Set(export.Id, export)\n\t\t\treturn\n\t\t}\n\n\t\t// has data\n\t\tif !cur.Next(context.Background()) {\n\t\t\t// no more data\n\t\t\texport.Status = constants.TaskStatusFinished\n\t\t\texport.EndTs = time.Now()\n\t\t\tlog.Infof(\"export finished (id: %s)\", export.Id)\n\t\t\tsvc.cache.Set(export.Id, export)\n\t\t\treturn\n\t\t}\n\n\t\t// convert raw data to entity\n\t\tvar data bson.M\n\t\terr = cur.Decode(&data)\n\t\tif err != nil {\n\t\t\t// error\n\t\t\texport.Status = constants.TaskStatusError\n\t\t\texport.EndTs = time.Now()\n\t\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\t\ttrace.PrintError(err)\n\t\t\tsvc.cache.Set(export.Id, export)\n\t\t\treturn\n\t\t}\n\n\t\t// write csv row cells\n\t\tcells := svc.getRowCells(columns, data)\n\t\terr = csvWriter.Write(cells)\n\t\tif err != nil {\n\t\t\t// error\n\t\t\texport.Status = constants.TaskStatusError\n\t\t\texport.EndTs = time.Now()\n\t\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\t\ttrace.PrintError(err)\n\t\t\tsvc.cache.Set(export.Id, export)\n\t\t\treturn\n\t\t}\n\n\t\t// flush if limit reached\n\t\tif i >= export.Limit {\n\t\t\tcsvWriter.Flush()\n\t\t\ti = 0\n\t\t}\n\t}\n}\n\nfunc (svc *CsvService) getExportDir() (dir string, err error) {\n\ttempDir := os.TempDir()\n\texportDir := path.Join(tempDir, \"export\", \"csv\")\n\tif !utils.Exists(exportDir) {\n\t\terr := os.MkdirAll(exportDir, 0755)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\treturn exportDir, nil\n}\n\nfunc (svc *CsvService) getFileName(exportId string) (fileName string) {\n\treturn exportId + \"_\" + time.Now().Format(\"20060102150405\") + \".csv\"\n}\n\n// getDownloadPath returns the download path for the export\n// format: <tempDir>/export/<exportId>/<exportId>_<timestamp>.csv\nfunc (svc *CsvService) getDownloadPath(exportId string) (downloadPath string) {\n\texportDir, err := svc.getExportDir()\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tdownloadPath = path.Join(exportDir, svc.getFileName(exportId))\n\treturn downloadPath\n}\n\nfunc (svc *CsvService) getCsvWriter(export *entity.Export) (csvWriter *csv.Writer, csvFile *os.File, err error) {\n\t// open file\n\tcsvFile, err = os.Create(export.DownloadPath)\n\tif err != nil {\n\t\treturn nil, nil, trace.TraceError(err)\n\t}\n\n\t// create csv writer\n\tcsvWriter = csv.NewWriter(csvFile)\n\n\treturn csvWriter, csvFile, nil\n}\n\nfunc (svc *CsvService) getColumns(query bson.M, export interfaces.Export) (columns []string, err error) {\n\t// get mongo collection\n\tcol := mongo.GetMongoCol(export.GetTarget())\n\n\t// get 10 records\n\tvar data []bson.M\n\tif err := col.Find(query, &mongo.FindOptions{Limit: 10}).All(&data); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// columns set\n\tcolumnsSet := make(map[string]bool)\n\tfor _, d := range data {\n\t\tfor k := range d {\n\t\t\tcolumnsSet[k] = true\n\t\t}\n\t}\n\n\t// columns\n\tcolumns = make([]string, 0, len(columnsSet))\n\tfor k := range columnsSet {\n\t\t// skip task key\n\t\tif k == constants.TaskKey {\n\t\t\tcontinue\n\t\t}\n\n\t\t// skip _id\n\t\tif k == \"_id\" {\n\t\t\tcontinue\n\t\t}\n\n\t\t// append to columns\n\t\tcolumns = append(columns, k)\n\t}\n\n\t// order columns\n\tsort.Strings(columns)\n\n\treturn columns, nil\n}\n\nfunc (svc *CsvService) getRowCells(columns []string, data bson.M) (cells []string) {\n\tfor _, c := range columns {\n\t\tv, ok := data[c]\n\t\tif !ok {\n\t\t\tcells = append(cells, \"\")\n\t\t\tcontinue\n\t\t}\n\t\tswitch v.(type) {\n\t\tcase string:\n\t\t\tcells = append(cells, v.(string))\n\t\tcase time.Time:\n\t\t\tcells = append(cells, v.(time.Time).Format(\"2006-01-02 15:04:05\"))\n\t\tcase int:\n\t\t\tcells = append(cells, strconv.Itoa(v.(int)))\n\t\tcase int32:\n\t\t\tcells = append(cells, strconv.Itoa(int(v.(int32))))\n\t\tcase int64:\n\t\t\tcells = append(cells, strconv.FormatInt(v.(int64), 10))\n\t\tcase float32:\n\t\t\tcells = append(cells, strconv.FormatFloat(float64(v.(float32)), 'f', -1, 32))\n\t\tcase float64:\n\t\t\tcells = append(cells, strconv.FormatFloat(v.(float64), 'f', -1, 64))\n\t\tcase bool:\n\t\t\tcells = append(cells, strconv.FormatBool(v.(bool)))\n\t\tcase primitive.ObjectID:\n\t\t\tcells = append(cells, v.(primitive.ObjectID).Hex())\n\t\tcase primitive.DateTime:\n\t\t\tcells = append(cells, v.(primitive.DateTime).Time().Format(\"2006-01-02 15:04:05\"))\n\t\tdefault:\n\t\t\tcells = append(cells, fmt.Sprintf(\"%v\", v))\n\t\t}\n\t}\n\treturn cells\n}\n\nfunc NewCsvService() (svc2 interfaces.ExportService) {\n\tcache := ttlcache.NewCache()\n\tcache.SetTTL(time.Minute * 5)\n\tsvc := &CsvService{\n\t\tcache: cache,\n\t}\n\treturn svc\n}\n\nvar _csvService interfaces.ExportService\n\nfunc GetCsvService() (svc interfaces.ExportService) {\n\tif _csvService == nil {\n\t\t_csvService = NewCsvService()\n\t}\n\treturn _csvService\n}\n"
  },
  {
    "path": "core/export/csv_service_test.go",
    "content": "package export\n\nimport (\n\t\"encoding/csv\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"os\"\n\t\"strconv\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestCsvService_Export(t *testing.T) {\n\t// test data rows\n\tvar rows []interface{}\n\tfor i := 0; i < 10; i++ {\n\t\tdata := bson.M{\n\t\t\t\"no\":              i,\n\t\t\t\"string_field\":    \"test\",\n\t\t\t\"int_field\":       1,\n\t\t\t\"float_field\":     1.1,\n\t\t\t\"bool_field\":      true,\n\t\t\t\"time_field\":      time.Now(),\n\t\t\t\"object_id_field\": primitive.NewObjectID(),\n\t\t}\n\t\trows = append(rows, data)\n\t}\n\n\t// test mongo collection name\n\tcollectionName := \"test_collection\"\n\n\t// test mongo collection\n\tcollection := mongo.GetMongoCol(collectionName)\n\n\t// delete records of test mongo collection after test\n\tt.Cleanup(func() {\n\t\t_ = collection.Delete(bson.M{})\n\t})\n\n\t// save test data rows to mongo collection\n\t_, err := collection.InsertMany(rows)\n\trequire.Nil(t, err)\n\n\t// export service\n\tcsvSvc := NewCsvService()\n\n\t// export\n\texportId, err := csvSvc.Export(collectionName, collectionName, nil)\n\trequire.Nil(t, err)\n\n\t// get export\n\texport, err := csvSvc.GetExport(exportId)\n\trequire.Nil(t, err)\n\trequire.NotNil(t, export)\n\trequire.Equal(t, exportId, export.GetId())\n\trequire.NotNil(t, export.GetDownloadPath())\n\n\t// wait for export to finish with timeout of 5 seconds\n\ttimeout := time.After(5 * time.Second)\n\tfinished := false\n\tfor {\n\t\tif finished {\n\t\t\tbreak\n\t\t}\n\t\tselect {\n\t\tcase <-timeout:\n\t\t\tt.Fatal(\"export timeout\")\n\t\tdefault:\n\t\t\tif export.GetStatus() == constants.TaskStatusFinished {\n\t\t\t\tfinished = true\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\ttime.Sleep(100 * time.Millisecond)\n\t\t}\n\t}\n\n\t// export file path\n\texportFilePath := export.GetDownloadPath()\n\trequire.FileExists(t, exportFilePath)\n\n\t// csv file\n\tcsvFile, err := os.Open(exportFilePath)\n\trequire.Nil(t, err)\n\tdefer csvFile.Close()\n\n\t// csv file reader\n\tcsvFileReader := csv.NewReader(csvFile)\n\n\t// csv file rows\n\tcsvFileRows, err := csvFileReader.ReadAll()\n\trequire.Nil(t, err)\n\trequire.Equal(t, len(rows), len(csvFileRows)-1)\n\n\t// csv file columns\n\tcsvFileColumns := csvFileRows[0]\n\n\t// iterate csv file records and compare with test data rows\n\tfor i, row := range rows {\n\t\t// csv file record\n\t\tcsvFileRecord := csvFileRows[i+1]\n\n\t\t// iterate csv file columns and compare with test data row\n\t\tfor j, column := range csvFileColumns {\n\t\t\t// csv file column value\n\t\t\tcsvFileColumnValue := csvFileRecord[j]\n\n\t\t\t// compare csv file column value with test data row\n\t\t\tswitch column {\n\t\t\tcase \"no\":\n\t\t\t\t// convert int to string\n\t\t\t\tstringValue := fmt.Sprintf(\"%d\", row.(bson.M)[\"no\"].(int))\n\t\t\t\trequire.Equal(t, stringValue, csvFileColumnValue)\n\t\t\tcase \"string_field\":\n\t\t\t\trequire.Equal(t, row.(bson.M)[\"string_field\"], csvFileColumnValue)\n\t\t\tcase \"int_field\":\n\t\t\t\t// convert int to string\n\t\t\t\tstringValue := fmt.Sprintf(\"%d\", row.(bson.M)[\"int_field\"])\n\t\t\t\trequire.Equal(t, stringValue, csvFileColumnValue)\n\t\t\tcase \"float_field\":\n\t\t\t\t// convert string to float\n\t\t\t\tfloatValue, err := strconv.ParseFloat(csvFileColumnValue, 64)\n\t\t\t\trequire.Nil(t, err)\n\t\t\t\trequire.Equal(t, row.(bson.M)[\"float_field\"].(float64), floatValue)\n\t\t\tcase \"bool_field\":\n\t\t\t\t// convert bool to string\n\t\t\t\tstringValue := fmt.Sprintf(\"%t\", row.(bson.M)[\"bool_field\"])\n\t\t\t\trequire.Equal(t, stringValue, csvFileColumnValue)\n\t\t\tcase \"time_field\":\n\t\t\t\t// convert time to string\n\t\t\t\tstringValue := row.(bson.M)[\"time_field\"].(time.Time).Format(\"2006-01-02 15:04:05\")\n\t\t\t\trequire.Equal(t, stringValue, csvFileColumnValue)\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "core/export/json_service.go",
    "content": "package export\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"github.com/ReneKroon/ttlcache\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/hashicorp/go-uuid\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"os\"\n\t\"path\"\n\t\"time\"\n)\n\ntype JsonService struct {\n\tcache *ttlcache.Cache\n}\n\nfunc (svc *JsonService) GenerateId() (exportId string, err error) {\n\texportId, err = uuid.GenerateUUID()\n\tif err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\treturn exportId, nil\n}\n\nfunc (svc *JsonService) Export(exportType, target string, filter interfaces.Filter) (exportId string, err error) {\n\t// generate export id\n\texportId, err = svc.GenerateId()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// export\n\texport := &entity.Export{\n\t\tId:           exportId,\n\t\tType:         exportType,\n\t\tTarget:       target,\n\t\tFilter:       filter,\n\t\tStatus:       constants.TaskStatusRunning,\n\t\tStartTs:      time.Now(),\n\t\tFileName:     svc.getFileName(exportId),\n\t\tDownloadPath: svc.getDownloadPath(exportId),\n\t\tLimit:        100,\n\t}\n\n\t// save to cache\n\tsvc.cache.Set(exportId, export)\n\n\t// execute export\n\tgo svc.export(export)\n\n\treturn exportId, nil\n}\n\nfunc (svc *JsonService) GetExport(exportId string) (export interfaces.Export, err error) {\n\t// get export from cache\n\tres, ok := svc.cache.Get(exportId)\n\tif !ok {\n\t\treturn nil, trace.TraceError(errors.New(\"export not found\"))\n\t}\n\texport = res.(interfaces.Export)\n\treturn export, nil\n}\n\nfunc (svc *JsonService) export(export *entity.Export) {\n\t// check empty\n\tif export.Target == \"\" {\n\t\terr := errors.New(\"empty target\")\n\t\texport.Status = constants.TaskStatusError\n\t\texport.EndTs = time.Now()\n\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\ttrace.PrintError(err)\n\t\tsvc.cache.Set(export.Id, export)\n\t\treturn\n\t}\n\n\t// mongo collection\n\tcol := mongo.GetMongoCol(export.Target)\n\n\t// mongo query\n\tquery, err := utils.FilterToQuery(export.Filter)\n\tif err != nil {\n\t\texport.Status = constants.TaskStatusError\n\t\texport.EndTs = time.Now()\n\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\ttrace.PrintError(err)\n\t\tsvc.cache.Set(export.Id, export)\n\t\treturn\n\t}\n\n\t// mongo cursor\n\tcur := col.Find(query, nil).GetCursor()\n\n\t// data\n\tvar jsonData []interface{}\n\n\t// iterate cursor\n\ti := 0\n\tfor {\n\t\t// increment counter\n\t\ti++\n\n\t\t// check error\n\t\terr := cur.Err()\n\t\tif err != nil {\n\t\t\tif err != mongo2.ErrNoDocuments {\n\t\t\t\t// error\n\t\t\t\texport.Status = constants.TaskStatusError\n\t\t\t\texport.EndTs = time.Now()\n\t\t\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\t\t\ttrace.PrintError(err)\n\t\t\t} else {\n\t\t\t\t// no more data\n\t\t\t\texport.Status = constants.TaskStatusFinished\n\t\t\t\texport.EndTs = time.Now()\n\t\t\t\tlog.Infof(\"export finished (id: %s)\", export.Id)\n\t\t\t}\n\t\t\tsvc.cache.Set(export.Id, export)\n\t\t\treturn\n\t\t}\n\n\t\t// has data\n\t\tif !cur.Next(context.Background()) {\n\t\t\t// no more data\n\t\t\texport.Status = constants.TaskStatusFinished\n\t\t\texport.EndTs = time.Now()\n\t\t\tlog.Infof(\"export finished (id: %s)\", export.Id)\n\t\t\tsvc.cache.Set(export.Id, export)\n\t\t\tbreak\n\t\t}\n\n\t\t// convert raw data to entity\n\t\tvar data map[string]interface{}\n\t\terr = cur.Decode(&data)\n\t\tif err != nil {\n\t\t\t// error\n\t\t\texport.Status = constants.TaskStatusError\n\t\t\texport.EndTs = time.Now()\n\t\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\t\ttrace.PrintError(err)\n\t\t\tsvc.cache.Set(export.Id, export)\n\t\t\treturn\n\t\t}\n\n\t\tjsonData = append(jsonData, data)\n\t}\n\n\tjsonBytes, err := json.Marshal(jsonData)\n\tif err != nil {\n\t\t// error\n\t\texport.Status = constants.TaskStatusError\n\t\texport.EndTs = time.Now()\n\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\ttrace.PrintError(err)\n\t\tsvc.cache.Set(export.Id, export)\n\t\treturn\n\t}\n\tjsonString := string(jsonBytes)\n\tf := utils.OpenFile(export.DownloadPath)\n\t_, err = f.WriteString(jsonString)\n\tif err != nil {\n\t\t// error\n\t\texport.Status = constants.TaskStatusError\n\t\texport.EndTs = time.Now()\n\t\tlog.Errorf(\"export error (id: %s): %v\", export.Id, err)\n\t\ttrace.PrintError(err)\n\t\tsvc.cache.Set(export.Id, export)\n\t\treturn\n\t}\n}\n\nfunc (svc *JsonService) getExportDir() (dir string, err error) {\n\ttempDir := os.TempDir()\n\texportDir := path.Join(tempDir, \"export\", \"json\")\n\tif !utils.Exists(exportDir) {\n\t\terr := os.MkdirAll(exportDir, 0755)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t}\n\treturn exportDir, nil\n}\n\nfunc (svc *JsonService) getFileName(exportId string) (fileName string) {\n\treturn exportId + \"_\" + time.Now().Format(\"20060102150405\") + \".json\"\n}\n\n// getDownloadPath returns the download path for the export\n// format: <tempDir>/export/<exportId>/<exportId>_<timestamp>.csv\nfunc (svc *JsonService) getDownloadPath(exportId string) (downloadPath string) {\n\texportDir, err := svc.getExportDir()\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tdownloadPath = path.Join(exportDir, svc.getFileName(exportId))\n\treturn downloadPath\n}\n\nfunc NewJsonService() (svc2 interfaces.ExportService) {\n\tcache := ttlcache.NewCache()\n\tcache.SetTTL(time.Minute * 5)\n\tsvc := &JsonService{\n\t\tcache: cache,\n\t}\n\treturn svc\n}\n\nvar _jsonService interfaces.ExportService\n\nfunc GetJsonService() (svc interfaces.ExportService) {\n\tif _jsonService == nil {\n\t\t_jsonService = NewJsonService()\n\t}\n\treturn _jsonService\n}\n"
  },
  {
    "path": "core/fs/default.go",
    "content": "package fs\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/mitchellh/go-homedir\"\n\t\"github.com/spf13/viper\"\n\t\"path/filepath\"\n)\n\nfunc init() {\n\trootDir, err := homedir.Dir()\n\tif err != nil {\n\t\tlog.Warnf(\"cannot find home directory: %v\", err)\n\t\treturn\n\t}\n\tDefaultWorkspacePath = filepath.Join(rootDir, \"crawlab_workspace\")\n\n\tworkspacePath := viper.GetString(\"workspace\")\n\tif workspacePath == \"\" {\n\t\tviper.Set(\"workspace\", DefaultWorkspacePath)\n\t}\n}\n\nvar DefaultWorkspacePath string\n"
  },
  {
    "path": "core/fs/service_v2.go",
    "content": "package fs\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/google/uuid\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\ntype ServiceV2 struct {\n\t// settings\n\trootPath  string\n\tskipNames []string\n}\n\nfunc (svc *ServiceV2) List(path string) (files []interfaces.FsFileInfo, err error) {\n\t// Normalize the provided path\n\tnormPath := filepath.Clean(path)\n\tif normPath == \".\" {\n\t\tnormPath = \"\"\n\t}\n\tfullPath := filepath.Join(svc.rootPath, normPath)\n\n\t// Temporary map to hold directory information and their children\n\tdirMap := make(map[string]*entity.FsFileInfo)\n\n\t// Use filepath.Walk to recursively traverse directories\n\terr = filepath.Walk(fullPath, func(p string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\trelPath, err := filepath.Rel(svc.rootPath, p)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfi := &entity.FsFileInfo{\n\t\t\tName:      info.Name(),\n\t\t\tPath:      filepath.ToSlash(relPath),\n\t\t\tFullPath:  p,\n\t\t\tExtension: filepath.Ext(p),\n\t\t\tIsDir:     info.IsDir(),\n\t\t\tFileSize:  info.Size(),\n\t\t\tModTime:   info.ModTime(),\n\t\t\tMode:      info.Mode(),\n\t\t\tChildren:  nil,\n\t\t}\n\n\t\t// Skip files/folders matching the pattern\n\t\tfor _, name := range svc.skipNames {\n\t\t\tif fi.Name == name {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\n\t\tif info.IsDir() {\n\t\t\tdirMap[p] = fi\n\t\t}\n\n\t\tif parentDir := filepath.Dir(p); parentDir != p && dirMap[parentDir] != nil {\n\t\t\tdirMap[parentDir].Children = append(dirMap[parentDir].Children, fi)\n\t\t}\n\n\t\treturn nil\n\t})\n\n\tif rootInfo, ok := dirMap[fullPath]; ok {\n\t\tfor _, info := range rootInfo.GetChildren() {\n\t\t\tfiles = append(files, info)\n\t\t}\n\t}\n\n\treturn files, err\n}\n\nfunc (svc *ServiceV2) GetFile(path string) (data []byte, err error) {\n\treturn os.ReadFile(filepath.Join(svc.rootPath, path))\n}\n\nfunc (svc *ServiceV2) GetFileInfo(path string) (file interfaces.FsFileInfo, err error) {\n\tf, err := os.Stat(filepath.Join(svc.rootPath, path))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &entity.FsFileInfo{\n\t\tName:      f.Name(),\n\t\tPath:      path,\n\t\tFullPath:  filepath.Join(svc.rootPath, path),\n\t\tExtension: filepath.Ext(path),\n\t\tIsDir:     f.IsDir(),\n\t\tFileSize:  f.Size(),\n\t\tModTime:   f.ModTime(),\n\t\tMode:      f.Mode(),\n\t\tChildren:  nil,\n\t}, nil\n}\n\nfunc (svc *ServiceV2) Save(path string, data []byte) (err error) {\n\t// Create directories if not exist\n\tdir := filepath.Dir(filepath.Join(svc.rootPath, path))\n\tif _, err := os.Stat(dir); os.IsNotExist(err) {\n\t\tif err := os.MkdirAll(dir, 0755); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Write file\n\treturn os.WriteFile(filepath.Join(svc.rootPath, path), data, 0644)\n}\n\nfunc (svc *ServiceV2) CreateDir(path string) (err error) {\n\treturn os.MkdirAll(filepath.Join(svc.rootPath, path), 0755)\n}\n\nfunc (svc *ServiceV2) Rename(path, newPath string) (err error) {\n\toldPath := filepath.Join(svc.rootPath, path)\n\tnewFullPath := filepath.Join(svc.rootPath, newPath)\n\treturn os.Rename(oldPath, newFullPath)\n}\n\nfunc (svc *ServiceV2) Delete(path string) (err error) {\n\tfullPath := filepath.Join(svc.rootPath, path)\n\treturn os.RemoveAll(fullPath)\n}\n\nfunc (svc *ServiceV2) Copy(path, newPath string) (err error) {\n\tsrcPath := filepath.Join(svc.rootPath, path)\n\tdestPath := filepath.Join(svc.rootPath, newPath)\n\n\t// Get source info\n\tsrcInfo, err := os.Stat(srcPath)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// If source is file, copy it\n\tif !srcInfo.IsDir() {\n\t\tsrcFile, err := os.Open(srcPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer srcFile.Close()\n\n\t\tdestFile, err := os.Create(destPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer destFile.Close()\n\n\t\t_, err = io.Copy(destFile, srcFile)\n\n\t\treturn err\n\t} else {\n\t\t// If source is directory, copy it recursively\n\t\treturn utils.CopyDir(srcPath, destPath)\n\t}\n}\n\nfunc (svc *ServiceV2) Export() (resultPath string, err error) {\n\tzipFilePath := filepath.Join(os.TempDir(), uuid.New().String()+\".zip\")\n\tif err := utils.ZipDirectory(svc.rootPath, zipFilePath); err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\n\treturn zipFilePath, nil\n}\n\nfunc NewFsServiceV2(path string) (svc interfaces.FsServiceV2) {\n\treturn &ServiceV2{\n\t\trootPath:  path,\n\t\tskipNames: []string{\".git\"},\n\t}\n}\n"
  },
  {
    "path": "core/fs/service_v2_test.go",
    "content": "package fs\n\nimport (\n\t\"github.com/apex/log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestServiceV2_List(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\ttestDir := filepath.Join(rootDir, \"dir\")\n\t_ = os.Mkdir(testDir, 0755)\n\t_ = os.WriteFile(filepath.Join(testDir, \"file1.txt\"), []byte(\"hello world\"), 0644)\n\t_ = os.WriteFile(filepath.Join(testDir, \"file2.txt\"), []byte(\"hello again\"), 0644)\n\tsubDir := filepath.Join(testDir, \"subdir\")\n\t_ = os.Mkdir(subDir, 0755)\n\t_ = os.WriteFile(filepath.Join(subDir, \"file3.txt\"), []byte(\"subdir file\"), 0644)\n\t_ = os.Mkdir(filepath.Join(testDir, \"empty\"), 0755) // explicitly testing empty dir inclusion\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\tfiles, err := svc.List(\"dir\")\n\tif err != nil {\n\t\tt.Errorf(\"Failed to list files: %v\", err)\n\t}\n\n\t// Assert correct number of items\n\tassert.Len(t, files, 4)\n\t// Use a map to verify presence and characteristics of files/directories to avoid order issues\n\titems := make(map[string]bool)\n\tfor _, item := range files {\n\t\titems[item.GetName()] = item.GetIsDir()\n\t}\n\n\t_, file1Exists := items[\"file1.txt\"]\n\t_, file2Exists := items[\"file2.txt\"]\n\t_, subdirExists := items[\"subdir\"]\n\t_, emptyExists := items[\"empty\"]\n\n\tassert.True(t, file1Exists)\n\tassert.True(t, file2Exists)\n\tassert.True(t, subdirExists)\n\tassert.True(t, emptyExists) // Verify that the empty directory is included\n\n\tif subdirExists && len(files[2].GetChildren()) > 0 {\n\t\tassert.Equal(t, \"file3.txt\", files[2].GetChildren()[0].GetName())\n\t}\n}\n\nfunc TestServiceV2_GetFile(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\texpectedContent := []byte(\"hello world\")\n\t_ = os.WriteFile(filepath.Join(rootDir, \"file.txt\"), expectedContent, 0644)\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\tcontent, err := svc.GetFile(\"file.txt\")\n\tif err != nil {\n\t\tt.Errorf(\"Failed to get file: %v\", err)\n\t}\n\tassert.Equal(t, expectedContent, content)\n}\n\nfunc TestServiceV2_Delete(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\tfilePath := filepath.Join(rootDir, \"file.txt\")\n\t_ = os.WriteFile(filePath, []byte(\"hello world\"), 0644)\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\t// Delete the file\n\terr = svc.Delete(\"file.txt\")\n\tif err != nil {\n\t\tt.Errorf(\"Failed to delete file: %v\", err)\n\t}\n\n\t// Verify deletion\n\t_, err = os.Stat(filePath)\n\tassert.True(t, os.IsNotExist(err))\n}\n\nfunc TestServiceV2_CreateDir(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\t// Create a new directory\n\terr = svc.CreateDir(\"newDir\")\n\tif err != nil {\n\t\tt.Errorf(\"Failed to create directory: %v\", err)\n\t}\n\n\t// Verify the directory was created\n\t_, err = os.Stat(filepath.Join(rootDir, \"newDir\"))\n\tassert.NoError(t, err)\n}\n\nfunc TestServiceV2_Save(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\t// Save a new file\n\terr = svc.Save(\"newFile.txt\", []byte(\"Hello, world!\"))\n\tif err != nil {\n\t\tt.Errorf(\"Failed to save file: %v\", err)\n\t}\n\n\t// Verify the file was saved\n\tdata, err := os.ReadFile(filepath.Join(rootDir, \"newFile.txt\"))\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"Hello, world!\", string(data))\n}\n\nfunc TestServiceV2_Rename(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\t// Create a file to rename\n\t_ = os.WriteFile(filepath.Join(rootDir, \"oldName.txt\"), []byte(\"Hello, world!\"), 0644)\n\n\t// Rename the file\n\terr = svc.Rename(\"oldName.txt\", \"newName.txt\")\n\tif err != nil {\n\t\tt.Errorf(\"Failed to rename file: %v\", err)\n\t}\n\n\t// Verify the file was renamed\n\t_, err = os.Stat(filepath.Join(rootDir, \"newName.txt\"))\n\tassert.NoError(t, err)\n}\n\nfunc TestServiceV2_RenameDir(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\t// Create a directory to rename\n\t_ = os.Mkdir(filepath.Join(rootDir, \"oldName\"), 0755)\n\n\t// Rename the directory\n\terr = svc.Rename(\"oldName\", \"newName\")\n\tif err != nil {\n\t\tt.Errorf(\"Failed to rename directory: %v\", err)\n\t}\n\n\t// Verify the directory was renamed\n\t_, err = os.Stat(filepath.Join(rootDir, \"newName\"))\n\tassert.NoError(t, err)\n}\n\nfunc TestServiceV2_Copy(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\t// Create a file to copy\n\t_ = os.WriteFile(filepath.Join(rootDir, \"source.txt\"), []byte(\"Hello, world!\"), 0644)\n\n\t// Copy the file\n\terr = svc.Copy(\"source.txt\", \"copy.txt\")\n\tif err != nil {\n\t\tt.Errorf(\"Failed to copy file: %v\", err)\n\t}\n\n\t// Verify the file was copied\n\tdata, err := os.ReadFile(filepath.Join(rootDir, \"copy.txt\"))\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"Hello, world!\", string(data))\n}\n\nfunc TestServiceV2_CopyDir(t *testing.T) {\n\trootDir, err := os.MkdirTemp(\"\", \"fsTest\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp dir: %v\", err)\n\t}\n\tdefer func() {\n\t\terr := os.RemoveAll(rootDir) // clean up\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Failed to remove temp dir: %v\", err)\n\t\t}\n\t}()\n\n\tsvc := NewFsServiceV2(rootDir)\n\n\t// Create a directory to copy\n\t_ = os.Mkdir(filepath.Join(rootDir, \"sourceDir\"), 0755)\n\t_ = os.WriteFile(filepath.Join(rootDir, \"sourceDir\", \"file.txt\"), []byte(\"Hello, world!\"), 0644)\n\n\t// Copy the directory\n\terr = svc.Copy(\"sourceDir\", \"copyDir\")\n\tif err != nil {\n\t\tt.Errorf(\"Failed to copy directory: %v\", err)\n\t}\n\n\t// Verify the directory was copied\n\t_, err = os.Stat(filepath.Join(rootDir, \"copyDir\"))\n\tassert.NoError(t, err)\n\n\t// Verify the file inside the directory was copied\n\tdata, err := os.ReadFile(filepath.Join(rootDir, \"copyDir\", \"file.txt\"))\n\tassert.NoError(t, err)\n\tassert.Equal(t, \"Hello, world!\", string(data))\n}\n"
  },
  {
    "path": "core/go.mod",
    "content": "module github.com/crawlab-team/crawlab/core\n\ngo 1.22\n\nreplace (\n\tgithub.com/crawlab-team/crawlab/db => ../db\n\tgithub.com/crawlab-team/crawlab/fs => ../fs\n\tgithub.com/crawlab-team/crawlab/grpc => ../grpc\n\tgithub.com/crawlab-team/crawlab/trace => ../trace\n\tgithub.com/crawlab-team/crawlab/vcs => ../vcs\n)\n\nrequire (\n\tgithub.com/PuerkitoBio/goquery v1.9.2\n\tgithub.com/ReneKroon/ttlcache v1.7.0\n\tgithub.com/apex/log v1.9.0\n\tgithub.com/cenkalti/backoff/v4 v4.3.0\n\tgithub.com/crawlab-team/crawlab/db v0.0.0-20240731075841-7fe770ae9d15\n\tgithub.com/crawlab-team/crawlab/fs v0.0.0-20240731075841-7fe770ae9d15\n\tgithub.com/crawlab-team/crawlab/grpc v0.0.0-20240731075841-7fe770ae9d15\n\tgithub.com/crawlab-team/crawlab/trace v0.0.0-20240731075841-7fe770ae9d15\n\tgithub.com/crawlab-team/crawlab/vcs v0.0.0-20240731075841-7fe770ae9d15\n\tgithub.com/elastic/go-elasticsearch/v8 v8.14.0\n\tgithub.com/emirpasic/gods v1.18.1\n\tgithub.com/fsnotify/fsnotify v1.7.0\n\tgithub.com/gin-gonic/gin v1.10.0\n\tgithub.com/golang-jwt/jwt/v5 v5.2.1\n\tgithub.com/gomarkdown/markdown v0.0.0-20240626202925-2eda941fd024\n\tgithub.com/google/uuid v1.6.0\n\tgithub.com/gorilla/websocket v1.5.3\n\tgithub.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4\n\tgithub.com/hashicorp/go-uuid v1.0.3\n\tgithub.com/imroc/req v0.3.2\n\tgithub.com/mitchellh/go-homedir v1.1.0\n\tgithub.com/pkg/errors v0.9.1\n\tgithub.com/robfig/cron/v3 v3.0.0\n\tgithub.com/segmentio/kafka-go v0.4.39\n\tgithub.com/shirou/gopsutil v3.21.11+incompatible\n\tgithub.com/smartystreets/goconvey v1.6.4\n\tgithub.com/spf13/cobra v1.3.0\n\tgithub.com/spf13/viper v1.19.0\n\tgithub.com/stretchr/testify v1.9.0\n\tgithub.com/thoas/go-funk v0.9.1\n\tgithub.com/upper/db/v4 v4.6.0\n\tgo.mongodb.org/mongo-driver v1.15.1\n\tgo.uber.org/dig v1.10.0\n\tgolang.org/x/oauth2 v0.21.0\n\tgoogle.golang.org/api v0.189.0\n\tgoogle.golang.org/grpc v1.65.0\n\tgopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df\n)\n\nrequire (\n\tdario.cat/mergo v1.0.0 // indirect\n\tgithub.com/cyphar/filepath-securejoin v0.2.4 // indirect\n)\n\nrequire (\n\tcloud.google.com/go/auth v0.7.2 // indirect\n\tcloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect\n\tcloud.google.com/go/compute/metadata v0.5.0 // indirect\n\tgithub.com/Microsoft/go-winio v0.6.1 // indirect\n\tgithub.com/ProtonMail/go-crypto v1.0.0 // indirect\n\tgithub.com/andybalholm/cascadia v1.3.2 // indirect\n\tgithub.com/bytedance/sonic v1.11.6 // indirect\n\tgithub.com/bytedance/sonic/loader v0.1.1 // indirect\n\tgithub.com/cloudflare/circl v1.3.7 // indirect\n\tgithub.com/cloudwego/base64x v0.1.4 // indirect\n\tgithub.com/cloudwego/iasm v0.2.0 // indirect\n\tgithub.com/crawlab-team/goseaweedfs v0.6.3 // indirect\n\tgithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect\n\tgithub.com/denisenkom/go-mssqldb v0.11.0 // indirect\n\tgithub.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect\n\tgithub.com/felixge/httpsnoop v1.0.4 // indirect\n\tgithub.com/gabriel-vasile/mimetype v1.4.3 // indirect\n\tgithub.com/gin-contrib/sse v0.1.0 // indirect\n\tgithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect\n\tgithub.com/go-git/go-billy/v5 v5.5.0 // indirect\n\tgithub.com/go-git/go-git/v5 v5.12.0 // indirect\n\tgithub.com/go-logr/logr v1.4.2 // indirect\n\tgithub.com/go-logr/stdr v1.2.2 // indirect\n\tgithub.com/go-ole/go-ole v1.2.6 // indirect\n\tgithub.com/go-playground/locales v0.14.1 // indirect\n\tgithub.com/go-playground/universal-translator v0.18.1 // indirect\n\tgithub.com/go-playground/validator/v10 v10.20.0 // indirect\n\tgithub.com/go-sql-driver/mysql v1.6.0 // indirect\n\tgithub.com/goccy/go-json v0.10.2 // indirect\n\tgithub.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect\n\tgithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect\n\tgithub.com/golang/snappy v0.0.4 // indirect\n\tgithub.com/google/s2a-go v0.1.8 // indirect\n\tgithub.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect\n\tgithub.com/googleapis/gax-go/v2 v2.13.0 // indirect\n\tgithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect\n\tgithub.com/hashicorp/hcl v1.0.0 // indirect\n\tgithub.com/inconshreveable/mousetrap v1.0.0 // indirect\n\tgithub.com/jackc/chunkreader/v2 v2.0.1 // indirect\n\tgithub.com/jackc/pgconn v1.14.3 // indirect\n\tgithub.com/jackc/pgio v1.0.0 // indirect\n\tgithub.com/jackc/pgpassfile v1.0.0 // indirect\n\tgithub.com/jackc/pgproto3/v2 v2.3.3 // indirect\n\tgithub.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect\n\tgithub.com/jackc/pgtype v1.14.0 // indirect\n\tgithub.com/jackc/pgx/v4 v4.18.2 // indirect\n\tgithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect\n\tgithub.com/json-iterator/go v1.1.12 // indirect\n\tgithub.com/jtolds/gls v4.20.0+incompatible // indirect\n\tgithub.com/kevinburke/ssh_config v1.2.0 // indirect\n\tgithub.com/klauspost/compress v1.17.7 // indirect\n\tgithub.com/klauspost/cpuid/v2 v2.2.7 // indirect\n\tgithub.com/leodido/go-urn v1.4.0 // indirect\n\tgithub.com/lib/pq v1.10.4 // indirect\n\tgithub.com/magiconair/properties v1.8.7 // indirect\n\tgithub.com/mattn/go-isatty v0.0.20 // indirect\n\tgithub.com/mattn/go-sqlite3 v1.14.9 // indirect\n\tgithub.com/mitchellh/mapstructure v1.5.0 // indirect\n\tgithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect\n\tgithub.com/modern-go/reflect2 v1.0.2 // indirect\n\tgithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect\n\tgithub.com/pelletier/go-toml/v2 v2.2.2 // indirect\n\tgithub.com/pierrec/lz4/v4 v4.1.18 // indirect\n\tgithub.com/pjbgf/sha1cd v0.3.0 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect\n\tgithub.com/sagikazarmark/locafero v0.4.0 // indirect\n\tgithub.com/sagikazarmark/slog-shim v0.1.0 // indirect\n\tgithub.com/segmentio/fasthash v1.0.3 // indirect\n\tgithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect\n\tgithub.com/skeema/knownhosts v1.2.2 // indirect\n\tgithub.com/smartystreets/assertions v1.0.0 // indirect\n\tgithub.com/sourcegraph/conc v0.3.0 // indirect\n\tgithub.com/spf13/afero v1.11.0 // indirect\n\tgithub.com/spf13/cast v1.6.0 // indirect\n\tgithub.com/spf13/pflag v1.0.5 // indirect\n\tgithub.com/stretchr/objx v0.5.2 // indirect\n\tgithub.com/subosito/gotenv v1.6.0 // indirect\n\tgithub.com/tklauser/go-sysconf v0.3.9 // indirect\n\tgithub.com/tklauser/numcpus v0.3.0 // indirect\n\tgithub.com/twitchyliquid64/golang-asm v0.15.1 // indirect\n\tgithub.com/ugorji/go/codec v1.2.12 // indirect\n\tgithub.com/xanzy/ssh-agent v0.3.3 // indirect\n\tgithub.com/xdg-go/pbkdf2 v1.0.0 // indirect\n\tgithub.com/xdg-go/scram v1.1.2 // indirect\n\tgithub.com/xdg-go/stringprep v1.0.4 // indirect\n\tgithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect\n\tgithub.com/yusufpapurcu/wmi v1.2.2 // indirect\n\tgithub.com/ztrue/tracerr v0.4.0 // indirect\n\tgo.opencensus.io v0.24.0 // indirect\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect\n\tgo.opentelemetry.io/otel v1.28.0 // indirect\n\tgo.opentelemetry.io/otel/metric v1.28.0 // indirect\n\tgo.opentelemetry.io/otel/sdk v1.24.0 // indirect\n\tgo.opentelemetry.io/otel/trace v1.28.0 // indirect\n\tgo.uber.org/atomic v1.9.0 // indirect\n\tgo.uber.org/goleak v1.1.11 // indirect\n\tgo.uber.org/multierr v1.9.0 // indirect\n\tgolang.org/x/arch v0.8.0 // indirect\n\tgolang.org/x/crypto v0.25.0 // indirect\n\tgolang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect\n\tgolang.org/x/mod v0.17.0 // indirect\n\tgolang.org/x/net v0.27.0 // indirect\n\tgolang.org/x/sync v0.7.0 // indirect\n\tgolang.org/x/sys v0.22.0 // indirect\n\tgolang.org/x/text v0.16.0 // indirect\n\tgolang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f // indirect\n\tgoogle.golang.org/protobuf v1.34.2 // indirect\n\tgopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect\n\tgopkg.in/ini.v1 v1.67.0 // indirect\n\tgopkg.in/warnings.v0 v0.1.2 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "core/go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=\ncloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=\ncloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=\ncloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=\ncloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=\ncloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=\ncloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=\ncloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=\ncloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=\ncloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=\ncloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=\ncloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=\ncloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=\ncloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=\ncloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=\ncloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=\ncloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=\ncloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=\ncloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=\ncloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=\ncloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=\ncloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=\ncloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=\ncloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=\ncloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=\ncloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM=\ncloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=\ncloud.google.com/go/auth v0.7.2 h1:uiha352VrCDMXg+yoBtaD0tUF4Kv9vrtrWPYXwutnDE=\ncloud.google.com/go/auth v0.7.2/go.mod h1:VEc4p5NNxycWQTMQEDQF0bd6aTMb6VgYDXEwiJJQAbs=\ncloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI=\ncloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I=\ncloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=\ncloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=\ncloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=\ncloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=\ncloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=\ncloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=\ncloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY=\ncloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY=\ncloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=\ncloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=\ncloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY=\ncloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=\ncloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=\ncloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=\ncloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=\ncloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=\ncloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=\ncloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=\ncloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=\ncloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=\ndario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=\ndario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=\ndmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=\ngithub.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=\ngithub.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=\ngithub.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=\ngithub.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=\ngithub.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=\ngithub.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=\ngithub.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=\ngithub.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78=\ngithub.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=\ngithub.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE=\ngithub.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk=\ngithub.com/ReneKroon/ttlcache v1.7.0 h1:8BkjFfrzVFXyrqnMtezAaJ6AHPSsVV10m6w28N/Fgkk=\ngithub.com/ReneKroon/ttlcache v1.7.0/go.mod h1:8BGGzdumrIjWxdRx8zpK6L3oGMWvIXdvB2GD1cfvd+I=\ngithub.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=\ngithub.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=\ngithub.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=\ngithub.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=\ngithub.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=\ngithub.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=\ngithub.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=\ngithub.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0=\ngithub.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=\ngithub.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=\ngithub.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE=\ngithub.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=\ngithub.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=\ngithub.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=\ngithub.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=\ngithub.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=\ngithub.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=\ngithub.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=\ngithub.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=\ngithub.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=\ngithub.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=\ngithub.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=\ngithub.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=\ngithub.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=\ngithub.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=\ngithub.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=\ngithub.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=\ngithub.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=\ngithub.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=\ngithub.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=\ngithub.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=\ngithub.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=\ngithub.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=\ngithub.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=\ngithub.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=\ngithub.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=\ngithub.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=\ngithub.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=\ngithub.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=\ngithub.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=\ngithub.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=\ngithub.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=\ngithub.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=\ngithub.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=\ngithub.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=\ngithub.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=\ngithub.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=\ngithub.com/crawlab-team/goseaweedfs v0.6.3 h1:f96H2QCLrZpof9na1mhIKouKrv8p32XRUyouSVm4YHU=\ngithub.com/crawlab-team/goseaweedfs v0.6.3/go.mod h1:Anqw9QErRJpTeVAVdcSfzprGzUz7OW4MVCHLJjKeO1U=\ngithub.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=\ngithub.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=\ngithub.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/denisenkom/go-mssqldb v0.11.0 h1:9rHa233rhdOyrz2GcP9NM+gi2psgJZ4GWDpL/7ND8HI=\ngithub.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=\ngithub.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=\ngithub.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA=\ngithub.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=\ngithub.com/elastic/go-elasticsearch/v8 v8.14.0 h1:1ywU8WFReLLcxE1WJqii3hTtbPUE2hc38ZK/j4mMFow=\ngithub.com/elastic/go-elasticsearch/v8 v8.14.0/go.mod h1:WRvnlGkSuZyp83M2U8El/LGXpCjYLrvlkSgkAH4O5I4=\ngithub.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=\ngithub.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=\ngithub.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=\ngithub.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=\ngithub.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=\ngithub.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=\ngithub.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=\ngithub.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ=\ngithub.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=\ngithub.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=\ngithub.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=\ngithub.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=\ngithub.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=\ngithub.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=\ngithub.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=\ngithub.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=\ngithub.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=\ngithub.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=\ngithub.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=\ngithub.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=\ngithub.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=\ngithub.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=\ngithub.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=\ngithub.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=\ngithub.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=\ngithub.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=\ngithub.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=\ngithub.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=\ngithub.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys=\ngithub.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY=\ngithub.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=\ngithub.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=\ngithub.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=\ngithub.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=\ngithub.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=\ngithub.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=\ngithub.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=\ngithub.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=\ngithub.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=\ngithub.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=\ngithub.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=\ngithub.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=\ngithub.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=\ngithub.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=\ngithub.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=\ngithub.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=\ngithub.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=\ngithub.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=\ngithub.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=\ngithub.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=\ngithub.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=\ngithub.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=\ngithub.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=\ngithub.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=\ngithub.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=\ngithub.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=\ngithub.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=\ngithub.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=\ngithub.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=\ngithub.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=\ngithub.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=\ngithub.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=\ngithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=\ngithub.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=\ngithub.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=\ngithub.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=\ngithub.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=\ngithub.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=\ngithub.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=\ngithub.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=\ngithub.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=\ngithub.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=\ngithub.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=\ngithub.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=\ngithub.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=\ngithub.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/gomarkdown/markdown v0.0.0-20240626202925-2eda941fd024 h1:saBP362Qm7zDdDXqv61kI4rzhmLFq3Z1gx34xpl6cWE=\ngithub.com/gomarkdown/markdown v0.0.0-20240626202925-2eda941fd024/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=\ngithub.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=\ngithub.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=\ngithub.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=\ngithub.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=\ngithub.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM=\ngithub.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=\ngithub.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=\ngithub.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=\ngithub.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=\ngithub.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=\ngithub.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=\ngithub.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s=\ngithub.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=\ngithub.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=\ngithub.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=\ngithub.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=\ngithub.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=\ngithub.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=\ngithub.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=\ngithub.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=\ngithub.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=\ngithub.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=\ngithub.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=\ngithub.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=\ngithub.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=\ngithub.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=\ngithub.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=\ngithub.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=\ngithub.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=\ngithub.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=\ngithub.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=\ngithub.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=\ngithub.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=\ngithub.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY=\ngithub.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=\ngithub.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=\ngithub.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=\ngithub.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk=\ngithub.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=\ngithub.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/imroc/req v0.3.2 h1:M/JkeU6RPmX+WYvT2vaaOL0K+q8ufL5LxwvJc4xeB4o=\ngithub.com/imroc/req v0.3.2/go.mod h1:F+NZ+2EFSo6EFXdeIbpfE9hcC233id70kf0byW97Caw=\ngithub.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=\ngithub.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=\ngithub.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk=\ngithub.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps=\ngithub.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=\ngithub.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=\ngithub.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=\ngithub.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=\ngithub.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=\ngithub.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=\ngithub.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=\ngithub.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=\ngithub.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=\ngithub.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=\ngithub.com/jackc/pgconn v1.11.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=\ngithub.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w=\ngithub.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM=\ngithub.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=\ngithub.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=\ngithub.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=\ngithub.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=\ngithub.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=\ngithub.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=\ngithub.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=\ngithub.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=\ngithub.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=\ngithub.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=\ngithub.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=\ngithub.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=\ngithub.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=\ngithub.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag=\ngithub.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=\ngithub.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=\ngithub.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=\ngithub.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=\ngithub.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=\ngithub.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=\ngithub.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=\ngithub.com/jackc/pgtype v1.10.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=\ngithub.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw=\ngithub.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=\ngithub.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=\ngithub.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=\ngithub.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=\ngithub.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=\ngithub.com/jackc/pgx/v4 v4.15.0/go.mod h1:D/zyOyXiaM1TmVWnOM18p0xdDtdakRBa0RsVGI3U3bw=\ngithub.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU=\ngithub.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=\ngithub.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=\ngithub.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=\ngithub.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0=\ngithub.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=\ngithub.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=\ngithub.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=\ngithub.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=\ngithub.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=\ngithub.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=\ngithub.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=\ngithub.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=\ngithub.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=\ngithub.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=\ngithub.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=\ngithub.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=\ngithub.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=\ngithub.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=\ngithub.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=\ngithub.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=\ngithub.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=\ngithub.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=\ngithub.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk=\ngithub.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=\ngithub.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=\ngithub.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=\ngithub.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=\ngithub.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=\ngithub.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=\ngithub.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=\ngithub.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=\ngithub.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=\ngithub.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=\ngithub.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=\ngithub.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=\ngithub.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA=\ngithub.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=\ngithub.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=\ngithub.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=\ngithub.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=\ngithub.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=\ngithub.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=\ngithub.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=\ngithub.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=\ngithub.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=\ngithub.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=\ngithub.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=\ngithub.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=\ngithub.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=\ngithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0=\ngithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=\ngithub.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=\ngithub.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=\ngithub.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=\ngithub.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=\ngithub.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=\ngithub.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=\ngithub.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ=\ngithub.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=\ngithub.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=\ngithub.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=\ngithub.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=\ngithub.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=\ngithub.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=\ngithub.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=\ngithub.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=\ngithub.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=\ngithub.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=\ngithub.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=\ngithub.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=\ngithub.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=\ngithub.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=\ngithub.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=\ngithub.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=\ngithub.com/robfig/cron/v3 v3.0.0 h1:kQ6Cb7aHOHTSzNVNEhmp8EcWKLb4CbiMW9h9VyIhO4E=\ngithub.com/robfig/cron/v3 v3.0.0/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=\ngithub.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=\ngithub.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=\ngithub.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=\ngithub.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=\ngithub.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=\ngithub.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=\ngithub.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig=\ngithub.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=\ngithub.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=\ngithub.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=\ngithub.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=\ngithub.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=\ngithub.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=\ngithub.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM=\ngithub.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=\ngithub.com/segmentio/kafka-go v0.4.39 h1:75smaomhvkYRwtuOwqLsdhgCG30B82NsbdkdDfFbvrw=\ngithub.com/segmentio/kafka-go v0.4.39/go.mod h1:T0MLgygYvmqmBvC+s8aCcbVNfJN4znVne5j0Pzowp/Q=\ngithub.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=\ngithub.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=\ngithub.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=\ngithub.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=\ngithub.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=\ngithub.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=\ngithub.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=\ngithub.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=\ngithub.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=\ngithub.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=\ngithub.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=\ngithub.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A=\ngithub.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=\ngithub.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=\ngithub.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8=\ngithub.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=\ngithub.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=\ngithub.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=\ngithub.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=\ngithub.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=\ngithub.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=\ngithub.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=\ngithub.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=\ngithub.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=\ngithub.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=\ngithub.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=\ngithub.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=\ngithub.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=\ngithub.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=\ngithub.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0=\ngithub.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4=\ngithub.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=\ngithub.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=\ngithub.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM=\ngithub.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=\ngithub.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=\ngithub.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=\ngithub.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=\ngithub.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=\ngithub.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngithub.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=\ngithub.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=\ngithub.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=\ngithub.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=\ngithub.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=\ngithub.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=\ngithub.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=\ngithub.com/thoas/go-funk v0.9.1/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q=\ngithub.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=\ngithub.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk=\ngithub.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk=\ngithub.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc=\ngithub.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=\ngithub.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=\ngithub.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=\ngithub.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo=\ngithub.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=\ngithub.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ=\ngithub.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=\ngithub.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=\ngithub.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=\ngithub.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=\ngithub.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=\ngithub.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=\ngithub.com/upper/db/v4 v4.6.0 h1:0VmASnqrl/XN8Ehoq++HBgZ4zRD5j3GXygW8FhP0C5I=\ngithub.com/upper/db/v4 v4.6.0/go.mod h1:2mnRcPf+RcCXmVcD+o04LYlyu3UuF7ubamJia7CkN6s=\ngithub.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=\ngithub.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=\ngithub.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=\ngithub.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=\ngithub.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=\ngithub.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4=\ngithub.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=\ngithub.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=\ngithub.com/xdg/scram v1.0.5 h1:TuS0RFmt5Is5qm9Tm2SoD89OPqe4IRiFtyFY4iwWXsw=\ngithub.com/xdg/scram v1.0.5/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=\ngithub.com/xdg/stringprep v1.0.3 h1:cmL5Enob4W83ti/ZHuZLuKD/xqJfus4fVPwE+/BDm+4=\ngithub.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=\ngithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=\ngithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=\ngithub.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngithub.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=\ngithub.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=\ngithub.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=\ngithub.com/ztrue/tracerr v0.4.0 h1:vT5PFxwIGs7rCg9ZgJ/y0NmOpJkPCPFK8x0vVIYzd04=\ngithub.com/ztrue/tracerr v0.4.0/go.mod h1:PaFfYlas0DfmXNpo7Eay4MFhZUONqvXM+T2HyGPpngk=\ngo.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=\ngo.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs=\ngo.mongodb.org/mongo-driver v1.15.1 h1:l+RvoUOoMXFmADTLfYDm7On9dRm7p4T80/lEQM+r7HU=\ngo.mongodb.org/mongo-driver v1.15.1/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=\ngo.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=\ngo.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=\ngo.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=\ngo.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=\ngo.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=\ngo.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg=\ngo.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo=\ngo.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4=\ngo.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q=\ngo.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s=\ngo.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw=\ngo.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=\ngo.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g=\ngo.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI=\ngo.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=\ngo.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=\ngo.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/dig v1.10.0 h1:yLmDDj9/zuDjv3gz8GQGviXMs9TfysIUMUilCpgzUJY=\ngo.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw=\ngo.uber.org/goleak v0.10.0/go.mod h1:VCZuO8V8mFPlL0F5J5GK1rtHV3DrFcQ1R8ryq7FK0aI=\ngo.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=\ngo.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=\ngo.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=\ngo.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=\ngo.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=\ngo.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=\ngo.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=\ngo.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=\ngo.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=\ngo.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=\ngo.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=\ngolang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=\ngolang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=\ngolang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=\ngolang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=\ngolang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=\ngolang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=\ngolang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=\ngolang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=\ngolang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=\ngolang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=\ngolang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=\ngolang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=\ngolang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=\ngolang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=\ngolang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=\ngolang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=\ngolang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=\ngolang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=\ngolang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=\ngolang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=\ngolang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=\ngolang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=\ngolang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=\ngolang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=\ngolang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=\ngolang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=\ngolang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=\ngolang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=\ngolang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=\ngolang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=\ngolang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=\ngolang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=\ngolang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=\ngolang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=\ngolang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=\ngolang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=\ngolang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=\ngolang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=\ngolang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=\ngolang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=\ngolang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=\ngolang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=\ngolang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=\ngolang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=\ngolang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=\ngolang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=\ngolang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=\ngolang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=\ngolang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngoogle.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=\ngoogle.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=\ngoogle.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=\ngoogle.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=\ngoogle.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=\ngoogle.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=\ngoogle.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=\ngoogle.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=\ngoogle.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=\ngoogle.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=\ngoogle.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=\ngoogle.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=\ngoogle.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=\ngoogle.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=\ngoogle.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=\ngoogle.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=\ngoogle.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=\ngoogle.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=\ngoogle.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=\ngoogle.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw=\ngoogle.golang.org/api v0.189.0 h1:equMo30LypAkdkLMBqfeIqtyAnlyig1JSZArl4XPwdI=\ngoogle.golang.org/api v0.189.0/go.mod h1:FLWGJKb0hb+pU2j+rJqwbnsF+ym+fQs73rbJ+KAUgy8=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=\ngoogle.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=\ngoogle.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=\ngoogle.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=\ngoogle.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=\ngoogle.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=\ngoogle.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=\ngoogle.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=\ngoogle.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=\ngoogle.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=\ngoogle.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=\ngoogle.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=\ngoogle.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=\ngoogle.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=\ngoogle.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=\ngoogle.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=\ngoogle.golang.org/genproto v0.0.0-20240722135656-d784300faade h1:lKFsS7wpngDgSCeFn7MoLy+wBDQZ1UQIJD4UNM1Qvkg=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d h1:kHjw/5UfflP/L5EbledDrcG4C2597RtymmGRZvHiCuY=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f h1:RARaIm8pxYuxyNPbBQf5igT7XdOyCNtat1qAT2ZxjU4=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=\ngoogle.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=\ngoogle.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=\ngoogle.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=\ngoogle.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=\ngoogle.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=\ngoogle.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=\ngoogle.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=\ngoogle.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=\ngoogle.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=\ngoogle.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=\ngoogle.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=\ngoogle.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=\ngoogle.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=\ngoogle.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=\ngoogle.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=\ngoogle.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=\ngoogle.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=\ngoogle.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=\ngoogle.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=\ngoogle.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=\ngoogle.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\ngoogle.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngoogle.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=\ngoogle.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngoogle.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngoogle.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=\ngoogle.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=\ngopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=\ngopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=\ngopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=\ngopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=\ngopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=\ngopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=\ngopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=\ngopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=\ngopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=\nhonnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nhonnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nmodernc.org/b v1.0.2/go.mod h1:fVGfCIzkZw5RsuF2A2WHbJmY7FiMIq30nP4s52uWsoY=\nmodernc.org/db v1.0.3/go.mod h1:L4ltUg8tu2pkSJk+fKaRrXs/3EdW79ZKYQ5PfVDT53U=\nmodernc.org/file v1.0.3/go.mod h1:CNj/pwOfCtCbqiHcXDUlHBB2vWrzdaDCWdcnjtS1+XY=\nmodernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8=\nmodernc.org/golex v1.0.1/go.mod h1:QCA53QtsT1NdGkaZZkF5ezFwk4IXh4BGNafAARTC254=\nmodernc.org/internal v1.0.0/go.mod h1:VUD/+JAkhCpvkUitlEOnhpVxCgsBI90oTzSCRcqQVSM=\nmodernc.org/internal v1.0.2/go.mod h1:bycJAcev709ZU/47nil584PeBD+kbu8nv61ozeMso9E=\nmodernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk=\nmodernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk=\nmodernc.org/lldb v1.0.2/go.mod h1:ovbKqyzA9H/iPwHkAOH0qJbIQVT9rlijecenxDwVUi0=\nmodernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=\nmodernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=\nmodernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=\nmodernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=\nmodernc.org/ql v1.4.0/go.mod h1:q4c29Bgdx+iAtxx47ODW5Xo2X0PDkjSCK9NdQl6KFxc=\nmodernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k=\nmodernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw=\nmodernc.org/zappy v1.0.3/go.mod h1:w/Akq8ipfols/xZJdR5IYiQNOqC80qz2mVvsEwEbkiI=\nnullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=\nrsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=\nrsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=\nrsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=\nrsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=\n"
  },
  {
    "path": "core/grpc/client/client.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"github.com/apex/log\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/middlewares\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tgrpc2 \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/spf13/viper\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/connectivity\"\n\t\"io\"\n\t\"time\"\n)\n\ntype Client struct {\n\t// dependencies\n\tnodeCfgSvc interfaces.NodeConfigService\n\n\t// settings\n\tcfgPath       string\n\taddress       interfaces.Address\n\ttimeout       time.Duration\n\tsubscribeType string\n\thandleMessage bool\n\n\t// internals\n\tconn   *grpc.ClientConn\n\tstream grpc2.NodeService_SubscribeClient\n\tmsgCh  chan *grpc2.StreamMessage\n\terr    error\n\n\t// grpc clients\n\tModelDelegateClient    grpc2.ModelDelegateClient\n\tModelBaseServiceClient grpc2.ModelBaseServiceClient\n\tNodeClient             grpc2.NodeServiceClient\n\tTaskClient             grpc2.TaskServiceClient\n\tMessageClient          grpc2.MessageServiceClient\n}\n\nfunc (c *Client) Init() (err error) {\n\t// do nothing\n\treturn nil\n}\n\nfunc (c *Client) Start() (err error) {\n\t// connect\n\tif err := c.connect(); err != nil {\n\t\treturn err\n\t}\n\n\t// register rpc services\n\tif err := c.Register(); err != nil {\n\t\treturn err\n\t}\n\n\t// subscribe\n\tif err := c.subscribe(); err != nil {\n\t\treturn err\n\t}\n\n\t// handle stream message\n\tif c.handleMessage {\n\t\tgo c.handleStreamMessage()\n\t}\n\n\treturn nil\n}\n\nfunc (c *Client) Stop() (err error) {\n\t// skip if connection is nil\n\tif c.conn == nil {\n\t\treturn nil\n\t}\n\n\t// grpc server address\n\taddress := c.address.String()\n\n\t// unsubscribe\n\tif err := c.unsubscribe(); err != nil {\n\t\treturn err\n\t}\n\tlog.Infof(\"grpc client unsubscribed from %s\", address)\n\n\t// close connection\n\tif err := c.conn.Close(); err != nil {\n\t\treturn err\n\t}\n\tlog.Infof(\"grpc client disconnected from %s\", address)\n\n\treturn nil\n}\n\nfunc (c *Client) Register() (err error) {\n\t// model delegate\n\tc.ModelDelegateClient = grpc2.NewModelDelegateClient(c.conn)\n\n\t// model base service\n\tc.ModelBaseServiceClient = grpc2.NewModelBaseServiceClient(c.conn)\n\n\t// node\n\tc.NodeClient = grpc2.NewNodeServiceClient(c.conn)\n\n\t// task\n\tc.TaskClient = grpc2.NewTaskServiceClient(c.conn)\n\n\t// message\n\tc.MessageClient = grpc2.NewMessageServiceClient(c.conn)\n\n\t// log\n\tlog.Infof(\"[GrpcClient] grpc client registered client services\")\n\tlog.Debugf(\"[GrpcClient] ModelDelegateClient: %v\", c.ModelDelegateClient)\n\tlog.Debugf(\"[GrpcClient] ModelBaseServiceClient: %v\", c.ModelBaseServiceClient)\n\tlog.Debugf(\"[GrpcClient] NodeClient: %v\", c.NodeClient)\n\tlog.Debugf(\"[GrpcClient] TaskClient: %v\", c.TaskClient)\n\tlog.Debugf(\"[GrpcClient] MessageClient: %v\", c.MessageClient)\n\n\treturn nil\n}\n\nfunc (c *Client) GetModelDelegateClient() (res grpc2.ModelDelegateClient) {\n\treturn c.ModelDelegateClient\n}\n\nfunc (c *Client) GetModelBaseServiceClient() (res grpc2.ModelBaseServiceClient) {\n\treturn c.ModelBaseServiceClient\n}\n\nfunc (c *Client) GetNodeClient() grpc2.NodeServiceClient {\n\treturn c.NodeClient\n}\n\nfunc (c *Client) GetTaskClient() grpc2.TaskServiceClient {\n\treturn c.TaskClient\n}\n\nfunc (c *Client) GetMessageClient() grpc2.MessageServiceClient {\n\treturn c.MessageClient\n}\n\nfunc (c *Client) SetAddress(address interfaces.Address) {\n\tc.address = address\n}\n\nfunc (c *Client) SetTimeout(timeout time.Duration) {\n\tc.timeout = timeout\n}\n\nfunc (c *Client) SetSubscribeType(value string) {\n\tc.subscribeType = value\n}\n\nfunc (c *Client) SetHandleMessage(handleMessage bool) {\n\tc.handleMessage = handleMessage\n}\n\nfunc (c *Client) Context() (ctx context.Context, cancel context.CancelFunc) {\n\treturn context.WithTimeout(context.Background(), c.timeout)\n}\n\nfunc (c *Client) NewRequest(d interface{}) (req *grpc2.Request) {\n\treturn &grpc2.Request{\n\t\tNodeKey: c.nodeCfgSvc.GetNodeKey(),\n\t\tData:    c.getRequestData(d),\n\t}\n}\n\nfunc (c *Client) GetConfigPath() (path string) {\n\treturn c.cfgPath\n}\n\nfunc (c *Client) SetConfigPath(path string) {\n\tc.cfgPath = path\n}\n\nfunc (c *Client) NewModelBaseServiceRequest(id interfaces.ModelId, params interfaces.GrpcBaseServiceParams) (req *grpc2.Request, err error) {\n\tdata, err := json.Marshal(params)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tmsg := &entity.GrpcBaseServiceMessage{\n\t\tModelId: id,\n\t\tData:    data,\n\t}\n\treturn c.NewRequest(msg), nil\n}\n\nfunc (c *Client) GetMessageChannel() (msgCh chan *grpc2.StreamMessage) {\n\treturn c.msgCh\n}\n\nfunc (c *Client) Restart() (err error) {\n\tif c.needRestart() {\n\t\treturn c.Start()\n\t}\n\treturn nil\n}\n\nfunc (c *Client) IsStarted() (res bool) {\n\treturn c.conn != nil\n}\n\nfunc (c *Client) IsClosed() (res bool) {\n\tif c.conn != nil {\n\t\treturn c.conn.GetState() == connectivity.Shutdown\n\t}\n\treturn false\n}\n\nfunc (c *Client) Err() (err error) {\n\treturn c.err\n}\n\nfunc (c *Client) GetStream() (stream grpc2.NodeService_SubscribeClient) {\n\treturn c.stream\n}\n\nfunc (c *Client) connect() (err error) {\n\treturn backoff.RetryNotify(c._connect, backoff.NewExponentialBackOff(), utils.BackoffErrorNotify(\"grpc client connect\"))\n}\n\nfunc (c *Client) _connect() (err error) {\n\t// grpc server address\n\taddress := c.address.String()\n\n\t// timeout context\n\tctx, cancel := context.WithTimeout(context.Background(), c.timeout)\n\tdefer cancel()\n\n\t// connection\n\t// TODO: configure dial options\n\tvar opts []grpc.DialOption\n\topts = append(opts, grpc.WithInsecure())\n\topts = append(opts, grpc.WithBlock())\n\topts = append(opts, grpc.WithChainUnaryInterceptor(middlewares.GetAuthTokenUnaryChainInterceptor(c.nodeCfgSvc)))\n\topts = append(opts, grpc.WithChainStreamInterceptor(middlewares.GetAuthTokenStreamChainInterceptor(c.nodeCfgSvc)))\n\tc.conn, err = grpc.DialContext(ctx, address, opts...)\n\tif err != nil {\n\t\t_ = trace.TraceError(err)\n\t\treturn errors.ErrorGrpcClientFailedToStart\n\t}\n\tlog.Infof(\"[GrpcClient] grpc client connected to %s\", address)\n\n\treturn nil\n}\n\nfunc (c *Client) subscribe() (err error) {\n\tvar op func() error\n\tswitch c.subscribeType {\n\tcase constants.GrpcSubscribeTypeNode:\n\t\top = c._subscribeNode\n\tdefault:\n\t\treturn errors.ErrorGrpcInvalidType\n\t}\n\treturn backoff.RetryNotify(op, backoff.NewExponentialBackOff(), utils.BackoffErrorNotify(\"grpc client subscribe\"))\n}\n\nfunc (c *Client) _subscribeNode() (err error) {\n\treq := c.NewRequest(&entity.NodeInfo{\n\t\tKey:      c.nodeCfgSvc.GetNodeKey(),\n\t\tIsMaster: false,\n\t})\n\tc.stream, err = c.GetNodeClient().Subscribe(context.Background(), req)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// log\n\tlog.Infof(\"[GrpcClient] grpc client subscribed to remote server\")\n\n\treturn nil\n}\n\nfunc (c *Client) unsubscribe() (err error) {\n\treq := c.NewRequest(&entity.NodeInfo{\n\t\tKey:      c.nodeCfgSvc.GetNodeKey(),\n\t\tIsMaster: false,\n\t})\n\tif _, err = c.GetNodeClient().Unsubscribe(context.Background(), req); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (c *Client) handleStreamMessage() {\n\tlog.Infof(\"[GrpcClient] start handling stream message...\")\n\tfor {\n\t\t// resubscribe if stream is set to nil\n\t\tif c.stream == nil {\n\t\t\tif err := backoff.RetryNotify(c.subscribe, backoff.NewExponentialBackOff(), utils.BackoffErrorNotify(\"grpc client subscribe\")); err != nil {\n\t\t\t\tlog.Errorf(\"subscribe\")\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\t// receive stream message\n\t\tmsg, err := c.stream.Recv()\n\t\tlog.Debugf(\"[GrpcClient] received message: %v\", msg)\n\t\tif err != nil {\n\t\t\t// set error\n\t\t\tc.err = err\n\n\t\t\t// end\n\t\t\tif err == io.EOF {\n\t\t\t\tlog.Infof(\"[GrpcClient] received EOF signal, disconnecting\")\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// connection closed\n\t\t\tif c.IsClosed() {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// error\n\t\t\ttrace.PrintError(err)\n\t\t\tc.stream = nil\n\t\t\ttime.Sleep(1 * time.Second)\n\t\t\tcontinue\n\t\t}\n\n\t\t// send stream message to channel\n\t\tc.msgCh <- msg\n\n\t\t// reset error\n\t\tc.err = nil\n\t}\n}\n\nfunc (c *Client) needRestart() bool {\n\tswitch c.conn.GetState() {\n\tcase connectivity.Shutdown, connectivity.TransientFailure:\n\t\treturn true\n\tcase connectivity.Idle, connectivity.Connecting, connectivity.Ready:\n\t\treturn false\n\tdefault:\n\t\treturn false\n\t}\n}\n\nfunc (c *Client) getRequestData(d interface{}) (data []byte) {\n\tif d == nil {\n\t\treturn data\n\t}\n\tswitch d.(type) {\n\tcase []byte:\n\t\tdata = d.([]byte)\n\tdefault:\n\t\tvar err error\n\t\tdata, err = json.Marshal(d)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\treturn data\n}\n\nfunc NewClient() (res interfaces.GrpcClient, err error) {\n\t// client\n\tclient := &Client{\n\t\taddress: entity.NewAddress(&entity.AddressOptions{\n\t\t\tHost: constants.DefaultGrpcClientRemoteHost,\n\t\t\tPort: constants.DefaultGrpcClientRemotePort,\n\t\t}),\n\t\ttimeout:       10 * time.Second,\n\t\tmsgCh:         make(chan *grpc2.StreamMessage),\n\t\tsubscribeType: constants.GrpcSubscribeTypeNode,\n\t\thandleMessage: true,\n\t}\n\n\tif viper.GetString(\"grpc.address\") != \"\" {\n\t\tclient.address, err = entity.NewAddressFromString(viper.GetString(\"grpc.address\"))\n\t\tif err != nil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(nodeCfgSvc interfaces.NodeConfigService) {\n\t\tclient.nodeCfgSvc = nodeCfgSvc\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// init\n\tif err := client.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn client, nil\n}\n\nvar _client interfaces.GrpcClient\n\nfunc GetClient() (c interfaces.GrpcClient, err error) {\n\tif _client != nil {\n\t\treturn _client, nil\n\t}\n\t_client, err = createClient()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn _client, nil\n}\n\nfunc createClient() (client2 interfaces.GrpcClient, err error) {\n\tif err := container.GetContainer().Invoke(func(client interfaces.GrpcClient) {\n\t\tclient2 = client\n\t}); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\treturn client2, nil\n}\n"
  },
  {
    "path": "core/grpc/client/client_v2.go",
    "content": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"github.com/apex/log\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/middlewares\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tgrpc2 \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/spf13/viper\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/connectivity\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\t\"io\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype GrpcClientV2 struct {\n\t// dependencies\n\tnodeCfgSvc interfaces.NodeConfigService\n\n\t// settings\n\taddress interfaces.Address\n\ttimeout time.Duration\n\n\t// internals\n\tconn   *grpc.ClientConn\n\tstream grpc2.NodeService_SubscribeClient\n\tmsgCh  chan *grpc2.StreamMessage\n\terr    error\n\tonce   sync.Once\n\n\t// clients\n\tNodeClient               grpc2.NodeServiceClient\n\tTaskClient               grpc2.TaskServiceClient\n\tModelBaseServiceV2Client grpc2.ModelBaseServiceV2Client\n\tDependenciesClient       grpc2.DependenciesServiceV2Client\n\tMetricsClient            grpc2.MetricsServiceV2Client\n}\n\nfunc (c *GrpcClientV2) Start() (err error) {\n\tc.once.Do(func() {\n\t\t// connect\n\t\terr = c.connect()\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\n\t\t// register rpc services\n\t\tc.Register()\n\n\t\t// subscribe\n\t\terr = c.subscribe()\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\n\t\t// handle stream message\n\t\tgo c.handleStreamMessage()\n\t})\n\n\treturn err\n}\n\nfunc (c *GrpcClientV2) Stop() (err error) {\n\t// skip if connection is nil\n\tif c.conn == nil {\n\t\treturn nil\n\t}\n\n\t// grpc server address\n\taddress := c.address.String()\n\n\t// unsubscribe\n\tif err := c.unsubscribe(); err != nil {\n\t\treturn err\n\t}\n\tlog.Infof(\"grpc client unsubscribed from %s\", address)\n\n\t// close connection\n\tif err := c.conn.Close(); err != nil {\n\t\treturn err\n\t}\n\tlog.Infof(\"grpc client disconnected from %s\", address)\n\n\treturn nil\n}\n\nfunc (c *GrpcClientV2) Register() {\n\tc.NodeClient = grpc2.NewNodeServiceClient(c.conn)\n\tc.ModelBaseServiceV2Client = grpc2.NewModelBaseServiceV2Client(c.conn)\n\tc.TaskClient = grpc2.NewTaskServiceClient(c.conn)\n\tc.DependenciesClient = grpc2.NewDependenciesServiceV2Client(c.conn)\n\tc.MetricsClient = grpc2.NewMetricsServiceV2Client(c.conn)\n}\n\nfunc (c *GrpcClientV2) Context() (ctx context.Context, cancel context.CancelFunc) {\n\treturn context.WithTimeout(context.Background(), c.timeout)\n}\n\nfunc (c *GrpcClientV2) NewRequest(d interface{}) (req *grpc2.Request) {\n\treturn &grpc2.Request{\n\t\tNodeKey: c.nodeCfgSvc.GetNodeKey(),\n\t\tData:    c.getRequestData(d),\n\t}\n}\n\nfunc (c *GrpcClientV2) IsStarted() (res bool) {\n\treturn c.conn != nil\n}\n\nfunc (c *GrpcClientV2) IsClosed() (res bool) {\n\tif c.conn != nil {\n\t\treturn c.conn.GetState() == connectivity.Shutdown\n\t}\n\treturn false\n}\n\nfunc (c *GrpcClientV2) GetMessageChannel() (msgCh chan *grpc2.StreamMessage) {\n\treturn c.msgCh\n}\n\nfunc (c *GrpcClientV2) getRequestData(d interface{}) (data []byte) {\n\tif d == nil {\n\t\treturn data\n\t}\n\tswitch d.(type) {\n\tcase []byte:\n\t\tdata = d.([]byte)\n\tdefault:\n\t\tvar err error\n\t\tdata, err = json.Marshal(d)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\treturn data\n}\n\nfunc (c *GrpcClientV2) unsubscribe() (err error) {\n\treq := c.NewRequest(&entity.NodeInfo{\n\t\tKey:      c.nodeCfgSvc.GetNodeKey(),\n\t\tIsMaster: false,\n\t})\n\tif _, err = c.NodeClient.Unsubscribe(context.Background(), req); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (c *GrpcClientV2) connect() (err error) {\n\top := func() error {\n\t\t// grpc server address\n\t\taddress := c.address.String()\n\n\t\t// timeout context\n\t\tctx, cancel := context.WithTimeout(context.Background(), c.timeout)\n\t\tdefer cancel()\n\n\t\t// connection\n\t\t// TODO: configure dial options\n\t\tvar opts []grpc.DialOption\n\t\topts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))\n\t\topts = append(opts, grpc.WithBlock())\n\t\topts = append(opts, grpc.WithChainUnaryInterceptor(middlewares.GetAuthTokenUnaryChainInterceptor(c.nodeCfgSvc)))\n\t\topts = append(opts, grpc.WithChainStreamInterceptor(middlewares.GetAuthTokenStreamChainInterceptor(c.nodeCfgSvc)))\n\t\tc.conn, err = grpc.DialContext(ctx, address, opts...)\n\t\tif err != nil {\n\t\t\t_ = trace.TraceError(err)\n\t\t\treturn errors.ErrorGrpcClientFailedToStart\n\t\t}\n\t\tlog.Infof(\"[GrpcClient] grpc client connected to %s\", address)\n\n\t\treturn nil\n\t}\n\treturn backoff.RetryNotify(op, backoff.NewExponentialBackOff(), utils.BackoffErrorNotify(\"grpc client connect\"))\n}\n\nfunc (c *GrpcClientV2) subscribe() (err error) {\n\top := func() error {\n\t\treq := c.NewRequest(&entity.NodeInfo{\n\t\t\tKey:      c.nodeCfgSvc.GetNodeKey(),\n\t\t\tIsMaster: false,\n\t\t})\n\t\tc.stream, err = c.NodeClient.Subscribe(context.Background(), req)\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\n\t\t// log\n\t\tlog.Infof(\"[GrpcClient] grpc client subscribed to remote server\")\n\n\t\treturn nil\n\t}\n\treturn backoff.RetryNotify(op, backoff.NewExponentialBackOff(), utils.BackoffErrorNotify(\"grpc client subscribe\"))\n}\n\nfunc (c *GrpcClientV2) handleStreamMessage() {\n\tlog.Infof(\"[GrpcClient] start handling stream message...\")\n\tfor {\n\t\t// resubscribe if stream is set to nil\n\t\tif c.stream == nil {\n\t\t\tif err := backoff.RetryNotify(c.subscribe, backoff.NewExponentialBackOff(), utils.BackoffErrorNotify(\"grpc client subscribe\")); err != nil {\n\t\t\t\tlog.Errorf(\"subscribe\")\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\t// receive stream message\n\t\tmsg, err := c.stream.Recv()\n\t\tlog.Debugf(\"[GrpcClient] received message: %v\", msg)\n\t\tif err != nil {\n\t\t\t// set error\n\t\t\tc.err = err\n\n\t\t\t// end\n\t\t\tif err == io.EOF {\n\t\t\t\tlog.Infof(\"[GrpcClient] received EOF signal, disconnecting\")\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// connection closed\n\t\t\tif c.IsClosed() {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// error\n\t\t\ttrace.PrintError(err)\n\t\t\tc.stream = nil\n\t\t\ttime.Sleep(1 * time.Second)\n\t\t\tcontinue\n\t\t}\n\n\t\t// send stream message to channel\n\t\tc.msgCh <- msg\n\n\t\t// reset error\n\t\tc.err = nil\n\t}\n}\n\nfunc newGrpcClientV2() (c *GrpcClientV2) {\n\tclient := &GrpcClientV2{\n\t\taddress: entity.NewAddress(&entity.AddressOptions{\n\t\t\tHost: constants.DefaultGrpcClientRemoteHost,\n\t\t\tPort: constants.DefaultGrpcClientRemotePort,\n\t\t}),\n\t\ttimeout: 10 * time.Second,\n\t\tmsgCh:   make(chan *grpc2.StreamMessage),\n\t}\n\tclient.nodeCfgSvc = nodeconfig.GetNodeConfigService()\n\n\tif viper.GetString(\"grpc.address\") != \"\" {\n\t\taddress, err := entity.NewAddressFromString(viper.GetString(\"grpc.address\"))\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"failed to parse grpc address: %s\", viper.GetString(\"grpc.address\"))\n\t\t\tpanic(err)\n\t\t}\n\t\tclient.address = address\n\t}\n\n\treturn client\n}\n\nvar clientV2 *GrpcClientV2\nvar clientV2Once sync.Once\n\nfunc GetGrpcClientV2() *GrpcClientV2 {\n\tclientV2Once.Do(func() {\n\t\tclientV2 = newGrpcClientV2()\n\t})\n\treturn clientV2\n}\n"
  },
  {
    "path": "core/grpc/client/options.go",
    "content": "package client\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype Option func(client interfaces.GrpcClient)\n\nfunc WithConfigPath(path string) Option {\n\treturn func(c interfaces.GrpcClient) {\n\t\tc.SetConfigPath(path)\n\t}\n}\n\nfunc WithAddress(address interfaces.Address) Option {\n\treturn func(c interfaces.GrpcClient) {\n\t\tc.SetAddress(address)\n\t}\n}\n\nfunc WithTimeout(timeout time.Duration) Option {\n\treturn func(c interfaces.GrpcClient) {\n\t}\n}\n\nfunc WithSubscribeType(subscribeType string) Option {\n\treturn func(c interfaces.GrpcClient) {\n\t\tc.SetSubscribeType(subscribeType)\n\t}\n}\n\nfunc WithHandleMessage(handleMessage bool) Option {\n\treturn func(c interfaces.GrpcClient) {\n\t\tc.SetHandleMessage(handleMessage)\n\t}\n}\n\ntype PoolOption func(p interfaces.GrpcClientPool)\n\nfunc WithPoolConfigPath(path string) PoolOption {\n\treturn func(c interfaces.GrpcClientPool) {\n\t\tc.SetConfigPath(path)\n\t}\n}\n\nfunc WithPoolSize(size int) PoolOption {\n\treturn func(c interfaces.GrpcClientPool) {\n\t\tc.SetSize(size)\n\t}\n}\n"
  },
  {
    "path": "core/grpc/client/pool.go",
    "content": "package client\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/emirpasic/gods/lists/arraylist\"\n\t\"math/rand\"\n)\n\ntype Pool struct {\n\t// settings\n\tsize    int\n\tcfgPath string\n\n\t// internals\n\tclients *arraylist.List\n}\n\nfunc (p *Pool) GetConfigPath() (path string) {\n\treturn p.cfgPath\n}\n\nfunc (p *Pool) SetConfigPath(path string) {\n\tp.cfgPath = path\n}\n\nfunc (p *Pool) Init() (err error) {\n\tfor i := 0; i < p.size; i++ {\n\t\tif err := p.NewClient(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (p *Pool) NewClient() (err error) {\n\tc, err := NewClient()\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := c.Start(); err != nil {\n\t\treturn err\n\t}\n\tp.clients.Add(c)\n\treturn nil\n}\n\nfunc (p *Pool) GetClient() (c interfaces.GrpcClient, err error) {\n\tidx := p.getRandomIndex()\n\tres, ok := p.clients.Get(idx)\n\tif !ok {\n\t\treturn nil, trace.TraceError(errors.ErrorGrpcClientNotExists)\n\t}\n\tc, ok = res.(interfaces.GrpcClient)\n\tif !ok {\n\t\treturn nil, trace.TraceError(errors.ErrorGrpcInvalidType)\n\t}\n\treturn c, nil\n}\n\nfunc (p *Pool) SetSize(size int) {\n\tp.size = size\n}\n\nfunc (p *Pool) getRandomIndex() (idx int) {\n\treturn rand.Intn(p.clients.Size())\n}\n\nfunc NewPool(opts ...PoolOption) (p interfaces.GrpcClientPool, err error) {\n\t// pool\n\tp = &Pool{\n\t\tsize:    1,\n\t\tclients: arraylist.New(),\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(p)\n\t}\n\n\t// initialize\n\tif err := p.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn p, nil\n}\n"
  },
  {
    "path": "core/grpc/client/utils_proto.go",
    "content": "package client\n\nimport grpc2 \"github.com/crawlab-team/crawlab/grpc\"\n\nvar EmptyRequest = &grpc2.Request{}\n"
  },
  {
    "path": "core/grpc/middlewares/auth_token.go",
    "content": "package middlewares\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/grpc-ecosystem/go-grpc-middleware/auth\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/metadata\"\n)\n\nfunc GetAuthTokenFunc(nodeCfgSvc interfaces.NodeConfigService) grpc_auth.AuthFunc {\n\treturn func(ctx context.Context) (ctx2 context.Context, err error) {\n\t\t// authentication (token verification)\n\t\tmd, ok := metadata.FromIncomingContext(ctx)\n\t\tif !ok {\n\t\t\treturn nil, errors.ErrorGrpcUnauthorized\n\t\t}\n\n\t\t// auth key from incoming context\n\t\tres, ok := md[constants.GrpcHeaderAuthorization]\n\t\tif !ok {\n\t\t\treturn ctx, errors.ErrorGrpcUnauthorized\n\t\t}\n\t\tif len(res) != 1 {\n\t\t\treturn ctx, errors.ErrorGrpcUnauthorized\n\t\t}\n\t\tauthKey := res[0]\n\n\t\t// validate\n\t\tsvrAuthKey := nodeCfgSvc.GetAuthKey()\n\t\tif authKey != svrAuthKey {\n\t\t\treturn ctx, errors.ErrorGrpcUnauthorized\n\t\t}\n\n\t\treturn ctx, nil\n\t}\n}\n\nfunc GetAuthTokenUnaryChainInterceptor(nodeCfgSvc interfaces.NodeConfigService) grpc.UnaryClientInterceptor {\n\t// set auth key\n\tmd := metadata.Pairs(constants.GrpcHeaderAuthorization, nodeCfgSvc.GetAuthKey())\n\t//header := metadata.MD{}\n\t//header[constants.GrpcHeaderAuthorization] = []string{nodeCfgSvc.GetAuthKey()}\n\treturn func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {\n\t\tctx = metadata.NewOutgoingContext(context.Background(), md)\n\t\t//opts = append(opts, grpc.Header(&header))\n\t\treturn invoker(ctx, method, req, reply, cc, opts...)\n\t}\n}\n\nfunc GetAuthTokenStreamChainInterceptor(nodeCfgSvc interfaces.NodeConfigService) grpc.StreamClientInterceptor {\n\t// set auth key\n\tmd := metadata.Pairs(constants.GrpcHeaderAuthorization, nodeCfgSvc.GetAuthKey())\n\t//header := metadata.MD{}\n\t//header[constants.GrpcHeaderAuthorization] = []string{nodeCfgSvc.GetAuthKey()}\n\treturn func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) {\n\t\tctx = metadata.NewOutgoingContext(context.Background(), md)\n\t\t//opts = append(opts, grpc.Header(&header))\n\t\ts, err := streamer(ctx, desc, cc, method, opts...)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn s, nil\n\t}\n}\n"
  },
  {
    "path": "core/grpc/payload/model_service_v2_payload.go",
    "content": "package payload\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype ModelServiceV2Payload struct {\n\tType        string             `json:\"type,omitempty\"`\n\tId          primitive.ObjectID `json:\"_id,omitempty\"`\n\tQuery       bson.M             `json:\"query,omitempty\"`\n\tFindOptions *mongo.FindOptions `json:\"find_options,omitempty\"`\n\tModel       any                `json:\"model,omitempty\"`\n\tUpdate      bson.M             `json:\"update,omitempty\"`\n\tModels      []any              `json:\"models,omitempty\"`\n}\n"
  },
  {
    "path": "core/grpc/server/dependencies_server_v2.go",
    "content": "package server\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"github.com/apex/log\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tmongo2 \"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n\t\"io\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype DependenciesServerV2 struct {\n\tgrpc.UnimplementedDependenciesServiceV2Server\n\tmu      *sync.Mutex\n\tstreams map[string]*grpc.DependenciesServiceV2_ConnectServer\n}\n\nfunc (svr DependenciesServerV2) Connect(req *grpc.DependenciesServiceV2ConnectRequest, stream grpc.DependenciesServiceV2_ConnectServer) (err error) {\n\tsvr.mu.Lock()\n\tsvr.streams[req.NodeKey] = &stream\n\tsvr.mu.Unlock()\n\tlog.Info(\"[DependenciesServerV2] connected: \" + req.NodeKey)\n\n\t// Keep this scope alive because once this scope exits - the stream is closed\n\tfor {\n\t\tselect {\n\t\tcase <-stream.Context().Done():\n\t\t\tlog.Info(\"[DependenciesServerV2] disconnected: \" + req.NodeKey)\n\t\t\treturn nil\n\t\t}\n\t}\n}\n\nfunc (svr DependenciesServerV2) Sync(ctx context.Context, request *grpc.DependenciesServiceV2SyncRequest) (response *grpc.Response, err error) {\n\tn, err := service.NewModelServiceV2[models2.NodeV2]().GetOne(bson.M{\"key\": request.NodeKey}, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdepsDb, err := service.NewModelServiceV2[models2.DependencyV2]().GetMany(bson.M{\n\t\t\"node_id\": n.Id,\n\t\t\"type\":    request.Lang,\n\t}, nil)\n\tif err != nil {\n\t\tif !errors.Is(err, mongo.ErrNoDocuments) {\n\t\t\tlog.Errorf(\"[DependenciesServiceV2] get dependencies from db error: %v\", err)\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tdepsDbMap := make(map[string]*models2.DependencyV2)\n\tfor _, d := range depsDb {\n\t\tdepsDbMap[d.Name] = &d\n\t}\n\n\tvar depsToInsert []models2.DependencyV2\n\tdepsMap := make(map[string]*models2.DependencyV2)\n\tfor _, dep := range request.Dependencies {\n\t\td := models2.DependencyV2{\n\t\t\tName:    dep.Name,\n\t\t\tNodeId:  n.Id,\n\t\t\tType:    request.Lang,\n\t\t\tVersion: dep.Version,\n\t\t}\n\t\td.SetCreatedAt(time.Now())\n\n\t\tdepsMap[d.Name] = &d\n\n\t\t_, ok := depsDbMap[d.Name]\n\t\tif !ok {\n\t\t\tdepsToInsert = append(depsToInsert, d)\n\t\t}\n\t}\n\n\tvar depIdsToDelete []primitive.ObjectID\n\tfor _, d := range depsDb {\n\t\t_, ok := depsMap[d.Name]\n\t\tif !ok {\n\t\t\tdepIdsToDelete = append(depIdsToDelete, d.Id)\n\t\t}\n\t}\n\n\terr = mongo2.RunTransaction(func(ctx mongo.SessionContext) (err error) {\n\t\tif len(depIdsToDelete) > 0 {\n\t\t\terr = service.NewModelServiceV2[models2.DependencyV2]().DeleteMany(bson.M{\n\t\t\t\t\"_id\": bson.M{\"$in\": depIdsToDelete},\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\tlog.Errorf(\"[DependenciesServerV2] delete dependencies in db error: %v\", err)\n\t\t\t\ttrace.PrintError(err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tif len(depsToInsert) > 0 {\n\t\t\t_, err = service.NewModelServiceV2[models2.DependencyV2]().InsertMany(depsToInsert)\n\t\t\tif err != nil {\n\t\t\t\tlog.Errorf(\"[DependenciesServerV2] insert dependencies in db error: %v\", err)\n\t\t\t\ttrace.PrintError(err)\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t})\n\n\treturn nil, err\n}\n\nfunc (svr DependenciesServerV2) UpdateTaskLog(stream grpc.DependenciesServiceV2_UpdateTaskLogServer) (err error) {\n\tvar t *models2.DependencyTaskV2\n\tfor {\n\t\treq, err := stream.Recv()\n\t\tif err == io.EOF {\n\t\t\t// all messages have been received\n\t\t\treturn stream.SendAndClose(&grpc.Response{Message: \"update task log finished\"})\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttaskId, err := primitive.ObjectIDFromHex(req.TaskId)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif t == nil {\n\t\t\tt, err = service.NewModelServiceV2[models2.DependencyTaskV2]().GetById(taskId)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tvar logs []models2.DependencyLogV2\n\t\tfor _, line := range req.LogLines {\n\t\t\tl := models2.DependencyLogV2{\n\t\t\t\tTaskId:  taskId,\n\t\t\t\tContent: line,\n\t\t\t}\n\t\t\tl.SetCreated(t.CreatedBy)\n\t\t\tlogs = append(logs, l)\n\t\t}\n\t\t_, err = service.NewModelServiceV2[models2.DependencyLogV2]().InsertMany(logs)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n}\n\nfunc (svr DependenciesServerV2) GetStream(key string) (stream *grpc.DependenciesServiceV2_ConnectServer, err error) {\n\tsvr.mu.Lock()\n\tdefer svr.mu.Unlock()\n\tstream, ok := svr.streams[key]\n\tif !ok {\n\t\treturn nil, errors.New(\"stream not found\")\n\t}\n\treturn stream, nil\n}\n\nfunc NewDependenciesServerV2() *DependenciesServerV2 {\n\treturn &DependenciesServerV2{\n\t\tmu:      new(sync.Mutex),\n\t\tstreams: make(map[string]*grpc.DependenciesServiceV2_ConnectServer),\n\t}\n}\n\nvar depSvc *DependenciesServerV2\n\nfunc GetDependenciesServerV2() *DependenciesServerV2 {\n\tif depSvc != nil {\n\t\treturn depSvc\n\t}\n\tdepSvc = NewDependenciesServerV2()\n\treturn depSvc\n}\n"
  },
  {
    "path": "core/grpc/server/message_server.go",
    "content": "package server\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"io\"\n)\n\ntype MessageServer struct {\n\tgrpc.UnimplementedMessageServiceServer\n\n\t// dependencies\n\tmodelSvc service.ModelService\n\tcfgSvc   interfaces.NodeConfigService\n\n\t// internals\n\tserver interfaces.GrpcServer\n}\n\nfunc (svr MessageServer) Connect(stream grpc.MessageService_ConnectServer) (err error) {\n\tfinished := make(chan bool)\n\tfor {\n\t\tmsg, err := stream.Recv()\n\t\tnodeKey := \"unknown node key\"\n\t\tif msg != nil {\n\t\t\tnodeKey = msg.NodeKey\n\t\t}\n\t\tif err == io.EOF {\n\t\t\tlog.Infof(\"[MessageServer] received signal EOF from node[%s], now quit\", nodeKey)\n\t\t\treturn nil\n\t\t}\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"[MessageServer] receiving message error from node[%s]: %v\", nodeKey, err)\n\t\t\treturn err\n\t\t}\n\t\tswitch msg.Code {\n\t\tcase grpc.StreamMessageCode_CONNECT:\n\t\t\tlog.Infof(\"[MessageServer] received connect request from node[%s], key: %s\", nodeKey, msg.Key)\n\t\t\tsvr.server.SetSubscribe(msg.Key, &entity.GrpcSubscribe{\n\t\t\t\tStream:   stream,\n\t\t\t\tFinished: finished,\n\t\t\t})\n\t\tcase grpc.StreamMessageCode_DISCONNECT:\n\t\t\tlog.Infof(\"[MessageServer] received disconnect request from node[%s], key: %s\", nodeKey, msg.Key)\n\t\t\tsvr.server.DeleteSubscribe(msg.Key)\n\t\t\treturn nil\n\t\tcase grpc.StreamMessageCode_SEND:\n\t\t\tlog.Debugf(\"[MessageServer] received send request from node[%s] to %s\", nodeKey, msg.To)\n\t\t\tsub, err := svr.server.GetSubscribe(msg.To)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tsvr.redirectMessage(sub, msg)\n\t\t}\n\t}\n}\n\nfunc (svr MessageServer) redirectMessage(sub interfaces.GrpcSubscribe, msg *grpc.StreamMessage) {\n\tstream := sub.GetStream()\n\tif stream == nil {\n\t\ttrace.PrintError(errors.ErrorGrpcStreamNotFound)\n\t\treturn\n\t}\n\tlog.Debugf(\"[MessageServer] redirect message: %v\", msg)\n\tif err := stream.Send(msg); err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n}\n\nfunc NewMessageServer() (res *MessageServer, err error) {\n\t// message server\n\tsvr := &MessageServer{}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(\n\t\tmodelSvc service.ModelService,\n\t\tcfgSvc interfaces.NodeConfigService,\n\t) {\n\t\tsvr.modelSvc = modelSvc\n\t\tsvr.cfgSvc = cfgSvc\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svr, nil\n}\n"
  },
  {
    "path": "core/grpc/server/metrics_server_v2.go",
    "content": "package server\n\nimport (\n\t\"context\"\n\t\"github.com/apex/log\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype MetricsServerV2 struct {\n\tgrpc.UnimplementedMetricsServiceV2Server\n}\n\nfunc (svr MetricsServerV2) Send(_ context.Context, req *grpc.MetricsServiceV2SendRequest) (res *grpc.Response, err error) {\n\tlog.Info(\"[MetricsServerV2] received metric from node: \" + req.NodeKey)\n\tn, err := service.NewModelServiceV2[models2.NodeV2]().GetOne(bson.M{\"key\": req.NodeKey}, nil)\n\tif err != nil {\n\t\tlog.Errorf(\"[MetricsServerV2] error getting node: %v\", err)\n\t\treturn HandleError(err)\n\t}\n\tmetric := models2.MetricV2{\n\t\tType:                 req.Type,\n\t\tNodeId:               n.Id,\n\t\tCpuUsagePercent:      req.CpuUsagePercent,\n\t\tTotalMemory:          req.TotalMemory,\n\t\tAvailableMemory:      req.AvailableMemory,\n\t\tUsedMemory:           req.UsedMemory,\n\t\tUsedMemoryPercent:    req.UsedMemoryPercent,\n\t\tTotalDisk:            req.TotalDisk,\n\t\tAvailableDisk:        req.AvailableDisk,\n\t\tUsedDisk:             req.UsedDisk,\n\t\tUsedDiskPercent:      req.UsedDiskPercent,\n\t\tDiskReadBytesRate:    req.DiskReadBytesRate,\n\t\tDiskWriteBytesRate:   req.DiskWriteBytesRate,\n\t\tNetworkBytesSentRate: req.NetworkBytesSentRate,\n\t\tNetworkBytesRecvRate: req.NetworkBytesRecvRate,\n\t}\n\tmetric.CreatedAt = time.Unix(req.Timestamp, 0)\n\t_, err = service.NewModelServiceV2[models2.MetricV2]().InsertOne(metric)\n\tif err != nil {\n\t\tlog.Errorf(\"[MetricsServerV2] error inserting metric: %v\", err)\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc newMetricsServerV2() *MetricsServerV2 {\n\treturn &MetricsServerV2{}\n}\n\nvar metricsServerV2 *MetricsServerV2\nvar metricsServerV2Once = &sync.Once{}\n\nfunc GetMetricsServerV2() *MetricsServerV2 {\n\tif metricsServerV2 != nil {\n\t\treturn metricsServerV2\n\t}\n\tmetricsServerV2Once.Do(func() {\n\t\tmetricsServerV2 = newMetricsServerV2()\n\t})\n\treturn metricsServerV2\n}\n"
  },
  {
    "path": "core/grpc/server/model_base_service_binder.go",
    "content": "package server\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\nfunc NewModelBaseServiceBinder(req *grpc.Request) (b *ModelBaseServiceBinder) {\n\treturn &ModelBaseServiceBinder{\n\t\treq: req,\n\t\tmsg: &entity.GrpcBaseServiceMessage{},\n\t}\n}\n\ntype ModelBaseServiceBinder struct {\n\treq *grpc.Request\n\tmsg interfaces.GrpcModelBaseServiceMessage\n}\n\nfunc (b *ModelBaseServiceBinder) Bind() (res *entity.GrpcBaseServiceParams, err error) {\n\tif err := b.bindBaseServiceMessage(); err != nil {\n\t\treturn nil, err\n\t}\n\tparams := &entity.GrpcBaseServiceParams{}\n\treturn b.process(params)\n}\n\nfunc (b *ModelBaseServiceBinder) MustBind() (res interface{}) {\n\tres, err := b.Bind()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn res\n}\n\nfunc (b *ModelBaseServiceBinder) BindWithBaseServiceMessage() (params *entity.GrpcBaseServiceParams, msg interfaces.GrpcModelBaseServiceMessage, err error) {\n\tif err := json.Unmarshal(b.req.Data, b.msg); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tparams, err = b.Bind()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn params, b.msg, nil\n}\n\nfunc (b *ModelBaseServiceBinder) process(params *entity.GrpcBaseServiceParams) (res *entity.GrpcBaseServiceParams, err error) {\n\tif err := json.Unmarshal(b.msg.GetData(), params); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\treturn params, nil\n}\n\nfunc (b *ModelBaseServiceBinder) bindBaseServiceMessage() (err error) {\n\treturn json.Unmarshal(b.req.Data, b.msg)\n}\n"
  },
  {
    "path": "core/grpc/server/model_base_service_server.go",
    "content": "package server\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\ntype ModelBaseServiceServer struct {\n\tgrpc.UnimplementedModelBaseServiceServer\n\n\t// dependencies\n\tmodelSvc interfaces.ModelService\n}\n\nfunc (svr ModelBaseServiceServer) GetById(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\treturn svc.GetById(params.Id)\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) Get(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\treturn svc.Get(utils.NormalizeBsonMObjectId(params.Query), params.FindOptions)\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) GetList(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\tlist, err := svc.GetList(utils.NormalizeBsonMObjectId(params.Query), params.FindOptions)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdata, err := json.Marshal(list)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn data, nil\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) DeleteById(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\terr := svc.DeleteById(params.Id, params.User)\n\t\treturn nil, err\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) Delete(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\terr := svc.Delete(utils.NormalizeBsonMObjectId(params.Query), params.User)\n\t\treturn nil, err\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) DeleteList(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\terr := svc.DeleteList(utils.NormalizeBsonMObjectId(params.Query), params.User)\n\t\treturn nil, err\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) ForceDeleteList(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\terr := svc.ForceDeleteList(utils.NormalizeBsonMObjectId(params.Query), params.User)\n\t\treturn nil, err\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) UpdateById(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\terr := svc.UpdateById(params.Id, params.Update)\n\t\treturn nil, err\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) Update(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\terr := svc.Update(utils.NormalizeBsonMObjectId(params.Query), params.Update, params.Fields, params.User)\n\t\treturn nil, err\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) UpdateDoc(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\terr := svc.UpdateDoc(utils.NormalizeBsonMObjectId(params.Query), params.Doc, params.Fields, params.User)\n\t\treturn nil, err\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) Insert(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\terr := svc.Insert(params.User, params.Docs...)\n\t\treturn nil, err\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) Count(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn svr.handleRequest(req, func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error) {\n\t\treturn svc.Count(utils.NormalizeBsonMObjectId(params.Query))\n\t})\n}\n\nfunc (svr ModelBaseServiceServer) handleRequest(req *grpc.Request, handle handleBaseServiceRequest) (res *grpc.Response, err error) {\n\tparams, msg, err := NewModelBaseServiceBinder(req).BindWithBaseServiceMessage()\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tsvc := svr.modelSvc.GetBaseService(msg.GetModelId())\n\td, err := handle(params, svc)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tif d == nil {\n\t\treturn HandleSuccess()\n\t}\n\treturn HandleSuccessWithData(d)\n}\n\ntype handleBaseServiceRequest func(params *entity.GrpcBaseServiceParams, svc interfaces.ModelBaseService) (interface{}, error)\n\nfunc NewModelBaseServiceServer() (svr2 *ModelBaseServiceServer, err error) {\n\tsvr := &ModelBaseServiceServer{}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(modelSvc service.ModelService) {\n\t\tsvr.modelSvc = modelSvc\n\t}); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\treturn svr, nil\n}\n"
  },
  {
    "path": "core/grpc/server/model_base_service_v2_server.go",
    "content": "package server\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"reflect\"\n)\n\nvar (\n\ttypeNameColNameMap  = make(map[string]string)\n\ttypeOneNameModelMap = make(map[string]any)\n\ttypeOneInstances    = []any{\n\t\t*new(models2.TestModelV2),\n\t\t*new(models2.DataCollectionV2),\n\t\t*new(models2.DatabaseV2),\n\t\t*new(models2.DatabaseMetricV2),\n\t\t*new(models2.DependencyV2),\n\t\t*new(models2.DependencyLogV2),\n\t\t*new(models2.DependencySettingV2),\n\t\t*new(models2.DependencyTaskV2),\n\t\t*new(models2.EnvironmentV2),\n\t\t*new(models2.GitV2),\n\t\t*new(models2.MetricV2),\n\t\t*new(models2.NodeV2),\n\t\t*new(models2.NotificationChannelV2),\n\t\t*new(models2.NotificationRequestV2),\n\t\t*new(models2.NotificationSettingV2),\n\t\t*new(models2.PermissionV2),\n\t\t*new(models2.ProjectV2),\n\t\t*new(models2.RolePermissionV2),\n\t\t*new(models2.RoleV2),\n\t\t*new(models2.ScheduleV2),\n\t\t*new(models2.SettingV2),\n\t\t*new(models2.SpiderV2),\n\t\t*new(models2.SpiderStatV2),\n\t\t*new(models2.TaskQueueItemV2),\n\t\t*new(models2.TaskStatV2),\n\t\t*new(models2.TaskV2),\n\t\t*new(models2.TokenV2),\n\t\t*new(models2.UserRoleV2),\n\t\t*new(models2.UserV2),\n\t}\n)\n\nfunc init() {\n\tfor _, v := range typeOneInstances {\n\t\tt := reflect.TypeOf(v)\n\t\ttypeName := t.Name()\n\t\tcolName := service.GetCollectionNameByInstance(v)\n\t\ttypeNameColNameMap[typeName] = colName\n\t\ttypeOneNameModelMap[typeName] = v\n\t}\n}\n\nfunc GetOneInstanceModel(typeName string) any {\n\treturn typeOneNameModelMap[typeName]\n}\n\ntype ModelBaseServiceServerV2 struct {\n\tgrpc.UnimplementedModelBaseServiceV2Server\n}\n\nfunc (svr ModelBaseServiceServerV2) GetById(_ context.Context, req *grpc.ModelServiceV2GetByIdRequest) (res *grpc.Response, err error) {\n\tid, err := primitive.ObjectIDFromHex(req.Id)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := service.NewModelServiceV2WithColName[bson.M](typeNameColNameMap[req.ModelType])\n\tdata, err := modelSvc.GetById(id)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccessWithData(data)\n}\n\nfunc (svr ModelBaseServiceServerV2) GetOne(_ context.Context, req *grpc.ModelServiceV2GetOneRequest) (res *grpc.Response, err error) {\n\tvar query bson.M\n\terr = json.Unmarshal(req.Query, &query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tvar options mongo.FindOptions\n\terr = json.Unmarshal(req.FindOptions, &options)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := service.NewModelServiceV2WithColName[bson.M](typeNameColNameMap[req.ModelType])\n\tdata, err := modelSvc.GetOne(query, &options)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccessWithData(data)\n}\n\nfunc (svr ModelBaseServiceServerV2) GetMany(_ context.Context, req *grpc.ModelServiceV2GetManyRequest) (res *grpc.Response, err error) {\n\tvar query bson.M\n\terr = json.Unmarshal(req.Query, &query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tvar options mongo.FindOptions\n\terr = json.Unmarshal(req.FindOptions, &options)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := service.NewModelServiceV2WithColName[bson.M](typeNameColNameMap[req.ModelType])\n\tdata, err := modelSvc.GetMany(query, &options)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccessWithData(data)\n}\n\nfunc (svr ModelBaseServiceServerV2) DeleteById(_ context.Context, req *grpc.ModelServiceV2DeleteByIdRequest) (res *grpc.Response, err error) {\n\tid, err := primitive.ObjectIDFromHex(req.Id)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\terr = modelSvc.DeleteById(id)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc (svr ModelBaseServiceServerV2) DeleteOne(_ context.Context, req *grpc.ModelServiceV2DeleteOneRequest) (res *grpc.Response, err error) {\n\tvar query bson.M\n\terr = json.Unmarshal(req.Query, &query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\terr = modelSvc.DeleteOne(query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc (svr ModelBaseServiceServerV2) DeleteMany(_ context.Context, req *grpc.ModelServiceV2DeleteManyRequest) (res *grpc.Response, err error) {\n\tvar query bson.M\n\terr = json.Unmarshal(req.Query, &query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\terr = modelSvc.DeleteMany(query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc (svr ModelBaseServiceServerV2) UpdateById(_ context.Context, req *grpc.ModelServiceV2UpdateByIdRequest) (res *grpc.Response, err error) {\n\tid, err := primitive.ObjectIDFromHex(req.Id)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tvar update bson.M\n\terr = json.Unmarshal(req.Update, &update)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\terr = modelSvc.UpdateById(id, update)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc (svr ModelBaseServiceServerV2) UpdateOne(_ context.Context, req *grpc.ModelServiceV2UpdateOneRequest) (res *grpc.Response, err error) {\n\tvar query bson.M\n\terr = json.Unmarshal(req.Query, &query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tvar update bson.M\n\terr = json.Unmarshal(req.Update, &update)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\terr = modelSvc.UpdateOne(query, update)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc (svr ModelBaseServiceServerV2) UpdateMany(_ context.Context, req *grpc.ModelServiceV2UpdateManyRequest) (res *grpc.Response, err error) {\n\tvar query bson.M\n\terr = json.Unmarshal(req.Query, &query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tvar update bson.M\n\terr = json.Unmarshal(req.Update, &update)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\terr = modelSvc.UpdateMany(query, update)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc (svr ModelBaseServiceServerV2) ReplaceById(_ context.Context, req *grpc.ModelServiceV2ReplaceByIdRequest) (res *grpc.Response, err error) {\n\tid, err := primitive.ObjectIDFromHex(req.Id)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodel := GetOneInstanceModel(req.ModelType)\n\tmodelType := reflect.TypeOf(model)\n\tmodelValuePtr := reflect.New(modelType).Interface()\n\terr = json.Unmarshal(req.Model, modelValuePtr)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\terr = modelSvc.GetCol().ReplaceId(id, modelValuePtr)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc (svr ModelBaseServiceServerV2) ReplaceOne(_ context.Context, req *grpc.ModelServiceV2ReplaceOneRequest) (res *grpc.Response, err error) {\n\tvar query bson.M\n\terr = json.Unmarshal(req.Query, &query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodel := GetOneInstanceModel(req.ModelType)\n\tmodelType := reflect.TypeOf(model)\n\tmodelValuePtr := reflect.New(modelType).Interface()\n\terr = json.Unmarshal(req.Model, &modelValuePtr)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\terr = modelSvc.GetCol().Replace(query, modelValuePtr)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccess()\n}\n\nfunc (svr ModelBaseServiceServerV2) InsertOne(_ context.Context, req *grpc.ModelServiceV2InsertOneRequest) (res *grpc.Response, err error) {\n\tmodel := GetOneInstanceModel(req.ModelType)\n\tmodelType := reflect.TypeOf(model)\n\tmodelValuePtr := reflect.New(modelType).Interface()\n\terr = json.Unmarshal(req.Model, modelValuePtr)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\tr, err := modelSvc.GetCol().GetCollection().InsertOne(modelSvc.GetCol().GetContext(), modelValuePtr)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccessWithData(r.InsertedID)\n}\n\nfunc (svr ModelBaseServiceServerV2) InsertMany(_ context.Context, req *grpc.ModelServiceV2InsertManyRequest) (res *grpc.Response, err error) {\n\tmodel := GetOneInstanceModel(req.ModelType)\n\tmodelType := reflect.TypeOf(model)\n\tmodelsSliceType := reflect.SliceOf(modelType)\n\tmodelsSlicePtr := reflect.New(modelsSliceType).Interface()\n\terr = json.Unmarshal(req.Models, modelsSlicePtr)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tmodelsSlice := reflect.ValueOf(modelsSlicePtr).Elem()\n\tmodelsInterface := make([]any, modelsSlice.Len())\n\tfor i := 0; i < modelsSlice.Len(); i++ {\n\t\tmodelsInterface[i] = modelsSlice.Index(i).Interface()\n\t}\n\tmodelSvc := GetModelService[bson.M](req.ModelType)\n\tr, err := modelSvc.GetCol().GetCollection().InsertMany(modelSvc.GetCol().GetContext(), modelsInterface)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccessWithData(r.InsertedIDs)\n}\n\nfunc (svr ModelBaseServiceServerV2) Count(_ context.Context, req *grpc.ModelServiceV2CountRequest) (res *grpc.Response, err error) {\n\tvar query bson.M\n\terr = json.Unmarshal(req.Query, &query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tcount, err := GetModelService[bson.M](req.ModelType).Count(query)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn HandleSuccessWithData(count)\n}\n\nfunc GetModelService[T any](typeName string) *service.ModelServiceV2[T] {\n\treturn service.NewModelServiceV2WithColName[T](typeNameColNameMap[typeName])\n}\n\nfunc NewModelBaseServiceV2Server() *ModelBaseServiceServerV2 {\n\treturn &ModelBaseServiceServerV2{}\n}\n"
  },
  {
    "path": "core/grpc/server/model_delegate_binder.go",
    "content": "package server\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n)\n\nfunc NewModelDelegateBinder(req *grpc.Request) (b *ModelDelegateBinder) {\n\treturn &ModelDelegateBinder{\n\t\treq: req,\n\t\tmsg: &entity.GrpcDelegateMessage{},\n\t}\n}\n\ntype ModelDelegateBinder struct {\n\treq *grpc.Request\n\tmsg interfaces.GrpcModelDelegateMessage\n}\n\nfunc (b *ModelDelegateBinder) Bind() (res interface{}, err error) {\n\tif err := b.bindDelegateMessage(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tm := models.NewModelMap()\n\n\tswitch b.msg.GetModelId() {\n\tcase interfaces.ModelIdArtifact:\n\t\treturn b.process(&m.Artifact, interfaces.ModelIdTag)\n\tcase interfaces.ModelIdTag:\n\t\treturn b.process(&m.Tag, interfaces.ModelIdTag)\n\tcase interfaces.ModelIdNode:\n\t\treturn b.process(&m.Node, interfaces.ModelIdTag)\n\tcase interfaces.ModelIdProject:\n\t\treturn b.process(&m.Project, interfaces.ModelIdTag)\n\tcase interfaces.ModelIdSpider:\n\t\treturn b.process(&m.Spider, interfaces.ModelIdTag)\n\tcase interfaces.ModelIdTask:\n\t\treturn b.process(&m.Task)\n\tcase interfaces.ModelIdJob:\n\t\treturn b.process(&m.Job)\n\tcase interfaces.ModelIdSchedule:\n\t\treturn b.process(&m.Schedule)\n\tcase interfaces.ModelIdUser:\n\t\treturn b.process(&m.User)\n\tcase interfaces.ModelIdSetting:\n\t\treturn b.process(&m.Setting)\n\tcase interfaces.ModelIdToken:\n\t\treturn b.process(&m.Token)\n\tcase interfaces.ModelIdVariable:\n\t\treturn b.process(&m.Variable)\n\tcase interfaces.ModelIdTaskQueue:\n\t\treturn b.process(&m.TaskQueueItem)\n\tcase interfaces.ModelIdTaskStat:\n\t\treturn b.process(&m.TaskStat)\n\tcase interfaces.ModelIdSpiderStat:\n\t\treturn b.process(&m.SpiderStat)\n\tcase interfaces.ModelIdDataSource:\n\t\treturn b.process(&m.DataSource)\n\tcase interfaces.ModelIdDataCollection:\n\t\treturn b.process(&m.DataCollection)\n\tcase interfaces.ModelIdResult:\n\t\treturn b.process(&m.Result)\n\tcase interfaces.ModelIdPassword:\n\t\treturn b.process(&m.Password)\n\tcase interfaces.ModelIdExtraValue:\n\t\treturn b.process(&m.ExtraValue)\n\tcase interfaces.ModelIdGit:\n\t\treturn b.process(&m.Git)\n\tcase interfaces.ModelIdRole:\n\t\treturn b.process(&m.Role)\n\tcase interfaces.ModelIdUserRole:\n\t\treturn b.process(&m.UserRole)\n\tcase interfaces.ModelIdPermission:\n\t\treturn b.process(&m.Permission)\n\tcase interfaces.ModelIdRolePermission:\n\t\treturn b.process(&m.RolePermission)\n\tcase interfaces.ModelIdEnvironment:\n\t\treturn b.process(&m.Environment)\n\tcase interfaces.ModelIdDependencySetting:\n\t\treturn b.process(&m.DependencySetting)\n\tdefault:\n\t\treturn nil, errors.ErrorModelInvalidModelId\n\t}\n}\n\nfunc (b *ModelDelegateBinder) MustBind() (res interface{}) {\n\tres, err := b.Bind()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn res\n}\n\nfunc (b *ModelDelegateBinder) BindWithDelegateMessage() (res interface{}, msg interfaces.GrpcModelDelegateMessage, err error) {\n\tif err := json.Unmarshal(b.req.Data, b.msg); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tres, err = b.Bind()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\treturn res, b.msg, nil\n}\n\nfunc (b *ModelDelegateBinder) process(d interface{}, fieldIds ...interfaces.ModelId) (res interface{}, err error) {\n\tif err := json.Unmarshal(b.msg.GetData(), d); err != nil {\n\t\treturn nil, err\n\t}\n\t//return models.AssignFields(d, fieldIds...) // TODO: do we need to assign fields?\n\treturn d, nil\n}\n\nfunc (b *ModelDelegateBinder) bindDelegateMessage() (err error) {\n\treturn json.Unmarshal(b.req.Data, b.msg)\n}\n"
  },
  {
    "path": "core/grpc/server/model_delegate_server.go",
    "content": "package server\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n)\n\ntype ModelDelegateServer struct {\n\tgrpc.UnimplementedModelDelegateServer\n}\n\n// Do and perform an RPC action of constants.Delegate\nfunc (svr ModelDelegateServer) Do(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\t// bind message\n\tobj, msg, err := NewModelDelegateBinder(req).BindWithDelegateMessage()\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\n\t// convert to model\n\tdoc, ok := obj.(interfaces.Model)\n\tif !ok {\n\t\treturn HandleError(errors.ErrorModelInvalidType)\n\t}\n\n\t// model delegate\n\td := delegate.NewModelDelegate(doc)\n\n\t// apply method\n\tswitch msg.GetMethod() {\n\tcase interfaces.ModelDelegateMethodAdd:\n\t\terr = d.Add()\n\tcase interfaces.ModelDelegateMethodSave:\n\t\terr = d.Save()\n\tcase interfaces.ModelDelegateMethodDelete:\n\t\terr = d.Delete()\n\tcase interfaces.ModelDelegateMethodGetArtifact, interfaces.ModelDelegateMethodRefresh:\n\t\terr = d.Refresh()\n\t}\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\n\t// model\n\tm := d.GetModel()\n\tif msg.GetMethod() == interfaces.ModelDelegateMethodGetArtifact {\n\t\tm, err = d.GetArtifact()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\t// json bytes\n\tdata, err := d.ToBytes(m)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn HandleSuccessWithData(data)\n}\n\nfunc NewModelDelegateServer() (svr *ModelDelegateServer) {\n\treturn &ModelDelegateServer{}\n}\n"
  },
  {
    "path": "core/grpc/server/node_server.go",
    "content": "package server\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n)\n\ntype NodeServer struct {\n\tgrpc.UnimplementedNodeServiceServer\n\n\t// dependencies\n\tmodelSvc service.ModelService\n\tcfgSvc   interfaces.NodeConfigService\n\n\t// internals\n\tserver interfaces.GrpcServer\n}\n\n// Register from handler/worker to master\nfunc (svr NodeServer) Register(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\t// unmarshall data\n\tvar nodeInfo entity.NodeInfo\n\tif req.Data != nil {\n\t\tif err := json.Unmarshal(req.Data, &nodeInfo); err != nil {\n\t\t\treturn HandleError(err)\n\t\t}\n\n\t\tif nodeInfo.IsMaster {\n\t\t\t// error: cannot register master node\n\t\t\treturn HandleError(errors.ErrorGrpcNotAllowed)\n\t\t}\n\t}\n\n\t// node key\n\tvar nodeKey string\n\tif req.NodeKey != \"\" {\n\t\tnodeKey = req.NodeKey\n\t} else {\n\t\tnodeKey = nodeInfo.Key\n\t}\n\tif nodeKey == \"\" {\n\t\treturn HandleError(errors.ErrorModelMissingRequiredData)\n\t}\n\n\t// find in db\n\tnode, err := svr.modelSvc.GetNodeByKey(nodeKey, nil)\n\tif err == nil {\n\t\tif node.IsMaster {\n\t\t\t// error: cannot register master node\n\t\t\treturn HandleError(errors.ErrorGrpcNotAllowed)\n\t\t} else {\n\t\t\t// register existing\n\t\t\tnode.Status = constants.NodeStatusRegistered\n\t\t\tnode.Active = true\n\t\t\tnodeD := delegate.NewModelNodeDelegate(node)\n\t\t\tif err := nodeD.Save(); err != nil {\n\t\t\t\treturn HandleError(err)\n\t\t\t}\n\t\t\tvar ok bool\n\t\t\tnode, ok = nodeD.GetModel().(*models.Node)\n\t\t\tif !ok {\n\t\t\t\treturn HandleError(errors.ErrorGrpcInvalidType)\n\t\t\t}\n\t\t\tlog.Infof(\"[NodeServer] updated worker[%s] in db. id: %s\", nodeKey, nodeD.GetModel().GetId().Hex())\n\t\t}\n\t} else if err == mongo.ErrNoDocuments {\n\t\t// register new\n\t\tnode = &models.Node{\n\t\t\tKey:         nodeKey,\n\t\t\tName:        nodeInfo.Name,\n\t\t\tIp:          nodeInfo.Ip,\n\t\t\tHostname:    nodeInfo.Hostname,\n\t\t\tDescription: nodeInfo.Description,\n\t\t\tMaxRunners:  nodeInfo.MaxRunners,\n\t\t\tStatus:      constants.NodeStatusRegistered,\n\t\t\tActive:      true,\n\t\t\tEnabled:     true,\n\t\t}\n\t\tif node.Name == \"\" {\n\t\t\tnode.Name = nodeKey\n\t\t}\n\t\tnodeD := delegate.NewModelDelegate(node)\n\t\tif err := nodeD.Add(); err != nil {\n\t\t\treturn HandleError(err)\n\t\t}\n\t\tvar ok bool\n\t\tnode, ok = nodeD.GetModel().(*models.Node)\n\t\tif !ok {\n\t\t\treturn HandleError(errors.ErrorGrpcInvalidType)\n\t\t}\n\t\tlog.Infof(\"[NodeServer] added worker[%s] in db. id: %s\", nodeKey, nodeD.GetModel().GetId().Hex())\n\t} else {\n\t\t// error\n\t\treturn HandleError(err)\n\t}\n\n\tlog.Infof(\"[NodeServer] master registered worker[%s]\", req.GetNodeKey())\n\n\treturn HandleSuccessWithData(node)\n}\n\n// SendHeartbeat from worker to master\nfunc (svr NodeServer) SendHeartbeat(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\t// find in db\n\tnode, err := svr.modelSvc.GetNodeByKey(req.NodeKey, nil)\n\tif err != nil {\n\t\tif err == mongo.ErrNoDocuments {\n\t\t\treturn HandleError(errors.ErrorNodeNotExists)\n\t\t}\n\t\treturn HandleError(err)\n\t}\n\n\t// validate status\n\tif node.Status == constants.NodeStatusUnregistered {\n\t\treturn HandleError(errors.ErrorNodeUnregistered)\n\t}\n\n\t// update status\n\tnodeD := delegate.NewModelNodeDelegate(node)\n\tif err := nodeD.UpdateStatusOnline(); err != nil {\n\t\treturn HandleError(err)\n\t}\n\n\treturn HandleSuccessWithData(node)\n}\n\n// Ping from worker to master\nfunc (svr NodeServer) Ping(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\treturn HandleSuccess()\n}\n\nfunc (svr NodeServer) Subscribe(request *grpc.Request, stream grpc.NodeService_SubscribeServer) (err error) {\n\tlog.Infof(\"[NodeServer] master received subscribe request from node[%s]\", request.NodeKey)\n\n\t// finished channel\n\tfinished := make(chan bool)\n\n\t// set subscribe\n\tsvr.server.SetSubscribe(\"node:\"+request.NodeKey, &entity.GrpcSubscribe{\n\t\tStream:   stream,\n\t\tFinished: finished,\n\t})\n\tctx := stream.Context()\n\n\tlog.Infof(\"[NodeServer] master subscribed node[%s]\", request.NodeKey)\n\n\t// Keep this scope alive because once this scope exits - the stream is closed\n\tfor {\n\t\tselect {\n\t\tcase <-finished:\n\t\t\tlog.Infof(\"[NodeServer] closing stream for node[%s]\", request.NodeKey)\n\t\t\treturn nil\n\t\tcase <-ctx.Done():\n\t\t\tlog.Infof(\"[NodeServer] node[%s] has disconnected\", request.NodeKey)\n\t\t\treturn nil\n\t\t}\n\t}\n}\n\nfunc (svr NodeServer) Unsubscribe(ctx context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\tsub, err := svr.server.GetSubscribe(\"node:\" + req.NodeKey)\n\tif err != nil {\n\t\treturn nil, errors.ErrorGrpcSubscribeNotExists\n\t}\n\tselect {\n\tcase sub.GetFinished() <- true:\n\t\tlog.Infof(\"unsubscribed node[%s]\", req.NodeKey)\n\tdefault:\n\t\t// Default case is to avoid blocking in case client has already unsubscribed\n\t}\n\tsvr.server.DeleteSubscribe(req.NodeKey)\n\treturn &grpc.Response{\n\t\tCode:    grpc.ResponseCode_OK,\n\t\tMessage: \"unsubscribed successfully\",\n\t}, nil\n}\n\nfunc NewNodeServer() (res *NodeServer, err error) {\n\t// node server\n\tsvr := &NodeServer{}\n\tsvr.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsvr.cfgSvc = nodeconfig.GetNodeConfigService()\n\n\treturn svr, nil\n}\n"
  },
  {
    "path": "core/grpc/server/node_server_v2.go",
    "content": "package server\n\nimport (\n\t\"context\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/core/notification\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\terrors2 \"github.com/pkg/errors\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype NodeServerV2 struct {\n\tgrpc.UnimplementedNodeServiceServer\n\n\t// dependencies\n\tcfgSvc interfaces.NodeConfigService\n\n\t// internals\n\tserver *GrpcServerV2\n}\n\n// Register from handler/worker to master\nfunc (svr NodeServerV2) Register(_ context.Context, req *grpc.NodeServiceRegisterRequest) (res *grpc.Response, err error) {\n\t// unmarshall data\n\tif req.IsMaster {\n\t\t// error: cannot register master node\n\t\treturn HandleError(errors.ErrorGrpcNotAllowed)\n\t}\n\n\t// node key\n\tif req.Key == \"\" {\n\t\treturn HandleError(errors.ErrorModelMissingRequiredData)\n\t}\n\n\t// find in db\n\tvar node *models.NodeV2\n\tnode, err = service.NewModelServiceV2[models.NodeV2]().GetOne(bson.M{\"key\": req.Key}, nil)\n\tif err == nil {\n\t\t// register existing\n\t\tnode.Status = constants.NodeStatusRegistered\n\t\tnode.Active = true\n\t\tnode.ActiveAt = time.Now()\n\t\terr = service.NewModelServiceV2[models.NodeV2]().ReplaceById(node.Id, *node)\n\t\tif err != nil {\n\t\t\treturn HandleError(err)\n\t\t}\n\t\tlog.Infof(\"[NodeServerV2] updated worker[%s] in db. id: %s\", req.Key, node.Id.Hex())\n\t} else if errors2.Is(err, mongo.ErrNoDocuments) {\n\t\t// register new\n\t\tnode = &models.NodeV2{\n\t\t\tKey:        req.Key,\n\t\t\tName:       req.Name,\n\t\t\tStatus:     constants.NodeStatusRegistered,\n\t\t\tActive:     true,\n\t\t\tActiveAt:   time.Now(),\n\t\t\tEnabled:    true,\n\t\t\tMaxRunners: int(req.MaxRunners),\n\t\t}\n\t\tnode.SetCreated(primitive.NilObjectID)\n\t\tnode.SetUpdated(primitive.NilObjectID)\n\t\tnode.Id, err = service.NewModelServiceV2[models.NodeV2]().InsertOne(*node)\n\t\tif err != nil {\n\t\t\treturn HandleError(err)\n\t\t}\n\t\tlog.Infof(\"[NodeServerV2] added worker[%s] in db. id: %s\", req.Key, node.Id.Hex())\n\t} else {\n\t\t// error\n\t\treturn HandleError(err)\n\t}\n\n\tlog.Infof(\"[NodeServerV2] master registered worker[%s]\", req.Key)\n\n\treturn HandleSuccessWithData(node)\n}\n\n// SendHeartbeat from worker to master\nfunc (svr NodeServerV2) SendHeartbeat(_ context.Context, req *grpc.NodeServiceSendHeartbeatRequest) (res *grpc.Response, err error) {\n\t// find in db\n\tnode, err := service.NewModelServiceV2[models.NodeV2]().GetOne(bson.M{\"key\": req.Key}, nil)\n\tif err != nil {\n\t\tif errors2.Is(err, mongo.ErrNoDocuments) {\n\t\t\treturn HandleError(errors.ErrorNodeNotExists)\n\t\t}\n\t\treturn HandleError(err)\n\t}\n\toldStatus := node.Status\n\n\t// validate status\n\tif node.Status == constants.NodeStatusUnregistered {\n\t\treturn HandleError(errors.ErrorNodeUnregistered)\n\t}\n\n\t// update status\n\tnode.Status = constants.NodeStatusOnline\n\tnode.Active = true\n\tnode.ActiveAt = time.Now()\n\terr = service.NewModelServiceV2[models.NodeV2]().ReplaceById(node.Id, *node)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\tnewStatus := node.Status\n\n\t// send notification if status changed\n\tif utils.IsPro() {\n\t\tif oldStatus != newStatus {\n\t\t\tgo notification.GetNotificationServiceV2().SendNodeNotification(node)\n\t\t}\n\t}\n\n\treturn HandleSuccessWithData(node)\n}\n\nfunc (svr NodeServerV2) Subscribe(request *grpc.Request, stream grpc.NodeService_SubscribeServer) (err error) {\n\tlog.Infof(\"[NodeServerV2] master received subscribe request from node[%s]\", request.NodeKey)\n\n\t// finished channel\n\tfinished := make(chan bool)\n\n\t// set subscribe\n\tsvr.server.SetSubscribe(\"node:\"+request.NodeKey, &entity.GrpcSubscribe{\n\t\tStream:   stream,\n\t\tFinished: finished,\n\t})\n\tctx := stream.Context()\n\n\tlog.Infof(\"[NodeServerV2] master subscribed node[%s]\", request.NodeKey)\n\n\t// Keep this scope alive because once this scope exits - the stream is closed\n\tfor {\n\t\tselect {\n\t\tcase <-finished:\n\t\t\tlog.Infof(\"[NodeServerV2] closing stream for node[%s]\", request.NodeKey)\n\t\t\treturn nil\n\t\tcase <-ctx.Done():\n\t\t\tlog.Infof(\"[NodeServerV2] node[%s] has disconnected\", request.NodeKey)\n\t\t\treturn nil\n\t\t}\n\t}\n}\n\nfunc (svr NodeServerV2) Unsubscribe(_ context.Context, req *grpc.Request) (res *grpc.Response, err error) {\n\tsub, err := svr.server.GetSubscribe(\"node:\" + req.NodeKey)\n\tif err != nil {\n\t\treturn nil, errors.ErrorGrpcSubscribeNotExists\n\t}\n\tselect {\n\tcase sub.GetFinished() <- true:\n\t\tlog.Infof(\"unsubscribed node[%s]\", req.NodeKey)\n\tdefault:\n\t\t// Default case is to avoid blocking in case client has already unsubscribed\n\t}\n\tsvr.server.DeleteSubscribe(req.NodeKey)\n\treturn &grpc.Response{\n\t\tCode:    grpc.ResponseCode_OK,\n\t\tMessage: \"unsubscribed successfully\",\n\t}, nil\n}\n\nvar nodeSvrV2 *NodeServerV2\nvar nodeSvrV2Once = new(sync.Once)\n\nfunc NewNodeServerV2() (res *NodeServerV2, err error) {\n\tif nodeSvrV2 != nil {\n\t\treturn nodeSvrV2, nil\n\t}\n\tnodeSvrV2Once.Do(func() {\n\t\tnodeSvrV2 = &NodeServerV2{}\n\t\tnodeSvrV2.cfgSvc = nodeconfig.GetNodeConfigService()\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"[NodeServerV2] error: %s\", err.Error())\n\t\t}\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn nodeSvrV2, nil\n}\n"
  },
  {
    "path": "core/grpc/server/server_v2.go",
    "content": "package server\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/middlewares\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\tgrpc2 \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\tgrpc_middleware \"github.com/grpc-ecosystem/go-grpc-middleware\"\n\tgrpc_auth \"github.com/grpc-ecosystem/go-grpc-middleware/auth\"\n\tgrpc_recovery \"github.com/grpc-ecosystem/go-grpc-middleware/recovery\"\n\terrors2 \"github.com/pkg/errors\"\n\t\"github.com/spf13/viper\"\n\t\"go/types\"\n\t\"google.golang.org/grpc\"\n\t\"net\"\n\t\"sync\"\n)\n\nvar (\n\tsubsV2      = map[string]interfaces.GrpcSubscribe{}\n\tmutexSubsV2 = &sync.Mutex{}\n)\n\ntype GrpcServerV2 struct {\n\t// settings\n\tcfgPath string\n\taddress interfaces.Address\n\n\t// internals\n\tsvr     *grpc.Server\n\tl       net.Listener\n\tstopped bool\n\n\t// dependencies\n\tnodeCfgSvc interfaces.NodeConfigService\n\n\t// servers\n\tNodeSvr             *NodeServerV2\n\tTaskSvr             *TaskServerV2\n\tModelBaseServiceSvr *ModelBaseServiceServerV2\n\tDependenciesSvr     *DependenciesServerV2\n\tMetricsSvr          *MetricsServerV2\n}\n\nfunc (svr *GrpcServerV2) GetConfigPath() (path string) {\n\treturn svr.cfgPath\n}\n\nfunc (svr *GrpcServerV2) SetConfigPath(path string) {\n\tsvr.cfgPath = path\n}\n\nfunc (svr *GrpcServerV2) Init() (err error) {\n\t// register\n\tif err := svr.Register(); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (svr *GrpcServerV2) Start() (err error) {\n\t// grpc server binding address\n\taddress := svr.address.String()\n\n\t// listener\n\tsvr.l, err = net.Listen(\"tcp\", address)\n\tif err != nil {\n\t\t_ = trace.TraceError(err)\n\t\treturn errors.ErrorGrpcServerFailedToListen\n\t}\n\tlog.Infof(\"grpc server listens to %s\", address)\n\n\t// start grpc server\n\tgo func() {\n\t\tif err := svr.svr.Serve(svr.l); err != nil {\n\t\t\tif errors2.Is(err, grpc.ErrServerStopped) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttrace.PrintError(err)\n\t\t\tlog.Error(errors.ErrorGrpcServerFailedToServe.Error())\n\t\t}\n\t}()\n\n\treturn nil\n}\n\nfunc (svr *GrpcServerV2) Stop() (err error) {\n\t// skip if listener is nil\n\tif svr.l == nil {\n\t\treturn nil\n\t}\n\n\t// graceful stop\n\tlog.Infof(\"grpc server stopping...\")\n\tsvr.svr.Stop()\n\n\t// close listener\n\tlog.Infof(\"grpc server closing listener...\")\n\t_ = svr.l.Close()\n\n\t// mark as stopped\n\tsvr.stopped = true\n\n\t// log\n\tlog.Infof(\"grpc server stopped\")\n\n\treturn nil\n}\n\nfunc (svr *GrpcServerV2) Register() (err error) {\n\tgrpc2.RegisterNodeServiceServer(svr.svr, *svr.NodeSvr)\n\tgrpc2.RegisterModelBaseServiceV2Server(svr.svr, *svr.ModelBaseServiceSvr)\n\tgrpc2.RegisterTaskServiceServer(svr.svr, *svr.TaskSvr)\n\tgrpc2.RegisterDependenciesServiceV2Server(svr.svr, *svr.DependenciesSvr)\n\tgrpc2.RegisterMetricsServiceV2Server(svr.svr, *svr.MetricsSvr)\n\n\treturn nil\n}\n\nfunc (svr *GrpcServerV2) recoveryHandlerFunc(p interface{}) (err error) {\n\terr = errors.NewError(errors.ErrorPrefixGrpc, fmt.Sprintf(\"%v\", p))\n\ttrace.PrintError(err)\n\treturn err\n}\n\nfunc (svr *GrpcServerV2) SetAddress(address interfaces.Address) {\n\n}\n\nfunc (svr *GrpcServerV2) GetSubscribe(key string) (sub interfaces.GrpcSubscribe, err error) {\n\tmutexSubsV2.Lock()\n\tdefer mutexSubsV2.Unlock()\n\tsub, ok := subsV2[key]\n\tif !ok {\n\t\treturn nil, errors.ErrorGrpcSubscribeNotExists\n\t}\n\treturn sub, nil\n}\n\nfunc (svr *GrpcServerV2) SetSubscribe(key string, sub interfaces.GrpcSubscribe) {\n\tmutexSubsV2.Lock()\n\tdefer mutexSubsV2.Unlock()\n\tsubsV2[key] = sub\n}\n\nfunc (svr *GrpcServerV2) DeleteSubscribe(key string) {\n\tmutexSubsV2.Lock()\n\tdefer mutexSubsV2.Unlock()\n\tdelete(subsV2, key)\n}\n\nfunc (svr *GrpcServerV2) SendStreamMessage(key string, code grpc2.StreamMessageCode) (err error) {\n\treturn svr.SendStreamMessageWithData(key, code, nil)\n}\n\nfunc (svr *GrpcServerV2) SendStreamMessageWithData(key string, code grpc2.StreamMessageCode, d interface{}) (err error) {\n\tvar data []byte\n\tswitch d.(type) {\n\tcase types.Nil:\n\t\t// do nothing\n\tcase []byte:\n\t\tdata = d.([]byte)\n\tdefault:\n\t\tvar err error\n\t\tdata, err = json.Marshal(d)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tsub, err := svr.GetSubscribe(key)\n\tif err != nil {\n\t\treturn err\n\t}\n\tmsg := &grpc2.StreamMessage{\n\t\tCode: code,\n\t\tKey:  svr.nodeCfgSvc.GetNodeKey(),\n\t\tData: data,\n\t}\n\treturn sub.GetStream().Send(msg)\n}\n\nfunc (svr *GrpcServerV2) IsStopped() (res bool) {\n\treturn svr.stopped\n}\n\nfunc NewGrpcServerV2() (svr *GrpcServerV2, err error) {\n\t// server\n\tsvr = &GrpcServerV2{\n\t\taddress: entity.NewAddress(&entity.AddressOptions{\n\t\t\tHost: constants.DefaultGrpcServerHost,\n\t\t\tPort: constants.DefaultGrpcServerPort,\n\t\t}),\n\t}\n\n\tif viper.GetString(\"grpc.server.address\") != \"\" {\n\t\tsvr.address, err = entity.NewAddressFromString(viper.GetString(\"grpc.server.address\"))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tsvr.nodeCfgSvc = nodeconfig.GetNodeConfigService()\n\n\tsvr.NodeSvr, err = NewNodeServerV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsvr.ModelBaseServiceSvr = NewModelBaseServiceV2Server()\n\tsvr.TaskSvr, err = NewTaskServerV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsvr.DependenciesSvr = GetDependenciesServerV2()\n\tsvr.MetricsSvr = GetMetricsServerV2()\n\n\t// recovery options\n\trecoveryOpts := []grpc_recovery.Option{\n\t\tgrpc_recovery.WithRecoveryHandler(svr.recoveryHandlerFunc),\n\t}\n\n\t// grpc server\n\tsvr.svr = grpc.NewServer(\n\t\tgrpc_middleware.WithUnaryServerChain(\n\t\t\tgrpc_recovery.UnaryServerInterceptor(recoveryOpts...),\n\t\t\tgrpc_auth.UnaryServerInterceptor(middlewares.GetAuthTokenFunc(svr.nodeCfgSvc)),\n\t\t),\n\t\tgrpc_middleware.WithStreamServerChain(\n\t\t\tgrpc_recovery.StreamServerInterceptor(recoveryOpts...),\n\t\t\tgrpc_auth.StreamServerInterceptor(middlewares.GetAuthTokenFunc(svr.nodeCfgSvc)),\n\t\t),\n\t)\n\n\t// initialize\n\tif err := svr.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svr, nil\n}\n\nvar _serverV2 *GrpcServerV2\n\nfunc GetGrpcServerV2() (svr *GrpcServerV2, err error) {\n\tif _serverV2 != nil {\n\t\treturn _serverV2, nil\n\t}\n\t_serverV2, err = NewGrpcServerV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn _serverV2, nil\n}\n"
  },
  {
    "path": "core/grpc/server/task_server_v2.go",
    "content": "package server\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/core/notification\"\n\t\"github.com/crawlab-team/crawlab/core/task/stats\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"io\"\n\t\"strings\"\n)\n\ntype TaskServerV2 struct {\n\tgrpc.UnimplementedTaskServiceServer\n\n\t// dependencies\n\tcfgSvc   interfaces.NodeConfigService\n\tstatsSvc *stats.ServiceV2\n\n\t// internals\n\tserver interfaces.GrpcServer\n}\n\n// Subscribe to task stream when a task runner in a node starts\nfunc (svr TaskServerV2) Subscribe(stream grpc.TaskService_SubscribeServer) (err error) {\n\tfor {\n\t\tmsg, err := stream.Recv()\n\t\tutils.LogDebug(msg.String())\n\t\tif err == io.EOF {\n\t\t\treturn nil\n\t\t}\n\t\tif err != nil {\n\t\t\tif strings.HasSuffix(err.Error(), \"context canceled\") {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\ttrace.PrintError(err)\n\t\t\tcontinue\n\t\t}\n\t\tswitch msg.Code {\n\t\tcase grpc.StreamMessageCode_INSERT_DATA:\n\t\t\terr = svr.handleInsertData(msg)\n\t\tcase grpc.StreamMessageCode_INSERT_LOGS:\n\t\t\terr = svr.handleInsertLogs(msg)\n\t\tdefault:\n\t\t\terr = errors.New(\"invalid stream message code\")\n\t\t\tlog.Errorf(\"invalid stream message code: %d\", msg.Code)\n\t\t\tcontinue\n\t\t}\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"grpc error[%d]: %v\", msg.Code, err)\n\t\t}\n\t}\n}\n\n// Fetch tasks to be executed by a task handler\nfunc (svr TaskServerV2) Fetch(ctx context.Context, request *grpc.Request) (response *grpc.Response, err error) {\n\tnodeKey := request.GetNodeKey()\n\tif nodeKey == \"\" {\n\t\treturn nil, errors.New(\"invalid node key\")\n\t}\n\tn, err := service.NewModelServiceV2[models2.NodeV2]().GetOne(bson.M{\"key\": nodeKey}, nil)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tvar tid primitive.ObjectID\n\topts := &mongo.FindOptions{\n\t\tSort: bson.D{\n\t\t\t{\"p\", 1},\n\t\t\t{\"_id\", 1},\n\t\t},\n\t\tLimit: 1,\n\t}\n\tif err := mongo.RunTransactionWithContext(ctx, func(sc mongo2.SessionContext) (err error) {\n\t\t// get task queue item assigned to this node\n\t\ttid, err = svr.getTaskQueueItemIdAndDequeue(bson.M{\"nid\": n.Id}, opts, n.Id)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !tid.IsZero() {\n\t\t\treturn nil\n\t\t}\n\n\t\t// get task queue item assigned to any node (random mode)\n\t\ttid, err = svr.getTaskQueueItemIdAndDequeue(bson.M{\"nid\": nil}, opts, n.Id)\n\t\tif !tid.IsZero() {\n\t\t\treturn nil\n\t\t}\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\treturn HandleSuccessWithData(tid)\n}\n\nfunc (svr TaskServerV2) SendNotification(_ context.Context, request *grpc.TaskServiceSendNotificationRequest) (response *grpc.Response, err error) {\n\tif !utils.IsPro() {\n\t\treturn nil, nil\n\t}\n\n\t// task id\n\ttaskId, err := primitive.ObjectIDFromHex(request.TaskId)\n\tif err != nil {\n\t\tlog.Errorf(\"invalid task id: %s\", request.TaskId)\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// arguments\n\tvar args []any\n\n\t// task\n\ttask, err := service.NewModelServiceV2[models2.TaskV2]().GetById(taskId)\n\tif err != nil {\n\t\tlog.Errorf(\"task not found: %s\", request.TaskId)\n\t\treturn nil, trace.TraceError(err)\n\t}\n\targs = append(args, task)\n\n\t// task stat\n\ttaskStat, err := service.NewModelServiceV2[models2.TaskStatV2]().GetById(task.Id)\n\tif err != nil {\n\t\tlog.Errorf(\"task stat not found for task: %s\", request.TaskId)\n\t\treturn nil, trace.TraceError(err)\n\t}\n\targs = append(args, taskStat)\n\n\t// spider\n\tspider, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(task.SpiderId)\n\tif err != nil {\n\t\tlog.Errorf(\"spider not found for task: %s\", request.TaskId)\n\t\treturn nil, trace.TraceError(err)\n\t}\n\targs = append(args, spider)\n\n\t// node\n\tnode, err := service.NewModelServiceV2[models2.NodeV2]().GetById(task.NodeId)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\targs = append(args, node)\n\n\t// schedule\n\tvar schedule *models2.ScheduleV2\n\tif !task.ScheduleId.IsZero() {\n\t\tschedule, err = service.NewModelServiceV2[models2.ScheduleV2]().GetById(task.ScheduleId)\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"schedule not found for task: %s\", request.TaskId)\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t\targs = append(args, schedule)\n\t}\n\n\t// settings\n\tsettings, err := service.NewModelServiceV2[models2.NotificationSettingV2]().GetMany(bson.M{\n\t\t\"enabled\": true,\n\t\t\"trigger\": bson.M{\n\t\t\t\"$regex\": constants.NotificationTriggerPatternTask,\n\t\t},\n\t}, nil)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// notification service\n\tsvc := notification.GetNotificationServiceV2()\n\n\tfor _, s := range settings {\n\t\t// compatible with old settings\n\t\ttrigger := s.Trigger\n\t\tif trigger == \"\" {\n\t\t\ttrigger = s.TaskTrigger\n\t\t}\n\n\t\t// send notification\n\t\tswitch trigger {\n\t\tcase constants.NotificationTriggerTaskFinish:\n\t\t\tif task.Status != constants.TaskStatusPending && task.Status != constants.TaskStatusRunning {\n\t\t\t\tgo svc.Send(&s, args...)\n\t\t\t}\n\t\tcase constants.NotificationTriggerTaskError:\n\t\t\tif task.Status == constants.TaskStatusError || task.Status == constants.TaskStatusAbnormal {\n\t\t\t\tgo svc.Send(&s, args...)\n\t\t\t}\n\t\tcase constants.NotificationTriggerTaskEmptyResults:\n\t\t\tif task.Status != constants.TaskStatusPending && task.Status != constants.TaskStatusRunning {\n\t\t\t\tif taskStat.ResultCount == 0 {\n\t\t\t\t\tgo svc.Send(&s, args...)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil, nil\n}\n\nfunc (svr TaskServerV2) handleInsertData(msg *grpc.StreamMessage) (err error) {\n\tdata, err := svr.deserialize(msg)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar records []map[string]interface{}\n\tfor _, d := range data.Records {\n\t\tres, ok := d[constants.TaskKey]\n\t\tif ok {\n\t\t\tswitch res.(type) {\n\t\t\tcase string:\n\t\t\t\tid, err := primitive.ObjectIDFromHex(res.(string))\n\t\t\t\tif err == nil {\n\t\t\t\t\td[constants.TaskKey] = id\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trecords = append(records, d)\n\t}\n\treturn svr.statsSvc.InsertData(data.TaskId, records...)\n}\n\nfunc (svr TaskServerV2) handleInsertLogs(msg *grpc.StreamMessage) (err error) {\n\tdata, err := svr.deserialize(msg)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn svr.statsSvc.InsertLogs(data.TaskId, data.Logs...)\n}\n\nfunc (svr TaskServerV2) getTaskQueueItemIdAndDequeue(query bson.M, opts *mongo.FindOptions, nid primitive.ObjectID) (tid primitive.ObjectID, err error) {\n\ttq, err := service.NewModelServiceV2[models2.TaskQueueItemV2]().GetOne(query, opts)\n\tif err != nil {\n\t\tif errors.Is(err, mongo2.ErrNoDocuments) {\n\t\t\treturn tid, nil\n\t\t}\n\t\treturn tid, trace.TraceError(err)\n\t}\n\tt, err := service.NewModelServiceV2[models2.TaskV2]().GetById(tq.Id)\n\tif err == nil {\n\t\tt.NodeId = nid\n\t\terr = service.NewModelServiceV2[models2.TaskV2]().ReplaceById(t.Id, *t)\n\t\tif err != nil {\n\t\t\treturn tid, trace.TraceError(err)\n\t\t}\n\t}\n\terr = service.NewModelServiceV2[models2.TaskQueueItemV2]().DeleteById(tq.Id)\n\tif err != nil {\n\t\treturn tid, trace.TraceError(err)\n\t}\n\treturn tq.Id, nil\n}\n\nfunc (svr TaskServerV2) deserialize(msg *grpc.StreamMessage) (data entity.StreamMessageTaskData, err error) {\n\tif err := json.Unmarshal(msg.Data, &data); err != nil {\n\t\treturn data, trace.TraceError(err)\n\t}\n\tif data.TaskId.IsZero() {\n\t\treturn data, errors.New(\"invalid task id\")\n\t}\n\treturn data, nil\n}\n\nfunc NewTaskServerV2() (res *TaskServerV2, err error) {\n\t// task server\n\tsvr := &TaskServerV2{}\n\n\tsvr.cfgSvc = nodeconfig.GetNodeConfigService()\n\n\tsvr.statsSvc, err = stats.GetTaskStatsServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svr, nil\n}\n"
  },
  {
    "path": "core/grpc/server/utils_handle.go",
    "content": "package server\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\nfunc HandleError(err error) (res *grpc.Response, err2 error) {\n\ttrace.PrintError(err)\n\treturn &grpc.Response{\n\t\tCode:  grpc.ResponseCode_ERROR,\n\t\tError: err.Error(),\n\t}, err\n}\n\nfunc HandleSuccess() (res *grpc.Response, err error) {\n\treturn &grpc.Response{\n\t\tCode:    grpc.ResponseCode_OK,\n\t\tMessage: \"success\",\n\t}, nil\n}\n\nfunc HandleSuccessWithData(data interface{}) (res *grpc.Response, err error) {\n\tvar bytes []byte\n\tswitch data.(type) {\n\tcase []byte:\n\t\tbytes = data.([]byte)\n\tdefault:\n\t\tbytes, err = json.Marshal(data)\n\t\tif err != nil {\n\t\t\treturn HandleError(err)\n\t\t}\n\t}\n\treturn &grpc.Response{\n\t\tCode:    grpc.ResponseCode_OK,\n\t\tMessage: \"success\",\n\t\tData:    bytes,\n\t}, nil\n}\n\nfunc HandleSuccessWithListData(data interface{}, total int) (res *grpc.Response, err error) {\n\tbytes, err := json.Marshal(data)\n\tif err != nil {\n\t\treturn HandleError(err)\n\t}\n\treturn &grpc.Response{\n\t\tCode:    grpc.ResponseCode_OK,\n\t\tMessage: \"success\",\n\t\tData:    bytes,\n\t\tTotal:   int64(total),\n\t}, nil\n}\n"
  },
  {
    "path": "core/i18n/service.go",
    "content": "package i18n\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\nvar translations []interfaces.Translation\n\nvar _svc interfaces.I18nService\n\ntype Service struct {\n}\n\nfunc (svc *Service) AddTranslations(t []interfaces.Translation) {\n\ttranslations = append(translations, t...)\n}\n\nfunc (svc *Service) GetTranslations() (t []interfaces.Translation) {\n\treturn translations\n}\n\nfunc GetI18nService(cfgPath string) (svc2 interfaces.I18nService, err error) {\n\tif _svc != nil {\n\t\treturn _svc, nil\n\t}\n\n\t_svc, err = NewI18nService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn _svc, nil\n}\n\nfunc ProvideGetI18nService(cfgPath string) func() (svc interfaces.I18nService, err error) {\n\treturn func() (svc interfaces.I18nService, err error) {\n\t\treturn GetI18nService(cfgPath)\n\t}\n}\n\nfunc NewI18nService() (svc2 interfaces.I18nService, err error) {\n\tsvc := &Service{}\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/interfaces/address.go",
    "content": "package interfaces\n\ntype Address interface {\n\tEntity\n\tString() string\n\tIsEmpty() bool\n}\n"
  },
  {
    "path": "core/interfaces/color.go",
    "content": "package interfaces\n\ntype Color interface {\n\tEntity\n\tGetHex() string\n\tGetName() string\n}\n"
  },
  {
    "path": "core/interfaces/color_service.go",
    "content": "package interfaces\n\ntype ColorService interface {\n\tInjectable\n\tGetByName(name string) (res Color, err error)\n\tGetRandom() (res Color, err error)\n}\n"
  },
  {
    "path": "core/interfaces/controller_params.go",
    "content": "package interfaces\n\ntype ControllerParams interface {\n\tIsZero() (ok bool)\n\tIsDefault() (ok bool)\n}\n"
  },
  {
    "path": "core/interfaces/data_source_service.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype DataSourceService interface {\n\tChangePassword(id primitive.ObjectID, password string) (err error)\n\tMonitor()\n\tCheckStatus(id primitive.ObjectID) (err error)\n\tSetTimeout(duration time.Duration)\n\tSetMonitorInterval(duration time.Duration)\n}\n"
  },
  {
    "path": "core/interfaces/entity.go",
    "content": "package interfaces\n\ntype Entity interface {\n\tValue() interface{}\n}\n"
  },
  {
    "path": "core/interfaces/event_data.go",
    "content": "package interfaces\n\ntype EventData interface {\n\tGetEvent() string\n\tGetData() interface{}\n}\n"
  },
  {
    "path": "core/interfaces/event_service.go",
    "content": "package interfaces\n\ntype EventFn func(data ...interface{}) (err error)\n\ntype EventService interface {\n\tRegister(key, include, exclude string, ch *chan EventData)\n\tUnregister(key string)\n\tSendEvent(eventName string, data ...interface{})\n}\n"
  },
  {
    "path": "core/interfaces/export.go",
    "content": "package interfaces\n\nimport \"time\"\n\ntype Export interface {\n\tGetId() string\n\tGetType() string\n\tGetTarget() string\n\tGetFilter() Filter\n\tGetStatus() string\n\tGetStartTs() time.Time\n\tGetEndTs() time.Time\n\tGetDownloadPath() string\n}\n"
  },
  {
    "path": "core/interfaces/export_service.go",
    "content": "package interfaces\n\ntype ExportService interface {\n\tGenerateId() (exportId string, err error)\n\tExport(exportType, target string, filter Filter) (exportId string, err error)\n\tGetExport(exportId string) (export Export, err error)\n}\n"
  },
  {
    "path": "core/interfaces/filter.go",
    "content": "package interfaces\n\ntype Filter interface {\n\tGetIsOr() (isOr bool)\n\tSetIsOr(isOr bool)\n\tGetConditions() (conditions []FilterCondition)\n\tSetConditions(conditions []FilterCondition)\n\tIsNil() (ok bool)\n}\n"
  },
  {
    "path": "core/interfaces/filter_condition.go",
    "content": "package interfaces\n\ntype FilterCondition interface {\n\tGetKey() (key string)\n\tSetKey(key string)\n\tGetOp() (op string)\n\tSetOp(op string)\n\tGetValue() (value interface{})\n\tSetValue(value interface{})\n}\n"
  },
  {
    "path": "core/interfaces/fs_file_info.go",
    "content": "package interfaces\n\nimport (\n\t\"os\"\n\t\"time\"\n)\n\ntype FsFileInfo interface {\n\tGetName() string\n\tGetPath() string\n\tGetFullPath() string\n\tGetExtension() string\n\tGetIsDir() bool\n\tGetFileSize() int64\n\tGetModTime() time.Time\n\tGetMode() os.FileMode\n\tGetHash() string\n\tGetChildren() []FsFileInfo\n}\n"
  },
  {
    "path": "core/interfaces/fs_service.go",
    "content": "package interfaces\n\nimport (\n\tcfs \"github.com/crawlab-team/crawlab/fs\"\n\tvcs \"github.com/crawlab-team/crawlab/vcs\"\n)\n\ntype FsService interface {\n\tWithConfigPath\n\tList(path string, opts ...ServiceCrudOption) (files []FsFileInfo, err error)\n\tGetFile(path string, opts ...ServiceCrudOption) (data []byte, err error)\n\tGetFileInfo(path string, opts ...ServiceCrudOption) (file FsFileInfo, err error)\n\tSave(path string, data []byte, opts ...ServiceCrudOption) (err error)\n\tRename(path, newPath string, opts ...ServiceCrudOption) (err error)\n\tDelete(path string, opts ...ServiceCrudOption) (err error)\n\tCopy(path, newPath string, opts ...ServiceCrudOption) (err error)\n\tCommit(msg string) (err error)\n\tSyncToFs(opts ...ServiceCrudOption) (err error)\n\tSyncToWorkspace() (err error)\n\tGetFsPath() (path string)\n\tSetFsPath(path string)\n\tGetWorkspacePath() (path string)\n\tSetWorkspacePath(path string)\n\tGetRepoPath() (path string)\n\tSetRepoPath(path string)\n\tGetFs() (fs cfs.Manager)\n\tGetGitClient() (c *vcs.GitClient)\n}\n"
  },
  {
    "path": "core/interfaces/fs_service_options.go",
    "content": "package interfaces\n\ntype ServiceCrudOptions struct {\n\tIsAbsolute         bool // whether the path is absolute\n\tOnlyFromWorkspace  bool // whether only sync from workspace\n\tNotSyncToWorkspace bool // whether not sync to workspace\n}\n\ntype ServiceCrudOption func(o *ServiceCrudOptions)\n\nfunc WithOnlyFromWorkspace() ServiceCrudOption {\n\treturn func(o *ServiceCrudOptions) {\n\t\to.OnlyFromWorkspace = true\n\t}\n}\n\nfunc WithNotSyncToWorkspace() ServiceCrudOption {\n\treturn func(o *ServiceCrudOptions) {\n\t\to.NotSyncToWorkspace = true\n\t}\n}\n"
  },
  {
    "path": "core/interfaces/fs_service_v2.go",
    "content": "package interfaces\n\ntype FsServiceV2 interface {\n\tList(path string) (files []FsFileInfo, err error)\n\tGetFile(path string) (data []byte, err error)\n\tGetFileInfo(path string) (file FsFileInfo, err error)\n\tSave(path string, data []byte) (err error)\n\tCreateDir(path string) (err error)\n\tRename(path, newPath string) (err error)\n\tDelete(path string) (err error)\n\tCopy(path, newPath string) (err error)\n\tExport() (resultPath string, err error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_base.go",
    "content": "package interfaces\n\ntype GrpcBase interface {\n\tWithConfigPath\n\tInit() (err error)\n\tStart() (err error)\n\tStop() (err error)\n\tRegister() (err error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_base_service_params.go",
    "content": "package interfaces\n\ntype GrpcBaseServiceParams interface {\n\tEntity\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client.go",
    "content": "package interfaces\n\nimport (\n\t\"context\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"time\"\n)\n\ntype GrpcClient interface {\n\tGrpcBase\n\tWithConfigPath\n\tGetModelDelegateClient() grpc.ModelDelegateClient\n\tGetModelBaseServiceClient() grpc.ModelBaseServiceClient\n\tGetNodeClient() grpc.NodeServiceClient\n\tGetTaskClient() grpc.TaskServiceClient\n\tGetMessageClient() grpc.MessageServiceClient\n\tSetAddress(Address)\n\tSetTimeout(time.Duration)\n\tSetSubscribeType(string)\n\tSetHandleMessage(bool)\n\tContext() (context.Context, context.CancelFunc)\n\tNewRequest(interface{}) *grpc.Request\n\tGetMessageChannel() chan *grpc.StreamMessage\n\tRestart() error\n\tNewModelBaseServiceRequest(ModelId, GrpcBaseServiceParams) (*grpc.Request, error)\n\tIsStarted() bool\n\tIsClosed() bool\n\tErr() error\n\tGetStream() grpc.NodeService_SubscribeClient\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_model_base_service.go",
    "content": "package interfaces\n\ntype GrpcClientModelBaseService interface {\n\tWithModelId\n\tWithConfigPath\n\tModelBaseService\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_model_delegate.go",
    "content": "package interfaces\n\ntype GrpcClientModelDelegate interface {\n\tModelDelegate\n\tWithConfigPath\n\tClose() error\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_model_environment_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype GrpcClientModelEnvironmentService interface {\n\tModelBaseService\n\tGetEnvironmentById(id primitive.ObjectID) (s Environment, err error)\n\tGetEnvironment(query bson.M, opts *mongo.FindOptions) (s Environment, err error)\n\tGetEnvironmentList(query bson.M, opts *mongo.FindOptions) (res []Environment, err error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_model_node_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype GrpcClientModelNodeService interface {\n\tModelBaseService\n\tGetNodeById(id primitive.ObjectID) (n Node, err error)\n\tGetNode(query bson.M, opts *mongo.FindOptions) (n Node, err error)\n\tGetNodeByKey(key string) (n Node, err error)\n\tGetNodeList(query bson.M, opts *mongo.FindOptions) (res []Node, err error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_model_service.go",
    "content": "package interfaces\n\ntype GrpcClientModelService interface {\n\tWithConfigPath\n\tNewBaseServiceDelegate(id ModelId) (GrpcClientModelBaseService, error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_model_spider_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype GrpcClientModelSpiderService interface {\n\tModelBaseService\n\tGetSpiderById(id primitive.ObjectID) (s Spider, err error)\n\tGetSpider(query bson.M, opts *mongo.FindOptions) (s Spider, err error)\n\tGetSpiderList(query bson.M, opts *mongo.FindOptions) (res []Spider, err error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_model_task_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype GrpcClientModelTaskService interface {\n\tModelBaseService\n\tGetTaskById(id primitive.ObjectID) (s Task, err error)\n\tGetTask(query bson.M, opts *mongo.FindOptions) (s Task, err error)\n\tGetTaskList(query bson.M, opts *mongo.FindOptions) (res []Task, err error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_model_task_stat_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype GrpcClientModelTaskStatService interface {\n\tModelBaseService\n\tGetTaskStatById(id primitive.ObjectID) (s TaskStat, err error)\n\tGetTaskStat(query bson.M, opts *mongo.FindOptions) (s TaskStat, err error)\n\tGetTaskStatList(query bson.M, opts *mongo.FindOptions) (res []TaskStat, err error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_client_pool.go",
    "content": "package interfaces\n\ntype GrpcClientPool interface {\n\tWithConfigPath\n\tInit() error\n\tNewClient() error\n\tGetClient() (GrpcClient, error)\n\tSetSize(int)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_model_base_service_message.go",
    "content": "package interfaces\n\ntype GrpcModelBaseServiceMessage interface {\n\tGetModelId() ModelId\n\tGetData() []byte\n\tToBytes() (data []byte)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_model_binder.go",
    "content": "package interfaces\n\ntype GrpcModelBinder interface {\n\tModelBinder\n}\n"
  },
  {
    "path": "core/interfaces/grpc_model_delegate_message.go",
    "content": "package interfaces\n\ntype GrpcModelDelegateMessage interface {\n\tGetModelId() ModelId\n\tGetMethod() ModelDelegateMethod\n\tGetData() []byte\n\tToBytes() (data []byte)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_model_list_binder.go",
    "content": "package interfaces\n\ntype GrpcModelListBinder interface {\n\tModelListBinder\n}\n"
  },
  {
    "path": "core/interfaces/grpc_server.go",
    "content": "package interfaces\n\nimport (\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n)\n\ntype GrpcServer interface {\n\tGrpcBase\n\tSetAddress(Address)\n\tGetSubscribe(key string) (sub GrpcSubscribe, err error)\n\tSetSubscribe(key string, sub GrpcSubscribe)\n\tDeleteSubscribe(key string)\n\tSendStreamMessage(key string, code grpc.StreamMessageCode) (err error)\n\tSendStreamMessageWithData(nodeKey string, code grpc.StreamMessageCode, d interface{}) (err error)\n\tIsStopped() (res bool)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_stream.go",
    "content": "package interfaces\n\nimport grpc \"github.com/crawlab-team/crawlab/grpc\"\n\ntype GrpcStream interface {\n\tSend(msg *grpc.StreamMessage) (err error)\n}\n\ntype GrpcStreamBidirectional interface {\n\tGrpcStream\n\tRecv() (msg *grpc.StreamMessage, err error)\n}\n"
  },
  {
    "path": "core/interfaces/grpc_subscribe.go",
    "content": "package interfaces\n\ntype GrpcSubscribe interface {\n\tGetStream() GrpcStream\n\tGetStreamBidirectional() GrpcStreamBidirectional\n\tGetFinished() chan bool\n}\n"
  },
  {
    "path": "core/interfaces/i18n_service.go",
    "content": "package interfaces\n\ntype I18nService interface {\n\tAddTranslations(t []Translation)\n\tGetTranslations() (t []Translation)\n}\n"
  },
  {
    "path": "core/interfaces/injectable.go",
    "content": "package interfaces\n\ntype Injectable interface {\n\tInject() error\n}\n"
  },
  {
    "path": "core/interfaces/list.go",
    "content": "package interfaces\n\ntype List interface {\n\tGetModels() (res []Model)\n}\n"
  },
  {
    "path": "core/interfaces/model.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Model interface {\n\tGetId() (id primitive.ObjectID)\n\tSetId(id primitive.ObjectID)\n}\n\ntype ModelV2 interface {\n\tGetId() (id primitive.ObjectID)\n\tSetId(id primitive.ObjectID)\n\tSetCreated(by primitive.ObjectID)\n\tSetUpdated(by primitive.ObjectID)\n}\n\ntype ModelId int\n\nconst (\n\tModelIdArtifact = iota\n\tModelIdTag\n\tModelIdNode\n\tModelIdProject\n\tModelIdSpider\n\tModelIdTask\n\tModelIdJob\n\tModelIdSchedule\n\tModelIdUser\n\tModelIdSetting\n\tModelIdToken\n\tModelIdVariable\n\tModelIdTaskQueue\n\tModelIdTaskStat\n\tModelIdSpiderStat\n\tModelIdDataSource\n\tModelIdDataCollection\n\tModelIdResult\n\tModelIdPassword\n\tModelIdExtraValue\n\tModelIdGit\n\tModelIdRole\n\tModelIdUserRole\n\tModelIdPermission\n\tModelIdRolePermission\n\tModelIdEnvironment\n\tModelIdDependencySetting\n)\n\nconst (\n\tModelColNameArtifact          = \"artifacts\"\n\tModelColNameTag               = \"tags\"\n\tModelColNameNode              = \"nodes\"\n\tModelColNameProject           = \"projects\"\n\tModelColNameSpider            = \"spiders\"\n\tModelColNameTask              = \"tasks\"\n\tModelColNameJob               = \"jobs\"\n\tModelColNameSchedule          = \"schedules\"\n\tModelColNameUser              = \"users\"\n\tModelColNameSetting           = \"settings\"\n\tModelColNameToken             = \"tokens\"\n\tModelColNameVariable          = \"variables\"\n\tModelColNameTaskQueue         = \"task_queue\"\n\tModelColNameTaskStat          = \"task_stats\"\n\tModelColNameSpiderStat        = \"spider_stats\"\n\tModelColNameDataSource        = \"data_sources\"\n\tModelColNameDataCollection    = \"data_collections\"\n\tModelColNamePasswords         = \"passwords\"\n\tModelColNameExtraValues       = \"extra_values\"\n\tModelColNameGit               = \"gits\"\n\tModelColNameRole              = \"roles\"\n\tModelColNameUserRole          = \"user_roles\"\n\tModelColNamePermission        = \"permissions\"\n\tModelColNameRolePermission    = \"role_permissions\"\n\tModelColNameEnvironment       = \"environments\"\n\tModelColNameDependencySetting = \"dependency_settings\"\n)\n\ntype ModelWithTags interface {\n\tModel\n\tSetTags(tags []Tag)\n\tGetTags() (tags []Tag)\n}\n\ntype ModelWithNameDescription interface {\n\tModel\n\tGetName() (name string)\n\tSetName(name string)\n\tGetDescription() (description string)\n\tSetDescription(description string)\n}\n\ntype ModelWithKey interface {\n\tModel\n\tGetKey() (key string)\n\tSetKey(key string)\n}\n"
  },
  {
    "path": "core/interfaces/model_artifact.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype ModelArtifact interface {\n\tModel\n\tGetSys() (sys ModelArtifactSys)\n\tGetTagIds() (ids []primitive.ObjectID)\n\tSetTagIds(ids []primitive.ObjectID)\n\tSetObj(obj Model)\n\tSetDel(del bool)\n}\n"
  },
  {
    "path": "core/interfaces/model_artifact_sys.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype ModelArtifactSys interface {\n\tGetCreateTs() time.Time\n\tSetCreateTs(ts time.Time)\n\tGetUpdateTs() time.Time\n\tSetUpdateTs(ts time.Time)\n\tGetDeleteTs() time.Time\n\tSetDeleteTs(ts time.Time)\n\tGetCreateUid() primitive.ObjectID\n\tSetCreateUid(id primitive.ObjectID)\n\tGetUpdateUid() primitive.ObjectID\n\tSetUpdateUid(id primitive.ObjectID)\n\tGetDeleteUid() primitive.ObjectID\n\tSetDeleteUid(id primitive.ObjectID)\n}\n"
  },
  {
    "path": "core/interfaces/model_base_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype ModelBaseService interface {\n\tGetModelId() (id ModelId)\n\tSetModelId(id ModelId)\n\tGetById(id primitive.ObjectID) (res Model, err error)\n\tGet(query bson.M, opts *mongo.FindOptions) (res Model, err error)\n\tGetList(query bson.M, opts *mongo.FindOptions) (res List, err error)\n\tDeleteById(id primitive.ObjectID, args ...interface{}) (err error)\n\tDelete(query bson.M, args ...interface{}) (err error)\n\tDeleteList(query bson.M, args ...interface{}) (err error)\n\tForceDeleteList(query bson.M, args ...interface{}) (err error)\n\tUpdateById(id primitive.ObjectID, update bson.M, args ...interface{}) (err error)\n\tUpdate(query bson.M, update bson.M, fields []string, args ...interface{}) (err error)\n\tUpdateDoc(query bson.M, doc Model, fields []string, args ...interface{}) (err error)\n\tInsert(u User, docs ...interface{}) (err error)\n\tCount(query bson.M) (total int, err error)\n}\n\ntype ModelService interface {\n\tGetBaseService(id ModelId) (svc ModelBaseService)\n}\n"
  },
  {
    "path": "core/interfaces/model_binder.go",
    "content": "package interfaces\n\ntype ModelBinder interface {\n\tBind() (res Model, err error)\n\tProcess(d Model) (res Model, err error)\n}\n"
  },
  {
    "path": "core/interfaces/model_delegate.go",
    "content": "package interfaces\n\ntype ModelDelegateMethod string\n\ntype ModelDelegate interface {\n\tAdd() error\n\tSave() error\n\tDelete() error\n\tGetArtifact() (ModelArtifact, error)\n\tGetModel() Model\n\tRefresh() error\n\tToBytes(interface{}) ([]byte, error)\n}\n\nconst (\n\tModelDelegateMethodAdd         = \"add\"\n\tModelDelegateMethodSave        = \"save\"\n\tModelDelegateMethodDelete      = \"delete\"\n\tModelDelegateMethodGetArtifact = \"get-artifact\"\n\tModelDelegateMethodRefresh     = \"refresh\"\n\tModelDelegateMethodChange      = \"change\"\n)\n"
  },
  {
    "path": "core/interfaces/model_environment.go",
    "content": "package interfaces\n\ntype Environment interface {\n\tModel\n\tGetKey() (key string)\n\tSetKey(key string)\n\tGetValue() (value string)\n\tSetValue(value string)\n}\n"
  },
  {
    "path": "core/interfaces/model_extra_value.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype ExtraValue interface {\n\tModel\n\tGetValue() (v interface{})\n\tSetValue(v interface{})\n\tGetObjectId() (oid primitive.ObjectID)\n\tSetObjectId(oid primitive.ObjectID)\n\tGetModel() (m string)\n\tSetModel(m string)\n\tGetType() (t string)\n\tSetType(t string)\n}\n"
  },
  {
    "path": "core/interfaces/model_git.go",
    "content": "package interfaces\n\n// Git interface\ntype Git interface {\n\tModel\n\tGetUrl() (url string)\n\tSetUrl(url string)\n\tGetAuthType() (authType string)\n\tSetAuthType(authType string)\n\tGetUsername() (username string)\n\tSetUsername(username string)\n\tGetPassword() (password string)\n\tSetPassword(password string)\n\tGetCurrentBranch() (currentBranch string)\n\tSetCurrentBranch(currentBranch string)\n\tGetAutoPull() (autoPull bool)\n\tSetAutoPull(autoPull bool)\n}\n"
  },
  {
    "path": "core/interfaces/model_list_binder.go",
    "content": "package interfaces\n\ntype ModelListBinder interface {\n\tBind() (l List, err error)\n\tProcess(d interface{}) (l List, err error)\n}\n"
  },
  {
    "path": "core/interfaces/model_node.go",
    "content": "package interfaces\n\nimport \"time\"\n\ntype Node interface {\n\tModelWithNameDescription\n\tGetKey() (key string)\n\tGetIsMaster() (ok bool)\n\tGetActive() (active bool)\n\tSetActive(active bool)\n\tSetActiveTs(activeTs time.Time)\n\tGetStatus() (status string)\n\tSetStatus(status string)\n\tGetEnabled() (enabled bool)\n\tSetEnabled(enabled bool)\n\tGetAvailableRunners() (runners int)\n\tSetAvailableRunners(runners int)\n\tGetMaxRunners() (runners int)\n\tSetMaxRunners(runners int)\n\tIncrementAvailableRunners()\n\tDecrementAvailableRunners()\n}\n"
  },
  {
    "path": "core/interfaces/model_node_delegate.go",
    "content": "package interfaces\n\nimport \"time\"\n\ntype ModelNodeDelegate interface {\n\tModelDelegate\n\tUpdateStatus(active bool, activeTs *time.Time, status string) (err error)\n\tUpdateStatusOnline() (err error)\n\tUpdateStatusOffline() (err error)\n}\n"
  },
  {
    "path": "core/interfaces/model_permission.go",
    "content": "package interfaces\n\ntype Permission interface {\n\tModelWithKey\n\tModelWithNameDescription\n\tGetType() (t string)\n\tSetType(t string)\n\tGetTarget() (target []string)\n\tSetTarget(target []string)\n\tGetAllow() (allow []string)\n\tSetAllow(allow []string)\n\tGetDeny() (deny []string)\n\tSetDeny(deny []string)\n}\n"
  },
  {
    "path": "core/interfaces/model_result.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype Result interface {\n\tValue() map[string]interface{}\n\tSetValue(key string, value interface{})\n\tGetValue(key string) (value interface{})\n\tGetTaskId() (id primitive.ObjectID)\n\tSetTaskId(id primitive.ObjectID)\n}\n"
  },
  {
    "path": "core/interfaces/model_role.go",
    "content": "package interfaces\n\ntype Role interface {\n\tModelWithKey\n\tModelWithNameDescription\n}\n"
  },
  {
    "path": "core/interfaces/model_schedule.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/robfig/cron/v3\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Schedule interface {\n\tModel\n\tGetEnabled() (enabled bool)\n\tSetEnabled(enabled bool)\n\tGetEntryId() (id cron.EntryID)\n\tSetEntryId(id cron.EntryID)\n\tGetCron() (c string)\n\tSetCron(c string)\n\tGetSpiderId() (id primitive.ObjectID)\n\tSetSpiderId(id primitive.ObjectID)\n\tGetMode() (mode string)\n\tSetMode(mode string)\n\tGetNodeIds() (ids []primitive.ObjectID)\n\tSetNodeIds(ids []primitive.ObjectID)\n\tGetCmd() (cmd string)\n\tSetCmd(cmd string)\n\tGetParam() (param string)\n\tSetParam(param string)\n\tGetPriority() (p int)\n\tSetPriority(p int)\n}\n"
  },
  {
    "path": "core/interfaces/model_service_v2.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype ModelServiceV2[T any] interface {\n\tGetById(id primitive.ObjectID) (model *T, err error)\n\tGet(query bson.M, options *mongo.FindOptions) (model *T, err error)\n\tGetList(query bson.M, options *mongo.FindOptions) (models []T, err error)\n\tDeleteById(id primitive.ObjectID) (err error)\n\tDelete(query bson.M) (err error)\n\tDeleteList(query bson.M) (err error)\n\tUpdateById(id primitive.ObjectID, update bson.M) (err error)\n\tUpdateOne(query bson.M, update bson.M) (err error)\n\tUpdateMany(query bson.M, update bson.M) (err error)\n\tReplaceById(id primitive.ObjectID, model T) (err error)\n\tReplace(query bson.M, model T) (err error)\n\tInsertOne(model T) (id primitive.ObjectID, err error)\n\tInsertMany(models []T) (ids []primitive.ObjectID, err error)\n\tCount(query bson.M) (total int, err error)\n\tGetCol() (col *mongo.Col)\n}\n"
  },
  {
    "path": "core/interfaces/model_spider.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype Spider interface {\n\tModelWithNameDescription\n\tGetType() (ty string)\n\tGetMode() (mode string)\n\tSetMode(mode string)\n\tGetNodeIds() (ids []primitive.ObjectID)\n\tSetNodeIds(ids []primitive.ObjectID)\n\tGetCmd() (cmd string)\n\tSetCmd(cmd string)\n\tGetParam() (param string)\n\tSetParam(param string)\n\tGetPriority() (p int)\n\tSetPriority(p int)\n\tGetColId() (id primitive.ObjectID)\n\tSetColId(id primitive.ObjectID)\n\tGetIncrementalSync() (incrementalSync bool)\n\tSetIncrementalSync(incrementalSync bool)\n\tGetAutoInstall() (autoInstall bool)\n\tSetAutoInstall(autoInstall bool)\n}\n"
  },
  {
    "path": "core/interfaces/model_tag.go",
    "content": "package interfaces\n\ntype Tag interface {\n\tModel\n\tGetName() string\n\tGetColor() string\n\tSetCol(string)\n}\n"
  },
  {
    "path": "core/interfaces/model_task.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype Task interface {\n\tModel\n\tGetNodeId() (id primitive.ObjectID)\n\tSetNodeId(id primitive.ObjectID)\n\tGetNodeIds() (ids []primitive.ObjectID)\n\tGetStatus() (status string)\n\tSetStatus(status string)\n\tGetError() (error string)\n\tSetError(error string)\n\tGetPid() (pid int)\n\tSetPid(pid int)\n\tGetSpiderId() (id primitive.ObjectID)\n\tGetType() (ty string)\n\tGetCmd() (cmd string)\n\tGetParam() (param string)\n\tGetPriority() (p int)\n\tGetUserId() (id primitive.ObjectID)\n\tSetUserId(id primitive.ObjectID)\n}\n"
  },
  {
    "path": "core/interfaces/model_task_stat.go",
    "content": "package interfaces\n\nimport \"time\"\n\ntype TaskStat interface {\n\tModel\n\tGetCreateTs() (ts time.Time)\n\tSetCreateTs(ts time.Time)\n\tGetStartTs() (ts time.Time)\n\tSetStartTs(ts time.Time)\n\tGetEndTs() (ts time.Time)\n\tSetEndTs(ts time.Time)\n\tGetWaitDuration() (d int64)\n\tSetWaitDuration(d int64)\n\tGetRuntimeDuration() (d int64)\n\tSetRuntimeDuration(d int64)\n\tGetTotalDuration() (d int64)\n\tSetTotalDuration(d int64)\n\tGetResultCount() (c int64)\n\tSetResultCount(c int64)\n\tGetErrorLogCount() (c int64)\n\tSetErrorLogCount(c int64)\n}\n"
  },
  {
    "path": "core/interfaces/model_user.go",
    "content": "package interfaces\n\ntype User interface {\n\tModel\n\tGetUsername() (name string)\n\tGetPassword() (p string)\n\tGetRole() (r string)\n\tGetEmail() (email string)\n}\n"
  },
  {
    "path": "core/interfaces/model_user_group.go",
    "content": "package interfaces\n\ntype UserGroup interface {\n\tModel\n\tGetUsers() (users []User, err error)\n}\n"
  },
  {
    "path": "core/interfaces/module.go",
    "content": "package interfaces\n\ntype ModuleId int\n\ntype Module interface {\n\tInit() error\n\tStart()\n\tWait()\n\tStop()\n}\n"
  },
  {
    "path": "core/interfaces/node_config_service.go",
    "content": "package interfaces\n\ntype NodeConfigService interface {\n\tWithConfigPath\n\tInit() error\n\tReload() error\n\tGetBasicNodeInfo() Entity\n\tGetNodeKey() string\n\tGetNodeName() string\n\tIsMaster() bool\n\tGetAuthKey() string\n\tGetMaxRunners() int\n}\n"
  },
  {
    "path": "core/interfaces/node_master_service.go",
    "content": "package interfaces\n\nimport (\n\t\"time\"\n)\n\ntype NodeMasterService interface {\n\tNodeService\n\tMonitor()\n\tSetMonitorInterval(duration time.Duration)\n\tRegister() error\n\tStopOnError()\n\tGetServer() GrpcServer\n}\n"
  },
  {
    "path": "core/interfaces/node_service.go",
    "content": "package interfaces\n\ntype NodeService interface {\n\tModule\n\tWithConfigPath\n\tWithAddress\n\tGetConfigService() NodeConfigService\n}\n"
  },
  {
    "path": "core/interfaces/node_service_option.go",
    "content": "package interfaces\n\ntype NodeServiceOption interface {\n}\n"
  },
  {
    "path": "core/interfaces/node_worker_service.go",
    "content": "package interfaces\n\nimport \"time\"\n\ntype NodeWorkerService interface {\n\tNodeService\n\tRegister()\n\tRecv()\n\tReportStatus()\n\tSetHeartbeatInterval(duration time.Duration)\n}\n"
  },
  {
    "path": "core/interfaces/options.go",
    "content": "package interfaces\n"
  },
  {
    "path": "core/interfaces/process_daemon.go",
    "content": "package interfaces\n\nimport (\n\t\"os/exec\"\n\t\"time\"\n)\n\ntype ProcessDaemon interface {\n\tStart() (err error)\n\tStop()\n\tGetMaxErrors() (maxErrors int)\n\tSetMaxErrors(maxErrors int)\n\tGetExitTimeout() (timeout time.Duration)\n\tSetExitTimeout(timeout time.Duration)\n\tGetCmd() (cmd *exec.Cmd)\n\tGetCh() (ch chan int)\n}\n"
  },
  {
    "path": "core/interfaces/provide.go",
    "content": "package interfaces\n\ntype Provide func(env string)\n"
  },
  {
    "path": "core/interfaces/result_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"time\"\n)\n\ntype ResultService interface {\n\tInsert(records ...interface{}) (err error)\n\tList(query generic.ListQuery, opts *generic.ListOptions) (results []interface{}, err error)\n\tCount(query generic.ListQuery) (n int, err error)\n\tIndex(fields []string)\n\tSetTime(t time.Time)\n\tGetTime() (t time.Time)\n}\n"
  },
  {
    "path": "core/interfaces/result_service_mongo.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype ResultServiceMongo interface {\n\tGetId() (id primitive.ObjectID)\n\tSetId(id primitive.ObjectID)\n\tList(query bson.M, opts *mongo.FindOptions) (results []Result, err error)\n\tCount(query bson.M) (total int, err error)\n\tInsert(docs ...interface{}) (err error)\n}\n"
  },
  {
    "path": "core/interfaces/result_service_registry.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype ResultServiceRegistry interface {\n\tRegister(key string, fn ResultServiceRegistryFn)\n\tUnregister(key string)\n\tGet(key string) (fn ResultServiceRegistryFn)\n}\n\ntype ResultServiceRegistryFn func(colId primitive.ObjectID, dsId primitive.ObjectID) (ResultService, error)\n"
  },
  {
    "path": "core/interfaces/schedule_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/robfig/cron/v3\"\n\t\"time\"\n)\n\ntype ScheduleService interface {\n\tWithConfigPath\n\tModule\n\tGetLocation() (loc *time.Location)\n\tSetLocation(loc *time.Location)\n\tGetDelay() (delay bool)\n\tSetDelay(delay bool)\n\tGetSkip() (skip bool)\n\tSetSkip(skip bool)\n\tGetUpdateInterval() (interval time.Duration)\n\tSetUpdateInterval(interval time.Duration)\n\tEnable(s Schedule, args ...interface{}) (err error)\n\tDisable(s Schedule, args ...interface{}) (err error)\n\tUpdate()\n\tGetCron() (c *cron.Cron)\n}\n"
  },
  {
    "path": "core/interfaces/spider_admin_service.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype SpiderAdminService interface {\n\tWithConfigPath\n\tStart() (err error)\n\t// Schedule a new task of the spider\n\tSchedule(id primitive.ObjectID, opts *SpiderRunOptions) (taskIds []primitive.ObjectID, err error)\n\t// Clone the spider\n\tClone(id primitive.ObjectID, opts *SpiderCloneOptions) (err error)\n\t// Delete the spider\n\tDelete(id primitive.ObjectID) (err error)\n\t// SyncGit syncs all git repositories\n\tSyncGit() (err error)\n\t// SyncGitOne syncs one git repository\n\tSyncGitOne(g Git) (err error)\n\t// Export exports the spider and return zip file path\n\tExport(id primitive.ObjectID) (filePath string, err error)\n}\n"
  },
  {
    "path": "core/interfaces/spider_service_options.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype SpiderRunOptions struct {\n\tMode       string               `json:\"mode\"`\n\tNodeIds    []primitive.ObjectID `json:\"node_ids\"`\n\tCmd        string               `json:\"cmd\"`\n\tParam      string               `json:\"param\"`\n\tScheduleId primitive.ObjectID   `json:\"schedule_id\"`\n\tPriority   int                  `json:\"priority\"`\n\tUserId     primitive.ObjectID   `json:\"-\"`\n}\n\ntype SpiderCloneOptions struct {\n\tName string\n}\n"
  },
  {
    "path": "core/interfaces/stats_service.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson\"\n\ntype StatsService interface {\n\tGetOverviewStats(query bson.M) (data interface{}, err error)\n\tGetDailyStats(query bson.M) (data interface{}, err error)\n\tGetTaskStats(query bson.M) (data interface{}, err error)\n}\n"
  },
  {
    "path": "core/interfaces/task_base_service.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype TaskBaseService interface {\n\tWithConfigPath\n\tModule\n\tSaveTask(t Task, status string) (err error)\n\tIsStopped() (res bool)\n\tGetQueue(nodeId primitive.ObjectID) (queue string)\n}\n"
  },
  {
    "path": "core/interfaces/task_handler_service.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype TaskHandlerService interface {\n\tTaskBaseService\n\t// Run task and execute locally\n\tRun(taskId primitive.ObjectID) (err error)\n\t// Cancel task locally\n\tCancel(taskId primitive.ObjectID) (err error)\n\t// Fetch tasks and run\n\tFetch()\n\t// ReportStatus periodically report handler status to master\n\tReportStatus()\n\t// Reset reset internals to default\n\tReset()\n\t// IsSyncLocked whether the given task is locked for files sync\n\tIsSyncLocked(path string) (ok bool)\n\t// LockSync lock files sync for given task\n\tLockSync(path string)\n\t// UnlockSync unlock files sync for given task\n\tUnlockSync(path string)\n\t// GetExitWatchDuration get max runners\n\tGetExitWatchDuration() (duration time.Duration)\n\t// SetExitWatchDuration set max runners\n\tSetExitWatchDuration(duration time.Duration)\n\t// GetFetchInterval get report interval\n\tGetFetchInterval() (interval time.Duration)\n\t// SetFetchInterval set report interval\n\tSetFetchInterval(interval time.Duration)\n\t// GetReportInterval get report interval\n\tGetReportInterval() (interval time.Duration)\n\t// SetReportInterval set report interval\n\tSetReportInterval(interval time.Duration)\n\t// GetCancelTimeout get report interval\n\tGetCancelTimeout() (timeout time.Duration)\n\t// SetCancelTimeout set report interval\n\tSetCancelTimeout(timeout time.Duration)\n\t// GetModelService get model service\n\tGetModelService() (modelSvc GrpcClientModelService)\n\t// GetModelSpiderService get model spider service\n\tGetModelSpiderService() (modelSpiderSvc GrpcClientModelSpiderService)\n\t// GetModelTaskService get model task service\n\tGetModelTaskService() (modelTaskSvc GrpcClientModelTaskService)\n\t// GetModelTaskStatService get model task stat service\n\tGetModelTaskStatService() (modelTaskStatSvc GrpcClientModelTaskStatService)\n\t// GetModelEnvironmentService get model environment service\n\tGetModelEnvironmentService() (modelEnvironmentSvc GrpcClientModelEnvironmentService)\n\t// GetNodeConfigService get node config service\n\tGetNodeConfigService() (cfgSvc NodeConfigService)\n\t// GetCurrentNode get node of the handler\n\tGetCurrentNode() (n Node, err error)\n\t// GetTaskById get task by id\n\tGetTaskById(id primitive.ObjectID) (t Task, err error)\n\t// GetSpiderById get task by id\n\tGetSpiderById(id primitive.ObjectID) (t Spider, err error)\n}\n"
  },
  {
    "path": "core/interfaces/task_hook_service.go",
    "content": "package interfaces\n\ntype TaskHookService interface {\n\tPreActions(Task, Spider, FsServiceV2, TaskHandlerService) (err error)\n\tPostActions(Task, Spider, FsServiceV2, TaskHandlerService) (err error)\n}\n"
  },
  {
    "path": "core/interfaces/task_runner.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype TaskRunner interface {\n\tInit() (err error)\n\tRun() (err error)\n\tCancel() (err error)\n\tSetSubscribeTimeout(timeout time.Duration)\n\tGetTaskId() (id primitive.ObjectID)\n\tCleanUp() (err error)\n}\n"
  },
  {
    "path": "core/interfaces/task_scheduler_service.go",
    "content": "package interfaces\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype TaskSchedulerService interface {\n\tTaskBaseService\n\t// Enqueue task into the task queue\n\tEnqueue(t Task) (t2 Task, err error)\n\t// Cancel task to corresponding node\n\tCancel(id primitive.ObjectID, args ...interface{}) (err error)\n\t// SetInterval set the interval or duration between two adjacent fetches\n\tSetInterval(interval time.Duration)\n}\n"
  },
  {
    "path": "core/interfaces/task_stats_service.go",
    "content": "package interfaces\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype TaskStatsService interface {\n\tTaskBaseService\n\tInsertData(id primitive.ObjectID, records ...interface{}) (err error)\n\tInsertLogs(id primitive.ObjectID, logs ...string) (err error)\n}\n"
  },
  {
    "path": "core/interfaces/test.go",
    "content": "package interfaces\n\nimport \"testing\"\n\ntype Test interface {\n\tSetup(*testing.T)\n\tCleanup()\n}\n"
  },
  {
    "path": "core/interfaces/translation.go",
    "content": "package interfaces\n\ntype Translation interface {\n\tGetLang() (l string)\n}\n"
  },
  {
    "path": "core/interfaces/user_service.go",
    "content": "package interfaces\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/golang-jwt/jwt/v5\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype UserService interface {\n\tInit() (err error)\n\tSetJwtSecret(secret string)\n\tSetJwtSigningMethod(method jwt.SigningMethod)\n\tCreate(opts *UserCreateOptions, args ...interface{}) (err error)\n\tLogin(opts *UserLoginOptions) (token string, u User, err error)\n\tCheckToken(token string) (u User, err error)\n\tChangePassword(id primitive.ObjectID, password string, args ...interface{}) (err error)\n\tMakeToken(user User) (tokenStr string, err error)\n\tGetCurrentUser(c *gin.Context) (u User, err error)\n}\n"
  },
  {
    "path": "core/interfaces/user_service_options.go",
    "content": "package interfaces\n\ntype UserCreateOptions struct {\n\tUsername string\n\tPassword string\n\tEmail    string\n\tRole     string\n}\n\ntype UserLoginOptions struct {\n\tUsername string\n\tPassword string\n}\n"
  },
  {
    "path": "core/interfaces/with_address.go",
    "content": "package interfaces\n\ntype WithAddress interface {\n\tGetAddress() (address Address)\n\tSetAddress(address Address)\n}\n"
  },
  {
    "path": "core/interfaces/with_config_path.go",
    "content": "package interfaces\n\ntype WithConfigPath interface {\n\tGetConfigPath() (path string)\n\tSetConfigPath(path string)\n}\n"
  },
  {
    "path": "core/interfaces/with_model_id.go",
    "content": "package interfaces\n\ntype WithModelId interface {\n\tGetModelId() (id ModelId)\n\tSetModelId(id ModelId)\n}\n"
  },
  {
    "path": "core/main.go",
    "content": "package main\n\nfunc main() {\n}\n"
  },
  {
    "path": "core/middlewares/auth.go",
    "content": "package middlewares\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/user\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n)\n\nfunc AuthorizationMiddleware() gin.HandlerFunc {\n\tuserSvc, _ := user.GetUserService()\n\treturn func(c *gin.Context) {\n\t\t// disable auth for test\n\t\tif viper.GetBool(\"auth.disabled\") {\n\t\t\tmodelSvc, err := service.GetService()\n\t\t\tif err != nil {\n\t\t\t\tutils.HandleErrorInternalServerError(c, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tu, err := modelSvc.GetUserByUsername(constants.DefaultAdminUsername, nil)\n\t\t\tif err != nil {\n\t\t\t\tutils.HandleErrorInternalServerError(c, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tc.Set(constants.UserContextKey, u)\n\t\t\tc.Next()\n\t\t\treturn\n\t\t}\n\n\t\t// token string\n\t\ttokenStr := c.GetHeader(\"Authorization\")\n\n\t\t// validate token\n\t\tu, err := userSvc.CheckToken(tokenStr)\n\t\tif err != nil {\n\t\t\t// validation failed, return error response\n\t\t\tutils.HandleErrorUnauthorized(c, errors.ErrorHttpUnauthorized)\n\t\t\treturn\n\t\t}\n\n\t\t// set user in context\n\t\tc.Set(constants.UserContextKey, u)\n\n\t\t// validation success\n\t\tc.Next()\n\t}\n}\n"
  },
  {
    "path": "core/middlewares/auth_v2.go",
    "content": "package middlewares\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/user\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n)\n\nfunc AuthorizationMiddlewareV2() gin.HandlerFunc {\n\tuserSvc, _ := user.GetUserServiceV2()\n\treturn func(c *gin.Context) {\n\t\t// disable auth for test\n\t\tif viper.GetBool(\"auth.disabled\") {\n\t\t\tmodelSvc, err := service.GetService()\n\t\t\tif err != nil {\n\t\t\t\tutils.HandleErrorInternalServerError(c, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tu, err := modelSvc.GetUserByUsername(constants.DefaultAdminUsername, nil)\n\t\t\tif err != nil {\n\t\t\t\tutils.HandleErrorInternalServerError(c, err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tc.Set(constants.UserContextKey, u)\n\t\t\tc.Next()\n\t\t\treturn\n\t\t}\n\n\t\t// token string\n\t\ttokenStr := c.GetHeader(\"Authorization\")\n\n\t\t// validate token\n\t\tu, err := userSvc.CheckToken(tokenStr)\n\t\tif err != nil {\n\t\t\t// validation failed, return error response\n\t\t\tutils.HandleErrorUnauthorized(c, errors.ErrorHttpUnauthorized)\n\t\t\treturn\n\t\t}\n\n\t\t// set user in context\n\t\tc.Set(constants.UserContextKey, u)\n\n\t\t// validation success\n\t\tc.Next()\n\t}\n}\n"
  },
  {
    "path": "core/middlewares/cors.go",
    "content": "package middlewares\n\nimport \"github.com/gin-gonic/gin\"\n\nfunc CORSMiddleware() gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\tc.Writer.Header().Set(\"Access-Control-Allow-Origin\", \"*\")\n\t\tc.Writer.Header().Set(\"Access-Control-Allow-Credentials\", \"true\")\n\t\tc.Writer.Header().Set(\"Access-Control-Allow-Headers\", \"Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With\")\n\t\tc.Writer.Header().Set(\"Access-Control-Allow-Methods\", \"DELETE, POST, OPTIONS, GET, PUT\")\n\n\t\tif c.Request.Method == \"OPTIONS\" {\n\t\t\tc.AbortWithStatus(204)\n\t\t\treturn\n\t\t}\n\n\t\tc.Next()\n\t}\n}\n"
  },
  {
    "path": "core/middlewares/filer_auth.go",
    "content": "package middlewares\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/spf13/viper\"\n)\n\nfunc FilerAuthorizationMiddleware() gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\t// auth key\n\t\tauthKey := c.GetHeader(\"Authorization\")\n\n\t\t// server auth key\n\t\tsvrAuthKey := viper.GetString(\"fs.filer.authKey\")\n\n\t\t// skip to next if no server auth key is provided\n\t\tif svrAuthKey == \"\" {\n\t\t\tc.Next()\n\t\t\treturn\n\t\t}\n\n\t\t// validate\n\t\tif authKey != svrAuthKey {\n\t\t\t// validation failed, return error response\n\t\t\tutils.HandleErrorUnauthorized(c, errors.ErrorHttpUnauthorized)\n\t\t\treturn\n\t\t}\n\n\t\t// validation success\n\t\tc.Next()\n\t}\n}\n"
  },
  {
    "path": "core/middlewares/middlewares.go",
    "content": "package middlewares\n\nimport \"github.com/gin-gonic/gin\"\n\nfunc InitMiddlewares(app *gin.Engine) (err error) {\n\t// default logger\n\tapp.Use(gin.Logger())\n\n\t// recovery from panics\n\tapp.Use(gin.Recovery())\n\n\t// cors\n\tapp.Use(CORSMiddleware())\n\n\treturn nil\n}\n"
  },
  {
    "path": "core/models/client/binder_basic.go",
    "content": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\nfunc NewBasicBinder(id interfaces.ModelId, res *grpc.Response) (b interfaces.GrpcModelBinder) {\n\treturn &BasicBinder{\n\t\tid:  id,\n\t\tres: res,\n\t}\n}\n\ntype BasicBinder struct {\n\tid  interfaces.ModelId\n\tres *grpc.Response\n}\n\nfunc (b *BasicBinder) Bind() (res interfaces.Model, err error) {\n\tm := models.NewModelMap()\n\n\tswitch b.id {\n\tcase interfaces.ModelIdArtifact:\n\t\treturn b.Process(&m.Artifact)\n\tcase interfaces.ModelIdTag:\n\t\treturn b.Process(&m.Tag)\n\tcase interfaces.ModelIdNode:\n\t\treturn b.Process(&m.Node)\n\tcase interfaces.ModelIdProject:\n\t\treturn b.Process(&m.Project)\n\tcase interfaces.ModelIdSpider:\n\t\treturn b.Process(&m.Spider)\n\tcase interfaces.ModelIdTask:\n\t\treturn b.Process(&m.Task)\n\tcase interfaces.ModelIdJob:\n\t\treturn b.Process(&m.Job)\n\tcase interfaces.ModelIdSchedule:\n\t\treturn b.Process(&m.Schedule)\n\tcase interfaces.ModelIdUser:\n\t\treturn b.Process(&m.User)\n\tcase interfaces.ModelIdSetting:\n\t\treturn b.Process(&m.Setting)\n\tcase interfaces.ModelIdToken:\n\t\treturn b.Process(&m.Token)\n\tcase interfaces.ModelIdVariable:\n\t\treturn b.Process(&m.Variable)\n\tcase interfaces.ModelIdTaskQueue:\n\t\treturn b.Process(&m.TaskQueueItem)\n\tcase interfaces.ModelIdTaskStat:\n\t\treturn b.Process(&m.TaskStat)\n\tcase interfaces.ModelIdSpiderStat:\n\t\treturn b.Process(&m.SpiderStat)\n\tcase interfaces.ModelIdDataSource:\n\t\treturn b.Process(&m.DataSource)\n\tcase interfaces.ModelIdDataCollection:\n\t\treturn b.Process(&m.DataCollection)\n\tcase interfaces.ModelIdResult:\n\t\treturn b.Process(&m.Result)\n\tcase interfaces.ModelIdPassword:\n\t\treturn b.Process(&m.Password)\n\tcase interfaces.ModelIdExtraValue:\n\t\treturn b.Process(&m.ExtraValue)\n\tcase interfaces.ModelIdGit:\n\t\treturn b.Process(&m.Git)\n\tcase interfaces.ModelIdRole:\n\t\treturn b.Process(&m.Role)\n\tcase interfaces.ModelIdUserRole:\n\t\treturn b.Process(&m.UserRole)\n\tcase interfaces.ModelIdPermission:\n\t\treturn b.Process(&m.Permission)\n\tcase interfaces.ModelIdRolePermission:\n\t\treturn b.Process(&m.RolePermission)\n\tcase interfaces.ModelIdEnvironment:\n\t\treturn b.Process(&m.Environment)\n\tcase interfaces.ModelIdDependencySetting:\n\t\treturn b.Process(&m.DependencySetting)\n\tdefault:\n\t\treturn nil, errors.ErrorModelInvalidModelId\n\t}\n}\n\nfunc (b *BasicBinder) Process(d interfaces.Model) (res interfaces.Model, err error) {\n\tif err := json.Unmarshal(b.res.Data, d); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\treturn d, nil\n}\n"
  },
  {
    "path": "core/models/client/binder_list.go",
    "content": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\nfunc NewListBinder(id interfaces.ModelId, res *grpc.Response) (b interfaces.GrpcModelListBinder) {\n\treturn &ListBinder{\n\t\tid:  id,\n\t\tres: res,\n\t}\n}\n\ntype ListBinder struct {\n\tid  interfaces.ModelId\n\tres *grpc.Response\n}\n\nfunc (b *ListBinder) Bind() (l interfaces.List, err error) {\n\tm := models.NewModelListMap()\n\n\tswitch b.id {\n\tcase interfaces.ModelIdArtifact:\n\t\treturn b.Process(&m.Artifacts)\n\tcase interfaces.ModelIdTag:\n\t\treturn b.Process(&m.Tags)\n\tcase interfaces.ModelIdNode:\n\t\treturn b.Process(&m.Nodes)\n\tcase interfaces.ModelIdProject:\n\t\treturn b.Process(&m.Projects)\n\tcase interfaces.ModelIdSpider:\n\t\treturn b.Process(&m.Spiders)\n\tcase interfaces.ModelIdTask:\n\t\treturn b.Process(&m.Tasks)\n\tcase interfaces.ModelIdJob:\n\t\treturn b.Process(&m.Jobs)\n\tcase interfaces.ModelIdSchedule:\n\t\treturn b.Process(&m.Schedules)\n\tcase interfaces.ModelIdUser:\n\t\treturn b.Process(&m.Users)\n\tcase interfaces.ModelIdSetting:\n\t\treturn b.Process(&m.Settings)\n\tcase interfaces.ModelIdToken:\n\t\treturn b.Process(&m.Tokens)\n\tcase interfaces.ModelIdVariable:\n\t\treturn b.Process(&m.Variables)\n\tcase interfaces.ModelIdTaskQueue:\n\t\treturn b.Process(&m.TaskQueueItems)\n\tcase interfaces.ModelIdTaskStat:\n\t\treturn b.Process(&m.TaskStats)\n\tcase interfaces.ModelIdSpiderStat:\n\t\treturn b.Process(&m.SpiderStats)\n\tcase interfaces.ModelIdDataSource:\n\t\treturn b.Process(&m.DataSources)\n\tcase interfaces.ModelIdDataCollection:\n\t\treturn b.Process(&m.DataCollections)\n\tcase interfaces.ModelIdResult:\n\t\treturn b.Process(&m.Results)\n\tcase interfaces.ModelIdPassword:\n\t\treturn b.Process(&m.Passwords)\n\tcase interfaces.ModelIdExtraValue:\n\t\treturn b.Process(&m.ExtraValues)\n\tcase interfaces.ModelIdGit:\n\t\treturn b.Process(&m.Gits)\n\tcase interfaces.ModelIdRole:\n\t\treturn b.Process(&m.Roles)\n\tcase interfaces.ModelIdUserRole:\n\t\treturn b.Process(&m.UserRoles)\n\tcase interfaces.ModelIdPermission:\n\t\treturn b.Process(&m.PermissionList)\n\tcase interfaces.ModelIdRolePermission:\n\t\treturn b.Process(&m.RolePermissionList)\n\tcase interfaces.ModelIdEnvironment:\n\t\treturn b.Process(&m.Environments)\n\tcase interfaces.ModelIdDependencySetting:\n\t\treturn b.Process(&m.DependencySettings)\n\tdefault:\n\t\treturn l, errors.ErrorModelInvalidModelId\n\t}\n}\n\nfunc (b *ListBinder) MustBind() (res interface{}) {\n\tres, err := b.Bind()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn res\n}\n\nfunc (b *ListBinder) Process(d interface{}) (l interfaces.List, err error) {\n\tif err := json.Unmarshal(b.res.Data, d); err != nil {\n\t\treturn l, trace.TraceError(err)\n\t}\n\treturn d.(interfaces.List), nil\n}\n"
  },
  {
    "path": "core/models/client/model_base_service.go",
    "content": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/apex/log\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\terrors2 \"github.com/pkg/errors\"\n\t\"github.com/spf13/viper\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype BaseServiceDelegate struct {\n\t// settings\n\tcfgPath string\n\n\t// internals\n\tid interfaces.ModelId\n\tc  interfaces.GrpcClient\n}\n\nfunc (d *BaseServiceDelegate) GetModelId() (id interfaces.ModelId) {\n\treturn d.id\n}\n\nfunc (d *BaseServiceDelegate) SetModelId(id interfaces.ModelId) {\n\td.id = id\n}\n\nfunc (d *BaseServiceDelegate) GetConfigPath() (path string) {\n\treturn d.cfgPath\n}\n\nfunc (d *BaseServiceDelegate) SetConfigPath(path string) {\n\td.cfgPath = path\n}\n\nfunc (d *BaseServiceDelegate) GetById(id primitive.ObjectID) (doc interfaces.Model, err error) {\n\tlog.Debugf(\"[BaseServiceDelegate] get by id[%s]\", id.Hex())\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Id: id})\n\tc := d.getModelBaseServiceClient()\n\tif c == nil {\n\t\treturn nil, trace.TraceError(errors.ErrorModelNilPointer)\n\t}\n\tlog.Debugf(\"[BaseServiceDelegate] get by id[%s] req: %v\", id.Hex(), req)\n\tres, err := c.GetById(ctx, req)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tlog.Debugf(\"[BaseServiceDelegate] get by id[%s] res: %v\", id.Hex(), res)\n\treturn NewBasicBinder(d.id, res).Bind()\n}\n\nfunc (d *BaseServiceDelegate) Get(query bson.M, opts *mongo.FindOptions) (doc interfaces.Model, err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Query: query, FindOptions: opts})\n\tres, err := d.getModelBaseServiceClient().Get(ctx, req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn NewBasicBinder(d.id, res).Bind()\n}\n\nfunc (d *BaseServiceDelegate) GetList(query bson.M, opts *mongo.FindOptions) (l interfaces.List, err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Query: query, FindOptions: opts})\n\tres, err := d.getModelBaseServiceClient().GetList(ctx, req)\n\tif err != nil {\n\t\treturn l, err\n\t}\n\treturn NewListBinder(d.id, res).Bind()\n}\n\nfunc (d *BaseServiceDelegate) DeleteById(id primitive.ObjectID, args ...interface{}) (err error) {\n\tu := utils.GetUserFromArgs(args...)\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Id: id, User: u})\n\t_, err = d.getModelBaseServiceClient().DeleteById(ctx, req)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *BaseServiceDelegate) Delete(query bson.M, args ...interface{}) (err error) {\n\tu := utils.GetUserFromArgs(args...)\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Query: query, User: u})\n\t_, err = d.getModelBaseServiceClient().Delete(ctx, req)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *BaseServiceDelegate) DeleteList(query bson.M, args ...interface{}) (err error) {\n\tu := utils.GetUserFromArgs(args...)\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Query: query, User: u})\n\t_, err = d.getModelBaseServiceClient().DeleteList(ctx, req)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *BaseServiceDelegate) ForceDeleteList(query bson.M, args ...interface{}) (err error) {\n\tu := utils.GetUserFromArgs(args...)\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Query: query, User: u})\n\t_, err = d.getModelBaseServiceClient().ForceDeleteList(ctx, req)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *BaseServiceDelegate) UpdateById(id primitive.ObjectID, update bson.M, args ...interface{}) (err error) {\n\tu := utils.GetUserFromArgs(args...)\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Id: id, Update: update, User: u})\n\t_, err = d.getModelBaseServiceClient().UpdateById(ctx, req)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *BaseServiceDelegate) Update(query bson.M, update bson.M, fields []string, args ...interface{}) (err error) {\n\tu := utils.GetUserFromArgs(args...)\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Query: query, Update: update, Fields: fields, User: u})\n\t_, err = d.getModelBaseServiceClient().Update(ctx, req)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *BaseServiceDelegate) UpdateDoc(query bson.M, doc interfaces.Model, fields []string, args ...interface{}) (err error) {\n\tu := utils.GetUserFromArgs(args...)\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Query: query, Doc: doc, Fields: fields, User: u})\n\t_, err = d.getModelBaseServiceClient().UpdateDoc(ctx, req)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *BaseServiceDelegate) Insert(u interfaces.User, docs ...interface{}) (err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Docs: docs, User: u})\n\t_, err = d.getModelBaseServiceClient().Insert(ctx, req)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *BaseServiceDelegate) Count(query bson.M) (total int, err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\treq := d.mustNewRequest(&entity.GrpcBaseServiceParams{Query: query})\n\tres, err := d.getModelBaseServiceClient().Count(ctx, req)\n\tif err != nil {\n\t\treturn total, err\n\t}\n\tif err := json.Unmarshal(res.Data, &total); err != nil {\n\t\treturn total, err\n\t}\n\treturn total, nil\n}\n\nfunc (d *BaseServiceDelegate) newRequest(params interfaces.GrpcBaseServiceParams) (req *grpc.Request, err error) {\n\treturn d.c.NewModelBaseServiceRequest(d.id, params)\n}\n\nfunc (d *BaseServiceDelegate) mustNewRequest(params *entity.GrpcBaseServiceParams) (req *grpc.Request) {\n\treq, err := d.newRequest(params)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn req\n}\n\nfunc (d *BaseServiceDelegate) getModelBaseServiceClient() (c grpc.ModelBaseServiceClient) {\n\tif err := backoff.Retry(func() (err error) {\n\t\tc = d.c.GetModelBaseServiceClient()\n\t\tif c == nil {\n\t\t\terr = errors2.New(\"unable to get model base service client\")\n\t\t\tlog.Debugf(\"[BaseServiceDelegate] err: %v\", err)\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}, backoff.NewConstantBackOff(1*time.Second)); err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\treturn c\n}\n\nfunc NewBaseServiceDelegate(opts ...ModelBaseServiceDelegateOption) (svc2 interfaces.GrpcClientModelBaseService, err error) {\n\t// base service\n\tsvc := &BaseServiceDelegate{}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(svc)\n\t}\n\n\t// config path\n\tif viper.GetString(\"config.path\") != \"\" {\n\t\tsvc.cfgPath = viper.GetString(\"config.path\")\n\t}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(client interfaces.GrpcClient) {\n\t\tsvc.c = client\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nfunc ProvideBaseServiceDelegate(id interfaces.ModelId) func() (svc interfaces.GrpcClientModelBaseService, err error) {\n\treturn func() (svc interfaces.GrpcClientModelBaseService, err error) {\n\t\treturn NewBaseServiceDelegate(WithBaseServiceModelId(id))\n\t}\n}\n"
  },
  {
    "path": "core/models/client/model_delegate.go",
    "content": "package client\n\nimport (\n\t\"encoding/json\"\n\tconfig2 \"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/client\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/spf13/viper\"\n)\n\nfunc NewModelDelegate(doc interfaces.Model, opts ...ModelDelegateOption) interfaces.GrpcClientModelDelegate {\n\tswitch doc.(type) {\n\tcase *models.Artifact:\n\t\treturn newModelDelegate(interfaces.ModelIdArtifact, doc, opts...)\n\tcase *models.Tag:\n\t\treturn newModelDelegate(interfaces.ModelIdTag, doc, opts...)\n\tcase *models.Node:\n\t\treturn newModelDelegate(interfaces.ModelIdNode, doc, opts...)\n\tcase *models.Project:\n\t\treturn newModelDelegate(interfaces.ModelIdProject, doc, opts...)\n\tcase *models.Spider:\n\t\treturn newModelDelegate(interfaces.ModelIdSpider, doc, opts...)\n\tcase *models.Task:\n\t\treturn newModelDelegate(interfaces.ModelIdTask, doc, opts...)\n\tcase *models.Job:\n\t\treturn newModelDelegate(interfaces.ModelIdJob, doc, opts...)\n\tcase *models.Schedule:\n\t\treturn newModelDelegate(interfaces.ModelIdSchedule, doc, opts...)\n\tcase *models.User:\n\t\treturn newModelDelegate(interfaces.ModelIdUser, doc, opts...)\n\tcase *models.Setting:\n\t\treturn newModelDelegate(interfaces.ModelIdSetting, doc, opts...)\n\tcase *models.Token:\n\t\treturn newModelDelegate(interfaces.ModelIdToken, doc, opts...)\n\tcase *models.Variable:\n\t\treturn newModelDelegate(interfaces.ModelIdVariable, doc, opts...)\n\tcase *models.TaskQueueItem:\n\t\treturn newModelDelegate(interfaces.ModelIdTaskQueue, doc, opts...)\n\tcase *models.TaskStat:\n\t\treturn newModelDelegate(interfaces.ModelIdTaskStat, doc, opts...)\n\tcase *models.SpiderStat:\n\t\treturn newModelDelegate(interfaces.ModelIdSpiderStat, doc, opts...)\n\tcase *models.DataSource:\n\t\treturn newModelDelegate(interfaces.ModelIdDataSource, doc, opts...)\n\tcase *models.DataCollection:\n\t\treturn newModelDelegate(interfaces.ModelIdDataCollection, doc, opts...)\n\tcase *models.Result:\n\t\treturn newModelDelegate(interfaces.ModelIdResult, doc, opts...)\n\tcase *models.Password:\n\t\treturn newModelDelegate(interfaces.ModelIdPassword, doc, opts...)\n\tcase *models.ExtraValue:\n\t\treturn newModelDelegate(interfaces.ModelIdExtraValue, doc, opts...)\n\tcase *models.Git:\n\t\treturn newModelDelegate(interfaces.ModelIdGit, doc, opts...)\n\tcase *models.UserRole:\n\t\treturn newModelDelegate(interfaces.ModelIdUserRole, doc, opts...)\n\tcase *models.Permission:\n\t\treturn newModelDelegate(interfaces.ModelIdPermission, doc, opts...)\n\tcase *models.RolePermission:\n\t\treturn newModelDelegate(interfaces.ModelIdRolePermission, doc, opts...)\n\tcase *models.Environment:\n\t\treturn newModelDelegate(interfaces.ModelIdEnvironment, doc, opts...)\n\tcase *models.DependencySetting:\n\t\treturn newModelDelegate(interfaces.ModelIdDependencySetting, doc, opts...)\n\tdefault:\n\t\t_ = trace.TraceError(errors.ErrorModelInvalidType)\n\t\treturn nil\n\t}\n}\n\nfunc newModelDelegate(id interfaces.ModelId, doc interfaces.Model, opts ...ModelDelegateOption) interfaces.GrpcClientModelDelegate {\n\tvar err error\n\n\t// collection name\n\tcolName := models.GetModelColName(id)\n\n\t// model delegate\n\td := &ModelDelegate{\n\t\tid:      id,\n\t\tcolName: colName,\n\t\tdoc:     doc,\n\t\tcfgPath: config2.GetConfigPath(),\n\t\ta: &models.Artifact{\n\t\t\tCol: colName,\n\t\t},\n\t}\n\n\t// config path\n\tif viper.GetString(\"config.path\") != \"\" {\n\t\td.cfgPath = viper.GetString(\"config.path\")\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(d)\n\t}\n\n\t// grpc client\n\td.c, err = client.GetClient()\n\tif err != nil {\n\t\ttrace.PrintError(errors.ErrorModelInvalidType)\n\t\treturn nil\n\t}\n\tif !d.c.IsStarted() {\n\t\tif err := d.c.Start(); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn nil\n\t\t}\n\t} else if d.c.IsClosed() {\n\t\tif err := d.c.Restart(); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn nil\n\t\t}\n\t}\n\n\treturn d\n}\n\ntype ModelDelegate struct {\n\t// settings\n\tcfgPath string\n\n\t// internals\n\tid      interfaces.ModelId\n\tcolName string\n\tc       interfaces.GrpcClient\n\tdoc     interfaces.Model\n\ta       interfaces.ModelArtifact\n}\n\nfunc (d *ModelDelegate) Add() (err error) {\n\treturn d.do(interfaces.ModelDelegateMethodAdd)\n}\n\nfunc (d *ModelDelegate) Save() (err error) {\n\treturn d.do(interfaces.ModelDelegateMethodSave)\n}\n\nfunc (d *ModelDelegate) Delete() (err error) {\n\treturn d.do(interfaces.ModelDelegateMethodDelete)\n}\n\nfunc (d *ModelDelegate) GetArtifact() (res interfaces.ModelArtifact, err error) {\n\tif err := d.do(interfaces.ModelDelegateMethodGetArtifact); err != nil {\n\t\treturn nil, err\n\t}\n\treturn d.a, nil\n}\n\nfunc (d *ModelDelegate) GetModel() (res interfaces.Model) {\n\treturn d.doc\n}\n\nfunc (d *ModelDelegate) Refresh() (err error) {\n\treturn d.refresh()\n}\n\nfunc (d *ModelDelegate) GetConfigPath() (path string) {\n\treturn d.cfgPath\n}\n\nfunc (d *ModelDelegate) SetConfigPath(path string) {\n\td.cfgPath = path\n}\n\nfunc (d *ModelDelegate) Close() (err error) {\n\treturn d.c.Stop()\n}\n\nfunc (d *ModelDelegate) ToBytes(m interface{}) (bytes []byte, err error) {\n\tif m != nil {\n\t\treturn utils.JsonToBytes(m)\n\t}\n\treturn json.Marshal(d.doc)\n}\n\nfunc (d *ModelDelegate) do(method interfaces.ModelDelegateMethod) (err error) {\n\tswitch method {\n\tcase interfaces.ModelDelegateMethodAdd:\n\t\terr = d.add()\n\tcase interfaces.ModelDelegateMethodSave:\n\t\terr = d.save()\n\tcase interfaces.ModelDelegateMethodDelete:\n\t\terr = d.delete()\n\tcase interfaces.ModelDelegateMethodGetArtifact, interfaces.ModelDelegateMethodRefresh:\n\t\treturn d.refresh()\n\tdefault:\n\t\treturn trace.TraceError(errors.ErrorModelInvalidType)\n\t}\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (d *ModelDelegate) add() (err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\tmethod := interfaces.ModelDelegateMethod(interfaces.ModelDelegateMethodAdd)\n\tres, err := d.c.GetModelDelegateClient().Do(ctx, d.c.NewRequest(entity.GrpcDelegateMessage{\n\t\tModelId: d.id,\n\t\tMethod:  method,\n\t\tData:    d.mustGetData(),\n\t}))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := d.deserialize(res, method); err != nil {\n\t\treturn err\n\t}\n\treturn d.refreshArtifact()\n}\n\nfunc (d *ModelDelegate) save() (err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\tmethod := interfaces.ModelDelegateMethod(interfaces.ModelDelegateMethodSave)\n\tres, err := d.c.GetModelDelegateClient().Do(ctx, d.c.NewRequest(entity.GrpcDelegateMessage{\n\t\tModelId: d.id,\n\t\tMethod:  method,\n\t\tData:    d.mustGetData(),\n\t}))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := d.deserialize(res, method); err != nil {\n\t\treturn err\n\t}\n\treturn d.refreshArtifact()\n}\n\nfunc (d *ModelDelegate) delete() (err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\tmethod := interfaces.ModelDelegateMethod(interfaces.ModelDelegateMethodDelete)\n\tres, err := d.c.GetModelDelegateClient().Do(ctx, d.c.NewRequest(entity.GrpcDelegateMessage{\n\t\tModelId: d.id,\n\t\tMethod:  method,\n\t\tData:    d.mustGetData(),\n\t}))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := d.deserialize(res, method); err != nil {\n\t\treturn err\n\t}\n\treturn d.refreshArtifact()\n}\n\nfunc (d *ModelDelegate) refresh() (err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\tmethod := interfaces.ModelDelegateMethod(interfaces.ModelDelegateMethodRefresh)\n\tres, err := d.c.GetModelDelegateClient().Do(ctx, d.c.NewRequest(entity.GrpcDelegateMessage{\n\t\tModelId: d.id,\n\t\tMethod:  method,\n\t\tData:    d.mustGetData(),\n\t}))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := d.deserialize(res, method); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *ModelDelegate) refreshArtifact() (err error) {\n\t_, err = d.getArtifact()\n\treturn err\n}\n\nfunc (d *ModelDelegate) getArtifact() (res2 interfaces.ModelArtifact, err error) {\n\tctx, cancel := d.c.Context()\n\tdefer cancel()\n\tmethod := interfaces.ModelDelegateMethod(interfaces.ModelDelegateMethodGetArtifact)\n\tres, err := d.c.GetModelDelegateClient().Do(ctx, d.c.NewRequest(entity.GrpcDelegateMessage{\n\t\tModelId: d.id,\n\t\tMethod:  method,\n\t\tData:    d.mustGetData(),\n\t}))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := d.deserialize(res, method); err != nil {\n\t\treturn nil, err\n\t}\n\treturn d.a, nil\n}\n\nfunc (d *ModelDelegate) mustGetData() (data []byte) {\n\tdata, err := d.getData()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn data\n}\n\nfunc (d *ModelDelegate) getData() (data []byte, err error) {\n\treturn json.Marshal(d.doc)\n}\n\nfunc (d *ModelDelegate) deserialize(res *grpc.Response, method interfaces.ModelDelegateMethod) (err error) {\n\tif method == interfaces.ModelDelegateMethodGetArtifact {\n\t\tres, err := NewBasicBinder(interfaces.ModelIdArtifact, res).Bind()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ta, ok := res.(interfaces.ModelArtifact)\n\t\tif !ok {\n\t\t\treturn trace.TraceError(errors.ErrorModelInvalidType)\n\t\t}\n\t\td.a = a\n\t} else {\n\t\td.doc, err = NewBasicBinder(d.id, res).Bind()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "core/models/client/model_environment_service.go",
    "content": "package client\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype EnvironmentServiceDelegate struct {\n\tinterfaces.GrpcClientModelBaseService\n}\n\nfunc (svc *EnvironmentServiceDelegate) GetEnvironmentById(id primitive.ObjectID) (e interfaces.Environment, err error) {\n\tres, err := svc.GetById(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.Environment)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *EnvironmentServiceDelegate) GetEnvironment(query bson.M, opts *mongo.FindOptions) (e interfaces.Environment, err error) {\n\tres, err := svc.Get(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.Environment)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *EnvironmentServiceDelegate) GetEnvironmentList(query bson.M, opts *mongo.FindOptions) (res []interfaces.Environment, err error) {\n\tlist, err := svc.GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, item := range list.GetModels() {\n\t\ts, ok := item.(interfaces.Environment)\n\t\tif !ok {\n\t\t\treturn nil, errors.ErrorModelInvalidType\n\t\t}\n\t\tres = append(res, s)\n\t}\n\treturn res, nil\n}\n\nfunc NewEnvironmentServiceDelegate() (svc2 interfaces.GrpcClientModelEnvironmentService, err error) {\n\tvar opts []ModelBaseServiceDelegateOption\n\n\t// apply options\n\topts = append(opts, WithBaseServiceModelId(interfaces.ModelIdEnvironment))\n\n\t// base service\n\tbaseSvc, err := NewBaseServiceDelegate(opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// service\n\tsvc := &EnvironmentServiceDelegate{baseSvc}\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/models/client/model_node_delegate.go",
    "content": "package client\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype ModelNodeDelegate struct {\n\tn interfaces.Node\n\tinterfaces.GrpcClientModelDelegate\n}\n\nfunc (d *ModelNodeDelegate) UpdateStatus(active bool, activeTs *time.Time, status string) (err error) {\n\td.n.SetActive(active)\n\tif activeTs != nil {\n\t\td.n.SetActiveTs(*activeTs)\n\t}\n\td.n.SetStatus(status)\n\treturn d.Save()\n}\n\nfunc (d *ModelNodeDelegate) UpdateStatusOnline() (err error) {\n\tnow := time.Now()\n\treturn d.UpdateStatus(true, &now, constants.NodeStatusOnline)\n}\n\nfunc (d *ModelNodeDelegate) UpdateStatusOffline() (err error) {\n\treturn d.UpdateStatus(false, nil, constants.NodeStatusOffline)\n}\n\nfunc NewModelNodeDelegate(n interfaces.Node) interfaces.ModelNodeDelegate {\n\treturn &ModelNodeDelegate{\n\t\tn:                       n,\n\t\tGrpcClientModelDelegate: NewModelDelegate(n),\n\t}\n}\n"
  },
  {
    "path": "core/models/client/model_node_service.go",
    "content": "package client\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype NodeServiceDelegate struct {\n\tinterfaces.GrpcClientModelBaseService\n}\n\nfunc (svc *NodeServiceDelegate) GetNodeById(id primitive.ObjectID) (n interfaces.Node, err error) {\n\tres, err := svc.GetById(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.Node)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *NodeServiceDelegate) GetNode(query bson.M, opts *mongo.FindOptions) (n interfaces.Node, err error) {\n\tres, err := svc.Get(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.Node)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *NodeServiceDelegate) GetNodeByKey(key string) (n interfaces.Node, err error) {\n\treturn svc.GetNode(bson.M{\"key\": key}, nil)\n}\n\nfunc (svc *NodeServiceDelegate) GetNodeList(query bson.M, opts *mongo.FindOptions) (res []interfaces.Node, err error) {\n\tlist, err := svc.GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, item := range list.GetModels() {\n\t\ts, ok := item.(interfaces.Node)\n\t\tif !ok {\n\t\t\treturn nil, errors.ErrorModelInvalidType\n\t\t}\n\t\tres = append(res, s)\n\t}\n\treturn res, nil\n}\n\nfunc NewNodeServiceDelegate() (svc2 interfaces.GrpcClientModelNodeService, err error) {\n\tvar opts []ModelBaseServiceDelegateOption\n\n\t// apply options\n\topts = append(opts, WithBaseServiceModelId(interfaces.ModelIdNode))\n\n\t// base service\n\tbaseSvc, err := NewBaseServiceDelegate(opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// service\n\tsvc := &NodeServiceDelegate{baseSvc}\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/models/client/model_service.go",
    "content": "package client\n\nimport (\n\tconfig2 \"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n)\n\ntype ServiceDelegate struct {\n\t// settings\n\tcfgPath string\n\n\t// internals\n\tc interfaces.GrpcClient\n}\n\nfunc (d *ServiceDelegate) GetConfigPath() string {\n\treturn d.cfgPath\n}\n\nfunc (d *ServiceDelegate) SetConfigPath(path string) {\n\td.cfgPath = path\n}\n\nfunc (d *ServiceDelegate) NewBaseServiceDelegate(id interfaces.ModelId) (svc interfaces.GrpcClientModelBaseService, err error) {\n\tvar opts []ModelBaseServiceDelegateOption\n\topts = append(opts, WithBaseServiceModelId(id))\n\tif d.cfgPath != \"\" {\n\t\topts = append(opts, WithBaseServiceConfigPath(d.cfgPath))\n\t}\n\treturn NewBaseServiceDelegate(opts...)\n}\n\nfunc NewServiceDelegate() (svc2 interfaces.GrpcClientModelService, err error) {\n\t// service delegate\n\tsvc := &ServiceDelegate{\n\t\tcfgPath: config2.GetConfigPath(),\n\t}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(client interfaces.GrpcClient) {\n\t\tsvc.c = client\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/models/client/model_service_v2.go",
    "content": "package client\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/client\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"reflect\"\n\t\"sync\"\n)\n\nvar (\n\tinstanceMap = make(map[string]interface{})\n\tonceMap     = make(map[string]*sync.Once)\n\tmu          sync.Mutex\n)\n\ntype ModelServiceV2[T any] struct {\n\tcfg       interfaces.NodeConfigService\n\tc         *client.GrpcClientV2\n\tmodelType string\n}\n\nfunc (svc *ModelServiceV2[T]) GetById(id primitive.ObjectID) (model *T, err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tres, err := svc.c.ModelBaseServiceV2Client.GetById(ctx, &grpc.ModelServiceV2GetByIdRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tId:        id.Hex(),\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn svc.deserializeOne(res)\n}\n\nfunc (svc *ModelServiceV2[T]) GetOne(query bson.M, options *mongo.FindOptions) (model *T, err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tqueryData, err := json.Marshal(query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfindOptionsData, err := json.Marshal(options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, err := svc.c.ModelBaseServiceV2Client.GetOne(ctx, &grpc.ModelServiceV2GetOneRequest{\n\t\tNodeKey:     svc.cfg.GetNodeKey(),\n\t\tModelType:   svc.modelType,\n\t\tQuery:       queryData,\n\t\tFindOptions: findOptionsData,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn svc.deserializeOne(res)\n}\n\nfunc (svc *ModelServiceV2[T]) GetMany(query bson.M, options *mongo.FindOptions) (models []T, err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tqueryData, err := json.Marshal(query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfindOptionsData, err := json.Marshal(options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, err := svc.c.ModelBaseServiceV2Client.GetMany(ctx, &grpc.ModelServiceV2GetManyRequest{\n\t\tNodeKey:     svc.cfg.GetNodeKey(),\n\t\tModelType:   svc.modelType,\n\t\tQuery:       queryData,\n\t\tFindOptions: findOptionsData,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn svc.deserializeMany(res)\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteById(id primitive.ObjectID) (err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\t_, err = svc.c.ModelBaseServiceV2Client.DeleteById(ctx, &grpc.ModelServiceV2DeleteByIdRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tId:        id.Hex(),\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteOne(query bson.M) (err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tqueryData, err := json.Marshal(query)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = svc.c.ModelBaseServiceV2Client.DeleteOne(ctx, &grpc.ModelServiceV2DeleteOneRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tQuery:     queryData,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteMany(query bson.M) (err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tqueryData, err := json.Marshal(query)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = svc.c.ModelBaseServiceV2Client.DeleteMany(ctx, &grpc.ModelServiceV2DeleteManyRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tQuery:     queryData,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateById(id primitive.ObjectID, update bson.M) (err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tupdateData, err := json.Marshal(update)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = svc.c.ModelBaseServiceV2Client.UpdateById(ctx, &grpc.ModelServiceV2UpdateByIdRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tId:        id.Hex(),\n\t\tUpdate:    updateData,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateOne(query bson.M, update bson.M) (err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tqueryData, err := json.Marshal(query)\n\tif err != nil {\n\t\treturn err\n\t}\n\tupdateData, err := json.Marshal(update)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = svc.c.ModelBaseServiceV2Client.UpdateOne(ctx, &grpc.ModelServiceV2UpdateOneRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tQuery:     queryData,\n\t\tUpdate:    updateData,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateMany(query bson.M, update bson.M) (err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tqueryData, err := json.Marshal(query)\n\tif err != nil {\n\t\treturn err\n\t}\n\tupdateData, err := json.Marshal(update)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = svc.c.ModelBaseServiceV2Client.UpdateMany(ctx, &grpc.ModelServiceV2UpdateManyRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tQuery:     queryData,\n\t\tUpdate:    updateData,\n\t})\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) ReplaceById(id primitive.ObjectID, model T) (err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tmodelData, err := json.Marshal(model)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = svc.c.ModelBaseServiceV2Client.ReplaceById(ctx, &grpc.ModelServiceV2ReplaceByIdRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tId:        id.Hex(),\n\t\tModel:     modelData,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) ReplaceOne(query bson.M, model T) (err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tqueryData, err := json.Marshal(query)\n\tif err != nil {\n\t\treturn err\n\t}\n\tmodelData, err := json.Marshal(model)\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = svc.c.ModelBaseServiceV2Client.ReplaceOne(ctx, &grpc.ModelServiceV2ReplaceOneRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tQuery:     queryData,\n\t\tModel:     modelData,\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) InsertOne(model T) (id primitive.ObjectID, err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tmodelData, err := json.Marshal(model)\n\tif err != nil {\n\t\treturn primitive.NilObjectID, err\n\t}\n\tres, err := svc.c.ModelBaseServiceV2Client.InsertOne(ctx, &grpc.ModelServiceV2InsertOneRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tModel:     modelData,\n\t})\n\tif err != nil {\n\t\treturn primitive.NilObjectID, err\n\t}\n\treturn deserialize[primitive.ObjectID](res)\n\t//idStr, err := deserialize[string](res)\n\t//if err != nil {\n\t//\treturn primitive.NilObjectID, err\n\t//}\n\t//return primitive.ObjectIDFromHex(idStr)\n}\n\nfunc (svc *ModelServiceV2[T]) InsertMany(models []T) (ids []primitive.ObjectID, err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tmodelsData, err := json.Marshal(models)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, err := svc.c.ModelBaseServiceV2Client.InsertMany(ctx, &grpc.ModelServiceV2InsertManyRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tModels:    modelsData,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn deserialize[[]primitive.ObjectID](res)\n}\n\nfunc (svc *ModelServiceV2[T]) Count(query bson.M) (total int, err error) {\n\tctx, cancel := svc.c.Context()\n\tdefer cancel()\n\tqueryData, err := json.Marshal(query)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tres, err := svc.c.ModelBaseServiceV2Client.Count(ctx, &grpc.ModelServiceV2CountRequest{\n\t\tNodeKey:   svc.cfg.GetNodeKey(),\n\t\tModelType: svc.modelType,\n\t\tQuery:     queryData,\n\t})\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn deserialize[int](res)\n}\n\nfunc (svc *ModelServiceV2[T]) GetCol() (col *mongo.Col) {\n\treturn nil\n}\n\nfunc (svc *ModelServiceV2[T]) deserializeOne(res *grpc.Response) (result *T, err error) {\n\tr, err := deserialize[T](res)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &r, err\n}\n\nfunc (svc *ModelServiceV2[T]) deserializeMany(res *grpc.Response) (results []T, err error) {\n\treturn deserialize[[]T](res)\n}\n\nfunc deserialize[T any](res *grpc.Response) (result T, err error) {\n\terr = json.Unmarshal(res.Data, &result)\n\tif err != nil {\n\t\treturn result, err\n\t}\n\treturn result, nil\n}\n\nfunc NewModelServiceV2[T any]() *ModelServiceV2[T] {\n\tmu.Lock()\n\tdefer mu.Unlock()\n\n\tvar v T\n\tt := reflect.TypeOf(v)\n\ttypeName := t.Name()\n\n\tif _, exists := onceMap[typeName]; !exists {\n\t\tonceMap[typeName] = new(sync.Once)\n\t}\n\n\tvar instance *ModelServiceV2[T]\n\n\tc := client.GetGrpcClientV2()\n\tif !c.IsStarted() {\n\t\terr := c.Start()\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\tonceMap[typeName].Do(func() {\n\t\tinstance = &ModelServiceV2[T]{\n\t\t\tcfg:       nodeconfig.GetNodeConfigService(),\n\t\t\tc:         c,\n\t\t\tmodelType: typeName,\n\t\t}\n\t\tinstanceMap[typeName] = instance\n\t})\n\n\treturn instanceMap[typeName].(*ModelServiceV2[T])\n}\n"
  },
  {
    "path": "core/models/client/model_service_v2_test.go",
    "content": "package client_test\n\nimport (\n\t\"context\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/server\"\n\t\"github.com/crawlab-team/crawlab/core/models/client\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/spf13/viper\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials/insecure\"\n\t\"testing\"\n\t\"time\"\n)\n\ntype TestModel models.TestModelV2\n\nfunc setupTestDB() {\n\tviper.Set(\"mongo.db\", \"testdb\")\n}\n\nfunc teardownTestDB() {\n\tdb := mongo.GetMongoDb(\"testdb\")\n\tdb.Drop(context.Background())\n}\n\nfunc startSvr(svr *server.GrpcServerV2) {\n\terr := svr.Start()\n\tif err != nil {\n\t\tlog.Errorf(\"failed to start grpc server: %v\", err)\n\t}\n}\n\nfunc stopSvr(svr *server.GrpcServerV2) {\n\terr := svr.Stop()\n\tif err != nil {\n\t\tlog.Errorf(\"failed to stop grpc server: %v\", err)\n\t}\n}\n\nfunc TestModelServiceV2_GetById(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\tres, err := clientSvc.GetById(m.Id)\n\trequire.Nil(t, err)\n\tassert.Equal(t, res.Id, m.Id)\n\tassert.Equal(t, res.Name, m.Name)\n}\n\nfunc TestModelServiceV2_GetOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\tres, err := clientSvc.GetOne(bson.M{\"name\": m.Name}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, res.Id, m.Id)\n\tassert.Equal(t, res.Name, m.Name)\n}\n\nfunc TestModelServiceV2_GetMany(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\tres, err := clientSvc.GetMany(bson.M{\"name\": m.Name}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, len(res), 1)\n\tassert.Equal(t, res[0].Id, m.Id)\n\tassert.Equal(t, res[0].Name, m.Name)\n}\n\nfunc TestModelServiceV2_DeleteById(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\terr = clientSvc.DeleteById(m.Id)\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetById(m.Id)\n\tassert.NotNil(t, err)\n\trequire.Nil(t, res)\n}\n\nfunc TestModelServiceV2_DeleteOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\terr = clientSvc.DeleteOne(bson.M{\"name\": m.Name})\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetOne(bson.M{\"name\": m.Name}, nil)\n\tassert.NotNil(t, err)\n\trequire.Nil(t, res)\n}\n\nfunc TestModelServiceV2_DeleteMany(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\terr = clientSvc.DeleteMany(bson.M{\"name\": m.Name})\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetMany(bson.M{\"name\": m.Name}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, len(res), 0)\n}\n\nfunc TestModelServiceV2_UpdateById(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\terr = clientSvc.UpdateById(m.Id, bson.M{\"$set\": bson.M{\"name\": \"New Name\"}})\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetById(m.Id)\n\trequire.Nil(t, err)\n\tassert.Equal(t, res.Name, \"New Name\")\n}\n\nfunc TestModelServiceV2_UpdateOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\terr = clientSvc.UpdateOne(bson.M{\"name\": m.Name}, bson.M{\"$set\": bson.M{\"name\": \"New Name\"}})\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetOne(bson.M{\"name\": \"New Name\"}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, res.Name, \"New Name\")\n}\n\nfunc TestModelServiceV2_UpdateMany(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm1 := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tm2 := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\t_, err = modelSvc.InsertOne(m1)\n\trequire.Nil(t, err)\n\t_, err = modelSvc.InsertOne(m2)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\terr = clientSvc.UpdateMany(bson.M{\"name\": \"Test Name\"}, bson.M{\"$set\": bson.M{\"name\": \"New Name\"}})\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetMany(bson.M{\"name\": \"New Name\"}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, len(res), 2)\n}\n\nfunc TestModelServiceV2_ReplaceById(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\tm.Name = \"New Name\"\n\terr = clientSvc.ReplaceById(m.Id, m)\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetById(m.Id)\n\trequire.Nil(t, err)\n\tassert.Equal(t, res.Name, \"New Name\")\n}\n\nfunc TestModelServiceV2_ReplaceOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tid, err := modelSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\tm.SetId(id)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\tm.Name = \"New Name\"\n\terr = clientSvc.ReplaceOne(bson.M{\"name\": \"Test Name\"}, m)\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetOne(bson.M{\"name\": \"New Name\"}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, res.Name, \"New Name\")\n}\n\nfunc TestModelServiceV2_InsertOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\tm := TestModel{\n\t\tName: \"Test Name\",\n\t}\n\tid, err := clientSvc.InsertOne(m)\n\trequire.Nil(t, err)\n\n\tres, err := clientSvc.GetById(id)\n\trequire.Nil(t, err)\n\tassert.Equal(t, res.Name, m.Name)\n}\n\nfunc TestModelServiceV2_InsertMany(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\ttestModels := []TestModel{\n\t\t{Name: \"Test Name 1\"},\n\t\t{Name: \"Test Name 2\"},\n\t}\n\tids, err := clientSvc.InsertMany(testModels)\n\trequire.Nil(t, err)\n\n\tfor i, id := range ids {\n\t\tres, err := clientSvc.GetById(id)\n\t\trequire.Nil(t, err)\n\t\tassert.Equal(t, res.Name, testModels[i].Name)\n\t}\n}\n\nfunc TestModelServiceV2_Count(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\tsvr, err := server.NewGrpcServerV2()\n\trequire.Nil(t, err)\n\tgo startSvr(svr)\n\tdefer stopSvr(svr)\n\n\tmodelSvc := service.NewModelServiceV2[TestModel]()\n\tfor i := 0; i < 5; i++ {\n\t\t_, err = modelSvc.InsertOne(TestModel{\n\t\t\tName: \"Test Name\",\n\t\t})\n\t\trequire.Nil(t, err)\n\t}\n\ttime.Sleep(100 * time.Millisecond)\n\n\tc, err := grpc.NewClient(\"localhost:9666\", grpc.WithTransportCredentials(insecure.NewCredentials()))\n\trequire.Nil(t, err)\n\tc.Connect()\n\n\tclientSvc := client.NewModelServiceV2[TestModel]()\n\tcount, err := clientSvc.Count(bson.M{})\n\trequire.Nil(t, err)\n\n\tassert.Equal(t, count, 5)\n}\n"
  },
  {
    "path": "core/models/client/model_spider_service.go",
    "content": "package client\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype SpiderServiceDelegate struct {\n\tinterfaces.GrpcClientModelBaseService\n}\n\nfunc (svc *SpiderServiceDelegate) GetSpiderById(id primitive.ObjectID) (s interfaces.Spider, err error) {\n\tres, err := svc.GetById(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.Spider)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *SpiderServiceDelegate) GetSpider(query bson.M, opts *mongo.FindOptions) (s interfaces.Spider, err error) {\n\tres, err := svc.Get(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.Spider)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *SpiderServiceDelegate) GetSpiderList(query bson.M, opts *mongo.FindOptions) (res []interfaces.Spider, err error) {\n\tlist, err := svc.GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, item := range list.GetModels() {\n\t\ts, ok := item.(interfaces.Spider)\n\t\tif !ok {\n\t\t\treturn nil, errors.ErrorModelInvalidType\n\t\t}\n\t\tres = append(res, s)\n\t}\n\treturn res, nil\n}\n\nfunc NewSpiderServiceDelegate() (svc2 interfaces.GrpcClientModelSpiderService, err error) {\n\tvar opts []ModelBaseServiceDelegateOption\n\n\t// apply options\n\topts = append(opts, WithBaseServiceModelId(interfaces.ModelIdSpider))\n\n\t// base service\n\tbaseSvc, err := NewBaseServiceDelegate(opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// service\n\tsvc := &SpiderServiceDelegate{baseSvc}\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/models/client/model_task_service.go",
    "content": "package client\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype TaskServiceDelegate struct {\n\tinterfaces.GrpcClientModelBaseService\n}\n\nfunc (svc *TaskServiceDelegate) GetTaskById(id primitive.ObjectID) (t interfaces.Task, err error) {\n\tres, err := svc.GetById(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.Task)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *TaskServiceDelegate) GetTask(query bson.M, opts *mongo.FindOptions) (t interfaces.Task, err error) {\n\tres, err := svc.Get(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.Task)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *TaskServiceDelegate) GetTaskList(query bson.M, opts *mongo.FindOptions) (res []interfaces.Task, err error) {\n\tlist, err := svc.GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, item := range list.GetModels() {\n\t\ts, ok := item.(interfaces.Task)\n\t\tif !ok {\n\t\t\treturn nil, errors.ErrorModelInvalidType\n\t\t}\n\t\tres = append(res, s)\n\t}\n\treturn res, nil\n}\n\nfunc NewTaskServiceDelegate() (svc2 interfaces.GrpcClientModelTaskService, err error) {\n\tvar opts []ModelBaseServiceDelegateOption\n\n\t// apply options\n\topts = append(opts, WithBaseServiceModelId(interfaces.ModelIdTask))\n\n\t// base service\n\tbaseSvc, err := NewBaseServiceDelegate(opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// service\n\tsvc := &TaskServiceDelegate{baseSvc}\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/models/client/model_task_stat_service.go",
    "content": "package client\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype TaskStatServiceDelegate struct {\n\tinterfaces.GrpcClientModelBaseService\n}\n\nfunc (svc *TaskStatServiceDelegate) GetTaskStatById(id primitive.ObjectID) (t interfaces.TaskStat, err error) {\n\tres, err := svc.GetById(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.TaskStat)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *TaskStatServiceDelegate) GetTaskStat(query bson.M, opts *mongo.FindOptions) (t interfaces.TaskStat, err error) {\n\tres, err := svc.Get(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts, ok := res.(interfaces.TaskStat)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn s, nil\n}\n\nfunc (svc *TaskStatServiceDelegate) GetTaskStatList(query bson.M, opts *mongo.FindOptions) (res []interfaces.TaskStat, err error) {\n\tlist, err := svc.GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, item := range list.GetModels() {\n\t\ts, ok := item.(interfaces.TaskStat)\n\t\tif !ok {\n\t\t\treturn nil, errors.ErrorModelInvalidType\n\t\t}\n\t\tres = append(res, s)\n\t}\n\treturn res, nil\n}\n\nfunc NewTaskStatServiceDelegate() (svc2 interfaces.GrpcClientModelTaskStatService, err error) {\n\tvar opts []ModelBaseServiceDelegateOption\n\n\t// apply options\n\topts = append(opts, WithBaseServiceModelId(interfaces.ModelIdTaskStat))\n\n\t// base service\n\tbaseSvc, err := NewBaseServiceDelegate(opts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// service\n\tsvc := &TaskStatServiceDelegate{baseSvc}\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/models/client/options.go",
    "content": "package client\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\ntype ModelDelegateOption func(delegate interfaces.GrpcClientModelDelegate)\n\nfunc WithDelegateConfigPath(path string) ModelDelegateOption {\n\treturn func(d interfaces.GrpcClientModelDelegate) {\n\t\td.SetConfigPath(path)\n\t}\n}\n\ntype ModelServiceDelegateOption func(delegate interfaces.GrpcClientModelService)\n\nfunc WithServiceConfigPath(path string) ModelServiceDelegateOption {\n\treturn func(d interfaces.GrpcClientModelService) {\n\t\td.SetConfigPath(path)\n\t}\n}\n\ntype ModelBaseServiceDelegateOption func(delegate interfaces.GrpcClientModelBaseService)\n\nfunc WithBaseServiceModelId(id interfaces.ModelId) ModelBaseServiceDelegateOption {\n\treturn func(d interfaces.GrpcClientModelBaseService) {\n\t\td.SetModelId(id)\n\t}\n}\n\nfunc WithBaseServiceConfigPath(path string) ModelBaseServiceDelegateOption {\n\treturn func(d interfaces.GrpcClientModelBaseService) {\n\t\td.SetConfigPath(path)\n\t}\n}\n"
  },
  {
    "path": "core/models/common/index_service_v2.go",
    "content": "package common\n\nimport (\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"go.mongodb.org/mongo-driver/mongo/options\"\n)\n\nfunc CreateIndexesV2() {\n\t// nodes\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.NodeV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"key\": 1}},       // key\n\t\t{Keys: bson.M{\"name\": 1}},      // name\n\t\t{Keys: bson.M{\"is_master\": 1}}, // is_master\n\t\t{Keys: bson.M{\"status\": 1}},    // status\n\t\t{Keys: bson.M{\"enabled\": 1}},   // enabled\n\t\t{Keys: bson.M{\"active\": 1}},    // active\n\t})\n\n\t// projects\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.ProjectV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"name\": 1}},\n\t})\n\n\t// spiders\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.SpiderV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"name\": 1}},\n\t\t{Keys: bson.M{\"type\": 1}},\n\t\t{Keys: bson.M{\"col_id\": 1}},\n\t\t{Keys: bson.M{\"project_id\": 1}},\n\t})\n\n\t// tasks\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.TaskV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"spider_id\": 1}},\n\t\t{Keys: bson.M{\"status\": 1}},\n\t\t{Keys: bson.M{\"node_id\": 1}},\n\t\t{Keys: bson.M{\"schedule_id\": 1}},\n\t\t{Keys: bson.M{\"type\": 1}},\n\t\t{Keys: bson.M{\"mode\": 1}},\n\t\t{Keys: bson.M{\"priority\": 1}},\n\t\t{Keys: bson.M{\"parent_id\": 1}},\n\t\t{Keys: bson.M{\"has_sub\": 1}},\n\t\t{Keys: bson.M{\"create_ts\": -1}},\n\t})\n\n\t// task stats\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.TaskStatV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"create_ts\": 1}},\n\t})\n\n\t// schedules\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.ScheduleV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"name\": 1}},\n\t\t{Keys: bson.M{\"spider_id\": 1}},\n\t\t{Keys: bson.M{\"enabled\": 1}},\n\t})\n\n\t// users\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.UserV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"username\": 1}},\n\t\t{Keys: bson.M{\"role\": 1}},\n\t\t{Keys: bson.M{\"email\": 1}},\n\t})\n\n\t// settings\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.SettingV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.D{{\"key\", 1}}, Options: options.Index().SetUnique(true)},\n\t})\n\n\t// tokens\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.TokenV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"name\": 1}},\n\t})\n\n\t// variables\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.VariableV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"key\": 1}},\n\t})\n\n\t// data sources\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DatabaseV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"name\": 1}},\n\t})\n\n\t// data collections\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DataCollectionV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.M{\"name\": 1}},\n\t})\n\n\t// roles\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.RoleV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.D{{\"key\", 1}}, Options: options.Index().SetUnique(true)},\n\t})\n\n\t// user role relations\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.UserRoleV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.D{{\"user_id\", 1}, {\"role_id\", 1}}, Options: options.Index().SetUnique(true)},\n\t\t{Keys: bson.D{{\"role_id\", 1}, {\"user_id\", 1}}, Options: options.Index().SetUnique(true)},\n\t})\n\n\t// permissions\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.PermissionV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.D{{\"key\", 1}}, Options: options.Index().SetUnique(true)},\n\t})\n\n\t// role permission relations\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.RolePermissionV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{Keys: bson.D{{\"role_id\", 1}, {\"permission_id\", 1}}, Options: options.Index().SetUnique(true)},\n\t\t{Keys: bson.D{{\"permission_id\", 1}, {\"role_id\", 1}}, Options: options.Index().SetUnique(true)},\n\t})\n\n\t// dependencies\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DependencyV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"type\", 1},\n\t\t\t\t{\"node_id\", 1},\n\t\t\t\t{\"name\", 1},\n\t\t\t},\n\t\t\tOptions: (&options.IndexOptions{}).SetUnique(true),\n\t\t},\n\t})\n\n\t// dependency settings\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DependencySettingV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"type\", 1},\n\t\t\t\t{\"node_id\", 1},\n\t\t\t\t{\"name\", 1},\n\t\t\t},\n\t\t\tOptions: (&options.IndexOptions{}).SetUnique(true),\n\t\t},\n\t})\n\n\t// dependency logs\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DependencyLogV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{{\"task_id\", 1}},\n\t\t},\n\t\t{\n\t\t\tKeys:    bson.D{{\"update_ts\", 1}},\n\t\t\tOptions: (&options.IndexOptions{}).SetExpireAfterSeconds(60 * 60 * 24),\n\t\t},\n\t})\n\n\t// dependency tasks\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DependencyTaskV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"update_ts\", 1},\n\t\t\t},\n\t\t\tOptions: (&options.IndexOptions{}).SetExpireAfterSeconds(60 * 60 * 24),\n\t\t},\n\t})\n\n\t// metrics\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.MetricV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"created_ts\", -1},\n\t\t\t},\n\t\t\tOptions: (&options.IndexOptions{}).SetExpireAfterSeconds(60 * 60 * 24 * 30),\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"node_id\", 1},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"type\", 1},\n\t\t\t},\n\t\t},\n\t})\n\n\t// notification requests\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.NotificationRequestV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"created_ts\", -1},\n\t\t\t},\n\t\t\tOptions: (&options.IndexOptions{}).SetExpireAfterSeconds(60 * 60 * 24 * 7),\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"channel_id\", 1},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"setting_id\", 1},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"status\", 1},\n\t\t\t},\n\t\t},\n\t})\n\n\t// databases\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DatabaseV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"data_source_id\", 1},\n\t\t\t},\n\t\t},\n\t})\n\n\t// database metrics\n\tmongo.GetMongoCol(service.GetCollectionNameByInstance(models2.DatabaseMetricV2{})).MustCreateIndexes([]mongo2.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"created_ts\", -1},\n\t\t\t},\n\t\t\tOptions: (&options.IndexOptions{}).SetExpireAfterSeconds(60 * 60 * 24 * 30),\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"database_id\", 1},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{\n\t\t\t\t{\"type\", 1},\n\t\t\t},\n\t\t},\n\t})\n}\n"
  },
  {
    "path": "core/models/config_spider/common.go",
    "content": "package config_spider\n\nimport \"github.com/crawlab-team/crawlab/core/entity\"\n\nfunc GetAllFields(data entity.ConfigSpiderData) []entity.Field {\n\tvar fields []entity.Field\n\tfor _, stage := range data.Stages {\n\t\tfields = append(fields, stage.Fields...)\n\t}\n\treturn fields\n}\n\nfunc GetStartStageName(data entity.ConfigSpiderData) string {\n\t// 如果 start_stage 设置了且在 stages 里，则返回\n\tif data.StartStage != \"\" {\n\t\treturn data.StartStage\n\t}\n\n\t// 否则返回第一个 stage\n\tfor _, stage := range data.Stages {\n\t\treturn stage.Name\n\t}\n\treturn \"\"\n}\n"
  },
  {
    "path": "core/models/config_spider/scrapy.go",
    "content": "package config_spider\n\n//import (\n//\t\"errors\"\n//\t\"fmt\"\n//\t\"github.com/crawlab-team/crawlab/core/constants\"\n//\t\"github.com/crawlab-team/crawlab/core/entity\"\n//\t\"github.com/crawlab-team/crawlab/core/models\"\n//\t\"github.com/crawlab-team/crawlab/core/utils\"\n//\t\"path/filepath\"\n//)\n//\n//type ScrapyGenerator struct {\n//\tSpider     model.Spider\n//\tConfigData entity.ConfigSpiderData\n//}\n//\n//// 生成爬虫文件\n//func (g ScrapyGenerator) Generate() error {\n//\t// 生成 items.py\n//\tif err := g.ProcessItems(); err != nil {\n//\t\treturn err\n//\t}\n//\n//\t// 生成 spider.py\n//\tif err := g.ProcessSpider(); err != nil {\n//\t\treturn err\n//\t}\n//\treturn nil\n//}\n//\n//// 生成 items.py\n//func (g ScrapyGenerator) ProcessItems() error {\n//\t// 待处理文件名\n//\tsrc := g.Spider.Src\n//\tfilePath := filepath.Join(src, \"config_spider\", \"items.py\")\n//\n//\t// 获取所有字段\n//\tfields := g.GetAllFields()\n//\n//\t// 字段名列表（包含默认字段名）\n//\tfieldNames := []string{\n//\t\t\"_id\",\n//\t\t\"task_id\",\n//\t\t\"ts\",\n//\t}\n//\n//\t// 加入字段\n//\tfor _, field := range fields {\n//\t\tfieldNames = append(fieldNames, field.Name)\n//\t}\n//\n//\t// 将字段名转化为python代码\n//\tstr := \"\"\n//\tfor _, fieldName := range fieldNames {\n//\t\tline := g.PadCode(fmt.Sprintf(\"%s = scrapy.Field()\", fieldName), 1)\n//\t\tstr += line\n//\t}\n//\n//\t// 将占位符替换为代码\n//\tif err := utils.SetFileVariable(filePath, constants.AnchorItems, str); err != nil {\n//\t\treturn err\n//\t}\n//\n//\treturn nil\n//}\n//\n//// 生成 spider.py\n//func (g ScrapyGenerator) ProcessSpider() error {\n//\t// 待处理文件名\n//\tsrc := g.Spider.Src\n//\tfilePath := filepath.Join(src, \"config_spider\", \"spiders\", \"spider.py\")\n//\n//\t// 替换 start_stage\n//\tif err := utils.SetFileVariable(filePath, constants.AnchorStartStage, \"parse_\"+GetStartStageName(g.ConfigData)); err != nil {\n//\t\treturn err\n//\t}\n//\n//\t// 替换 start_url\n//\tif err := utils.SetFileVariable(filePath, constants.AnchorStartUrl, g.ConfigData.StartUrl); err != nil {\n//\t\treturn err\n//\t}\n//\n//\t// 替换 parsers\n//\tstrParser := \"\"\n//\tfor _, stage := range g.ConfigData.Stages {\n//\t\tstageName := stage.Name\n//\t\tstageStr := g.GetParserString(stageName, stage)\n//\t\tstrParser += stageStr\n//\t}\n//\tif err := utils.SetFileVariable(filePath, constants.AnchorParsers, strParser); err != nil {\n//\t\treturn err\n//\t}\n//\n//\treturn nil\n//}\n//\n//func (g ScrapyGenerator) GetParserString(stageName string, stage entity.Stage) string {\n//\t// 构造函数定义行\n//\tstrDef := g.PadCode(fmt.Sprintf(\"def parse_%s(self, response):\", stageName), 1)\n//\n//\tstrParse := \"\"\n//\tif stage.IsList {\n//\t\t// 列表逻辑\n//\t\tstrParse = g.GetListParserString(stageName, stage)\n//\t} else {\n//\t\t// 非列表逻辑\n//\t\tstrParse = g.GetNonListParserString(stageName, stage)\n//\t}\n//\n//\t// 构造\n//\tstr := fmt.Sprintf(`%s%s`, strDef, strParse)\n//\n//\treturn str\n//}\n//\n//func (g ScrapyGenerator) PadCode(str string, num int) string {\n//\tres := \"\"\n//\tfor i := 0; i < num; i++ {\n//\t\tres += \"    \"\n//\t}\n//\tres += str\n//\tres += \"\\n\"\n//\treturn res\n//}\n//\n//func (g ScrapyGenerator) GetNonListParserString(stageName string, stage entity.Stage) string {\n//\tstr := \"\"\n//\n//\t// 获取或构造item\n//\tstr += g.PadCode(\"item = Item() if response.meta.get('item') is None else response.meta.get('item')\", 2)\n//\n//\t// 遍历字段列表\n//\tfor _, f := range stage.Fields {\n//\t\tline := fmt.Sprintf(`item['%s'] = response.%s.extract_first()`, f.Name, g.GetExtractStringFromField(f))\n//\t\tline = g.PadCode(line, 2)\n//\t\tstr += line\n//\t}\n//\n//\t// next stage 字段\n//\tif f, err := g.GetNextStageField(stage); err == nil {\n//\t\t// 如果找到 next stage 字段，进行下一个回调\n//\t\tstr += g.PadCode(fmt.Sprintf(`yield scrapy.Request(url=\"get_real_url(response, item['%s'])\", callback=self.parse_%s, meta={'item': item})`, f.Name, f.NextStage), 2)\n//\t} else {\n//\t\t// 如果没找到 next stage 字段，返回 item\n//\t\tstr += g.PadCode(fmt.Sprintf(`yield item`), 2)\n//\t}\n//\n//\t// 加入末尾换行\n//\tstr += g.PadCode(\"\", 0)\n//\n//\treturn str\n//}\n//\n//func (g ScrapyGenerator) GetListParserString(stageName string, stage entity.Stage) string {\n//\tstr := \"\"\n//\n//\t// 获取前一个 stage 的 item\n//\tstr += g.PadCode(`prev_item = response.meta.get('item')`, 2)\n//\n//\t// for 循环遍历列表\n//\tstr += g.PadCode(fmt.Sprintf(`for elem in response.%s:`, g.GetListString(stage)), 2)\n//\n//\t// 构造item\n//\tstr += g.PadCode(`item = Item()`, 3)\n//\n//\t// 遍历字段列表\n//\tfor _, f := range stage.Fields {\n//\t\tline := fmt.Sprintf(`item['%s'] = elem.%s.extract_first()`, f.Name, g.GetExtractStringFromField(f))\n//\t\tline = g.PadCode(line, 3)\n//\t\tstr += line\n//\t}\n//\n//\t// 把前一个 stage 的 item 值赋给当前 item\n//\tstr += g.PadCode(`if prev_item is not None:`, 3)\n//\tstr += g.PadCode(`for key, value in prev_item.items():`, 4)\n//\tstr += g.PadCode(`item[key] = value`, 5)\n//\n//\t// next stage 字段\n//\tif f, err := g.GetNextStageField(stage); err == nil {\n//\t\t// 如果 url 为空，则不进入下一个 stage\n//\t\tstr += g.PadCode(fmt.Sprintf(`if not item['%s']:`, f.Name), 3)\n//\t\tstr += g.PadCode(`continue`, 4)\n//\n//\t\t// 如果找到 next stage 字段，进行下一个回调\n//\t\tstr += g.PadCode(fmt.Sprintf(`yield scrapy.Request(url=get_real_url(response, item['%s']), callback=self.parse_%s, meta={'item': item})`, f.Name, f.NextStage), 3)\n//\t} else {\n//\t\t// 如果没找到 next stage 字段，返回 item\n//\t\tstr += g.PadCode(fmt.Sprintf(`yield item`), 3)\n//\t}\n//\n//\t// 分页\n//\tif stage.PageCss != \"\" || stage.PageXpath != \"\" {\n//\t\tstr += g.PadCode(fmt.Sprintf(`next_url = response.%s.extract_first()`, g.GetExtractStringFromStage(stage)), 2)\n//\t\tstr += g.PadCode(fmt.Sprintf(`yield scrapy.Request(url=get_real_url(response, next_url), callback=self.parse_%s, meta={'item': prev_item})`, stageName), 2)\n//\t}\n//\n//\t// 加入末尾换行\n//\tstr += g.PadCode(\"\", 0)\n//\n//\treturn str\n//}\n//\n//// 获取所有字段\n//func (g ScrapyGenerator) GetAllFields() []entity.Field {\n//\treturn GetAllFields(g.ConfigData)\n//}\n//\n//// 获取包含 next stage 的字段\n//func (g ScrapyGenerator) GetNextStageField(stage entity.Stage) (entity.Field, error) {\n//\tfor _, field := range stage.Fields {\n//\t\tif field.NextStage != \"\" {\n//\t\t\treturn field, nil\n//\t\t}\n//\t}\n//\treturn entity.Field{}, errors.New(\"cannot find next stage field\")\n//}\n//\n//func (g ScrapyGenerator) GetExtractStringFromField(f entity.Field) string {\n//\tif f.Css != \"\" {\n//\t\t// 如果为CSS\n//\t\tif f.Attr == \"\" {\n//\t\t\t// 文本\n//\t\t\treturn fmt.Sprintf(`css('%s::text')`, f.Css)\n//\t\t} else {\n//\t\t\t// 属性\n//\t\t\treturn fmt.Sprintf(`css('%s::attr(\"%s\")')`, f.Css, f.Attr)\n//\t\t}\n//\t} else {\n//\t\t// 如果为XPath\n//\t\tif f.Attr == \"\" {\n//\t\t\t// 文本\n//\t\t\treturn fmt.Sprintf(`xpath('string(%s)')`, f.Xpath)\n//\t\t} else {\n//\t\t\t// 属性\n//\t\t\treturn fmt.Sprintf(`xpath('%s/@%s')`, f.Xpath, f.Attr)\n//\t\t}\n//\t}\n//}\n//\n//func (g ScrapyGenerator) GetExtractStringFromStage(stage entity.Stage) string {\n//\t// 分页元素属性，默认为 href\n//\tpageAttr := \"href\"\n//\tif stage.PageAttr != \"\" {\n//\t\tpageAttr = stage.PageAttr\n//\t}\n//\n//\tif stage.PageCss != \"\" {\n//\t\t// 如果为CSS\n//\t\treturn fmt.Sprintf(`css('%s::attr(\"%s\")')`, stage.PageCss, pageAttr)\n//\t} else {\n//\t\t// 如果为XPath\n//\t\treturn fmt.Sprintf(`xpath('%s/@%s')`, stage.PageXpath, pageAttr)\n//\t}\n//}\n//\n//func (g ScrapyGenerator) GetListString(stage entity.Stage) string {\n//\tif stage.ListCss != \"\" {\n//\t\treturn fmt.Sprintf(`css('%s')`, stage.ListCss)\n//\t} else {\n//\t\treturn fmt.Sprintf(`xpath('%s')`, stage.ListXpath)\n//\t}\n//}\n"
  },
  {
    "path": "core/models/delegate/base_test.go",
    "content": "package delegate_test\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc SetupTest(t *testing.T) {\n\tCleanupTest()\n\tt.Cleanup(CleanupTest)\n}\n\nfunc CleanupTest() {\n\tdb := mongo.GetMongoDb(\"\")\n\tnames, _ := db.ListCollectionNames(context.Background(), bson.M{})\n\tfor _, n := range names {\n\t\t_, _ = db.Collection(n).DeleteMany(context.Background(), bson.M{})\n\t}\n\n\t// avoid caching\n\ttime.Sleep(200 * time.Millisecond)\n}\n"
  },
  {
    "path": "core/models/delegate/model.go",
    "content": "package delegate\n\nimport (\n\t\"encoding/json\"\n\terrors2 \"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/event\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/errors\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"reflect\"\n\t\"time\"\n)\n\nfunc NewModelDelegate(doc interfaces.Model, args ...interface{}) interfaces.ModelDelegate {\n\tswitch doc.(type) {\n\tcase *models.Artifact:\n\t\treturn newModelDelegate(interfaces.ModelIdArtifact, doc, args...)\n\tcase *models.Tag:\n\t\treturn newModelDelegate(interfaces.ModelIdTag, doc, args...)\n\tcase *models.Node:\n\t\treturn newModelDelegate(interfaces.ModelIdNode, doc, args...)\n\tcase *models.Project:\n\t\treturn newModelDelegate(interfaces.ModelIdProject, doc, args...)\n\tcase *models.Spider:\n\t\treturn newModelDelegate(interfaces.ModelIdSpider, doc, args...)\n\tcase *models.Task:\n\t\treturn newModelDelegate(interfaces.ModelIdTask, doc, args...)\n\tcase *models.Job:\n\t\treturn newModelDelegate(interfaces.ModelIdJob, doc, args...)\n\tcase *models.Schedule:\n\t\treturn newModelDelegate(interfaces.ModelIdSchedule, doc, args...)\n\tcase *models.User:\n\t\treturn newModelDelegate(interfaces.ModelIdUser, doc, args...)\n\tcase *models.Setting:\n\t\treturn newModelDelegate(interfaces.ModelIdSetting, doc, args...)\n\tcase *models.Token:\n\t\treturn newModelDelegate(interfaces.ModelIdToken, doc, args...)\n\tcase *models.Variable:\n\t\treturn newModelDelegate(interfaces.ModelIdVariable, doc, args...)\n\tcase *models.TaskQueueItem:\n\t\treturn newModelDelegate(interfaces.ModelIdTaskQueue, doc, args...)\n\tcase *models.TaskStat:\n\t\treturn newModelDelegate(interfaces.ModelIdTaskStat, doc, args...)\n\tcase *models.SpiderStat:\n\t\treturn newModelDelegate(interfaces.ModelIdSpiderStat, doc, args...)\n\tcase *models.DataSource:\n\t\treturn newModelDelegate(interfaces.ModelIdDataSource, doc, args...)\n\tcase *models.DataCollection:\n\t\treturn newModelDelegate(interfaces.ModelIdDataCollection, doc, args...)\n\tcase *models.Result:\n\t\treturn newModelDelegate(interfaces.ModelIdResult, doc, args...)\n\tcase *models.Password:\n\t\treturn newModelDelegate(interfaces.ModelIdPassword, doc, args...)\n\tcase *models.ExtraValue:\n\t\treturn newModelDelegate(interfaces.ModelIdExtraValue, doc, args...)\n\tcase *models.Git:\n\t\treturn newModelDelegate(interfaces.ModelIdGit, doc, args...)\n\tcase *models.Role:\n\t\treturn newModelDelegate(interfaces.ModelIdRole, doc, args...)\n\tcase *models.UserRole:\n\t\treturn newModelDelegate(interfaces.ModelIdUserRole, doc, args...)\n\tcase *models.Permission:\n\t\treturn newModelDelegate(interfaces.ModelIdPermission, doc, args...)\n\tcase *models.RolePermission:\n\t\treturn newModelDelegate(interfaces.ModelIdRolePermission, doc, args...)\n\tcase *models.Environment:\n\t\treturn newModelDelegate(interfaces.ModelIdEnvironment, doc, args...)\n\tcase *models.DependencySetting:\n\t\treturn newModelDelegate(interfaces.ModelIdDependencySetting, doc, args...)\n\tdefault:\n\t\t_ = trace.TraceError(errors2.ErrorModelInvalidType)\n\t\treturn nil\n\t}\n}\n\nfunc newModelDelegate(id interfaces.ModelId, doc interfaces.Model, args ...interface{}) interfaces.ModelDelegate {\n\t// user\n\tu := utils.GetUserFromArgs(args...)\n\n\t// collection name\n\tcolName := models.GetModelColName(id)\n\n\t// model delegate\n\td := &ModelDelegate{\n\t\tid:      id,\n\t\tcolName: colName,\n\t\tdoc:     doc,\n\t\ta: &models.Artifact{\n\t\t\tCol: colName,\n\t\t},\n\t\tu: u,\n\t}\n\n\treturn d\n}\n\ntype ModelDelegate struct {\n\tid      interfaces.ModelId\n\tcolName string\n\tdoc     interfaces.Model         // doc to delegate\n\tcd      bson.M                   // current doc\n\tod      bson.M                   // original doc\n\ta       interfaces.ModelArtifact // artifact\n\tu       interfaces.User          // user\n}\n\n// Add model\nfunc (d *ModelDelegate) Add() (err error) {\n\treturn d.do(interfaces.ModelDelegateMethodAdd)\n}\n\n// Save model\nfunc (d *ModelDelegate) Save() (err error) {\n\treturn d.do(interfaces.ModelDelegateMethodSave)\n}\n\n// Delete model\nfunc (d *ModelDelegate) Delete() (err error) {\n\treturn d.do(interfaces.ModelDelegateMethodDelete)\n}\n\n// GetArtifact refresh artifact and return it\nfunc (d *ModelDelegate) GetArtifact() (res interfaces.ModelArtifact, err error) {\n\tif err := d.do(interfaces.ModelDelegateMethodGetArtifact); err != nil {\n\t\treturn nil, err\n\t}\n\treturn d.a, nil\n}\n\n// Refresh model\nfunc (d *ModelDelegate) Refresh() (err error) {\n\treturn d.refresh()\n}\n\n// GetModel return model\nfunc (d *ModelDelegate) GetModel() (res interfaces.Model) {\n\treturn d.doc\n}\n\nfunc (d *ModelDelegate) ToBytes(m interface{}) (bytes []byte, err error) {\n\tif m != nil {\n\t\treturn utils.JsonToBytes(m)\n\t}\n\treturn json.Marshal(d.doc)\n}\n\n// do action given the model delegate method\nfunc (d *ModelDelegate) do(method interfaces.ModelDelegateMethod) (err error) {\n\tswitch method {\n\tcase interfaces.ModelDelegateMethodAdd:\n\t\terr = d.add()\n\tcase interfaces.ModelDelegateMethodSave:\n\t\terr = d.save()\n\tcase interfaces.ModelDelegateMethodDelete:\n\t\terr = d.delete()\n\tcase interfaces.ModelDelegateMethodGetArtifact, interfaces.ModelDelegateMethodRefresh:\n\t\terr = d.refresh()\n\tdefault:\n\t\treturn trace.TraceError(errors2.ErrorModelInvalidType)\n\t}\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// trigger event\n\teventName := GetEventName(d, method)\n\tgo event.SendEvent(eventName, d.doc)\n\n\treturn nil\n}\n\n// add model\nfunc (d *ModelDelegate) add() (err error) {\n\tif d.doc == nil {\n\t\treturn trace.TraceError(errors.ErrMissingValue)\n\t}\n\tif d.doc.GetId().IsZero() {\n\t\td.doc.SetId(primitive.NewObjectID())\n\t}\n\tcol := mongo.GetMongoCol(d.colName)\n\tif _, err = col.Insert(d.doc); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := d.upsertArtifact(); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn d.refresh()\n}\n\n// save model\nfunc (d *ModelDelegate) save() (err error) {\n\t// validate\n\tif d.doc == nil || d.doc.GetId().IsZero() {\n\t\treturn trace.TraceError(errors.ErrMissingValue)\n\t}\n\n\t// collection\n\tcol := mongo.GetMongoCol(d.colName)\n\n\t// current doc\n\tdocData, err := bson.Marshal(d.doc)\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t} else {\n\t\tif err := bson.Unmarshal(docData, &d.cd); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t}\n\t}\n\n\t// original doc\n\tif err := col.FindId(d.doc.GetId()).One(&d.od); err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\n\t// replace\n\tif err := col.ReplaceId(d.doc.GetId(), d.doc); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// upsert artifact\n\tif err := d.upsertArtifact(); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn d.refresh()\n}\n\n// delete model\nfunc (d *ModelDelegate) delete() (err error) {\n\tif d.doc.GetId().IsZero() {\n\t\treturn trace.TraceError(errors2.ErrorModelMissingId)\n\t}\n\tcol := mongo.GetMongoCol(d.colName)\n\tif err := col.FindId(d.doc.GetId()).One(d.doc); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := col.DeleteId(d.doc.GetId()); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn d.deleteArtifact()\n}\n\n// refresh model and artifact\nfunc (d *ModelDelegate) refresh() (err error) {\n\tif d.doc.GetId().IsZero() {\n\t\treturn trace.TraceError(errors2.ErrorModelMissingId)\n\t}\n\tcol := mongo.GetMongoCol(d.colName)\n\tfr := col.FindId(d.doc.GetId())\n\tif err := fr.One(d.doc); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn d.refreshArtifact()\n}\n\n// refresh artifact\nfunc (d *ModelDelegate) refreshArtifact() (err error) {\n\tif d.doc.GetId().IsZero() {\n\t\treturn trace.TraceError(errors2.ErrorModelMissingId)\n\t}\n\tcol := mongo.GetMongoCol(interfaces.ModelColNameArtifact)\n\tif err := col.FindId(d.doc.GetId()).One(d.a); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\n// upsertArtifact\nfunc (d *ModelDelegate) upsertArtifact() (err error) {\n\t// skip\n\tif d._skip() {\n\t\treturn nil\n\t}\n\n\t// validate id\n\tif d.doc.GetId().IsZero() {\n\t\treturn trace.TraceError(errors.ErrMissingValue)\n\t}\n\n\t// mongo collection\n\tcol := mongo.GetMongoCol(interfaces.ModelColNameArtifact)\n\n\t// assign id to artifact\n\td.a.SetId(d.doc.GetId())\n\n\t// attempt to find artifact\n\tif err := col.FindId(d.doc.GetId()).One(d.a); err != nil {\n\t\tif err == mongo2.ErrNoDocuments {\n\t\t\t// new artifact\n\t\t\td.a.GetSys().SetCreateTs(time.Now())\n\t\t\td.a.GetSys().SetUpdateTs(time.Now())\n\t\t\tif d.u != nil && !reflect.ValueOf(d.u).IsZero() {\n\t\t\t\td.a.GetSys().SetCreateUid(d.u.GetId())\n\t\t\t\td.a.GetSys().SetUpdateUid(d.u.GetId())\n\t\t\t}\n\t\t\t_, err = col.Insert(d.a)\n\t\t\tif err != nil {\n\t\t\t\treturn trace.TraceError(err)\n\t\t\t}\n\t\t\treturn nil\n\t\t} else {\n\t\t\t// error\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\t// existing artifact\n\td.a.GetSys().SetUpdateTs(time.Now())\n\tif d.u != nil {\n\t\td.a.GetSys().SetUpdateUid(d.u.GetId())\n\t}\n\n\t// save new artifact\n\treturn col.ReplaceId(d.a.GetId(), d.a)\n}\n\n// deleteArtifact\nfunc (d *ModelDelegate) deleteArtifact() (err error) {\n\t// skip\n\tif d._skip() {\n\t\treturn nil\n\t}\n\n\tif d.doc.GetId().IsZero() {\n\t\treturn trace.TraceError(errors.ErrMissingValue)\n\t}\n\tcol := mongo.GetMongoCol(interfaces.ModelColNameArtifact)\n\td.a.SetId(d.doc.GetId())\n\td.a.SetObj(d.doc)\n\td.a.SetDel(true)\n\td.a.GetSys().SetDeleteTs(time.Now())\n\tif d.u != nil {\n\t\td.a.GetSys().SetDeleteUid(d.u.GetId())\n\t}\n\treturn col.ReplaceId(d.doc.GetId(), d.a)\n}\n\nfunc (d *ModelDelegate) hasChange() (ok bool) {\n\treturn !utils.BsonMEqual(d.cd, d.od)\n}\n\nfunc (d *ModelDelegate) _skip() (ok bool) {\n\tswitch d.id {\n\tcase\n\t\tinterfaces.ModelIdArtifact,\n\t\tinterfaces.ModelIdTaskQueue,\n\t\tinterfaces.ModelIdTaskStat,\n\t\tinterfaces.ModelIdSpiderStat,\n\t\tinterfaces.ModelIdResult,\n\t\tinterfaces.ModelIdPassword:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n"
  },
  {
    "path": "core/models/delegate/model_node.go",
    "content": "package delegate\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype ModelNodeDelegate struct {\n\tn interfaces.Node\n\tinterfaces.ModelDelegate\n}\n\nfunc (d *ModelNodeDelegate) UpdateStatus(active bool, activeTs *time.Time, status string) (err error) {\n\td.n.SetActive(active)\n\tif activeTs != nil {\n\t\td.n.SetActiveTs(*activeTs)\n\t}\n\td.n.SetStatus(status)\n\treturn d.Save()\n}\n\nfunc (d *ModelNodeDelegate) UpdateStatusOnline() (err error) {\n\tnow := time.Now()\n\treturn d.UpdateStatus(true, &now, constants.NodeStatusOnline)\n}\n\nfunc (d *ModelNodeDelegate) UpdateStatusOffline() (err error) {\n\treturn d.UpdateStatus(false, nil, constants.NodeStatusOffline)\n}\n\nfunc NewModelNodeDelegate(n interfaces.Node) interfaces.ModelNodeDelegate {\n\treturn &ModelNodeDelegate{\n\t\tn:             n,\n\t\tModelDelegate: NewModelDelegate(n),\n\t}\n}\n"
  },
  {
    "path": "core/models/delegate/model_node_test.go",
    "content": "package delegate_test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n)\n\nfunc TestNode_Add(t *testing.T) {\n\tSetupTest(t)\n\n\tn := &models2.Node{}\n\n\terr := delegate.NewModelDelegate(n).Add()\n\trequire.Nil(t, err)\n\trequire.NotNil(t, n.Id)\n\n\t// validate artifact\n\ta, err := delegate.NewModelDelegate(n).GetArtifact()\n\trequire.Nil(t, err)\n\trequire.Equal(t, n.Id, a.GetId())\n\trequire.NotNil(t, a.GetSys().GetCreateTs())\n\trequire.NotNil(t, a.GetSys().GetUpdateTs())\n}\n\nfunc TestNode_Save(t *testing.T) {\n\tSetupTest(t)\n\n\tn := &models2.Node{}\n\n\terr := delegate.NewModelDelegate(n).Add()\n\n\tname := \"test_node\"\n\tn.Name = name\n\terr = delegate.NewModelDelegate(n).Save()\n\trequire.Nil(t, err)\n\n\terr = mongo.GetMongoCol(interfaces.ModelColNameNode).FindId(n.Id).One(&n)\n\trequire.Nil(t, err)\n\trequire.Equal(t, name, n.Name)\n}\n\nfunc TestNode_Delete(t *testing.T) {\n\tSetupTest(t)\n\n\tn := &models2.Node{\n\t\tName: \"test_node\",\n\t}\n\n\terr := delegate.NewModelDelegate(n).Add()\n\trequire.Nil(t, err)\n\n\terr = delegate.NewModelDelegate(n).Delete()\n\trequire.Nil(t, err)\n\n\tvar a models2.Artifact\n\tcol := mongo.GetMongoCol(interfaces.ModelColNameArtifact)\n\terr = col.FindId(n.Id).One(&a)\n\trequire.Nil(t, err)\n\trequire.NotNil(t, a.Obj)\n\trequire.True(t, a.Del)\n}\n"
  },
  {
    "path": "core/models/delegate/model_role_test.go",
    "content": "package delegate_test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n)\n\nfunc TestRole_Add(t *testing.T) {\n\tSetupTest(t)\n\n\tp := &models2.Role{}\n\n\terr := delegate.NewModelDelegate(p).Add()\n\trequire.Nil(t, err)\n\trequire.NotNil(t, p.Id)\n\n\ta, err := delegate.NewModelDelegate(p).GetArtifact()\n\trequire.Nil(t, err)\n\trequire.Equal(t, p.Id, a.GetId())\n\trequire.NotNil(t, a.GetSys().GetCreateTs())\n\trequire.NotNil(t, a.GetSys().GetUpdateTs())\n}\n\nfunc TestRole_Save(t *testing.T) {\n\tSetupTest(t)\n\n\tp := &models2.Role{}\n\n\terr := delegate.NewModelDelegate(p).Add()\n\trequire.Nil(t, err)\n\n\tname := \"test_role\"\n\tp.Name = name\n\terr = delegate.NewModelDelegate(p).Save()\n\trequire.Nil(t, err)\n\n\terr = mongo.GetMongoCol(interfaces.ModelColNameRole).FindId(p.Id).One(&p)\n\trequire.Nil(t, err)\n\trequire.Equal(t, name, p.Name)\n}\n\nfunc TestRole_Delete(t *testing.T) {\n\tSetupTest(t)\n\n\tp := &models2.Role{\n\t\tName: \"test_role\",\n\t}\n\n\terr := delegate.NewModelDelegate(p).Add()\n\trequire.Nil(t, err)\n\n\terr = delegate.NewModelDelegate(p).Delete()\n\trequire.Nil(t, err)\n\n\tvar a models2.Artifact\n\tcol := mongo.GetMongoCol(interfaces.ModelColNameArtifact)\n\terr = col.FindId(p.Id).One(&a)\n\trequire.Nil(t, err)\n\trequire.NotNil(t, a.Obj)\n\trequire.True(t, a.Del)\n}\n"
  },
  {
    "path": "core/models/delegate/model_test.go",
    "content": "package delegate_test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n)\n\nfunc TestProject_Add(t *testing.T) {\n\tSetupTest(t)\n\n\tp := &models2.Project{}\n\n\terr := delegate.NewModelDelegate(p).Add()\n\trequire.Nil(t, err)\n\trequire.NotNil(t, p.Id)\n\n\ta, err := delegate.NewModelDelegate(p).GetArtifact()\n\trequire.Nil(t, err)\n\trequire.Equal(t, p.Id, a.GetId())\n\trequire.NotNil(t, a.GetSys().GetCreateTs())\n\trequire.NotNil(t, a.GetSys().GetUpdateTs())\n}\n\nfunc TestProject_Save(t *testing.T) {\n\tSetupTest(t)\n\n\tp := &models2.Project{}\n\n\terr := delegate.NewModelDelegate(p).Add()\n\trequire.Nil(t, err)\n\n\tname := \"test_project\"\n\tp.Name = name\n\terr = delegate.NewModelDelegate(p).Save()\n\trequire.Nil(t, err)\n\n\terr = mongo.GetMongoCol(interfaces.ModelColNameProject).FindId(p.Id).One(&p)\n\trequire.Nil(t, err)\n\trequire.Equal(t, name, p.Name)\n}\n\nfunc TestProject_Delete(t *testing.T) {\n\tSetupTest(t)\n\n\tp := &models2.Project{\n\t\tName: \"test_project\",\n\t}\n\n\terr := delegate.NewModelDelegate(p).Add()\n\trequire.Nil(t, err)\n\n\terr = delegate.NewModelDelegate(p).Delete()\n\trequire.Nil(t, err)\n\n\tvar a models2.Artifact\n\tcol := mongo.GetMongoCol(interfaces.ModelColNameArtifact)\n\terr = col.FindId(p.Id).One(&a)\n\trequire.Nil(t, err)\n\trequire.NotNil(t, a.Obj)\n\trequire.True(t, a.Del)\n}\n"
  },
  {
    "path": "core/models/delegate/utils_event.go",
    "content": "package delegate\n\nimport (\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n)\n\nfunc GetEventName(d *ModelDelegate, method interfaces.ModelDelegateMethod) (eventName string) {\n\treturn getEventName(d, method)\n}\n\nfunc getEventName(d *ModelDelegate, method interfaces.ModelDelegateMethod) (eventName string) {\n\tif method == interfaces.ModelDelegateMethodSave {\n\t\thasChange := d.hasChange()\n\t\tif hasChange {\n\t\t\tmethod = interfaces.ModelDelegateMethodChange\n\t\t}\n\t}\n\treturn fmt.Sprintf(\"model:%s:%s\", d.colName, method)\n}\n"
  },
  {
    "path": "core/models/models/artifact.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Artifact struct {\n\tId     primitive.ObjectID   `bson:\"_id\" json:\"_id\"`\n\tCol    string               `bson:\"_col\" json:\"_col\"`\n\tDel    bool                 `bson:\"_del\" json:\"_del\"`\n\tTagIds []primitive.ObjectID `bson:\"_tid\" json:\"_tid\"`\n\tSys    *ArtifactSys         `bson:\"_sys\" json:\"_sys\"`\n\tObj    interface{}          `bson:\"_obj\" json:\"_obj\"`\n}\n\nfunc (a *Artifact) GetId() (id primitive.ObjectID) {\n\treturn a.Id\n}\n\nfunc (a *Artifact) SetId(id primitive.ObjectID) {\n\ta.Id = id\n}\n\nfunc (a *Artifact) GetSys() (sys interfaces.ModelArtifactSys) {\n\tif a.Sys == nil {\n\t\ta.Sys = &ArtifactSys{}\n\t}\n\treturn a.Sys\n}\n\nfunc (a *Artifact) GetTagIds() (ids []primitive.ObjectID) {\n\treturn a.TagIds\n}\n\nfunc (a *Artifact) SetTagIds(ids []primitive.ObjectID) {\n\ta.TagIds = ids\n}\n\nfunc (a *Artifact) SetObj(obj interfaces.Model) {\n\ta.Obj = obj\n}\n\nfunc (a *Artifact) SetDel(del bool) {\n\ta.Del = del\n}\n\ntype ArtifactList []Artifact\n\nfunc (l *ArtifactList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/artifact_sys.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype ArtifactSys struct {\n\tCreateTs  time.Time          `json:\"create_ts\" bson:\"create_ts\"`\n\tCreateUid primitive.ObjectID `json:\"create_uid\" bson:\"create_uid\"`\n\tUpdateTs  time.Time          `json:\"update_ts\" bson:\"update_ts\"`\n\tUpdateUid primitive.ObjectID `json:\"update_uid\" bson:\"update_uid\"`\n\tDeleteTs  time.Time          `json:\"delete_ts\" bson:\"delete_ts\"`\n\tDeleteUid primitive.ObjectID `json:\"delete_uid\" bson:\"delete_uid\"`\n}\n\nfunc (sys *ArtifactSys) GetCreateTs() time.Time {\n\treturn sys.CreateTs\n}\n\nfunc (sys *ArtifactSys) SetCreateTs(ts time.Time) {\n\tsys.CreateTs = ts\n}\n\nfunc (sys *ArtifactSys) GetUpdateTs() time.Time {\n\treturn sys.UpdateTs\n}\n\nfunc (sys *ArtifactSys) SetUpdateTs(ts time.Time) {\n\tsys.UpdateTs = ts\n}\n\nfunc (sys *ArtifactSys) GetDeleteTs() time.Time {\n\treturn sys.DeleteTs\n}\n\nfunc (sys *ArtifactSys) SetDeleteTs(ts time.Time) {\n\tsys.DeleteTs = ts\n}\n\nfunc (sys *ArtifactSys) GetCreateUid() primitive.ObjectID {\n\treturn sys.CreateUid\n}\n\nfunc (sys *ArtifactSys) SetCreateUid(id primitive.ObjectID) {\n\tsys.CreateUid = id\n}\n\nfunc (sys *ArtifactSys) GetUpdateUid() primitive.ObjectID {\n\treturn sys.UpdateUid\n}\n\nfunc (sys *ArtifactSys) SetUpdateUid(id primitive.ObjectID) {\n\tsys.UpdateUid = id\n}\n\nfunc (sys *ArtifactSys) GetDeleteUid() primitive.ObjectID {\n\treturn sys.DeleteUid\n}\n\nfunc (sys *ArtifactSys) SetDeleteUid(id primitive.ObjectID) {\n\tsys.DeleteUid = id\n}\n"
  },
  {
    "path": "core/models/models/base.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype BaseModel struct {\n\tId primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n}\n\nfunc (d *BaseModel) GetId() (id primitive.ObjectID) {\n\treturn d.Id\n}\n"
  },
  {
    "path": "core/models/models/data_collection.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype DataCollection struct {\n\tId     primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tName   string             `json:\"name\" bson:\"name\"`\n\tFields []entity.DataField `json:\"fields\" bson:\"fields\"`\n\tDedup  struct {\n\t\tEnabled bool     `json:\"enabled\" bson:\"enabled\"`\n\t\tKeys    []string `json:\"keys\" bson:\"keys\"`\n\t\tType    string   `json:\"type\" bson:\"type\"`\n\t} `json:\"dedup\" bson:\"dedup\"`\n}\n\nfunc (dc *DataCollection) GetId() (id primitive.ObjectID) {\n\treturn dc.Id\n}\n\nfunc (dc *DataCollection) SetId(id primitive.ObjectID) {\n\tdc.Id = id\n}\n\ntype DataCollectionList []DataCollection\n\nfunc (l *DataCollectionList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/data_source.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype DataSource struct {\n\tId          primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tName        string             `json:\"name\" bson:\"name\"`\n\tType        string             `json:\"type\" bson:\"type\"`\n\tDescription string             `json:\"description\" bson:\"description\"`\n\tHost        string             `json:\"host\" bson:\"host\"`\n\tPort        int                `json:\"port\" bson:\"port\"`\n\tUrl         string             `json:\"url\" bson:\"url\"`\n\tHosts       []string           `json:\"hosts\" bson:\"hosts\"`\n\tDatabase    string             `json:\"database\" bson:\"database\"`\n\tUsername    string             `json:\"username\" bson:\"username\"`\n\tPassword    string             `json:\"password,omitempty\" bson:\"-\"`\n\tConnectType string             `json:\"connect_type\" bson:\"connect_type\"`\n\tStatus      string             `json:\"status\" bson:\"status\"`\n\tError       string             `json:\"error\" bson:\"error\"`\n\tExtra       map[string]string  `json:\"extra,omitempty\" bson:\"extra,omitempty\"`\n}\n\nfunc (ds *DataSource) GetId() (id primitive.ObjectID) {\n\treturn ds.Id\n}\n\nfunc (ds *DataSource) SetId(id primitive.ObjectID) {\n\tds.Id = id\n}\n\ntype DataSourceList []DataSource\n\nfunc (l *DataSourceList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/dependency_setting.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype DependencySetting struct {\n\tId           primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tKey          string             `json:\"key\" bson:\"key\"`\n\tName         string             `json:\"name\" bson:\"name\"`\n\tDescription  string             `json:\"description\" bson:\"description\"`\n\tEnabled      bool               `json:\"enabled\" bson:\"enabled\"`\n\tCmd          string             `json:\"cmd\" bson:\"cmd\"`\n\tProxy        string             `json:\"proxy\" bson:\"proxy\"`\n\tLastUpdateTs time.Time          `json:\"last_update_ts\" bson:\"last_update_ts\"`\n}\n\nfunc (j *DependencySetting) GetId() (id primitive.ObjectID) {\n\treturn j.Id\n}\n\nfunc (j *DependencySetting) SetId(id primitive.ObjectID) {\n\tj.Id = id\n}\n\ntype DependencySettingList []DependencySetting\n\nfunc (l *DependencySettingList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/environment.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Environment struct {\n\tId    primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tKey   string             `json:\"key\" bson:\"key\"`\n\tValue string             `json:\"value\" bson:\"value\"`\n}\n\nfunc (e *Environment) GetId() (id primitive.ObjectID) {\n\treturn e.Id\n}\n\nfunc (e *Environment) SetId(id primitive.ObjectID) {\n\te.Id = id\n}\n\nfunc (e *Environment) GetKey() (key string) {\n\treturn e.Key\n}\n\nfunc (e *Environment) SetKey(key string) {\n\te.Key = key\n}\n\nfunc (e *Environment) GetValue() (value string) {\n\treturn e.Value\n}\n\nfunc (e *Environment) SetValue(value string) {\n\te.Value = value\n}\n\ntype EnvironmentList []Environment\n\nfunc (l *EnvironmentList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/extra_value.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype ExtraValue struct {\n\tId       primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tObjectId primitive.ObjectID `json:\"oid\" bson:\"oid\"`\n\tModel    string             `json:\"model\" bson:\"m\"`\n\tType     string             `json:\"type\" bson:\"t\"`\n\tValue    interface{}        `json:\"value\" bson:\"v\"`\n}\n\nfunc (ev *ExtraValue) GetId() (id primitive.ObjectID) {\n\treturn ev.Id\n}\n\nfunc (ev *ExtraValue) SetId(id primitive.ObjectID) {\n\tev.Id = id\n}\n\nfunc (ev *ExtraValue) GetValue() (v interface{}) {\n\treturn ev.Value\n}\n\nfunc (ev *ExtraValue) SetValue(v interface{}) {\n\tev.Value = v\n}\n\nfunc (ev *ExtraValue) GetObjectId() (oid primitive.ObjectID) {\n\treturn ev.ObjectId\n}\n\nfunc (ev *ExtraValue) SetObjectId(oid primitive.ObjectID) {\n\tev.ObjectId = oid\n}\n\nfunc (ev *ExtraValue) GetModel() (m string) {\n\treturn ev.Model\n}\n\nfunc (ev *ExtraValue) SetModel(m string) {\n\tev.Model = m\n}\n\nfunc (ev *ExtraValue) GetType() (t string) {\n\treturn ev.Type\n}\n\nfunc (ev *ExtraValue) SetType(t string) {\n\tev.Type = t\n}\n\ntype ExtraValueList []ExtraValue\n\nfunc (l *ExtraValueList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/git.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Git struct {\n\tId            primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tUrl           string             `json:\"url\" bson:\"url\"`\n\tAuthType      string             `json:\"auth_type\" bson:\"auth_type\"`\n\tUsername      string             `json:\"username\" bson:\"username\"`\n\tPassword      string             `json:\"password\" bson:\"password\"`\n\tCurrentBranch string             `json:\"current_branch\" bson:\"current_branch\"`\n\tAutoPull      bool               `json:\"auto_pull\" bson:\"auto_pull\"`\n}\n\nfunc (g *Git) GetId() (id primitive.ObjectID) {\n\treturn g.Id\n}\n\nfunc (g *Git) SetId(id primitive.ObjectID) {\n\tg.Id = id\n}\n\nfunc (g *Git) GetUrl() (url string) {\n\treturn g.Url\n}\n\nfunc (g *Git) SetUrl(url string) {\n\tg.Url = url\n}\n\nfunc (g *Git) GetAuthType() (authType string) {\n\treturn g.AuthType\n}\n\nfunc (g *Git) SetAuthType(authType string) {\n\tg.AuthType = authType\n}\n\nfunc (g *Git) GetUsername() (username string) {\n\treturn g.Username\n}\n\nfunc (g *Git) SetUsername(username string) {\n\tg.Username = username\n}\n\nfunc (g *Git) GetPassword() (password string) {\n\treturn g.Password\n}\n\nfunc (g *Git) SetPassword(password string) {\n\tg.Password = password\n}\n\nfunc (g *Git) GetCurrentBranch() (currentBranch string) {\n\treturn g.CurrentBranch\n}\n\nfunc (g *Git) SetCurrentBranch(currentBranch string) {\n\tg.CurrentBranch = currentBranch\n}\n\nfunc (g *Git) GetAutoPull() (autoPull bool) {\n\treturn g.AutoPull\n}\n\nfunc (g *Git) SetAutoPull(autoPull bool) {\n\tg.AutoPull = autoPull\n}\n\ntype GitList []Git\n\nfunc (l *GitList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/job.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Job struct {\n\tId     primitive.ObjectID `bson:\"_id\" json:\"_id\"`\n\tTaskId primitive.ObjectID `bson:\"task_id\" json:\"task_id\"`\n}\n\nfunc (j *Job) GetId() (id primitive.ObjectID) {\n\treturn j.Id\n}\n\nfunc (j *Job) SetId(id primitive.ObjectID) {\n\tj.Id = id\n}\n\ntype JobList []Job\n\nfunc (l *JobList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/node.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype Node struct {\n\tId               primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tKey              string             `json:\"key\" bson:\"key\"`\n\tName             string             `json:\"name\" bson:\"name\"`\n\tIp               string             `json:\"ip\" bson:\"ip\"`\n\tPort             string             `json:\"port\" bson:\"port\"`\n\tMac              string             `json:\"mac\" bson:\"mac\"`\n\tHostname         string             `json:\"hostname\" bson:\"hostname\"`\n\tDescription      string             `json:\"description\" bson:\"description\"`\n\tIsMaster         bool               `json:\"is_master\" bson:\"is_master\"`\n\tStatus           string             `json:\"status\" bson:\"status\"`\n\tEnabled          bool               `json:\"enabled\" bson:\"enabled\"`\n\tActive           bool               `json:\"active\" bson:\"active\"`\n\tActiveTs         time.Time          `json:\"active_ts\" bson:\"active_ts\"`\n\tAvailableRunners int                `json:\"available_runners\" bson:\"available_runners\"`\n\tMaxRunners       int                `json:\"max_runners\" bson:\"max_runners\"`\n}\n\nfunc (n *Node) GetId() (id primitive.ObjectID) {\n\treturn n.Id\n}\n\nfunc (n *Node) SetId(id primitive.ObjectID) {\n\tn.Id = id\n}\n\nfunc (n *Node) GetName() (name string) {\n\treturn n.Name\n}\n\nfunc (n *Node) SetName(name string) {\n\tn.Name = name\n}\n\nfunc (n *Node) GetDescription() (description string) {\n\treturn n.Description\n}\n\nfunc (n *Node) SetDescription(description string) {\n\tn.Description = description\n}\n\nfunc (n *Node) GetKey() (key string) {\n\treturn n.Key\n}\n\nfunc (n *Node) GetIsMaster() (ok bool) {\n\treturn n.IsMaster\n}\n\nfunc (n *Node) GetActive() (active bool) {\n\treturn n.Active\n}\n\nfunc (n *Node) SetActive(active bool) {\n\tn.Active = active\n}\n\nfunc (n *Node) SetActiveTs(activeTs time.Time) {\n\tn.ActiveTs = activeTs\n}\n\nfunc (n *Node) GetStatus() (status string) {\n\treturn n.Status\n}\n\nfunc (n *Node) SetStatus(status string) {\n\tn.Status = status\n}\n\nfunc (n *Node) GetEnabled() (enabled bool) {\n\treturn n.Enabled\n}\n\nfunc (n *Node) SetEnabled(enabled bool) {\n\tn.Enabled = enabled\n}\n\nfunc (n *Node) GetAvailableRunners() (runners int) {\n\treturn n.AvailableRunners\n}\n\nfunc (n *Node) SetAvailableRunners(runners int) {\n\tn.AvailableRunners = runners\n}\n\nfunc (n *Node) GetMaxRunners() (runners int) {\n\treturn n.MaxRunners\n}\n\nfunc (n *Node) SetMaxRunners(runners int) {\n\tn.MaxRunners = runners\n}\n\nfunc (n *Node) IncrementAvailableRunners() {\n\tn.AvailableRunners++\n}\n\nfunc (n *Node) DecrementAvailableRunners() {\n\tn.AvailableRunners--\n}\n\ntype NodeList []Node\n\nfunc (l *NodeList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/password.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Password struct {\n\tId       primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tPassword string             `json:\"password\" bson:\"p\"`\n}\n\nfunc (p *Password) GetId() (id primitive.ObjectID) {\n\treturn p.Id\n}\n\nfunc (p *Password) SetId(id primitive.ObjectID) {\n\tp.Id = id\n}\n\ntype PasswordList []Password\n\nfunc (l *PasswordList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/permission.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Permission struct {\n\tId          primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tKey         string             `json:\"key\" bson:\"key\"`\n\tName        string             `json:\"name\" bson:\"name\"`\n\tDescription string             `json:\"description\" bson:\"description\"`\n\tType        string             `json:\"type\" bson:\"type\"`\n\tTarget      []string           `json:\"target\" bson:\"target\"`\n\tAllow       []string           `json:\"allow\" bson:\"allow\"`\n\tDeny        []string           `json:\"deny\" bson:\"deny\"`\n}\n\nfunc (p *Permission) GetId() (id primitive.ObjectID) {\n\treturn p.Id\n}\n\nfunc (p *Permission) SetId(id primitive.ObjectID) {\n\tp.Id = id\n}\n\nfunc (p *Permission) GetKey() (key string) {\n\treturn p.Key\n}\n\nfunc (p *Permission) SetKey(key string) {\n\tp.Key = key\n}\n\nfunc (p *Permission) GetName() (name string) {\n\treturn p.Name\n}\n\nfunc (p *Permission) SetName(name string) {\n\tp.Name = name\n}\n\nfunc (p *Permission) GetDescription() (description string) {\n\treturn p.Description\n}\n\nfunc (p *Permission) SetDescription(description string) {\n\tp.Description = description\n}\n\nfunc (p *Permission) GetType() (t string) {\n\treturn p.Type\n}\n\nfunc (p *Permission) SetType(t string) {\n\tp.Type = t\n}\n\nfunc (p *Permission) GetTarget() (target []string) {\n\treturn p.Target\n}\n\nfunc (p *Permission) SetTarget(target []string) {\n\tp.Target = target\n}\n\nfunc (p *Permission) GetAllow() (include []string) {\n\treturn p.Allow\n}\n\nfunc (p *Permission) SetAllow(include []string) {\n\tp.Allow = include\n}\n\nfunc (p *Permission) GetDeny() (exclude []string) {\n\treturn p.Deny\n}\n\nfunc (p *Permission) SetDeny(exclude []string) {\n\tp.Deny = exclude\n}\n\ntype PermissionList []Permission\n\nfunc (l *PermissionList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/project.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Project struct {\n\tId          primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tName        string             `json:\"name\" bson:\"name\"`\n\tDescription string             `json:\"description\" bson:\"description\"`\n\tSpiders     int                `json:\"spiders\" bson:\"-\"`\n}\n\nfunc (p *Project) GetId() (id primitive.ObjectID) {\n\treturn p.Id\n}\n\nfunc (p *Project) SetId(id primitive.ObjectID) {\n\tp.Id = id\n}\n\nfunc (p *Project) GetName() (name string) {\n\treturn p.Name\n}\n\nfunc (p *Project) SetName(name string) {\n\tp.Name = name\n}\n\nfunc (p *Project) GetDescription() (description string) {\n\treturn p.Description\n}\n\nfunc (p *Project) SetDescription(description string) {\n\tp.Description = description\n}\n\ntype ProjectList []Project\n\nfunc (l *ProjectList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/result.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Result bson.M\n\nfunc (r *Result) GetId() (id primitive.ObjectID) {\n\tres, ok := r.Value()[\"_id\"]\n\tif ok {\n\t\tid, ok = res.(primitive.ObjectID)\n\t\tif ok {\n\t\t\treturn id\n\t\t}\n\t}\n\treturn id\n}\n\nfunc (r *Result) SetId(id primitive.ObjectID) {\n\t(*r)[\"_id\"] = id\n}\n\nfunc (r *Result) Value() map[string]interface{} {\n\treturn *r\n}\n\nfunc (r *Result) SetValue(key string, value interface{}) {\n\t(*r)[key] = value\n}\n\nfunc (r *Result) GetValue(key string) (value interface{}) {\n\treturn (*r)[key]\n}\n\nfunc (r *Result) GetTaskId() (id primitive.ObjectID) {\n\tres := r.GetValue(constants.TaskKey)\n\tif res == nil {\n\t\treturn id\n\t}\n\tid, _ = res.(primitive.ObjectID)\n\treturn id\n}\n\nfunc (r *Result) SetTaskId(id primitive.ObjectID) {\n\tr.SetValue(constants.TaskKey, id)\n}\n\ntype ResultList []Result\n\nfunc (l *ResultList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/role.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Role struct {\n\tId          primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tKey         string             `json:\"key\" bson:\"key\"`\n\tName        string             `json:\"name\" bson:\"name\"`\n\tDescription string             `json:\"description\" bson:\"description\"`\n}\n\nfunc (r *Role) GetId() (id primitive.ObjectID) {\n\treturn r.Id\n}\n\nfunc (r *Role) SetId(id primitive.ObjectID) {\n\tr.Id = id\n}\n\nfunc (r *Role) GetKey() (key string) {\n\treturn r.Key\n}\n\nfunc (r *Role) SetKey(key string) {\n\tr.Key = key\n}\n\nfunc (r *Role) GetName() (name string) {\n\treturn r.Name\n}\n\nfunc (r *Role) SetName(name string) {\n\tr.Name = name\n}\n\nfunc (r *Role) GetDescription() (description string) {\n\treturn r.Description\n}\n\nfunc (r *Role) SetDescription(description string) {\n\tr.Description = description\n}\n\ntype RoleList []Role\n\nfunc (l *RoleList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/role_permission.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype RolePermission struct {\n\tId           primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tRoleId       primitive.ObjectID `json:\"role_id\" bson:\"role_id\"`\n\tPermissionId primitive.ObjectID `json:\"permission_id\" bson:\"permission_id\"`\n}\n\nfunc (ur *RolePermission) GetId() (id primitive.ObjectID) {\n\treturn ur.Id\n}\n\nfunc (ur *RolePermission) SetId(id primitive.ObjectID) {\n\tur.Id = id\n}\n\ntype RolePermissionList []RolePermission\n\nfunc (l *RolePermissionList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/schedule.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/robfig/cron/v3\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Schedule struct {\n\tId          primitive.ObjectID   `json:\"_id\" bson:\"_id\"`\n\tName        string               `json:\"name\" bson:\"name\"`\n\tDescription string               `json:\"description\" bson:\"description\"`\n\tSpiderId    primitive.ObjectID   `json:\"spider_id\" bson:\"spider_id\"`\n\tCron        string               `json:\"cron\" bson:\"cron\"`\n\tEntryId     cron.EntryID         `json:\"entry_id\" bson:\"entry_id\"`\n\tCmd         string               `json:\"cmd\" bson:\"cmd\"`\n\tParam       string               `json:\"param\" bson:\"param\"`\n\tMode        string               `json:\"mode\" bson:\"mode\"`\n\tNodeIds     []primitive.ObjectID `json:\"node_ids\" bson:\"node_ids\"`\n\tPriority    int                  `json:\"priority\" bson:\"priority\"`\n\tEnabled     bool                 `json:\"enabled\" bson:\"enabled\"`\n\tUserId      primitive.ObjectID   `json:\"user_id\" bson:\"user_id\"`\n}\n\nfunc (s *Schedule) GetId() (id primitive.ObjectID) {\n\treturn s.Id\n}\n\nfunc (s *Schedule) SetId(id primitive.ObjectID) {\n\ts.Id = id\n}\n\nfunc (s *Schedule) GetEnabled() (enabled bool) {\n\treturn s.Enabled\n}\n\nfunc (s *Schedule) SetEnabled(enabled bool) {\n\ts.Enabled = enabled\n}\n\nfunc (s *Schedule) GetEntryId() (id cron.EntryID) {\n\treturn s.EntryId\n}\n\nfunc (s *Schedule) SetEntryId(id cron.EntryID) {\n\ts.EntryId = id\n}\n\nfunc (s *Schedule) GetCron() (c string) {\n\treturn s.Cron\n}\n\nfunc (s *Schedule) SetCron(c string) {\n\ts.Cron = c\n}\n\nfunc (s *Schedule) GetSpiderId() (id primitive.ObjectID) {\n\treturn s.SpiderId\n}\n\nfunc (s *Schedule) SetSpiderId(id primitive.ObjectID) {\n\ts.SpiderId = id\n}\n\nfunc (s *Schedule) GetMode() (mode string) {\n\treturn s.Mode\n}\n\nfunc (s *Schedule) SetMode(mode string) {\n\ts.Mode = mode\n}\n\nfunc (s *Schedule) GetNodeIds() (ids []primitive.ObjectID) {\n\treturn s.NodeIds\n}\n\nfunc (s *Schedule) SetNodeIds(ids []primitive.ObjectID) {\n\ts.NodeIds = ids\n}\n\nfunc (s *Schedule) GetCmd() (cmd string) {\n\treturn s.Cmd\n}\n\nfunc (s *Schedule) SetCmd(cmd string) {\n\ts.Cmd = cmd\n}\n\nfunc (s *Schedule) GetParam() (param string) {\n\treturn s.Param\n}\n\nfunc (s *Schedule) SetParam(param string) {\n\ts.Param = param\n}\n\nfunc (s *Schedule) GetPriority() (p int) {\n\treturn s.Priority\n}\n\nfunc (s *Schedule) SetPriority(p int) {\n\ts.Priority = p\n}\n\ntype ScheduleList []Schedule\n\nfunc (l *ScheduleList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/setting.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Setting struct {\n\tId    primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tKey   string             `json:\"key\" bson:\"key\"`\n\tValue bson.M             `json:\"value\" bson:\"value\"`\n}\n\nfunc (s *Setting) GetId() (id primitive.ObjectID) {\n\treturn s.Id\n}\n\nfunc (s *Setting) SetId(id primitive.ObjectID) {\n\ts.Id = id\n}\n\ntype SettingList []Setting\n\nfunc (l *SettingList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/spider.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Env struct {\n\tName  string `json:\"name\" bson:\"name\"`\n\tValue string `json:\"value\" bson:\"value\"`\n}\n\ntype Spider struct {\n\tId           primitive.ObjectID   `json:\"_id\" bson:\"_id\"`                       // spider id\n\tName         string               `json:\"name\" bson:\"name\"`                     // spider name\n\tType         string               `json:\"type\" bson:\"type\"`                     // spider type\n\tColId        primitive.ObjectID   `json:\"col_id\" bson:\"col_id\"`                 // data collection id\n\tColName      string               `json:\"col_name,omitempty\" bson:\"-\"`          // data collection name\n\tDataSourceId primitive.ObjectID   `json:\"data_source_id\" bson:\"data_source_id\"` // data source id\n\tDataSource   *DataSource          `json:\"data_source,omitempty\" bson:\"-\"`       // data source\n\tDescription  string               `json:\"description\" bson:\"description\"`       // description\n\tProjectId    primitive.ObjectID   `json:\"project_id\" bson:\"project_id\"`         // Project.Id\n\tMode         string               `json:\"mode\" bson:\"mode\"`                     // default Task.Mode\n\tNodeIds      []primitive.ObjectID `json:\"node_ids\" bson:\"node_ids\"`             // default Task.NodeIds\n\tStat         *SpiderStat          `json:\"stat,omitempty\" bson:\"-\"`\n\n\t// execution\n\tCmd         string `json:\"cmd\" bson:\"cmd\"`     // execute command\n\tParam       string `json:\"param\" bson:\"param\"` // default task param\n\tPriority    int    `json:\"priority\" bson:\"priority\"`\n\tAutoInstall bool   `json:\"auto_install\" bson:\"auto_install\"`\n\n\t// settings\n\tIncrementalSync bool `json:\"incremental_sync\" bson:\"incremental_sync\"` // whether to incrementally sync files\n}\n\nfunc (s *Spider) GetId() (id primitive.ObjectID) {\n\treturn s.Id\n}\n\nfunc (s *Spider) SetId(id primitive.ObjectID) {\n\ts.Id = id\n}\n\nfunc (s *Spider) GetName() (name string) {\n\treturn s.Name\n}\n\nfunc (s *Spider) SetName(name string) {\n\ts.Name = name\n}\n\nfunc (s *Spider) GetDescription() (description string) {\n\treturn s.Description\n}\n\nfunc (s *Spider) SetDescription(description string) {\n\ts.Description = description\n}\n\nfunc (s *Spider) GetType() (ty string) {\n\treturn s.Type\n}\n\nfunc (s *Spider) GetMode() (mode string) {\n\treturn s.Mode\n}\n\nfunc (s *Spider) SetMode(mode string) {\n\ts.Mode = mode\n}\n\nfunc (s *Spider) GetNodeIds() (ids []primitive.ObjectID) {\n\treturn s.NodeIds\n}\n\nfunc (s *Spider) SetNodeIds(ids []primitive.ObjectID) {\n\ts.NodeIds = ids\n}\n\nfunc (s *Spider) GetCmd() (cmd string) {\n\treturn s.Cmd\n}\n\nfunc (s *Spider) SetCmd(cmd string) {\n\ts.Cmd = cmd\n}\n\nfunc (s *Spider) GetParam() (param string) {\n\treturn s.Param\n}\n\nfunc (s *Spider) SetParam(param string) {\n\ts.Param = param\n}\n\nfunc (s *Spider) GetPriority() (p int) {\n\treturn s.Priority\n}\n\nfunc (s *Spider) SetPriority(p int) {\n\ts.Priority = p\n}\n\nfunc (s *Spider) GetColId() (id primitive.ObjectID) {\n\treturn s.ColId\n}\n\nfunc (s *Spider) SetColId(id primitive.ObjectID) {\n\ts.ColId = id\n}\n\nfunc (s *Spider) GetIncrementalSync() (incrementalSync bool) {\n\treturn s.IncrementalSync\n}\n\nfunc (s *Spider) SetIncrementalSync(incrementalSync bool) {\n\ts.IncrementalSync = incrementalSync\n}\n\nfunc (s *Spider) GetAutoInstall() (autoInstall bool) {\n\treturn s.AutoInstall\n}\n\nfunc (s *Spider) SetAutoInstall(autoInstall bool) {\n\ts.AutoInstall = autoInstall\n}\n\ntype SpiderList []Spider\n\nfunc (l *SpiderList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/spider_stat.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype SpiderStat struct {\n\tId                     primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tLastTaskId             primitive.ObjectID `json:\"last_task_id\" bson:\"last_task_id,omitempty\"`\n\tLastTask               *Task              `json:\"last_task,omitempty\" bson:\"-\"`\n\tTasks                  int                `json:\"tasks\" bson:\"tasks\"`\n\tResults                int                `json:\"results\" bson:\"results\"`\n\tWaitDuration           int64              `json:\"wait_duration\" bson:\"wait_duration,omitempty\"`       // in second\n\tRuntimeDuration        int64              `json:\"runtime_duration\" bson:\"runtime_duration,omitempty\"` // in second\n\tTotalDuration          int64              `json:\"total_duration\" bson:\"total_duration,omitempty\"`     // in second\n\tAverageWaitDuration    int64              `json:\"average_wait_duration\" bson:\"-\"`                     // in second\n\tAverageRuntimeDuration int64              `json:\"average_runtime_duration\" bson:\"-\"`                  // in second\n\tAverageTotalDuration   int64              `json:\"average_total_duration\" bson:\"-\"`                    // in second\n}\n\nfunc (s *SpiderStat) GetId() (id primitive.ObjectID) {\n\treturn s.Id\n}\n\nfunc (s *SpiderStat) SetId(id primitive.ObjectID) {\n\ts.Id = id\n}\n\ntype SpiderStatList []SpiderStat\n\nfunc (l *SpiderStatList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/tag.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Tag struct {\n\tId          primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tName        string             `json:\"name\" bson:\"name\"`\n\tColor       string             `json:\"color\" bson:\"color\"`\n\tDescription string             `json:\"description\" bson:\"description\"`\n\tCol         string             `json:\"col\" bson:\"col\"`\n}\n\nfunc (t *Tag) GetId() (id primitive.ObjectID) {\n\treturn t.Id\n}\n\nfunc (t *Tag) SetId(id primitive.ObjectID) {\n\tt.Id = id\n}\n\nfunc (t *Tag) GetName() (res string) {\n\treturn t.Name\n}\n\nfunc (t *Tag) GetColor() (res string) {\n\treturn t.Color\n}\n\nfunc (t *Tag) SetCol(col string) {\n\tt.Col = col\n}\n\ntype TagList []Tag\n\nfunc (l *TagList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/task.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype Task struct {\n\tId         primitive.ObjectID   `json:\"_id\" bson:\"_id\"`\n\tSpiderId   primitive.ObjectID   `json:\"spider_id\" bson:\"spider_id\"`\n\tStatus     string               `json:\"status\" bson:\"status\"`\n\tNodeId     primitive.ObjectID   `json:\"node_id\" bson:\"node_id\"`\n\tCmd        string               `json:\"cmd\" bson:\"cmd\"`\n\tParam      string               `json:\"param\" bson:\"param\"`\n\tError      string               `json:\"error\" bson:\"error\"`\n\tPid        int                  `json:\"pid\" bson:\"pid\"`\n\tScheduleId primitive.ObjectID   `json:\"schedule_id\" bson:\"schedule_id\"` // Schedule.Id\n\tType       string               `json:\"type\" bson:\"type\"`\n\tMode       string               `json:\"mode\" bson:\"mode\"`           // running mode of Task\n\tNodeIds    []primitive.ObjectID `json:\"node_ids\" bson:\"node_ids\"`   // list of Node.Id\n\tParentId   primitive.ObjectID   `json:\"parent_id\" bson:\"parent_id\"` // parent Task.Id if it'Spider a sub-task\n\tPriority   int                  `json:\"priority\" bson:\"priority\"`\n\tStat       *TaskStat            `json:\"stat,omitempty\" bson:\"-\"`\n\tHasSub     bool                 `json:\"has_sub\" json:\"has_sub\"` // whether to have sub-tasks\n\tSubTasks   []Task               `json:\"sub_tasks,omitempty\" bson:\"-\"`\n\tSpider     *Spider              `json:\"spider,omitempty\" bson:\"-\"`\n\tUserId     primitive.ObjectID   `json:\"-\" bson:\"-\"`\n\tCreateTs   time.Time            `json:\"create_ts\" bson:\"create_ts\"`\n}\n\nfunc (t *Task) GetId() (id primitive.ObjectID) {\n\treturn t.Id\n}\n\nfunc (t *Task) SetId(id primitive.ObjectID) {\n\tt.Id = id\n}\n\nfunc (t *Task) GetNodeId() (id primitive.ObjectID) {\n\treturn t.NodeId\n}\n\nfunc (t *Task) SetNodeId(id primitive.ObjectID) {\n\tt.NodeId = id\n}\n\nfunc (t *Task) GetNodeIds() (ids []primitive.ObjectID) {\n\treturn t.NodeIds\n}\n\nfunc (t *Task) GetStatus() (status string) {\n\treturn t.Status\n}\n\nfunc (t *Task) SetStatus(status string) {\n\tt.Status = status\n}\n\nfunc (t *Task) GetError() (error string) {\n\treturn t.Error\n}\n\nfunc (t *Task) SetError(error string) {\n\tt.Error = error\n}\n\nfunc (t *Task) GetPid() (pid int) {\n\treturn t.Pid\n}\n\nfunc (t *Task) SetPid(pid int) {\n\tt.Pid = pid\n}\n\nfunc (t *Task) GetSpiderId() (id primitive.ObjectID) {\n\treturn t.SpiderId\n}\n\nfunc (t *Task) GetType() (ty string) {\n\treturn t.Type\n}\n\nfunc (t *Task) GetCmd() (cmd string) {\n\treturn t.Cmd\n}\n\nfunc (t *Task) GetParam() (param string) {\n\treturn t.Param\n}\n\nfunc (t *Task) GetPriority() (p int) {\n\treturn t.Priority\n}\n\nfunc (t *Task) GetUserId() (id primitive.ObjectID) {\n\treturn t.UserId\n}\n\nfunc (t *Task) SetUserId(id primitive.ObjectID) {\n\tt.UserId = id\n}\n\ntype TaskList []Task\n\nfunc (l *TaskList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n\ntype TaskDailyItem struct {\n\tDate               string  `json:\"date\" bson:\"_id\"`\n\tTaskCount          int     `json:\"task_count\" bson:\"task_count\"`\n\tAvgRuntimeDuration float64 `json:\"avg_runtime_duration\" bson:\"avg_runtime_duration\"`\n}\n"
  },
  {
    "path": "core/models/models/task_queue_item.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype TaskQueueItem struct {\n\tId       primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tPriority int                `json:\"p\" bson:\"p\"`\n\tNodeId   primitive.ObjectID `json:\"nid,omitempty\" bson:\"nid,omitempty\"`\n}\n\nfunc (t *TaskQueueItem) GetId() (id primitive.ObjectID) {\n\treturn t.Id\n}\n\nfunc (t *TaskQueueItem) SetId(id primitive.ObjectID) {\n\tt.Id = id\n}\n\ntype TaskQueueItemList []TaskQueueItem\n\nfunc (l *TaskQueueItemList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/task_stat.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype TaskStat struct {\n\tId              primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tCreateTs        time.Time          `json:\"create_ts\" bson:\"create_ts,omitempty\"`\n\tStartTs         time.Time          `json:\"start_ts\" bson:\"start_ts,omitempty\"`\n\tEndTs           time.Time          `json:\"end_ts\" bson:\"end_ts,omitempty\"`\n\tWaitDuration    int64              `json:\"wait_duration\" bson:\"wait_duration,omitempty\"`       // in millisecond\n\tRuntimeDuration int64              `json:\"runtime_duration\" bson:\"runtime_duration,omitempty\"` // in millisecond\n\tTotalDuration   int64              `json:\"total_duration\" bson:\"total_duration,omitempty\"`     // in millisecond\n\tResultCount     int64              `json:\"result_count\" bson:\"result_count\"`\n\tErrorLogCount   int64              `json:\"error_log_count\" bson:\"error_log_count\"`\n}\n\nfunc (s *TaskStat) GetId() (id primitive.ObjectID) {\n\treturn s.Id\n}\n\nfunc (s *TaskStat) SetId(id primitive.ObjectID) {\n\ts.Id = id\n}\n\nfunc (s *TaskStat) GetCreateTs() (ts time.Time) {\n\treturn s.CreateTs\n}\n\nfunc (s *TaskStat) SetCreateTs(ts time.Time) {\n\ts.CreateTs = ts\n}\n\nfunc (s *TaskStat) GetStartTs() (ts time.Time) {\n\treturn s.StartTs\n}\n\nfunc (s *TaskStat) SetStartTs(ts time.Time) {\n\ts.StartTs = ts\n}\n\nfunc (s *TaskStat) GetEndTs() (ts time.Time) {\n\treturn s.EndTs\n}\n\nfunc (s *TaskStat) SetEndTs(ts time.Time) {\n\ts.EndTs = ts\n}\n\nfunc (s *TaskStat) GetWaitDuration() (d int64) {\n\treturn s.WaitDuration\n}\n\nfunc (s *TaskStat) SetWaitDuration(d int64) {\n\ts.WaitDuration = d\n}\n\nfunc (s *TaskStat) GetRuntimeDuration() (d int64) {\n\treturn s.RuntimeDuration\n}\n\nfunc (s *TaskStat) SetRuntimeDuration(d int64) {\n\ts.RuntimeDuration = d\n}\n\nfunc (s *TaskStat) GetTotalDuration() (d int64) {\n\treturn s.WaitDuration + s.RuntimeDuration\n}\n\nfunc (s *TaskStat) SetTotalDuration(d int64) {\n\ts.TotalDuration = d\n}\n\nfunc (s *TaskStat) GetResultCount() (c int64) {\n\treturn s.ResultCount\n}\n\nfunc (s *TaskStat) SetResultCount(c int64) {\n\ts.ResultCount = c\n}\n\nfunc (s *TaskStat) GetErrorLogCount() (c int64) {\n\treturn s.ErrorLogCount\n}\n\nfunc (s *TaskStat) SetErrorLogCount(c int64) {\n\ts.ErrorLogCount = c\n}\n\ntype TaskStatList []TaskStat\n\nfunc (l *TaskStatList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/token.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Token struct {\n\tId    primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tName  string             `json:\"name\" bson:\"name\"`\n\tToken string             `json:\"token\" bson:\"token\"`\n}\n\nfunc (t *Token) GetId() (id primitive.ObjectID) {\n\treturn t.Id\n}\n\nfunc (t *Token) SetId(id primitive.ObjectID) {\n\tt.Id = id\n}\n\ntype TokenList []Token\n\nfunc (l *TokenList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/user.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype User struct {\n\tId       primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tUsername string             `json:\"username\" bson:\"username\"`\n\tPassword string             `json:\"password,omitempty\" bson:\"-\"`\n\tRole     string             `json:\"role\" bson:\"role\"`\n\tEmail    string             `json:\"email\" bson:\"email\"`\n\t//Setting  UserSetting        `json:\"setting\" bson:\"setting\"`\n}\n\nfunc (u *User) GetId() (id primitive.ObjectID) {\n\treturn u.Id\n}\n\nfunc (u *User) SetId(id primitive.ObjectID) {\n\tu.Id = id\n}\n\nfunc (u *User) GetUsername() (name string) {\n\treturn u.Username\n}\n\nfunc (u *User) GetPassword() (p string) {\n\treturn u.Password\n}\n\nfunc (u *User) GetRole() (r string) {\n\treturn u.Role\n}\n\nfunc (u *User) GetEmail() (email string) {\n\treturn u.Email\n}\n\n//type UserSetting struct {\n//\tNotificationTrigger  string   `json:\"notification_trigger\" bson:\"notification_trigger\"`\n//\tDingTalkRobotWebhook string   `json:\"ding_talk_robot_webhook\" bson:\"ding_talk_robot_webhook\"`\n//\tWechatRobotWebhook   string   `json:\"wechat_robot_webhook\" bson:\"wechat_robot_webhook\"`\n//\tEnabledNotifications []string `json:\"enabled_notifications\" bson:\"enabled_notifications\"`\n//\tErrorRegexPattern    string   `json:\"error_regex_pattern\" bson:\"error_regex_pattern\"`\n//\tMaxErrorLog          int      `json:\"max_error_log\" bson:\"max_error_log\"`\n//\tLogExpireDuration    int64    `json:\"log_expire_duration\" bson:\"log_expire_duration\"`\n//}\n\ntype UserList []User\n\nfunc (l *UserList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/user_role.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype UserRole struct {\n\tId     primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tRoleId primitive.ObjectID `json:\"role_id\" bson:\"role_id\"`\n\tUserId primitive.ObjectID `json:\"user_id\" bson:\"user_id\"`\n}\n\nfunc (ur *UserRole) GetId() (id primitive.ObjectID) {\n\treturn ur.Id\n}\n\nfunc (ur *UserRole) SetId(id primitive.ObjectID) {\n\tur.Id = id\n}\n\ntype UserRoleList []UserRole\n\nfunc (l *UserRoleList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/utils_binder_legacy.go",
    "content": "package models\n\n//func AssignFields(d interface{}, fieldIds ...interfaces.ModelId) (res interface{}, err error) {\n//\treturn assignFields(d, fieldIds...)\n//}\n//\n//func AssignListFields(list interface{}, fieldIds ...interfaces.ModelId) (res arraylist.List, err error) {\n//\treturn assignListFields(list, fieldIds...)\n//}\n//\n//func AssignListFieldsAsPtr(list interface{}, fieldIds ...interfaces.ModelId) (res arraylist.List, err error) {\n//\treturn assignListFieldsAsPtr(list, fieldIds...)\n//}\n//\n//func assignFields(d interface{}, fieldIds ...interfaces.ModelId) (res interface{}, err error) {\n//\tdoc, ok := d.(interfaces.Model)\n//\tif !ok {\n//\t\treturn nil, errors.ErrorModelInvalidType\n//\t}\n//\tif len(fieldIds) == 0 {\n//\t\treturn doc, nil\n//\t}\n//\tfor _, fid := range fieldIds {\n//\t\tswitch fid {\n//\t\tcase interfaces.ModelIdTag:\n//\t\t\t// convert interface\n//\t\t\td, ok := doc.(interfaces.ModelWithTags)\n//\t\t\tif !ok {\n//\t\t\t\treturn nil, errors.ErrorModelInvalidType\n//\t\t\t}\n//\n//\t\t\t// attempt to get artifact\n//\t\t\ta, err := doc.GetArtifact()\n//\t\t\tif err != nil {\n//\t\t\t\treturn nil, err\n//\t\t\t}\n//\n//\t\t\t// skip if no artifact found\n//\t\t\tif a == nil {\n//\t\t\t\treturn d, nil\n//\t\t\t}\n//\n//\t\t\t// assign tags\n//\t\t\ttags, err := a.GetTags()\n//\t\t\tif err != nil {\n//\t\t\t\treturn nil, err\n//\t\t\t}\n//\t\t\td.SetTags(tags)\n//\n//\t\t\treturn d, nil\n//\t\t}\n//\t}\n//\treturn doc, nil\n//}\n//\n//func _assignListFields(asPtr bool, list interface{}, fieldIds ...interfaces.ModelId) (res arraylist.List, err error) {\n//\tvList := reflect.ValueOf(list)\n//\tif vList.Kind() != reflect.Array &&\n//\t\tvList.Kind() != reflect.Slice {\n//\t\treturn res, errors.ErrorModelInvalidType\n//\t}\n//\tfor i := 0; i < vList.Len(); i++ {\n//\t\tvItem := vList.Index(i)\n//\t\tvar item interface{}\n//\t\tif vItem.CanAddr() {\n//\t\t\titem = vItem.Addr().Interface()\n//\t\t} else {\n//\t\t\titem = vItem.Interface()\n//\t\t}\n//\t\tdoc, ok := item.(interfaces.Model)\n//\t\tif !ok {\n//\t\t\treturn res, errors.ErrorModelInvalidType\n//\t\t}\n//\t\tptr, err := assignFields(doc, fieldIds...)\n//\t\tif err != nil {\n//\t\t\treturn res, err\n//\t\t}\n//\t\tv := reflect.ValueOf(ptr)\n//\t\tif !asPtr {\n//\t\t\t// non-pointer item\n//\t\t\tres.Add(v.Elem().Interface())\n//\t\t} else {\n//\t\t\t// pointer item\n//\t\t\tres.Add(v.Interface())\n//\t\t}\n//\t}\n//\treturn res, nil\n//}\n//\n//func assignListFields(list interface{}, fieldIds ...interfaces.ModelId) (res arraylist.List, err error) {\n//\treturn _assignListFields(false, list, fieldIds...)\n//}\n//\n//func assignListFieldsAsPtr(list interface{}, fieldIds ...interfaces.ModelId) (res arraylist.List, err error) {\n//\treturn _assignListFields(true, list, fieldIds...)\n//}\n"
  },
  {
    "path": "core/models/models/utils_col.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils/binders\"\n)\n\nfunc GetModelColName(id interfaces.ModelId) (colName string) {\n\treturn binders.NewColNameBinder(id).MustBindString()\n}\n"
  },
  {
    "path": "core/models/models/utils_model_map.go",
    "content": "package models\n\ntype ModelMap struct {\n\tArtifact          Artifact\n\tTag               Tag\n\tNode              Node\n\tProject           Project\n\tSpider            Spider\n\tTask              Task\n\tJob               Job\n\tSchedule          Schedule\n\tUser              User\n\tSetting           Setting\n\tToken             Token\n\tVariable          Variable\n\tTaskQueueItem     TaskQueueItem\n\tTaskStat          TaskStat\n\tSpiderStat        SpiderStat\n\tDataSource        DataSource\n\tDataCollection    DataCollection\n\tResult            Result\n\tPassword          Password\n\tExtraValue        ExtraValue\n\tGit               Git\n\tRole              Role\n\tUserRole          UserRole\n\tPermission        Permission\n\tRolePermission    RolePermission\n\tEnvironment       Environment\n\tDependencySetting DependencySetting\n}\n\ntype ModelListMap struct {\n\tArtifacts          ArtifactList\n\tTags               TagList\n\tNodes              NodeList\n\tProjects           ProjectList\n\tSpiders            SpiderList\n\tTasks              TaskList\n\tJobs               JobList\n\tSchedules          ScheduleList\n\tUsers              UserList\n\tSettings           SettingList\n\tTokens             TokenList\n\tVariables          VariableList\n\tTaskQueueItems     TaskQueueItemList\n\tTaskStats          TaskStatList\n\tSpiderStats        SpiderStatList\n\tDataSources        DataSourceList\n\tDataCollections    DataCollectionList\n\tResults            ResultList\n\tPasswords          PasswordList\n\tExtraValues        ExtraValueList\n\tGits               GitList\n\tRoles              RoleList\n\tUserRoles          UserRoleList\n\tPermissionList     PermissionList\n\tRolePermissionList RolePermissionList\n\tEnvironments       EnvironmentList\n\tDependencySettings DependencySettingList\n}\n\nfunc NewModelMap() (m *ModelMap) {\n\treturn &ModelMap{}\n}\n\nfunc NewModelListMap() (m *ModelListMap) {\n\treturn &ModelListMap{\n\t\tArtifacts:          ArtifactList{},\n\t\tTags:               TagList{},\n\t\tNodes:              NodeList{},\n\t\tProjects:           ProjectList{},\n\t\tSpiders:            SpiderList{},\n\t\tTasks:              TaskList{},\n\t\tJobs:               JobList{},\n\t\tSchedules:          ScheduleList{},\n\t\tUsers:              UserList{},\n\t\tSettings:           SettingList{},\n\t\tTokens:             TokenList{},\n\t\tVariables:          VariableList{},\n\t\tTaskQueueItems:     TaskQueueItemList{},\n\t\tTaskStats:          TaskStatList{},\n\t\tSpiderStats:        SpiderStatList{},\n\t\tDataSources:        DataSourceList{},\n\t\tDataCollections:    DataCollectionList{},\n\t\tResults:            ResultList{},\n\t\tPasswords:          PasswordList{},\n\t\tExtraValues:        ExtraValueList{},\n\t\tGits:               GitList{},\n\t\tRoles:              RoleList{},\n\t\tPermissionList:     PermissionList{},\n\t\tRolePermissionList: RolePermissionList{},\n\t\tEnvironments:       EnvironmentList{},\n\t}\n}\n"
  },
  {
    "path": "core/models/models/utils_tag.go",
    "content": "package models\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\nfunc convertInterfacesToTags(tags []interfaces.Tag) (res []Tag) {\n\tif tags == nil {\n\t\treturn nil\n\t}\n\tfor _, t := range tags {\n\t\ttag, ok := t.(*Tag)\n\t\tif !ok {\n\t\t\tlog.Warnf(\"%v: cannot convert tag\", trace.TraceError(errors.ErrorModelInvalidType))\n\t\t\treturn nil\n\t\t}\n\t\tif tag == nil {\n\t\t\tlog.Warnf(\"%v: cannot convert tag\", trace.TraceError(errors.ErrorModelInvalidType))\n\t\t\treturn nil\n\t\t}\n\t\tres = append(res, *tag)\n\t}\n\treturn res\n}\n\nfunc convertTagsToInterfaces(tags []Tag) (res []interfaces.Tag) {\n\tfor _, t := range tags {\n\t\tres = append(res, &t)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/models/v2/base_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\ntype BaseModelV2[T any] struct {\n\tId        primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tCreatedAt time.Time          `json:\"created_ts,omitempty\" bson:\"created_ts,omitempty\"`\n\tCreatedBy primitive.ObjectID `json:\"created_by,omitempty\" bson:\"created_by,omitempty\"`\n\tUpdatedAt time.Time          `json:\"updated_ts,omitempty\" bson:\"updated_ts,omitempty\"`\n\tUpdatedBy primitive.ObjectID `json:\"updated_by,omitempty\" bson:\"updated_by,omitempty\"`\n}\n\nfunc (m *BaseModelV2[T]) GetId() primitive.ObjectID {\n\treturn m.Id\n}\n\nfunc (m *BaseModelV2[T]) SetId(id primitive.ObjectID) {\n\tm.Id = id\n}\n\nfunc (m *BaseModelV2[T]) GetCreatedAt() time.Time {\n\treturn m.CreatedAt\n}\n\nfunc (m *BaseModelV2[T]) SetCreatedAt(t time.Time) {\n\tm.CreatedAt = t\n}\n\nfunc (m *BaseModelV2[T]) GetCreatedBy() primitive.ObjectID {\n\treturn m.CreatedBy\n}\n\nfunc (m *BaseModelV2[T]) SetCreatedBy(id primitive.ObjectID) {\n\tm.CreatedBy = id\n}\n\nfunc (m *BaseModelV2[T]) GetUpdatedAt() time.Time {\n\treturn m.UpdatedAt\n}\n\nfunc (m *BaseModelV2[T]) SetUpdatedAt(t time.Time) {\n\tm.UpdatedAt = t\n}\n\nfunc (m *BaseModelV2[T]) GetUpdatedBy() primitive.ObjectID {\n\treturn m.UpdatedBy\n}\n\nfunc (m *BaseModelV2[T]) SetUpdatedBy(id primitive.ObjectID) {\n\tm.UpdatedBy = id\n}\n\nfunc (m *BaseModelV2[T]) SetCreated(id primitive.ObjectID) {\n\tm.SetCreatedAt(time.Now())\n\tm.SetCreatedBy(id)\n}\n\nfunc (m *BaseModelV2[T]) SetUpdated(id primitive.ObjectID) {\n\tm.SetUpdatedAt(time.Now())\n\tm.SetUpdatedBy(id)\n}\n"
  },
  {
    "path": "core/models/models/v2/data_collection_v2.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n)\n\ntype DataCollectionV2 struct {\n\tany                           `collection:\"data_collections\"`\n\tBaseModelV2[DataCollectionV2] `bson:\",inline\"`\n\tName                          string             `json:\"name\" bson:\"name\"`\n\tFields                        []entity.DataField `json:\"fields\" bson:\"fields\"`\n\tDedup                         struct {\n\t\tEnabled bool     `json:\"enabled\" bson:\"enabled\"`\n\t\tKeys    []string `json:\"keys\" bson:\"keys\"`\n\t\tType    string   `json:\"type\" bson:\"type\"`\n\t} `json:\"dedup\" bson:\"dedup\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/database_metric_v2.go",
    "content": "package models\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype DatabaseMetricV2 struct {\n\tany                           `collection:\"database_metrics\"`\n\tBaseModelV2[DatabaseMetricV2] `bson:\",inline\"`\n\tDatabaseId                    primitive.ObjectID `json:\"database_id\" bson:\"database_id\"`\n\tCpuUsagePercent               float32            `json:\"cpu_usage_percent\" bson:\"cpu_usage_percent\"`\n\tTotalMemory                   uint64             `json:\"total_memory\" bson:\"total_memory\"`\n\tAvailableMemory               uint64             `json:\"available_memory\" bson:\"available_memory\"`\n\tUsedMemory                    uint64             `json:\"used_memory\" bson:\"used_memory\"`\n\tUsedMemoryPercent             float32            `json:\"used_memory_percent\" bson:\"used_memory_percent\"`\n\tTotalDisk                     uint64             `json:\"total_disk\" bson:\"total_disk\"`\n\tAvailableDisk                 uint64             `json:\"available_disk\" bson:\"available_disk\"`\n\tUsedDisk                      uint64             `json:\"used_disk\" bson:\"used_disk\"`\n\tUsedDiskPercent               float32            `json:\"used_disk_percent\" bson:\"used_disk_percent\"`\n\tConnections                   int                `json:\"connections\" bson:\"connections\"`\n\tQueryPerSecond                float64            `json:\"query_per_second\" bson:\"query_per_second\"`\n\tTotalQuery                    uint64             `json:\"total_query,omitempty\" bson:\"total_query,omitempty\"`\n\tCacheHitRatio                 float64            `json:\"cache_hit_ratio\" bson:\"cache_hit_ratio\"`\n\tReplicationLag                float64            `json:\"replication_lag\" bson:\"replication_lag\"`\n\tLockWaitTime                  float64            `json:\"lock_wait_time\" bson:\"lock_wait_time\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/database_v2.go",
    "content": "package models\n\nimport (\n\t\"time\"\n)\n\ntype DatabaseV2 struct {\n\tany                     `collection:\"databases\"`\n\tBaseModelV2[DatabaseV2] `bson:\",inline\"`\n\tName                    string    `json:\"name\" bson:\"name\"`\n\tDescription             string    `json:\"description\" bson:\"description\"`\n\tDataSource              string    `json:\"data_source\" bson:\"data_source\"`\n\tHost                    string    `json:\"host\" bson:\"host\"`\n\tPort                    int       `json:\"port\" bson:\"port\"`\n\tURI                     string    `json:\"uri,omitempty\" bson:\"uri,omitempty\"`\n\tDatabase                string    `json:\"database,omitempty\" bson:\"database,omitempty\"`\n\tUsername                string    `json:\"username,omitempty\" bson:\"username,omitempty\"`\n\tPassword                string    `json:\"password,omitempty\" bson:\"-\"`\n\tEncryptedPassword       string    `json:\"-,omitempty\" bson:\"encrypted_password,omitempty\"`\n\tStatus                  string    `json:\"status\" bson:\"status\"`\n\tError                   string    `json:\"error\" bson:\"error\"`\n\tActive                  bool      `json:\"active\" bson:\"active\"`\n\tActiveAt                time.Time `json:\"active_ts\" bson:\"active_ts\"`\n\tIsDefault               bool      `json:\"is_default\" bson:\"-\"`\n\n\tMongoParams *struct {\n\t\tAuthSource    string `json:\"auth_source,omitempty\" bson:\"auth_source,omitempty\"`\n\t\tAuthMechanism string `json:\"auth_mechanism,omitempty\" bson:\"auth_mechanism,omitempty\"`\n\t} `json:\"mongo_params,omitempty\" bson:\"mongo_params,omitempty\"`\n\tPostgresParams *struct {\n\t\tSSLMode string `json:\"ssl_mode,omitempty\" bson:\"ssl_mode,omitempty\"`\n\t} `json:\"postgres_params,omitempty\" bson:\"postgres_params,omitempty\"`\n\tSnowflakeParams *struct {\n\t\tAccount   string `json:\"account,omitempty\" bson:\"account,omitempty\"`\n\t\tSchema    string `json:\"schema,omitempty\" bson:\"schema,omitempty\"`\n\t\tWarehouse string `json:\"warehouse,omitempty\" bson:\"warehouse,omitempty\"`\n\t\tRole      string `json:\"role,omitempty\" bson:\"role,omitempty\"`\n\t} `json:\"snowflake_params,omitempty\" bson:\"snowflake_params,omitempty\"`\n\tCassandraParams *struct {\n\t\tKeyspace string `json:\"keyspace,omitempty\" bson:\"keyspace,omitempty\"`\n\t} `json:\"cassandra_params,omitempty\" bson:\"cassandra_params,omitempty\"`\n\tHiveParams *struct {\n\t\tAuth string `json:\"auth,omitempty\" bson:\"auth,omitempty\"`\n\t} `json:\"hive_params,omitempty\" bson:\"hive_params,omitempty\"`\n\tRedisParams *struct {\n\t\tDB int `json:\"db,omitempty\" bson:\"db,omitempty\"`\n\t} `json:\"redis_params,omitempty\" bson:\"redis_params,omitempty\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/dependency_log_v2.go",
    "content": "package models\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype DependencyLogV2 struct {\n\tany                          `collection:\"dependency_logs\"`\n\tBaseModelV2[DependencyLogV2] `bson:\",inline\"`\n\tTaskId                       primitive.ObjectID `json:\"task_id\" bson:\"task_id\"`\n\tContent                      string             `json:\"content\" bson:\"content\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/dependency_setting_v2.go",
    "content": "package models\n\nimport (\n\t\"time\"\n)\n\ntype DependencySettingV2 struct {\n\tany                              `collection:\"dependency_settings\"`\n\tBaseModelV2[DependencySettingV2] `bson:\",inline\"`\n\tKey                              string    `json:\"key\" bson:\"key\"`\n\tName                             string    `json:\"name\" bson:\"name\"`\n\tDescription                      string    `json:\"description\" bson:\"description\"`\n\tEnabled                          bool      `json:\"enabled\" bson:\"enabled\"`\n\tCmd                              string    `json:\"cmd\" bson:\"cmd\"`\n\tProxy                            string    `json:\"proxy\" bson:\"proxy\"`\n\tLastUpdateTs                     time.Time `json:\"last_update_ts\" bson:\"last_update_ts\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/dependency_task_v2.go",
    "content": "package models\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype DependencyTaskV2 struct {\n\tany                           `collection:\"dependency_tasks\"`\n\tBaseModelV2[DependencyTaskV2] `bson:\",inline\"`\n\tStatus                        string             `json:\"status\" bson:\"status\"`\n\tError                         string             `json:\"error\" bson:\"error\"`\n\tSettingId                     primitive.ObjectID `json:\"setting_id\" bson:\"setting_id\"`\n\tType                          string             `json:\"type\" bson:\"type\"`\n\tNodeId                        primitive.ObjectID `json:\"node_id\" bson:\"node_id\"`\n\tAction                        string             `json:\"action\" bson:\"action\"`\n\tDepNames                      []string           `json:\"dep_names\" bson:\"dep_names\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/dependency_v2.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype DependencyV2 struct {\n\tany                       `collection:\"dependencies\"`\n\tBaseModelV2[DependencyV2] `bson:\",inline\"`\n\tName                      string                  `json:\"name\" bson:\"name\"`\n\tDescription               string                  `json:\"description\" bson:\"description\"`\n\tNodeId                    primitive.ObjectID      `json:\"node_id\" bson:\"node_id\"`\n\tType                      string                  `json:\"type\" bson:\"type\"`\n\tLatestVersion             string                  `json:\"latest_version\" bson:\"latest_version\"`\n\tVersion                   string                  `json:\"version\" bson:\"version\"`\n\tResult                    entity.DependencyResult `json:\"result\" bson:\"-\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/environment_v2.go",
    "content": "package models\n\ntype EnvironmentV2 struct {\n\tany                        `collection:\"environments\"`\n\tBaseModelV2[EnvironmentV2] `bson:\",inline\"`\n\tKey                        string `json:\"key\" bson:\"key\"`\n\tValue                      string `json:\"value\" bson:\"value\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/git_v2.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/vcs\"\n\t\"time\"\n)\n\ntype GitV2 struct {\n\tany                `collection:\"gits\"`\n\tBaseModelV2[GitV2] `bson:\",inline\"`\n\tUrl                string       `json:\"url\" bson:\"url\"`\n\tName               string       `json:\"name\" bson:\"name\"`\n\tAuthType           string       `json:\"auth_type\" bson:\"auth_type\"`\n\tUsername           string       `json:\"username\" bson:\"username\"`\n\tPassword           string       `json:\"password\" bson:\"password\"`\n\tCurrentBranch      string       `json:\"current_branch\" bson:\"current_branch\"`\n\tStatus             string       `json:\"status\" bson:\"status\"`\n\tError              string       `json:\"error\" bson:\"error\"`\n\tSpiders            []SpiderV2   `json:\"spiders,omitempty\" bson:\"-\"`\n\tRefs               []vcs.GitRef `json:\"refs\" bson:\"refs\"`\n\tRefsUpdatedAt      time.Time    `json:\"refs_updated_at\" bson:\"refs_updated_at\"`\n\tCloneLogs          []string     `json:\"clone_logs,omitempty\" bson:\"clone_logs\"`\n\n\t// settings\n\tAutoPull bool `json:\"auto_pull\" bson:\"auto_pull\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/metric_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype MetricV2 struct {\n\tany                   `collection:\"metrics\"`\n\tBaseModelV2[MetricV2] `bson:\",inline\"`\n\tType                  string             `json:\"type\" bson:\"type\"`\n\tNodeId                primitive.ObjectID `json:\"node_id\" bson:\"node_id\"`\n\tCpuUsagePercent       float32            `json:\"cpu_usage_percent\" bson:\"cpu_usage_percent\"`\n\tTotalMemory           uint64             `json:\"total_memory\" bson:\"total_memory\"`\n\tAvailableMemory       uint64             `json:\"available_memory\" bson:\"available_memory\"`\n\tUsedMemory            uint64             `json:\"used_memory\" bson:\"used_memory\"`\n\tUsedMemoryPercent     float32            `json:\"used_memory_percent\" bson:\"used_memory_percent\"`\n\tTotalDisk             uint64             `json:\"total_disk\" bson:\"total_disk\"`\n\tAvailableDisk         uint64             `json:\"available_disk\" bson:\"available_disk\"`\n\tUsedDisk              uint64             `json:\"used_disk\" bson:\"used_disk\"`\n\tUsedDiskPercent       float32            `json:\"used_disk_percent\" bson:\"used_disk_percent\"`\n\tDiskReadBytesRate     float32            `json:\"disk_read_bytes_rate\" bson:\"disk_read_bytes_rate\"`\n\tDiskWriteBytesRate    float32            `json:\"disk_write_bytes_rate\" bson:\"disk_write_bytes_rate\"`\n\tNetworkBytesSentRate  float32            `json:\"network_bytes_sent_rate\" bson:\"network_bytes_sent_rate\"`\n\tNetworkBytesRecvRate  float32            `json:\"network_bytes_recv_rate\" bson:\"network_bytes_recv_rate\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/node_v2.go",
    "content": "package models\n\nimport (\n\t\"time\"\n)\n\ntype NodeV2 struct {\n\tany                 `collection:\"nodes\"`\n\tBaseModelV2[NodeV2] `bson:\",inline\"`\n\tKey                 string    `json:\"key\" bson:\"key\"`\n\tName                string    `json:\"name\" bson:\"name\"`\n\tIp                  string    `json:\"ip\" bson:\"ip\"`\n\tMac                 string    `json:\"mac\" bson:\"mac\"`\n\tHostname            string    `json:\"hostname\" bson:\"hostname\"`\n\tDescription         string    `json:\"description\" bson:\"description\"`\n\tIsMaster            bool      `json:\"is_master\" bson:\"is_master\"`\n\tStatus              string    `json:\"status\" bson:\"status\"`\n\tEnabled             bool      `json:\"enabled\" bson:\"enabled\"`\n\tActive              bool      `json:\"active\" bson:\"active\"`\n\tActiveAt            time.Time `json:\"active_at\" bson:\"active_ts\"`\n\tAvailableRunners    int       `json:\"available_runners\" bson:\"available_runners\"`\n\tMaxRunners          int       `json:\"max_runners\" bson:\"max_runners\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/notification_alert_v2.go",
    "content": "package models\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype NotificationAlertV2 struct {\n\tany                              `collection:\"notification_alerts\"`\n\tBaseModelV2[NotificationAlertV2] `bson:\",inline\"`\n\tName                             string             `json:\"name\" bson:\"name\"`\n\tDescription                      string             `json:\"description\" bson:\"description\"`\n\tEnabled                          bool               `json:\"enabled\" bson:\"enabled\"`\n\tHasMetricTarget                  bool               `json:\"has_metric_target\" bson:\"has_metric_target\"`\n\tMetricTargetId                   primitive.ObjectID `json:\"metric_target_id,omitempty\" bson:\"metric_target_id,omitempty\"`\n\tMetricName                       string             `json:\"metric_name\" bson:\"metric_name\"`\n\tOperator                         string             `json:\"operator\" bson:\"operator\"`\n\tLastingSeconds                   int                `json:\"lasting_seconds\" bson:\"lasting_seconds\"`\n\tTargetValue                      float32            `json:\"target_value\" bson:\"target_value\"`\n\tLevel                            string             `json:\"level\" bson:\"level\"`\n\tTemplateKey                      string             `json:\"template_key,omitempty\" bson:\"template_key,omitempty\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/notification_channel_v2.go",
    "content": "package models\n\ntype NotificationChannelV2 struct {\n\tany                                `collection:\"notification_channels\"`\n\tBaseModelV2[NotificationChannelV2] `bson:\",inline\"`\n\tType                               string `json:\"type\" bson:\"type\"`\n\tName                               string `json:\"name\" bson:\"name\"`\n\tDescription                        string `json:\"description\" bson:\"description\"`\n\tProvider                           string `json:\"provider\" bson:\"provider\"`\n\tSMTPServer                         string `json:\"smtp_server,omitempty\" bson:\"smtp_server,omitempty\"`\n\tSMTPPort                           int    `json:\"smtp_port,omitempty\" bson:\"smtp_port,omitempty\"`\n\tSMTPUsername                       string `json:\"smtp_username,omitempty\" bson:\"smtp_username,omitempty\"`\n\tSMTPPassword                       string `json:\"smtp_password,omitempty\" bson:\"smtp_password,omitempty\"`\n\tWebhookUrl                         string `json:\"webhook_url,omitempty\" bson:\"webhook_url,omitempty\"`\n\tTelegramBotToken                   string `json:\"telegram_bot_token,omitempty\" bson:\"telegram_bot_token,omitempty\"`\n\tTelegramChatId                     string `json:\"telegram_chat_id,omitempty\" bson:\"telegram_chat_id,omitempty\"`\n\tGoogleOAuth2Json                   string `json:\"google_oauth2_json,omitempty\" bson:\"google_oauth2_json,omitempty\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/notification_request_v2.go",
    "content": "package models\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype NotificationRequestV2 struct {\n\tany                                `collection:\"notification_requests\"`\n\tBaseModelV2[NotificationRequestV2] `bson:\",inline\"`\n\tStatus                             string                 `json:\"status\" bson:\"status\"`\n\tError                              string                 `json:\"error,omitempty\" bson:\"error,omitempty\"`\n\tTitle                              string                 `json:\"title\" bson:\"title\"`\n\tContent                            string                 `json:\"content\" bson:\"content\"`\n\tSenderEmail                        string                 `json:\"sender_email,omitempty\" bson:\"sender_email,omitempty\"`\n\tSenderName                         string                 `json:\"sender_name,omitempty\" bson:\"sender_name,omitempty\"`\n\tMailTo                             []string               `json:\"mail_to,omitempty\" bson:\"mail_to,omitempty\"`\n\tMailCc                             []string               `json:\"mail_cc,omitempty\" bson:\"mail_cc,omitempty\"`\n\tMailBcc                            []string               `json:\"mail_bcc,omitempty\" bson:\"mail_bcc,omitempty\"`\n\tSettingId                          primitive.ObjectID     `json:\"setting_id\" bson:\"setting_id\"`\n\tChannelId                          primitive.ObjectID     `json:\"channel_id\" bson:\"channel_id\"`\n\tSetting                            *NotificationSettingV2 `json:\"setting,omitempty\" bson:\"-\"`\n\tChannel                            *NotificationChannelV2 `json:\"channel,omitempty\" bson:\"-\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/notification_setting_v2.go",
    "content": "package models\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype NotificationSettingV2 struct {\n\tany                                `collection:\"notification_settings\"`\n\tBaseModelV2[NotificationSettingV2] `bson:\",inline\"`\n\tName                               string `json:\"name\" bson:\"name\"`\n\tDescription                        string `json:\"description\" bson:\"description\"`\n\tEnabled                            bool   `json:\"enabled\" bson:\"enabled\"`\n\n\tTitle                string `json:\"title,omitempty\" bson:\"title,omitempty\"`\n\tTemplate             string `json:\"template\" bson:\"template\"`\n\tTemplateMode         string `json:\"template_mode\" bson:\"template_mode\"`\n\tTemplateMarkdown     string `json:\"template_markdown,omitempty\" bson:\"template_markdown,omitempty\"`\n\tTemplateRichText     string `json:\"template_rich_text,omitempty\" bson:\"template_rich_text,omitempty\"`\n\tTemplateRichTextJson string `json:\"template_rich_text_json,omitempty\" bson:\"template_rich_text_json,omitempty\"`\n\tTemplateTheme        string `json:\"template_theme,omitempty\" bson:\"template_theme,omitempty\"`\n\n\tTaskTrigger string `json:\"task_trigger\" bson:\"task_trigger\"`\n\tTrigger     string `json:\"trigger\" bson:\"trigger\"`\n\n\tSenderEmail          string   `json:\"sender_email,omitempty\" bson:\"sender_email,omitempty\"`\n\tUseCustomSenderEmail bool     `json:\"use_custom_sender_email,omitempty\" bson:\"use_custom_sender_email,omitempty\"`\n\tSenderName           string   `json:\"sender_name,omitempty\" bson:\"sender_name,omitempty\"`\n\tMailTo               []string `json:\"mail_to,omitempty\" bson:\"mail_to,omitempty\"`\n\tMailCc               []string `json:\"mail_cc,omitempty\" bson:\"mail_cc,omitempty\"`\n\tMailBcc              []string `json:\"mail_bcc,omitempty\" bson:\"mail_bcc,omitempty\"`\n\n\tChannelIds []primitive.ObjectID    `json:\"channel_ids,omitempty\" bson:\"channel_ids,omitempty\"`\n\tChannels   []NotificationChannelV2 `json:\"channels,omitempty\" bson:\"-\"`\n\n\tAlertId primitive.ObjectID `json:\"alert_id,omitempty\" bson:\"alert_id,omitempty\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/permission_v2.go",
    "content": "package models\n\ntype PermissionV2 struct {\n\tany                       `collection:\"permissions\"`\n\tBaseModelV2[PermissionV2] `bson:\",inline\"`\n\tKey                       string   `json:\"key\" bson:\"key\"`\n\tName                      string   `json:\"name\" bson:\"name\"`\n\tDescription               string   `json:\"description\" bson:\"description\"`\n\tType                      string   `json:\"type\" bson:\"type\"`\n\tTarget                    []string `json:\"target\" bson:\"target\"`\n\tAllow                     []string `json:\"allow\" bson:\"allow\"`\n\tDeny                      []string `json:\"deny\" bson:\"deny\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/project_v2.go",
    "content": "package models\n\ntype ProjectV2 struct {\n\tany                    `collection:\"projects\"`\n\tBaseModelV2[ProjectV2] `bson:\",inline\"`\n\tName                   string `json:\"name\" bson:\"name\"`\n\tDescription            string `json:\"description\" bson:\"description\"`\n\tSpiders                int    `json:\"spiders\" bson:\"-\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/role_permission_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype RolePermissionV2 struct {\n\tany                           `collection:\"role_permissions\"`\n\tBaseModelV2[RolePermissionV2] `bson:\",inline\"`\n\tRoleId                        primitive.ObjectID `json:\"role_id\" bson:\"role_id\"`\n\tPermissionId                  primitive.ObjectID `json:\"permission_id\" bson:\"permission_id\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/role_v2.go",
    "content": "package models\n\ntype RoleV2 struct {\n\tany                 `collection:\"roles\"`\n\tBaseModelV2[RoleV2] `bson:\",inline\"`\n\tKey                 string `json:\"key\" bson:\"key\"`\n\tName                string `json:\"name\" bson:\"name\"`\n\tDescription         string `json:\"description\" bson:\"description\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/schedule_v2.go",
    "content": "package models\n\nimport (\n\t\"github.com/robfig/cron/v3\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype ScheduleV2 struct {\n\tany                     `collection:\"schedules\"`\n\tBaseModelV2[ScheduleV2] `bson:\",inline\"`\n\tName                    string               `json:\"name\" bson:\"name\"`\n\tDescription             string               `json:\"description\" bson:\"description\"`\n\tSpiderId                primitive.ObjectID   `json:\"spider_id\" bson:\"spider_id\"`\n\tCron                    string               `json:\"cron\" bson:\"cron\"`\n\tEntryId                 cron.EntryID         `json:\"entry_id\" bson:\"entry_id\"`\n\tCmd                     string               `json:\"cmd\" bson:\"cmd\"`\n\tParam                   string               `json:\"param\" bson:\"param\"`\n\tMode                    string               `json:\"mode\" bson:\"mode\"`\n\tNodeIds                 []primitive.ObjectID `json:\"node_ids\" bson:\"node_ids\"`\n\tPriority                int                  `json:\"priority\" bson:\"priority\"`\n\tEnabled                 bool                 `json:\"enabled\" bson:\"enabled\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/setting_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson\"\n)\n\ntype SettingV2 struct {\n\tany                    `collection:\"settings\"`\n\tBaseModelV2[SettingV2] `bson:\",inline\"`\n\tKey                    string `json:\"key\" bson:\"key\"`\n\tValue                  bson.M `json:\"value\" bson:\"value\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/spider_stat_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype SpiderStatV2 struct {\n\tany                       `collection:\"spider_stats\"`\n\tBaseModelV2[SpiderStatV2] `bson:\",inline\"`\n\tLastTaskId                primitive.ObjectID `json:\"last_task_id\" bson:\"last_task_id,omitempty\"`\n\tLastTask                  *TaskV2            `json:\"last_task,omitempty\" bson:\"-\"`\n\tTasks                     int                `json:\"tasks\" bson:\"tasks\"`\n\tResults                   int                `json:\"results\" bson:\"results\"`\n\tWaitDuration              int64              `json:\"wait_duration\" bson:\"wait_duration,omitempty\"`       // in second\n\tRuntimeDuration           int64              `json:\"runtime_duration\" bson:\"runtime_duration,omitempty\"` // in second\n\tTotalDuration             int64              `json:\"total_duration\" bson:\"total_duration,omitempty\"`     // in second\n\tAverageWaitDuration       int64              `json:\"average_wait_duration\" bson:\"-\"`                     // in second\n\tAverageRuntimeDuration    int64              `json:\"average_runtime_duration\" bson:\"-\"`                  // in second\n\tAverageTotalDuration      int64              `json:\"average_total_duration\" bson:\"-\"`                    // in second\n}\n"
  },
  {
    "path": "core/models/models/v2/spider_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype SpiderV2 struct {\n\tany                   `collection:\"spiders\"`\n\tBaseModelV2[SpiderV2] `bson:\",inline\"`\n\tName                  string               `json:\"name\" bson:\"name\"`                     // spider name\n\tColId                 primitive.ObjectID   `json:\"col_id\" bson:\"col_id\"`                 // data collection id (deprecated) # TODO: remove this field in the future\n\tColName               string               `json:\"col_name,omitempty\" bson:\"col_name\"`   // data collection name\n\tDataSourceId          primitive.ObjectID   `json:\"data_source_id\" bson:\"data_source_id\"` // data source id\n\tDataSource            *DatabaseV2          `json:\"data_source,omitempty\" bson:\"-\"`       // data source\n\tDescription           string               `json:\"description\" bson:\"description\"`       // description\n\tProjectId             primitive.ObjectID   `json:\"project_id\" bson:\"project_id\"`         // Project.Id\n\tMode                  string               `json:\"mode\" bson:\"mode\"`                     // default Task.Mode\n\tNodeIds               []primitive.ObjectID `json:\"node_ids\" bson:\"node_ids\"`             // default Task.NodeIds\n\tGitId                 primitive.ObjectID   `json:\"git_id\" bson:\"git_id\"`                 // related Git.Id\n\tGitRootPath           string               `json:\"git_root_path\" bson:\"git_root_path\"`\n\tGit                   *GitV2               `json:\"git,omitempty\" bson:\"-\"`\n\n\t// stats\n\tStat *SpiderStatV2 `json:\"stat,omitempty\" bson:\"-\"`\n\n\t// execution\n\tCmd         string `json:\"cmd\" bson:\"cmd\"`     // execute command\n\tParam       string `json:\"param\" bson:\"param\"` // default task param\n\tPriority    int    `json:\"priority\" bson:\"priority\"`\n\tAutoInstall bool   `json:\"auto_install\" bson:\"auto_install\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/task_queue_item_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype TaskQueueItemV2 struct {\n\tany                          `collection:\"task_queue\"`\n\tBaseModelV2[TaskQueueItemV2] `bson:\",inline\"`\n\tPriority                     int                `json:\"p\" bson:\"p\"`\n\tNodeId                       primitive.ObjectID `json:\"nid,omitempty\" bson:\"nid,omitempty\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/task_stat_v2.go",
    "content": "package models\n\nimport (\n\t\"time\"\n)\n\ntype TaskStatV2 struct {\n\tany                     `collection:\"task_stats\"`\n\tBaseModelV2[TaskStatV2] `bson:\",inline\"`\n\tStartTs                 time.Time `json:\"start_ts\" bson:\"start_ts,omitempty\"`\n\tEndTs                   time.Time `json:\"end_ts\" bson:\"end_ts,omitempty\"`\n\tWaitDuration            int64     `json:\"wait_duration\" bson:\"wait_duration,omitempty\"`       // in millisecond\n\tRuntimeDuration         int64     `json:\"runtime_duration\" bson:\"runtime_duration,omitempty\"` // in millisecond\n\tTotalDuration           int64     `json:\"total_duration\" bson:\"total_duration,omitempty\"`     // in millisecond\n\tResultCount             int64     `json:\"result_count\" bson:\"result_count\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/task_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype TaskV2 struct {\n\tany                 `collection:\"tasks\"`\n\tBaseModelV2[TaskV2] `bson:\",inline\"`\n\tSpiderId            primitive.ObjectID   `json:\"spider_id\" bson:\"spider_id\"`\n\tStatus              string               `json:\"status\" bson:\"status\"`\n\tNodeId              primitive.ObjectID   `json:\"node_id\" bson:\"node_id\"`\n\tCmd                 string               `json:\"cmd\" bson:\"cmd\"`\n\tParam               string               `json:\"param\" bson:\"param\"`\n\tError               string               `json:\"error\" bson:\"error\"`\n\tPid                 int                  `json:\"pid\" bson:\"pid\"`\n\tScheduleId          primitive.ObjectID   `json:\"schedule_id\" bson:\"schedule_id\"`\n\tType                string               `json:\"type\" bson:\"type\"`\n\tMode                string               `json:\"mode\" bson:\"mode\"`\n\tNodeIds             []primitive.ObjectID `json:\"node_ids\" bson:\"node_ids\"`\n\tParentId            primitive.ObjectID   `json:\"parent_id\" bson:\"parent_id\"`\n\tPriority            int                  `json:\"priority\" bson:\"priority\"`\n\tStat                *TaskStatV2          `json:\"stat,omitempty\" bson:\"-\"`\n\tHasSub              bool                 `json:\"has_sub\" json:\"has_sub\"`\n\tSubTasks            []TaskV2             `json:\"sub_tasks,omitempty\" bson:\"-\"`\n\tSpider              *SpiderV2            `json:\"spider,omitempty\" bson:\"-\"`\n\tUserId              primitive.ObjectID   `json:\"-\" bson:\"-\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/test_v2.go",
    "content": "package models\n\ntype TestModelV2 struct {\n\tany                      `collection:\"testmodels\"`\n\tBaseModelV2[TestModelV2] `bson:\",inline\"`\n\tName                     string `json:\"name\" bson:\"name\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/token_v2.go",
    "content": "package models\n\ntype TokenV2 struct {\n\tany                  `collection:\"tokens\"`\n\tBaseModelV2[TokenV2] `bson:\",inline\"`\n\tName                 string `json:\"name\" bson:\"name\"`\n\tToken                string `json:\"token\" bson:\"token\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/user_role_v2.go",
    "content": "package models\n\nimport (\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype UserRoleV2 struct {\n\tany                     `collection:\"user_roles\"`\n\tBaseModelV2[UserRoleV2] `bson:\",inline\"`\n\tRoleId                  primitive.ObjectID `json:\"role_id\" bson:\"role_id\"`\n\tUserId                  primitive.ObjectID `json:\"user_id\" bson:\"user_id\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/user_v2.go",
    "content": "package models\n\ntype UserV2 struct {\n\tany                 `collection:\"users\"`\n\tBaseModelV2[UserV2] `bson:\",inline\"`\n\tUsername            string `json:\"username\" bson:\"username\"`\n\tPassword            string `json:\"-,omitempty\" bson:\"password\"`\n\tRole                string `json:\"role\" bson:\"role\"`\n\tEmail               string `json:\"email\" bson:\"email\"`\n}\n"
  },
  {
    "path": "core/models/models/v2/variable_v2.go",
    "content": "package models\n\ntype VariableV2 struct {\n\tany                     `collection:\"variables\"`\n\tBaseModelV2[VariableV2] `bson:\",inline\"`\n\tKey                     string `json:\"key\" bson:\"key\"`\n\tValue                   string `json:\"value\" bson:\"value\"`\n\tRemark                  string `json:\"remark\" bson:\"remark\"`\n}\n"
  },
  {
    "path": "core/models/models/variable.go",
    "content": "package models\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Variable struct {\n\tId     primitive.ObjectID `json:\"_id\" bson:\"_id\"`\n\tKey    string             `json:\"key\" bson:\"key\"`\n\tValue  string             `json:\"value\" bson:\"value\"`\n\tRemark string             `json:\"remark\" bson:\"remark\"`\n}\n\nfunc (v *Variable) GetId() (id primitive.ObjectID) {\n\treturn v.Id\n}\n\nfunc (v *Variable) SetId(id primitive.ObjectID) {\n\tv.Id = id\n}\n\ntype VariableList []Variable\n\nfunc (l *VariableList) GetModels() (res []interfaces.Model) {\n\tfor i := range *l {\n\t\td := (*l)[i]\n\t\tres = append(res, &d)\n\t}\n\treturn res\n}\n"
  },
  {
    "path": "core/models/service/artifact_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeArtifact(d interface{}, err error) (res *models2.Artifact, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Artifact)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetArtifactById(id primitive.ObjectID) (res *models2.Artifact, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdArtifact).GetById(id)\n\treturn convertTypeArtifact(d, err)\n}\n\nfunc (svc *Service) GetArtifact(query bson.M, opts *mongo.FindOptions) (res *models2.Artifact, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdArtifact).Get(query, opts)\n\treturn convertTypeArtifact(d, err)\n}\n\nfunc (svc *Service) GetArtifactList(query bson.M, opts *mongo.FindOptions) (res []models2.Artifact, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdArtifact).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Artifact)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/base_service.go",
    "content": "package service\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"reflect\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype BaseService struct {\n\tid  interfaces.ModelId\n\tcol *mongo.Col\n}\n\nfunc (svc *BaseService) GetModelId() (id interfaces.ModelId) {\n\treturn svc.id\n}\n\nfunc (svc *BaseService) SetModelId(id interfaces.ModelId) {\n\tsvc.id = id\n}\n\nfunc (svc *BaseService) GetCol() (col *mongo.Col) {\n\treturn svc.col\n}\n\nfunc (svc *BaseService) SetCol(col *mongo.Col) {\n\tsvc.col = col\n}\n\nfunc (svc *BaseService) GetById(id primitive.ObjectID) (res interfaces.Model, err error) {\n\t// find result\n\tfr := svc.findId(id)\n\n\t// bind\n\treturn NewBasicBinder(svc.id, fr).Bind()\n}\n\nfunc (svc *BaseService) Get(query bson.M, opts *mongo.FindOptions) (res interfaces.Model, err error) {\n\t// find result\n\tfr := svc.find(query, opts)\n\n\t// bind\n\treturn NewBasicBinder(svc.id, fr).Bind()\n}\n\nfunc (svc *BaseService) GetList(query bson.M, opts *mongo.FindOptions) (l interfaces.List, err error) {\n\t// find result\n\ttic := time.Now()\n\tlog.Debugf(\"baseService.GetMany -> svc.find:start\")\n\tlog.Debugf(\"baseService.GetMany -> svc.id: %v\", svc.id)\n\tlog.Debugf(\"baseService.GetMany -> svc.col.GetName(): %v\", svc.col.GetName())\n\tlog.Debugf(\"baseService.GetMany -> query: %v\", query)\n\tlog.Debugf(\"baseService.GetMany -> opts: %v\", opts)\n\tfr := svc.find(query, opts)\n\tlog.Debugf(\"baseService.GetMany -> svc.find:end. elapsed: %d ms\", time.Now().Sub(tic).Milliseconds())\n\n\t// bind\n\treturn NewListBinder(svc.id, fr).Bind()\n}\n\nfunc (svc *BaseService) DeleteById(id primitive.ObjectID, args ...interface{}) (err error) {\n\treturn svc.deleteId(id, args...)\n}\n\nfunc (svc *BaseService) Delete(query bson.M, args ...interface{}) (err error) {\n\treturn svc.delete(query)\n}\n\nfunc (svc *BaseService) DeleteList(query bson.M, args ...interface{}) (err error) {\n\treturn svc.deleteList(query)\n}\n\nfunc (svc *BaseService) ForceDeleteList(query bson.M, args ...interface{}) (err error) {\n\treturn svc.forceDeleteList(query)\n}\n\nfunc (svc *BaseService) UpdateById(id primitive.ObjectID, update bson.M, args ...interface{}) (err error) {\n\treturn svc.updateId(id, update)\n}\n\nfunc (svc *BaseService) Update(query bson.M, update bson.M, fields []string, args ...interface{}) (err error) {\n\treturn svc.update(query, update, fields)\n}\n\nfunc (svc *BaseService) UpdateDoc(query bson.M, doc interfaces.Model, fields []string, args ...interface{}) (err error) {\n\treturn svc.update(query, doc, fields)\n}\n\nfunc (svc *BaseService) Insert(u interfaces.User, docs ...interface{}) (err error) {\n\tlog.Debugf(\"baseService.Insert -> svc.col.GetName(): %v\", svc.col.GetName())\n\tlog.Debugf(\"baseService.Insert -> docs: %v\", docs)\n\treturn svc.insert(u, docs...)\n}\n\nfunc (svc *BaseService) Count(query bson.M) (total int, err error) {\n\treturn svc.count(query)\n}\n\nfunc (svc *BaseService) findId(id primitive.ObjectID) (fr *mongo.FindResult) {\n\tif svc.col == nil {\n\t\treturn mongo.NewFindResultWithError(constants.ErrMissingCol)\n\t}\n\treturn svc.col.FindId(id)\n}\n\nfunc (svc *BaseService) find(query bson.M, opts *mongo.FindOptions) (fr *mongo.FindResult) {\n\tif svc.col == nil {\n\t\treturn mongo.NewFindResultWithError(constants.ErrMissingCol)\n\t}\n\treturn svc.col.Find(query, opts)\n}\n\nfunc (svc *BaseService) deleteId(id primitive.ObjectID, args ...interface{}) (err error) {\n\tif svc.col == nil {\n\t\treturn trace.TraceError(constants.ErrMissingCol)\n\t}\n\tfr := svc.findId(id)\n\tdoc, err := NewBasicBinder(svc.id, fr).Bind()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn delegate.NewModelDelegate(doc, svc._getUserFromArgs(args...)).Delete()\n}\n\nfunc (svc *BaseService) delete(query bson.M, args ...interface{}) (err error) {\n\tif svc.col == nil {\n\t\treturn trace.TraceError(constants.ErrMissingCol)\n\t}\n\tvar doc models2.BaseModel\n\tif err := svc.find(query, nil).One(&doc); err != nil {\n\t\treturn err\n\t}\n\treturn svc.deleteId(doc.Id, svc._getUserFromArgs(args...))\n}\n\nfunc (svc *BaseService) deleteList(query bson.M, args ...interface{}) (err error) {\n\tif svc.col == nil {\n\t\treturn trace.TraceError(constants.ErrMissingCol)\n\t}\n\tfr := svc.find(query, nil)\n\tlist, err := NewListBinder(svc.id, fr).Bind()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, doc := range list.GetModels() {\n\t\tif err := delegate.NewModelDelegate(doc, svc._getUserFromArgs(args...)).Delete(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (svc *BaseService) forceDeleteList(query bson.M, args ...interface{}) (err error) {\n\treturn svc.col.Delete(query)\n}\n\nfunc (svc *BaseService) count(query bson.M) (total int, err error) {\n\tif svc.col == nil {\n\t\treturn total, trace.TraceError(constants.ErrMissingCol)\n\t}\n\treturn svc.col.Count(query)\n}\n\nfunc (svc *BaseService) update(query bson.M, update interface{}, fields []string, args ...interface{}) (err error) {\n\tupdate, err = svc._getUpdateBsonM(update, fields)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn svc._update(query, update, svc._getUserFromArgs(args...))\n}\n\nfunc (svc *BaseService) updateId(id primitive.ObjectID, update interface{}, args ...interface{}) (err error) {\n\tupdate, err = svc._getUpdateBsonM(update, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn svc._updateById(id, update, svc._getUserFromArgs(args...))\n}\n\nfunc (svc *BaseService) insert(u interfaces.User, docs ...interface{}) (err error) {\n\t// validate col\n\tif svc.col == nil {\n\t\treturn trace.TraceError(constants.ErrMissingCol)\n\t}\n\n\t// iterate docs\n\tfor i, doc := range docs {\n\t\tswitch doc.(type) {\n\t\tcase map[string]interface{}:\n\t\t\t// doc type: map[string]interface{}, need to handle _id\n\t\t\td := doc.(map[string]interface{})\n\t\t\tvId, ok := d[\"_id\"]\n\t\t\tif !ok {\n\t\t\t\t// _id not exists\n\t\t\t\td[\"_id\"] = primitive.NewObjectID()\n\t\t\t} else {\n\t\t\t\t// _id exists\n\t\t\t\tswitch vId.(type) {\n\t\t\t\tcase string:\n\t\t\t\t\t// _id type: string\n\t\t\t\t\tsId, ok := vId.(string)\n\t\t\t\t\tif ok {\n\t\t\t\t\t\td[\"_id\"], err = primitive.ObjectIDFromHex(sId)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn trace.TraceError(err)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tcase primitive.ObjectID:\n\t\t\t\t\t// _id type: primitive.ObjectID\n\t\t\t\t\t// do nothing\n\t\t\t\tdefault:\n\t\t\t\t\treturn trace.TraceError(errors.ErrorModelInvalidType)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdocs[i] = doc\n\t}\n\n\t// perform insert\n\tids, err := svc.col.InsertMany(docs)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// upsert artifacts\n\tquery := bson.M{\n\t\t\"_id\": bson.M{\n\t\t\t\"$in\": ids,\n\t\t},\n\t}\n\tfr := svc.col.Find(query, nil)\n\tlist, err := NewListBinder(svc.id, fr).Bind()\n\tfor _, doc := range list.GetModels() {\n\t\t// upsert artifact when performing model delegate save\n\t\tif err := delegate.NewModelDelegate(doc, u).Save(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (svc *BaseService) _update(query bson.M, update interface{}, args ...interface{}) (err error) {\n\t// ids of query\n\tvar ids []primitive.ObjectID\n\tlist, err := NewListBinder(svc.id, svc.find(query, nil)).Bind()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, doc := range list.GetModels() {\n\t\tids = append(ids, doc.GetId())\n\t}\n\n\t// update model objects\n\tif err := svc.col.Update(query, update); err != nil {\n\t\treturn err\n\t}\n\n\t// update artifacts\n\tu := svc._getUserFromArgs(args...)\n\treturn mongo.GetMongoCol(interfaces.ModelColNameArtifact).Update(query, svc._getUpdateArtifactUpdate(u))\n}\n\nfunc (svc *BaseService) _updateById(id primitive.ObjectID, update interface{}, args ...interface{}) (err error) {\n\t// update model object\n\tif err := svc.col.UpdateId(id, update); err != nil {\n\t\treturn err\n\t}\n\n\t// update artifact\n\tu := svc._getUserFromArgs(args...)\n\treturn mongo.GetMongoCol(interfaces.ModelColNameArtifact).UpdateId(id, svc._getUpdateArtifactUpdate(u))\n}\n\nfunc (svc *BaseService) _getUpdateBsonM(update interface{}, fields []string) (res bson.M, err error) {\n\tswitch update.(type) {\n\tcase interfaces.Model:\n\t\t// convert to bson.M\n\t\tvar updateBsonM bson.M\n\t\tbytes, err := json.Marshal(&update)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err := json.Unmarshal(bytes, &updateBsonM); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn svc._getUpdateBsonM(updateBsonM, fields)\n\n\tcase bson.M:\n\t\t// convert to bson.M\n\t\tupdateBsonM := update.(bson.M)\n\n\t\t// filter fields if not nil\n\t\tif fields != nil {\n\t\t\t// fields map\n\t\t\tfieldsMap := map[string]bool{}\n\t\t\tfor _, f := range fields {\n\t\t\t\tfieldsMap[f] = true\n\t\t\t}\n\n\t\t\t// remove unselected fields\n\t\t\tfor k := range updateBsonM {\n\t\t\t\tif _, ok := fieldsMap[k]; !ok {\n\t\t\t\t\tdelete(updateBsonM, k)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// normalize update bson.M\n\t\tif !svc._containsDollar(updateBsonM) {\n\t\t\tif _, ok := updateBsonM[\"$set\"]; !ok {\n\t\t\t\tupdateBsonM = bson.M{\n\t\t\t\t\t\"$set\": updateBsonM,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn updateBsonM, nil\n\t}\n\n\tv := reflect.ValueOf(update)\n\tswitch v.Kind() {\n\tcase reflect.Struct:\n\t\tif v.CanAddr() {\n\t\t\tupdate = v.Addr().Interface()\n\t\t\treturn svc._getUpdateBsonM(update, fields)\n\t\t}\n\t\treturn nil, errors.ErrorModelInvalidType\n\tdefault:\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n}\n\nfunc (svc *BaseService) _getUpdateArtifactUpdate(u interfaces.User) (res bson.M) {\n\tvar uid primitive.ObjectID\n\tif u != nil {\n\t\tuid = u.GetId()\n\t}\n\treturn bson.M{\n\t\t\"$set\": bson.M{\n\t\t\t\"_sys.update_ts\":  time.Now(),\n\t\t\t\"_sys.update_uid\": uid,\n\t\t},\n\t}\n}\n\nfunc (svc *BaseService) _getUserFromArgs(args ...interface{}) (u interfaces.User) {\n\treturn utils.GetUserFromArgs(args...)\n}\n\nfunc (svc *BaseService) _containsDollar(updateBsonM bson.M) (ok bool) {\n\tfor k := range updateBsonM {\n\t\tif strings.HasPrefix(k, \"$\") {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc NewBaseService(id interfaces.ModelId, opts ...BaseServiceOption) (svc2 interfaces.ModelBaseService) {\n\t// service\n\tsvc := &BaseService{\n\t\tid: id,\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(svc)\n\t}\n\n\t// get collection name if not set\n\tif svc.GetCol() == nil {\n\t\tcolName := models2.GetModelColName(id)\n\t\tsvc.SetCol(mongo.GetMongoCol(colName))\n\t}\n\n\treturn svc\n}\n\nvar store = sync.Map{}\n\nfunc GetBaseService(id interfaces.ModelId) (svc interfaces.ModelBaseService) {\n\tres, ok := store.Load(id)\n\tif ok {\n\t\tsvc, ok = res.(interfaces.ModelBaseService)\n\t\tif ok {\n\t\t\treturn svc\n\t\t}\n\t}\n\tsvc = NewBaseService(id)\n\tstore.Store(id, svc)\n\treturn svc\n}\n\nfunc GetBaseServiceByColName(id interfaces.ModelId, colName string) (svc interfaces.ModelBaseService) {\n\tres, ok := store.Load(colName)\n\tif ok {\n\t\tsvc, ok = res.(interfaces.ModelBaseService)\n\t\tif ok {\n\t\t\treturn svc\n\t\t}\n\t}\n\tcol := mongo.GetMongoCol(colName)\n\tsvc = NewBaseService(id, WithBaseServiceCol(col))\n\tstore.Store(colName, svc)\n\treturn svc\n}\n"
  },
  {
    "path": "core/models/service/base_service_v2.go",
    "content": "package service\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"go.mongodb.org/mongo-driver/mongo/options\"\n\t\"reflect\"\n\t\"sync\"\n\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nvar (\n\tinstanceMap    = make(map[string]any)\n\tonceMap        = make(map[string]*sync.Once)\n\tonceColNameMap = make(map[string]*sync.Once)\n\tmu             sync.Mutex\n)\n\ntype ModelServiceV2[T any] struct {\n\tcol *mongo.Col\n}\n\nfunc (svc *ModelServiceV2[T]) GetById(id primitive.ObjectID) (model *T, err error) {\n\tvar result T\n\terr = svc.col.FindId(id).One(&result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &result, nil\n}\n\nfunc (svc *ModelServiceV2[T]) GetByIdContext(ctx context.Context, id primitive.ObjectID) (model *T, err error) {\n\tvar result T\n\terr = svc.col.GetCollection().FindOne(ctx, bson.M{\"_id\": id}).Decode(&result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &result, nil\n}\n\nfunc (svc *ModelServiceV2[T]) GetOne(query bson.M, options *mongo.FindOptions) (model *T, err error) {\n\tvar result T\n\terr = svc.col.Find(query, options).One(&result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &result, nil\n}\n\nfunc (svc *ModelServiceV2[T]) GetOneContext(ctx context.Context, query bson.M, opts *mongo.FindOptions) (model *T, err error) {\n\tvar result T\n\t_opts := &options.FindOneOptions{}\n\tif opts != nil {\n\t\tif opts.Skip != 0 {\n\t\t\tskipInt64 := int64(opts.Skip)\n\t\t\t_opts.Skip = &skipInt64\n\t\t}\n\t\tif opts.Sort != nil {\n\t\t\t_opts.Sort = opts.Sort\n\t\t}\n\t}\n\terr = svc.col.GetCollection().FindOne(ctx, query, _opts).Decode(&result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &result, nil\n}\n\nfunc (svc *ModelServiceV2[T]) GetMany(query bson.M, options *mongo.FindOptions) (models []T, err error) {\n\tvar result []T\n\terr = svc.col.Find(query, options).All(&result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn result, nil\n}\n\nfunc (svc *ModelServiceV2[T]) GetManyContext(ctx context.Context, query bson.M, opts *mongo.FindOptions) (models []T, err error) {\n\tvar result []T\n\t_opts := &options.FindOptions{}\n\tif opts != nil {\n\t\tif opts.Skip != 0 {\n\t\t\tskipInt64 := int64(opts.Skip)\n\t\t\t_opts.Skip = &skipInt64\n\t\t}\n\t\tif opts.Limit != 0 {\n\t\t\tlimitInt64 := int64(opts.Limit)\n\t\t\t_opts.Limit = &limitInt64\n\t\t}\n\t\tif opts.Sort != nil {\n\t\t\t_opts.Sort = opts.Sort\n\t\t}\n\t}\n\tcur, err := svc.col.GetCollection().Find(ctx, query, _opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer cur.Close(ctx)\n\tfor cur.Next(ctx) {\n\t\tvar model T\n\t\tif err := cur.Decode(&model); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tresult = append(result, model)\n\t}\n\treturn result, nil\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteById(id primitive.ObjectID) (err error) {\n\treturn svc.col.DeleteId(id)\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteByIdContext(ctx context.Context, id primitive.ObjectID) (err error) {\n\t_, err = svc.col.GetCollection().DeleteOne(ctx, bson.M{\"_id\": id})\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteOne(query bson.M) (err error) {\n\t_, err = svc.col.GetCollection().DeleteOne(svc.col.GetContext(), query)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteOneContext(ctx context.Context, query bson.M) (err error) {\n\t_, err = svc.col.GetCollection().DeleteOne(ctx, query)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteMany(query bson.M) (err error) {\n\t_, err = svc.col.GetCollection().DeleteMany(svc.col.GetContext(), query, nil)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) DeleteManyContext(ctx context.Context, query bson.M) (err error) {\n\t_, err = svc.col.GetCollection().DeleteMany(ctx, query, nil)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateById(id primitive.ObjectID, update bson.M) (err error) {\n\treturn svc.col.UpdateId(id, update)\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateByIdContext(ctx context.Context, id primitive.ObjectID, update bson.M) (err error) {\n\t_, err = svc.col.GetCollection().UpdateOne(ctx, bson.M{\"_id\": id}, update)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateOne(query bson.M, update bson.M) (err error) {\n\t_, err = svc.col.GetCollection().UpdateOne(svc.col.GetContext(), query, update)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateOneContext(ctx context.Context, query bson.M, update bson.M) (err error) {\n\t_, err = svc.col.GetCollection().UpdateOne(ctx, query, update)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateMany(query bson.M, update bson.M) (err error) {\n\t_, err = svc.col.GetCollection().UpdateMany(svc.col.GetContext(), query, update)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) UpdateManyContext(ctx context.Context, query bson.M, update bson.M) (err error) {\n\t_, err = svc.col.GetCollection().UpdateMany(ctx, query, update)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) ReplaceById(id primitive.ObjectID, model T) (err error) {\n\t_, err = svc.col.GetCollection().ReplaceOne(svc.col.GetContext(), bson.M{\"_id\": id}, model)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) ReplaceByIdContext(ctx context.Context, id primitive.ObjectID, model T) (err error) {\n\t_, err = svc.col.GetCollection().ReplaceOne(ctx, bson.M{\"_id\": id}, model)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) ReplaceOne(query bson.M, model T) (err error) {\n\t_, err = svc.col.GetCollection().ReplaceOne(svc.col.GetContext(), query, model)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) ReplaceOneContext(ctx context.Context, query bson.M, model T) (err error) {\n\t_, err = svc.col.GetCollection().ReplaceOne(ctx, query, model)\n\treturn err\n}\n\nfunc (svc *ModelServiceV2[T]) InsertOne(model T) (id primitive.ObjectID, err error) {\n\tm := any(&model).(interfaces.Model)\n\tif m.GetId().IsZero() {\n\t\tm.SetId(primitive.NewObjectID())\n\t}\n\tres, err := svc.col.GetCollection().InsertOne(svc.col.GetContext(), m)\n\tif err != nil {\n\t\treturn primitive.NilObjectID, err\n\t}\n\treturn res.InsertedID.(primitive.ObjectID), nil\n}\n\nfunc (svc *ModelServiceV2[T]) InsertOneContext(ctx context.Context, model T) (id primitive.ObjectID, err error) {\n\tm := any(&model).(interfaces.Model)\n\tif m.GetId().IsZero() {\n\t\tm.SetId(primitive.NewObjectID())\n\t}\n\tres, err := svc.col.GetCollection().InsertOne(ctx, m)\n\tif err != nil {\n\t\treturn primitive.NilObjectID, err\n\t}\n\treturn res.InsertedID.(primitive.ObjectID), nil\n}\n\nfunc (svc *ModelServiceV2[T]) InsertMany(models []T) (ids []primitive.ObjectID, err error) {\n\tvar _models []any\n\tfor _, model := range models {\n\t\tm := any(&model).(interfaces.Model)\n\t\tif m.GetId().IsZero() {\n\t\t\tm.SetId(primitive.NewObjectID())\n\t\t}\n\t\t_models = append(_models, m)\n\t}\n\tres, err := svc.col.GetCollection().InsertMany(svc.col.GetContext(), _models)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, v := range res.InsertedIDs {\n\t\tids = append(ids, v.(primitive.ObjectID))\n\t}\n\treturn ids, nil\n}\n\nfunc (svc *ModelServiceV2[T]) InsertManyContext(ctx context.Context, models []T) (ids []primitive.ObjectID, err error) {\n\tvar _models []any\n\tfor _, model := range models {\n\t\tm := any(&model).(interfaces.Model)\n\t\tif m.GetId().IsZero() {\n\t\t\tm.SetId(primitive.NewObjectID())\n\t\t}\n\t\t_models = append(_models, m)\n\t}\n\tres, err := svc.col.GetCollection().InsertMany(ctx, _models)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, v := range res.InsertedIDs {\n\t\tids = append(ids, v.(primitive.ObjectID))\n\t}\n\treturn ids, nil\n}\n\nfunc (svc *ModelServiceV2[T]) Count(query bson.M) (total int, err error) {\n\treturn svc.col.Count(query)\n}\n\nfunc (svc *ModelServiceV2[T]) GetCol() (col *mongo.Col) {\n\treturn svc.col\n}\n\nfunc GetCollectionNameByInstance(v any) string {\n\tt := reflect.TypeOf(v)\n\tfield := t.Field(0)\n\treturn field.Tag.Get(\"collection\")\n}\n\nfunc getCollectionName[T any]() string {\n\tvar instance T\n\tt := reflect.TypeOf(instance)\n\tfield := t.Field(0)\n\treturn field.Tag.Get(\"collection\")\n}\n\n// NewModelServiceV2 return singleton instance of ModelServiceV2\nfunc NewModelServiceV2[T any]() *ModelServiceV2[T] {\n\ttypeName := fmt.Sprintf(\"%T\", *new(T))\n\n\tmu.Lock()\n\tdefer mu.Unlock()\n\n\tif _, exists := onceMap[typeName]; !exists {\n\t\tonceMap[typeName] = new(sync.Once)\n\t}\n\n\tvar instance *ModelServiceV2[T]\n\n\tonceMap[typeName].Do(func() {\n\t\tcollectionName := getCollectionName[T]()\n\t\tcollection := mongo.GetMongoCol(collectionName)\n\t\tinstance = &ModelServiceV2[T]{col: collection}\n\t\tinstanceMap[typeName] = instance\n\t})\n\n\treturn instanceMap[typeName].(*ModelServiceV2[T])\n}\n\nfunc NewModelServiceV2WithColName[T any](colName string) *ModelServiceV2[T] {\n\tmu.Lock()\n\tdefer mu.Unlock()\n\n\tif _, exists := onceColNameMap[colName]; !exists {\n\t\tonceColNameMap[colName] = new(sync.Once)\n\t}\n\n\tvar instance *ModelServiceV2[T]\n\n\tonceColNameMap[colName].Do(func() {\n\t\tcollection := mongo.GetMongoCol(colName)\n\t\tinstance = &ModelServiceV2[T]{col: collection}\n\t\tinstanceMap[colName] = instance\n\t})\n\n\treturn instanceMap[colName].(*ModelServiceV2[T])\n}\n"
  },
  {
    "path": "core/models/service/base_service_v2_test.go",
    "content": "package service_test\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/spf13/viper\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"testing\"\n\t\"time\"\n)\n\ntype TestModel struct {\n\tId                            primitive.ObjectID `bson:\"_id,omitempty\" collection:\"testmodels\"`\n\tmodels.BaseModelV2[TestModel] `bson:\",inline\"`\n\tName                          string `bson:\"name\"`\n}\n\nfunc setupTestDB() {\n\tviper.Set(\"mongo.db\", \"testdb\")\n}\n\nfunc teardownTestDB() {\n\tdb := mongo.GetMongoDb(\"testdb\")\n\terr := db.Drop(context.Background())\n\tif err != nil {\n\t\treturn\n\t}\n}\n\nfunc TestModelServiceV2_GetById(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModel := TestModel{Name: \"Test Name\"}\n\n\tid, err := svc.InsertOne(testModel)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresult, err := svc.GetById(id)\n\trequire.Nil(t, err)\n\tassert.Equal(t, testModel.Name, result.Name)\n}\n\nfunc TestModelServiceV2_GetOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModel := TestModel{Name: \"Test Name\"}\n\n\t_, err := svc.InsertOne(testModel)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresult, err := svc.GetOne(bson.M{\"name\": \"Test Name\"}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, testModel.Name, result.Name)\n}\n\nfunc TestModelServiceV2_GetMany(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModels := []TestModel{\n\t\t{Name: \"Name1\"},\n\t\t{Name: \"Name2\"},\n\t}\n\n\t_, err := svc.InsertMany(testModels)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresults, err := svc.GetMany(bson.M{}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, 2, len(results))\n}\n\nfunc TestModelServiceV2_InsertOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModel := TestModel{Name: \"Test Name\"}\n\n\tid, err := svc.InsertOne(testModel)\n\trequire.Nil(t, err)\n\tassert.NotEqual(t, primitive.NilObjectID, id)\n}\n\nfunc TestModelServiceV2_InsertMany(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModels := []TestModel{\n\t\t{Name: \"Name1\"},\n\t\t{Name: \"Name2\"},\n\t}\n\n\tids, err := svc.InsertMany(testModels)\n\trequire.Nil(t, err)\n\tassert.Equal(t, 2, len(ids))\n}\n\nfunc TestModelServiceV2_UpdateById(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModel := TestModel{Name: \"Old Name\"}\n\n\tid, err := svc.InsertOne(testModel)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tupdate := bson.M{\"$set\": bson.M{\"name\": \"New Name\"}}\n\terr = svc.UpdateById(id, update)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresult, err := svc.GetById(id)\n\trequire.Nil(t, err)\n\tassert.Equal(t, \"New Name\", result.Name)\n}\n\nfunc TestModelServiceV2_UpdateOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModel := TestModel{Name: \"Old Name\"}\n\n\t_, err := svc.InsertOne(testModel)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tupdate := bson.M{\"$set\": bson.M{\"name\": \"New Name\"}}\n\terr = svc.UpdateOne(bson.M{\"name\": \"Old Name\"}, update)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresult, err := svc.GetOne(bson.M{\"name\": \"New Name\"}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, \"New Name\", result.Name)\n}\n\nfunc TestModelServiceV2_UpdateMany(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModels := []TestModel{\n\t\t{Name: \"Old Name1\"},\n\t\t{Name: \"Old Name2\"},\n\t}\n\n\t_, err := svc.InsertMany(testModels)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tupdate := bson.M{\"$set\": bson.M{\"name\": \"New Name\"}}\n\terr = svc.UpdateMany(bson.M{\"name\": bson.M{\"$regex\": \"^Old\"}}, update)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresults, err := svc.GetMany(bson.M{\"name\": \"New Name\"}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, 2, len(results))\n}\n\nfunc TestModelServiceV2_DeleteById(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModel := TestModel{Name: \"Test Name\"}\n\n\tid, err := svc.InsertOne(testModel)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\terr = svc.DeleteById(id)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresult, err := svc.GetById(id)\n\tassert.NotNil(t, err)\n\tassert.Nil(t, result)\n}\n\nfunc TestModelServiceV2_DeleteOne(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModel := TestModel{Name: \"Test Name\"}\n\n\t_, err := svc.InsertOne(testModel)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\terr = svc.DeleteOne(bson.M{\"name\": \"Test Name\"})\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresult, err := svc.GetOne(bson.M{\"name\": \"Test Name\"}, nil)\n\tassert.NotNil(t, err)\n\tassert.Nil(t, result)\n}\n\nfunc TestModelServiceV2_DeleteMany(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModels := []TestModel{\n\t\t{Name: \"Test Name1\"},\n\t\t{Name: \"Test Name2\"},\n\t}\n\n\t_, err := svc.InsertMany(testModels)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\terr = svc.DeleteMany(bson.M{\"name\": bson.M{\"$regex\": \"^Test Name\"}})\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\tresults, err := svc.GetMany(bson.M{\"name\": bson.M{\"$regex\": \"^Test Name\"}}, nil)\n\trequire.Nil(t, err)\n\tassert.Equal(t, 0, len(results))\n}\n\nfunc TestModelServiceV2_Count(t *testing.T) {\n\tsetupTestDB()\n\tdefer teardownTestDB()\n\n\tsvc := service.NewModelServiceV2[TestModel]()\n\ttestModels := []TestModel{\n\t\t{Name: \"Name1\"},\n\t\t{Name: \"Name2\"},\n\t}\n\n\t_, err := svc.InsertMany(testModels)\n\trequire.Nil(t, err)\n\ttime.Sleep(100 * time.Millisecond)\n\n\ttotal, err := svc.Count(bson.M{})\n\trequire.Nil(t, err)\n\tassert.Equal(t, 2, total)\n}\n"
  },
  {
    "path": "core/models/service/binder_basic.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n)\n\nfunc NewBasicBinder(id interfaces.ModelId, fr *mongo.FindResult) (b interfaces.ModelBinder) {\n\treturn &BasicBinder{\n\t\tid: id,\n\t\tfr: fr,\n\t\tm:  models.NewModelMap(),\n\t}\n}\n\ntype BasicBinder struct {\n\tid interfaces.ModelId\n\tfr *mongo.FindResult\n\tm  *models.ModelMap\n}\n\nfunc (b *BasicBinder) Bind() (res interfaces.Model, err error) {\n\tm := b.m\n\n\tswitch b.id {\n\tcase interfaces.ModelIdArtifact:\n\t\treturn b.Process(&m.Artifact)\n\tcase interfaces.ModelIdTag:\n\t\treturn b.Process(&m.Tag)\n\tcase interfaces.ModelIdNode:\n\t\treturn b.Process(&m.Node)\n\tcase interfaces.ModelIdProject:\n\t\treturn b.Process(&m.Project)\n\tcase interfaces.ModelIdSpider:\n\t\treturn b.Process(&m.Spider)\n\tcase interfaces.ModelIdTask:\n\t\treturn b.Process(&m.Task)\n\tcase interfaces.ModelIdJob:\n\t\treturn b.Process(&m.Job)\n\tcase interfaces.ModelIdSchedule:\n\t\treturn b.Process(&m.Schedule)\n\tcase interfaces.ModelIdUser:\n\t\treturn b.Process(&m.User)\n\tcase interfaces.ModelIdSetting:\n\t\treturn b.Process(&m.Setting)\n\tcase interfaces.ModelIdToken:\n\t\treturn b.Process(&m.Token)\n\tcase interfaces.ModelIdVariable:\n\t\treturn b.Process(&m.Variable)\n\tcase interfaces.ModelIdTaskQueue:\n\t\treturn b.Process(&m.TaskQueueItem)\n\tcase interfaces.ModelIdTaskStat:\n\t\treturn b.Process(&m.TaskStat)\n\tcase interfaces.ModelIdSpiderStat:\n\t\treturn b.Process(&m.SpiderStat)\n\tcase interfaces.ModelIdDataSource:\n\t\treturn b.Process(&m.DataSource)\n\tcase interfaces.ModelIdDataCollection:\n\t\treturn b.Process(&m.DataCollection)\n\tcase interfaces.ModelIdResult:\n\t\treturn b.Process(&m.Result)\n\tcase interfaces.ModelIdPassword:\n\t\treturn b.Process(&m.Password)\n\tcase interfaces.ModelIdExtraValue:\n\t\treturn b.Process(&m.ExtraValue)\n\tcase interfaces.ModelIdGit:\n\t\treturn b.Process(&m.Git)\n\tcase interfaces.ModelIdRole:\n\t\treturn b.Process(&m.Role)\n\tcase interfaces.ModelIdUserRole:\n\t\treturn b.Process(&m.UserRole)\n\tcase interfaces.ModelIdPermission:\n\t\treturn b.Process(&m.Permission)\n\tcase interfaces.ModelIdRolePermission:\n\t\treturn b.Process(&m.RolePermission)\n\tcase interfaces.ModelIdEnvironment:\n\t\treturn b.Process(&m.Environment)\n\tcase interfaces.ModelIdDependencySetting:\n\t\treturn b.Process(&m.DependencySetting)\n\tdefault:\n\t\treturn nil, errors.ErrorModelInvalidModelId\n\t}\n}\n\nfunc (b *BasicBinder) Process(d interfaces.Model) (res interfaces.Model, err error) {\n\tif err := b.fr.One(d); err != nil {\n\t\treturn nil, err\n\t}\n\treturn d, nil\n}\n"
  },
  {
    "path": "core/models/service/binder_list.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n)\n\nfunc NewListBinder(id interfaces.ModelId, fr *mongo.FindResult) (b interfaces.ModelListBinder) {\n\treturn &ListBinder{\n\t\tid: id,\n\t\tm:  models.NewModelListMap(),\n\t\tfr: fr,\n\t\tb:  NewBasicBinder(id, fr),\n\t}\n}\n\ntype ListBinder struct {\n\tid interfaces.ModelId\n\tm  *models.ModelListMap\n\tfr *mongo.FindResult\n\tb  interfaces.ModelBinder\n}\n\nfunc (b *ListBinder) Bind() (l interfaces.List, err error) {\n\tm := b.m\n\n\tswitch b.id {\n\tcase interfaces.ModelIdArtifact:\n\t\treturn b.Process(&m.Artifacts)\n\tcase interfaces.ModelIdTag:\n\t\treturn b.Process(&m.Tags)\n\tcase interfaces.ModelIdNode:\n\t\treturn b.Process(&m.Nodes)\n\tcase interfaces.ModelIdProject:\n\t\treturn b.Process(&m.Projects)\n\tcase interfaces.ModelIdSpider:\n\t\treturn b.Process(&m.Spiders)\n\tcase interfaces.ModelIdTask:\n\t\treturn b.Process(&m.Tasks)\n\tcase interfaces.ModelIdSchedule:\n\t\treturn b.Process(&m.Schedules)\n\tcase interfaces.ModelIdUser:\n\t\treturn b.Process(&m.Users)\n\tcase interfaces.ModelIdSetting:\n\t\treturn b.Process(&m.Settings)\n\tcase interfaces.ModelIdToken:\n\t\treturn b.Process(&m.Tokens)\n\tcase interfaces.ModelIdVariable:\n\t\treturn b.Process(&m.Variables)\n\tcase interfaces.ModelIdTaskQueue:\n\t\treturn b.Process(&m.TaskQueueItems)\n\tcase interfaces.ModelIdTaskStat:\n\t\treturn b.Process(&m.TaskStats)\n\tcase interfaces.ModelIdSpiderStat:\n\t\treturn b.Process(&m.SpiderStats)\n\tcase interfaces.ModelIdDataSource:\n\t\treturn b.Process(&m.DataSources)\n\tcase interfaces.ModelIdDataCollection:\n\t\treturn b.Process(&m.DataCollections)\n\tcase interfaces.ModelIdResult:\n\t\treturn b.Process(&m.Results)\n\tcase interfaces.ModelIdPassword:\n\t\treturn b.Process(&m.Passwords)\n\tcase interfaces.ModelIdExtraValue:\n\t\treturn b.Process(&m.ExtraValues)\n\tcase interfaces.ModelIdGit:\n\t\treturn b.Process(&m.Gits)\n\tcase interfaces.ModelIdRole:\n\t\treturn b.Process(&m.Roles)\n\tcase interfaces.ModelIdUserRole:\n\t\treturn b.Process(&m.UserRoles)\n\tcase interfaces.ModelIdPermission:\n\t\treturn b.Process(&m.PermissionList)\n\tcase interfaces.ModelIdRolePermission:\n\t\treturn b.Process(&m.RolePermissionList)\n\tcase interfaces.ModelIdEnvironment:\n\t\treturn b.Process(&m.Environments)\n\tcase interfaces.ModelIdDependencySetting:\n\t\treturn b.Process(&m.DependencySettings)\n\tdefault:\n\t\treturn l, errors.ErrorModelInvalidModelId\n\t}\n}\n\nfunc (b *ListBinder) Process(d interface{}) (l interfaces.List, err error) {\n\tif err := b.fr.All(d); err != nil {\n\t\treturn l, trace.TraceError(err)\n\t}\n\treturn d.(interfaces.List), nil\n}\n"
  },
  {
    "path": "core/models/service/data_collection_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeDataCollection(d interface{}, err error) (res *models2.DataCollection, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.DataCollection)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetDataCollectionById(id primitive.ObjectID) (res *models2.DataCollection, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdDataCollection).GetById(id)\n\treturn convertTypeDataCollection(d, err)\n}\n\nfunc (svc *Service) GetDataCollection(query bson.M, opts *mongo.FindOptions) (res *models2.DataCollection, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdDataCollection).Get(query, opts)\n\treturn convertTypeDataCollection(d, err)\n}\n\nfunc (svc *Service) GetDataCollectionList(query bson.M, opts *mongo.FindOptions) (res []models2.DataCollection, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdDataCollection).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.DataCollection)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetDataCollectionByName(name string, opts *mongo.FindOptions) (res *models2.DataCollection, err error) {\n\tquery := bson.M{\"name\": name}\n\treturn svc.GetDataCollection(query, opts)\n}\n"
  },
  {
    "path": "core/models/service/data_source_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeDataSource(d interface{}, err error) (res *models2.DataSource, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.DataSource)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetDataSourceById(id primitive.ObjectID) (res *models2.DataSource, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdDataSource).GetById(id)\n\treturn convertTypeDataSource(d, err)\n}\n\nfunc (svc *Service) GetDataSource(query bson.M, opts *mongo.FindOptions) (res *models2.DataSource, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdDataSource).Get(query, opts)\n\treturn convertTypeDataSource(d, err)\n}\n\nfunc (svc *Service) GetDataSourceList(query bson.M, opts *mongo.FindOptions) (res []models2.DataSource, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdDataSource).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.DataSource)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/dependency_setting_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeDependencySetting(d interface{}, err error) (res *models2.DependencySetting, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.DependencySetting)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetDependencySettingById(id primitive.ObjectID) (res *models2.DependencySetting, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdDependencySetting).GetById(id)\n\treturn convertTypeDependencySetting(d, err)\n}\n\nfunc (svc *Service) GetDependencySetting(query bson.M, opts *mongo.FindOptions) (res *models2.DependencySetting, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdDependencySetting).Get(query, opts)\n\treturn convertTypeDependencySetting(d, err)\n}\n\nfunc (svc *Service) GetDependencySettingList(query bson.M, opts *mongo.FindOptions) (res []models2.DependencySetting, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdDependencySetting).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.DependencySetting)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/environment_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeEnvironment(d interface{}, err error) (res *models2.Environment, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Environment)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetEnvironmentById(id primitive.ObjectID) (res *models2.Environment, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdEnvironment).GetById(id)\n\treturn convertTypeEnvironment(d, err)\n}\n\nfunc (svc *Service) GetEnvironment(query bson.M, opts *mongo.FindOptions) (res *models2.Environment, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdEnvironment).Get(query, opts)\n\treturn convertTypeEnvironment(d, err)\n}\n\nfunc (svc *Service) GetEnvironmentList(query bson.M, opts *mongo.FindOptions) (res []models2.Environment, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdEnvironment).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Environment)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/extra_value_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeExtraValue(d interface{}, err error) (res *models.ExtraValue, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models.ExtraValue)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetExtraValueById(id primitive.ObjectID) (res *models.ExtraValue, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdExtraValue).GetById(id)\n\treturn convertTypeExtraValue(d, err)\n}\n\nfunc (svc *Service) GetExtraValue(query bson.M, opts *mongo.FindOptions) (res *models.ExtraValue, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdExtraValue).Get(query, opts)\n\treturn convertTypeExtraValue(d, err)\n}\n\nfunc (svc *Service) GetExtraValueList(query bson.M, opts *mongo.FindOptions) (res []models.ExtraValue, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdExtraValue).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models.ExtraValue)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetExtraValueByObjectIdModel(oid primitive.ObjectID, m string, opts *mongo.FindOptions) (res *models.ExtraValue, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdExtraValue).Get(bson.M{\"oid\": oid, \"m\": m}, opts)\n\treturn convertTypeExtraValue(d, err)\n}\n"
  },
  {
    "path": "core/models/service/git_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeGit(d interface{}, err error) (res *models2.Git, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Git)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetGitById(id primitive.ObjectID) (res *models2.Git, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdGit).GetById(id)\n\treturn convertTypeGit(d, err)\n}\n\nfunc (svc *Service) GetGit(query bson.M, opts *mongo.FindOptions) (res *models2.Git, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdGit).Get(query, opts)\n\treturn convertTypeGit(d, err)\n}\n\nfunc (svc *Service) GetGitList(query bson.M, opts *mongo.FindOptions) (res []models2.Git, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdGit).GetList(query, opts)\n\tif l == nil {\n\t\treturn nil, nil\n\t}\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Git)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/interface.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype ModelService interface {\n\tinterfaces.ModelService\n\tDropAll() (err error)\n\tGetNodeById(id primitive.ObjectID) (res *models.Node, err error)\n\tGetNode(query bson.M, opts *mongo.FindOptions) (res *models.Node, err error)\n\tGetNodeList(query bson.M, opts *mongo.FindOptions) (res []models.Node, err error)\n\tGetNodeByKey(key string, opts *mongo.FindOptions) (res *models.Node, err error)\n\tGetProjectById(id primitive.ObjectID) (res *models.Project, err error)\n\tGetProject(query bson.M, opts *mongo.FindOptions) (res *models.Project, err error)\n\tGetProjectList(query bson.M, opts *mongo.FindOptions) (res []models.Project, err error)\n\tGetArtifactById(id primitive.ObjectID) (res *models.Artifact, err error)\n\tGetArtifact(query bson.M, opts *mongo.FindOptions) (res *models.Artifact, err error)\n\tGetArtifactList(query bson.M, opts *mongo.FindOptions) (res []models.Artifact, err error)\n\tGetTagById(id primitive.ObjectID) (res *models.Tag, err error)\n\tGetTag(query bson.M, opts *mongo.FindOptions) (res *models.Tag, err error)\n\tGetTagList(query bson.M, opts *mongo.FindOptions) (res []models.Tag, err error)\n\tGetTagIds(colName string, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error)\n\tUpdateTagsById(colName string, id primitive.ObjectID, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error)\n\tUpdateTags(colName string, query bson.M, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error)\n\tGetJobById(id primitive.ObjectID) (res *models.Job, err error)\n\tGetJob(query bson.M, opts *mongo.FindOptions) (res *models.Job, err error)\n\tGetJobList(query bson.M, opts *mongo.FindOptions) (res []models.Job, err error)\n\tGetScheduleById(id primitive.ObjectID) (res *models.Schedule, err error)\n\tGetSchedule(query bson.M, opts *mongo.FindOptions) (res *models.Schedule, err error)\n\tGetScheduleList(query bson.M, opts *mongo.FindOptions) (res []models.Schedule, err error)\n\tGetUserById(id primitive.ObjectID) (res *models.User, err error)\n\tGetUser(query bson.M, opts *mongo.FindOptions) (res *models.User, err error)\n\tGetUserList(query bson.M, opts *mongo.FindOptions) (res []models.User, err error)\n\tGetUserByUsername(username string, opts *mongo.FindOptions) (res *models.User, err error)\n\tGetUserByUsernameWithPassword(username string, opts *mongo.FindOptions) (res *models.User, err error)\n\tGetSettingById(id primitive.ObjectID) (res *models.Setting, err error)\n\tGetSetting(query bson.M, opts *mongo.FindOptions) (res *models.Setting, err error)\n\tGetSettingList(query bson.M, opts *mongo.FindOptions) (res []models.Setting, err error)\n\tGetSettingByKey(key string, opts *mongo.FindOptions) (res *models.Setting, err error)\n\tGetSpiderById(id primitive.ObjectID) (res *models.Spider, err error)\n\tGetSpider(query bson.M, opts *mongo.FindOptions) (res *models.Spider, err error)\n\tGetSpiderList(query bson.M, opts *mongo.FindOptions) (res []models.Spider, err error)\n\tGetTaskById(id primitive.ObjectID) (res *models.Task, err error)\n\tGetTask(query bson.M, opts *mongo.FindOptions) (res *models.Task, err error)\n\tGetTaskList(query bson.M, opts *mongo.FindOptions) (res []models.Task, err error)\n\tGetTokenById(id primitive.ObjectID) (res *models.Token, err error)\n\tGetToken(query bson.M, opts *mongo.FindOptions) (res *models.Token, err error)\n\tGetTokenList(query bson.M, opts *mongo.FindOptions) (res []models.Token, err error)\n\tGetVariableById(id primitive.ObjectID) (res *models.Variable, err error)\n\tGetVariable(query bson.M, opts *mongo.FindOptions) (res *models.Variable, err error)\n\tGetVariableList(query bson.M, opts *mongo.FindOptions) (res []models.Variable, err error)\n\tGetVariableByKey(key string, opts *mongo.FindOptions) (res *models.Variable, err error)\n\tGetTaskQueueItemById(id primitive.ObjectID) (res *models.TaskQueueItem, err error)\n\tGetTaskQueueItem(query bson.M, opts *mongo.FindOptions) (res *models.TaskQueueItem, err error)\n\tGetTaskQueueItemList(query bson.M, opts *mongo.FindOptions) (res []models.TaskQueueItem, err error)\n\tGetTaskStatById(id primitive.ObjectID) (res *models.TaskStat, err error)\n\tGetTaskStat(query bson.M, opts *mongo.FindOptions) (res *models.TaskStat, err error)\n\tGetTaskStatList(query bson.M, opts *mongo.FindOptions) (res []models.TaskStat, err error)\n\tGetSpiderStatById(id primitive.ObjectID) (res *models.SpiderStat, err error)\n\tGetSpiderStat(query bson.M, opts *mongo.FindOptions) (res *models.SpiderStat, err error)\n\tGetSpiderStatList(query bson.M, opts *mongo.FindOptions) (res []models.SpiderStat, err error)\n\tGetDataSourceById(id primitive.ObjectID) (res *models.DataSource, err error)\n\tGetDataSource(query bson.M, opts *mongo.FindOptions) (res *models.DataSource, err error)\n\tGetDataSourceList(query bson.M, opts *mongo.FindOptions) (res []models.DataSource, err error)\n\tGetDataCollectionById(id primitive.ObjectID) (res *models.DataCollection, err error)\n\tGetDataCollection(query bson.M, opts *mongo.FindOptions) (res *models.DataCollection, err error)\n\tGetDataCollectionList(query bson.M, opts *mongo.FindOptions) (res []models.DataCollection, err error)\n\tGetDataCollectionByName(name string, opts *mongo.FindOptions) (res *models.DataCollection, err error)\n\tGetPasswordById(id primitive.ObjectID) (res *models.Password, err error)\n\tGetPassword(query bson.M, opts *mongo.FindOptions) (res *models.Password, err error)\n\tGetPasswordList(query bson.M, opts *mongo.FindOptions) (res []models.Password, err error)\n\tGetExtraValueById(id primitive.ObjectID) (res *models.ExtraValue, err error)\n\tGetExtraValue(query bson.M, opts *mongo.FindOptions) (res *models.ExtraValue, err error)\n\tGetExtraValueList(query bson.M, opts *mongo.FindOptions) (res []models.ExtraValue, err error)\n\tGetExtraValueByObjectIdModel(oid primitive.ObjectID, m string, opts *mongo.FindOptions) (res *models.ExtraValue, err error)\n\tGetGitById(id primitive.ObjectID) (res *models.Git, err error)\n\tGetGit(query bson.M, opts *mongo.FindOptions) (res *models.Git, err error)\n\tGetGitList(query bson.M, opts *mongo.FindOptions) (res []models.Git, err error)\n\tGetRoleById(id primitive.ObjectID) (res *models.Role, err error)\n\tGetRole(query bson.M, opts *mongo.FindOptions) (res *models.Role, err error)\n\tGetRoleList(query bson.M, opts *mongo.FindOptions) (res []models.Role, err error)\n\tGetRoleByName(name string, opts *mongo.FindOptions) (res *models.Role, err error)\n\tGetRoleByKey(key string, opts *mongo.FindOptions) (res *models.Role, err error)\n\tGetUserRoleById(id primitive.ObjectID) (res *models.UserRole, err error)\n\tGetUserRole(query bson.M, opts *mongo.FindOptions) (res *models.UserRole, err error)\n\tGetUserRoleList(query bson.M, opts *mongo.FindOptions) (res []models.UserRole, err error)\n\tGetUserRoleListByUserId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models.UserRole, err error)\n\tGetUserRoleListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models.UserRole, err error)\n\tGetPermissionById(id primitive.ObjectID) (res *models.Permission, err error)\n\tGetPermission(query bson.M, opts *mongo.FindOptions) (res *models.Permission, err error)\n\tGetPermissionList(query bson.M, opts *mongo.FindOptions) (res []models.Permission, err error)\n\tGetPermissionByKey(key string, opts *mongo.FindOptions) (res *models.Permission, err error)\n\tGetRolePermission(query bson.M, opts *mongo.FindOptions) (res *models.RolePermission, err error)\n\tGetRolePermissionList(query bson.M, opts *mongo.FindOptions) (res []models.RolePermission, err error)\n\tGetRolePermissionListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models.RolePermission, err error)\n\tGetRolePermissionListByPermissionId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models.RolePermission, err error)\n\tGetEnvironmentById(id primitive.ObjectID) (res *models.Environment, err error)\n\tGetEnvironment(query bson.M, opts *mongo.FindOptions) (res *models.Environment, err error)\n\tGetEnvironmentList(query bson.M, opts *mongo.FindOptions) (res []models.Environment, err error)\n}\n"
  },
  {
    "path": "core/models/service/job_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeJob(d interface{}, err error) (res *models2.Job, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Job)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetJobById(id primitive.ObjectID) (res *models2.Job, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdJob).GetById(id)\n\treturn convertTypeJob(d, err)\n}\n\nfunc (svc *Service) GetJob(query bson.M, opts *mongo.FindOptions) (res *models2.Job, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdJob).Get(query, opts)\n\treturn convertTypeJob(d, err)\n}\n\nfunc (svc *Service) GetJobList(query bson.M, opts *mongo.FindOptions) (res []models2.Job, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdJob).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Job)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/node_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeNode(d interface{}, err error) (res *models2.Node, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Node)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetNodeById(id primitive.ObjectID) (res *models2.Node, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdNode).GetById(id)\n\treturn convertTypeNode(d, err)\n}\n\nfunc (svc *Service) GetNode(query bson.M, opts *mongo.FindOptions) (res *models2.Node, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdNode).Get(query, opts)\n\treturn convertTypeNode(d, err)\n}\n\nfunc (svc *Service) GetNodeList(query bson.M, opts *mongo.FindOptions) (res []models2.Node, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdNode).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Node)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetNodeByKey(key string, opts *mongo.FindOptions) (res *models2.Node, err error) {\n\tquery := bson.M{\"key\": key}\n\treturn svc.GetNode(query, opts)\n}\n"
  },
  {
    "path": "core/models/service/options.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n)\n\ntype Option func(ModelService)\n\ntype BaseServiceOption func(svc interfaces.ModelBaseService)\n\nfunc WithBaseServiceModelId(id interfaces.ModelId) BaseServiceOption {\n\treturn func(svc interfaces.ModelBaseService) {\n\t\tsvc.SetModelId(id)\n\t}\n}\n\nfunc WithBaseServiceCol(col *mongo.Col) BaseServiceOption {\n\treturn func(svc interfaces.ModelBaseService) {\n\t\t_svc, ok := svc.(*BaseService)\n\t\tif ok {\n\t\t\t_svc.SetCol(col)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "core/models/service/password_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypePassword(d interface{}, err error) (res *models2.Password, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Password)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetPasswordById(id primitive.ObjectID) (res *models2.Password, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdPassword).GetById(id)\n\treturn convertTypePassword(d, err)\n}\n\nfunc (svc *Service) GetPassword(query bson.M, opts *mongo.FindOptions) (res *models2.Password, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdPassword).Get(query, opts)\n\treturn convertTypePassword(d, err)\n}\n\nfunc (svc *Service) GetPasswordList(query bson.M, opts *mongo.FindOptions) (res []models2.Password, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdPassword).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Password)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/permission_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypePermission(d interface{}, err error) (res *models2.Permission, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Permission)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetPermissionById(id primitive.ObjectID) (res *models2.Permission, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdPermission).GetById(id)\n\treturn convertTypePermission(d, err)\n}\n\nfunc (svc *Service) GetPermission(query bson.M, opts *mongo.FindOptions) (res *models2.Permission, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdPermission).Get(query, opts)\n\treturn convertTypePermission(d, err)\n}\n\nfunc (svc *Service) GetPermissionList(query bson.M, opts *mongo.FindOptions) (res []models2.Permission, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdPermission).GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Permission)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetPermissionByKey(key string, opts *mongo.FindOptions) (res *models2.Permission, err error) {\n\tquery := bson.M{\"key\": key}\n\treturn svc.GetPermission(query, opts)\n}\n"
  },
  {
    "path": "core/models/service/project_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeProject(d interface{}, err error) (res *models2.Project, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Project)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetProjectById(id primitive.ObjectID) (res *models2.Project, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdProject).GetById(id)\n\treturn convertTypeProject(d, err)\n}\n\nfunc (svc *Service) GetProject(query bson.M, opts *mongo.FindOptions) (res *models2.Project, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdProject).Get(query, opts)\n\treturn convertTypeProject(d, err)\n}\n\nfunc (svc *Service) GetProjectList(query bson.M, opts *mongo.FindOptions) (res []models2.Project, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdProject).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Project)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/role_permission_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeRolePermission(d interface{}, err error) (res *models2.RolePermission, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.RolePermission)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetRolePermissionById(id primitive.ObjectID) (res *models2.RolePermission, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdRolePermission).GetById(id)\n\treturn convertTypeRolePermission(d, err)\n}\n\nfunc (svc *Service) GetRolePermission(query bson.M, opts *mongo.FindOptions) (res *models2.RolePermission, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdRolePermission).Get(query, opts)\n\treturn convertTypeRolePermission(d, err)\n}\n\nfunc (svc *Service) GetRolePermissionList(query bson.M, opts *mongo.FindOptions) (res []models2.RolePermission, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdRolePermission).GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.RolePermission)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetRolePermissionListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.RolePermission, err error) {\n\treturn svc.GetRolePermissionList(bson.M{\"role_id\": id}, opts)\n}\n\nfunc (svc *Service) GetRolePermissionListByPermissionId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.RolePermission, err error) {\n\treturn svc.GetRolePermissionList(bson.M{\"permission_id\": id}, opts)\n}\n"
  },
  {
    "path": "core/models/service/role_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeRole(d interface{}, err error) (res *models2.Role, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Role)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetRoleById(id primitive.ObjectID) (res *models2.Role, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdRole).GetById(id)\n\treturn convertTypeRole(d, err)\n}\n\nfunc (svc *Service) GetRole(query bson.M, opts *mongo.FindOptions) (res *models2.Role, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdRole).Get(query, opts)\n\treturn convertTypeRole(d, err)\n}\n\nfunc (svc *Service) GetRoleList(query bson.M, opts *mongo.FindOptions) (res []models2.Role, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdRole).GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Role)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetRoleByName(name string, opts *mongo.FindOptions) (res *models2.Role, err error) {\n\tquery := bson.M{\"name\": name}\n\treturn svc.GetRole(query, opts)\n}\n\nfunc (svc *Service) GetRoleByKey(key string, opts *mongo.FindOptions) (res *models2.Role, err error) {\n\tquery := bson.M{\"key\": key}\n\treturn svc.GetRole(query, opts)\n}\n"
  },
  {
    "path": "core/models/service/schedule_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeSchedule(d interface{}, err error) (res *models2.Schedule, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Schedule)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetScheduleById(id primitive.ObjectID) (res *models2.Schedule, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdSchedule).GetById(id)\n\treturn convertTypeSchedule(d, err)\n}\n\nfunc (svc *Service) GetSchedule(query bson.M, opts *mongo.FindOptions) (res *models2.Schedule, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdSchedule).Get(query, opts)\n\treturn convertTypeSchedule(d, err)\n}\n\nfunc (svc *Service) GetScheduleList(query bson.M, opts *mongo.FindOptions) (res []models2.Schedule, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdSchedule).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Schedule)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/service.go",
    "content": "package service\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/core/color\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n)\n\ntype Service struct {\n\tenv      string\n\tcolorSvc interfaces.ColorService\n}\n\nfunc (svc *Service) DropAll() (err error) {\n\tdb := mongo.GetMongoDb(\"\")\n\tcolNames, err := db.ListCollectionNames(context.Background(), bson.M{})\n\tif err != nil {\n\t\tif err == mongo2.ErrNoDocuments {\n\t\t\treturn nil\n\t\t}\n\t\treturn err\n\t}\n\tfor _, colName := range colNames {\n\t\tcol := db.Collection(colName)\n\t\tif err := col.Drop(context.Background()); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (svc *Service) GetBaseService(id interfaces.ModelId) (svc2 interfaces.ModelBaseService) {\n\treturn GetBaseService(id)\n}\n\nfunc NewService() (svc2 ModelService, err error) {\n\t// service\n\tsvc := &Service{}\n\n\tsvc.colorSvc, err = color.NewService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nvar modelSvc ModelService\n\nfunc GetService() (svc ModelService, err error) {\n\tif modelSvc != nil {\n\t\treturn modelSvc, nil\n\t}\n\tmodelSvc, err = NewService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn modelSvc, nil\n}\n"
  },
  {
    "path": "core/models/service/setting_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeSetting(d interface{}, err error) (res *models2.Setting, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Setting)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetSettingById(id primitive.ObjectID) (res *models2.Setting, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdSetting).GetById(id)\n\treturn convertTypeSetting(d, err)\n}\n\nfunc (svc *Service) GetSetting(query bson.M, opts *mongo.FindOptions) (res *models2.Setting, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdSetting).Get(query, opts)\n\treturn convertTypeSetting(d, err)\n}\n\nfunc (svc *Service) GetSettingList(query bson.M, opts *mongo.FindOptions) (res []models2.Setting, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdSetting).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Setting)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetSettingByKey(key string, opts *mongo.FindOptions) (res *models2.Setting, err error) {\n\tquery := bson.M{\"key\": key}\n\treturn svc.GetSetting(query, opts)\n}\n"
  },
  {
    "path": "core/models/service/spider_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeSpider(d interface{}, err error) (res *models2.Spider, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Spider)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetSpiderById(id primitive.ObjectID) (res *models2.Spider, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdSpider).GetById(id)\n\treturn convertTypeSpider(d, err)\n}\n\nfunc (svc *Service) GetSpider(query bson.M, opts *mongo.FindOptions) (res *models2.Spider, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdSpider).Get(query, opts)\n\treturn convertTypeSpider(d, err)\n}\n\nfunc (svc *Service) GetSpiderList(query bson.M, opts *mongo.FindOptions) (res []models2.Spider, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdSpider).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Spider)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/spider_stat_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeSpiderStat(d interface{}, err error) (res *models2.SpiderStat, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.SpiderStat)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetSpiderStatById(id primitive.ObjectID) (res *models2.SpiderStat, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdSpiderStat).GetById(id)\n\treturn convertTypeSpiderStat(d, err)\n}\n\nfunc (svc *Service) GetSpiderStat(query bson.M, opts *mongo.FindOptions) (res *models2.SpiderStat, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdSpiderStat).Get(query, opts)\n\treturn convertTypeSpiderStat(d, err)\n}\n\nfunc (svc *Service) GetSpiderStatList(query bson.M, opts *mongo.FindOptions) (res []models2.SpiderStat, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdSpiderStat).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.SpiderStat)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/tag_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n)\n\nfunc convertTypeTag(d interface{}, err error) (res *models2.Tag, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Tag)\n\tif !ok {\n\t\treturn nil, trace.TraceError(errors.ErrorModelInvalidType)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetTagById(id primitive.ObjectID) (res *models2.Tag, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdTag).GetById(id)\n\treturn convertTypeTag(d, err)\n}\n\nfunc (svc *Service) GetTag(query bson.M, opts *mongo.FindOptions) (res *models2.Tag, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdTag).Get(query, opts)\n\treturn convertTypeTag(d, err)\n}\n\nfunc (svc *Service) GetTagList(query bson.M, opts *mongo.FindOptions) (res []models2.Tag, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdTag).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Tag)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetTagIds(colName string, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error) {\n\t// iterate tag names\n\tfor _, tag := range tags {\n\t\t// count of tags with the name\n\t\ttagDb, err := svc.GetTag(bson.M{\"name\": tag.GetName(), \"col\": colName}, nil)\n\t\tif err == nil {\n\t\t\t// tag exists\n\t\t\ttag = tagDb\n\t\t} else if err == mongo2.ErrNoDocuments {\n\t\t\t// add new tag if not exists\n\t\t\tcolorHex := tag.GetColor()\n\t\t\tif colorHex == \"\" {\n\t\t\t\tcolor, _ := svc.colorSvc.GetRandom()\n\t\t\t\tcolorHex = color.GetHex()\n\t\t\t}\n\t\t\ttag = &models2.Tag{\n\t\t\t\tId:    primitive.NewObjectID(),\n\t\t\t\tName:  tag.GetName(),\n\t\t\t\tColor: colorHex,\n\t\t\t\tCol:   colName,\n\t\t\t}\n\t\t\tif err := delegate.NewModelDelegate(tag).Add(); err != nil {\n\t\t\t\treturn tagIds, trace.TraceError(err)\n\t\t\t}\n\t\t}\n\n\t\t// add to tag ids\n\t\ttagIds = append(tagIds, tag.GetId())\n\t}\n\n\treturn tagIds, nil\n}\n\nfunc (svc *Service) UpdateTagsById(colName string, id primitive.ObjectID, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error) {\n\t// get tag ids to update\n\ttagIds, err = svc.GetTagIds(colName, tags)\n\tif err != nil {\n\t\treturn tagIds, trace.TraceError(err)\n\t}\n\n\t// update in db\n\ta, err := svc.GetArtifactById(id)\n\tif err != nil {\n\t\treturn tagIds, trace.TraceError(err)\n\t}\n\ta.TagIds = tagIds\n\tif err := mongo.GetMongoCol(interfaces.ModelColNameArtifact).ReplaceId(id, a); err != nil {\n\t\treturn tagIds, err\n\t}\n\treturn tagIds, nil\n}\n\nfunc (svc *Service) UpdateTags(colName string, query bson.M, tags []interfaces.Tag) (tagIds []primitive.ObjectID, err error) {\n\t// tag ids to update\n\ttagIds, err = svc.GetTagIds(colName, tags)\n\tif err != nil {\n\t\treturn tagIds, trace.TraceError(err)\n\t}\n\n\t// update\n\tupdate := bson.M{\n\t\t\"_tid\": tagIds,\n\t}\n\n\t// fields\n\tfields := []string{\"_tid\"}\n\n\t// update in db\n\tif err := svc.GetBaseService(interfaces.ModelIdTag).Update(query, update, fields); err != nil {\n\t\treturn tagIds, trace.TraceError(err)\n\t}\n\n\treturn tagIds, nil\n}\n"
  },
  {
    "path": "core/models/service/tag_service_legacy.go",
    "content": "package service\n\n//\n//import (\n//\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n//\t\"github.com/crawlab-team/crawlab/db/mongo\"\n//\t\"go.mongodb.org/mongo-driver/bson\"\n//\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n//\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n//)\n//\n//type TagServiceInterface interface {\n//\tgetTagIds(colName string, tags []Tag) (tagIds []primitive.ObjectID, err error)\n//\tGetModelById(id primitive.ObjectID) (res Tag, err error)\n//\tGetModel(query bson.M, opts *mongo.FindOptions) (res Tag, err error)\n//\tGetModelList(query bson.M, opts *mongo.FindOptions) (res []Tag, err error)\n//\tUpdateTagsById(colName string, id primitive.ObjectID, tags []Tag) (tagIds []primitive.ObjectID, err error)\n//\tUpdateTags(colName string, query bson.M, tags []Tag) (tagIds []primitive.ObjectID, err error)\n//}\n//\n//type tagService struct {\n//\t*baseService\n//}\n//\n//func (svc *tagService) getTagIds(colName string, tags []Tag) (tagIds []primitive.ObjectID, err error) {\n//\t// iterate tag names\n//\tfor _, tag := range tags {\n//\t\t// count of tags with the name\n//\t\ttagDb, err := MustGetRootService().GetTag(bson.M{\"name\": tag.Name, \"col\": colName}, nil)\n//\t\tif err == nil {\n//\t\t\t// tag exists\n//\t\t\ttag = tagDb\n//\t\t} else if err == mongo2.ErrNoDocuments {\n//\t\t\t// add new tag if not exists\n//\t\t\tcolorHex := tag.Color\n//\t\t\tif colorHex == \"\" {\n//\t\t\t\tcolor, _ := ColorService.GetRandom()\n//\t\t\t\tcolorHex = color.Hex\n//\t\t\t}\n//\t\t\ttag = Tag{\n//\t\t\t\tName:  tag.Name,\n//\t\t\t\tColor: colorHex,\n//\t\t\t\tCol:   colName,\n//\t\t\t}\n//\t\t\tif err := tag.Add(); err != nil {\n//\t\t\t\treturn tagIds, err\n//\t\t\t}\n//\t\t}\n//\n//\t\t// add to tag ids\n//\t\ttagIds = append(tagIds, tag.Id)\n//\t}\n//\n//\treturn tagIds, nil\n//}\n//\n//func (svc *tagService) GetModelById(id primitive.ObjectID) (res Tag, err error) {\n//\terr = svc.findId(id).One(&res)\n//\treturn res, err\n//}\n//\n//func (svc *tagService) GetModel(query bson.M, opts *mongo.FindOptions) (res Tag, err error) {\n//\terr = svc.find(query, opts).One(&res)\n//\treturn res, err\n//}\n//\n//func (svc *tagService) GetModelList(query bson.M, opts *mongo.FindOptions) (res []Tag, err error) {\n//\terr = svc.find(query, opts).All(&res)\n//\treturn res, err\n//}\n//\n//func (svc *tagService) UpdateTagsById(colName string, id primitive.ObjectID, tags []Tag) (tagIds []primitive.ObjectID, err error) {\n//\t// get tag ids to update\n//\ttagIds, err = svc.getTagIds(colName, tags)\n//\tif err != nil {\n//\t\treturn tagIds, err\n//\t}\n//\n//\t// update in db\n//\ta, err := MustGetRootService().GetArtifactById(id)\n//\tif err != nil {\n//\t\treturn tagIds, err\n//\t}\n//\ta.TagIds = tagIds\n//\tif err := mongo.GetMongoCol(interfaces.ModelColNameArtifact).ReplaceId(id, a); err != nil {\n//\t\treturn tagIds, err\n//\t}\n//\treturn tagIds, nil\n//}\n//\n//func (svc *tagService) UpdateTags(colName string, query bson.M, tags []Tag) (tagIds []primitive.ObjectID, err error) {\n//\t// tag ids to update\n//\ttagIds, err = svc.getTagIds(colName, tags)\n//\tif err != nil {\n//\t\treturn tagIds, err\n//\t}\n//\n//\t// update\n//\tupdate := bson.M{\n//\t\t\"_tid\": tagIds,\n//\t}\n//\n//\t// fields\n//\tfields := []string{\"_tid\"}\n//\n//\t// update in db\n//\tif err := ArtifactService.Update(query, update, fields); err != nil {\n//\t\treturn tagIds, err\n//\t}\n//\n//\treturn tagIds, nil\n//}\n//\n//func NewTagService() (svc *tagService) {\n//\treturn &tagService{svc.GetBaseService(interfaces.ModelIdTag)}\n//}\n//\n//var TagService *tagService\n"
  },
  {
    "path": "core/models/service/task_queue_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeTaskQueueItem(d interface{}, err error) (res *models2.TaskQueueItem, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.TaskQueueItem)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetTaskQueueItemById(id primitive.ObjectID) (res *models2.TaskQueueItem, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdTaskQueue).GetById(id)\n\treturn convertTypeTaskQueueItem(d, err)\n}\n\nfunc (svc *Service) GetTaskQueueItem(query bson.M, opts *mongo.FindOptions) (res *models2.TaskQueueItem, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdTaskQueue).Get(query, opts)\n\treturn convertTypeTaskQueueItem(d, err)\n}\n\nfunc (svc *Service) GetTaskQueueItemList(query bson.M, opts *mongo.FindOptions) (res []models2.TaskQueueItem, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdTaskQueue).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.TaskQueueItem)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/task_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeTask(d interface{}, err error) (res *models2.Task, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Task)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetTaskById(id primitive.ObjectID) (res *models2.Task, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdTask).GetById(id)\n\treturn convertTypeTask(d, err)\n}\n\nfunc (svc *Service) GetTask(query bson.M, opts *mongo.FindOptions) (res *models2.Task, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdTask).Get(query, opts)\n\treturn convertTypeTask(d, err)\n}\n\nfunc (svc *Service) GetTaskList(query bson.M, opts *mongo.FindOptions) (res []models2.Task, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdTask).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Task)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/task_stat_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeTaskStat(d interface{}, err error) (res *models2.TaskStat, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.TaskStat)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetTaskStatById(id primitive.ObjectID) (res *models2.TaskStat, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdTaskStat).GetById(id)\n\treturn convertTypeTaskStat(d, err)\n}\n\nfunc (svc *Service) GetTaskStat(query bson.M, opts *mongo.FindOptions) (res *models2.TaskStat, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdTaskStat).Get(query, opts)\n\treturn convertTypeTaskStat(d, err)\n}\n\nfunc (svc *Service) GetTaskStatList(query bson.M, opts *mongo.FindOptions) (res []models2.TaskStat, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdTaskStat).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.TaskStat)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/token_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeToken(d interface{}, err error) (res *models2.Token, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Token)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetTokenById(id primitive.ObjectID) (res *models2.Token, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdToken).GetById(id)\n\treturn convertTypeToken(d, err)\n}\n\nfunc (svc *Service) GetToken(query bson.M, opts *mongo.FindOptions) (res *models2.Token, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdToken).Get(query, opts)\n\treturn convertTypeToken(d, err)\n}\n\nfunc (svc *Service) GetTokenList(query bson.M, opts *mongo.FindOptions) (res []models2.Token, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdToken).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Token)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/models/service/user_role_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeUserRole(d interface{}, err error) (res *models2.UserRole, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.UserRole)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetUserRoleById(id primitive.ObjectID) (res *models2.UserRole, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdUserRole).GetById(id)\n\treturn convertTypeUserRole(d, err)\n}\n\nfunc (svc *Service) GetUserRole(query bson.M, opts *mongo.FindOptions) (res *models2.UserRole, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdUserRole).Get(query, opts)\n\treturn convertTypeUserRole(d, err)\n}\n\nfunc (svc *Service) GetUserRoleList(query bson.M, opts *mongo.FindOptions) (res []models2.UserRole, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdUserRole).GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.UserRole)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetUserRoleListByUserId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.UserRole, err error) {\n\treturn svc.GetUserRoleList(bson.M{\"user_id\": id}, opts)\n}\n\nfunc (svc *Service) GetUserRoleListByRoleId(id primitive.ObjectID, opts *mongo.FindOptions) (res []models2.UserRole, err error) {\n\treturn svc.GetUserRoleList(bson.M{\"role_id\": id}, opts)\n}\n"
  },
  {
    "path": "core/models/service/user_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeUser(d interface{}, err error) (res *models2.User, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.User)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetUserById(id primitive.ObjectID) (res *models2.User, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdUser).GetById(id)\n\treturn convertTypeUser(d, err)\n}\n\nfunc (svc *Service) GetUser(query bson.M, opts *mongo.FindOptions) (res *models2.User, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdUser).Get(query, opts)\n\treturn convertTypeUser(d, err)\n}\n\nfunc (svc *Service) GetUserList(query bson.M, opts *mongo.FindOptions) (res []models2.User, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdUser).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.User)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetUserByUsername(username string, opts *mongo.FindOptions) (res *models2.User, err error) {\n\tquery := bson.M{\"username\": username}\n\treturn svc.GetUser(query, opts)\n}\n\nfunc (svc *Service) GetUserByUsernameWithPassword(username string, opts *mongo.FindOptions) (res *models2.User, err error) {\n\tu, err := svc.GetUserByUsername(username, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tp, err := svc.GetPasswordById(u.Id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tu.Password = p.Password\n\treturn u, nil\n}\n"
  },
  {
    "path": "core/models/service/variable_service.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc convertTypeVariable(d interface{}, err error) (res *models2.Variable, err2 error) {\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tres, ok := d.(*models2.Variable)\n\tif !ok {\n\t\treturn nil, errors.ErrorModelInvalidType\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetVariableById(id primitive.ObjectID) (res *models2.Variable, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdVariable).GetById(id)\n\treturn convertTypeVariable(d, err)\n}\n\nfunc (svc *Service) GetVariable(query bson.M, opts *mongo.FindOptions) (res *models2.Variable, err error) {\n\td, err := svc.GetBaseService(interfaces.ModelIdVariable).Get(query, opts)\n\treturn convertTypeVariable(d, err)\n}\n\nfunc (svc *Service) GetVariableList(query bson.M, opts *mongo.FindOptions) (res []models2.Variable, err error) {\n\tl, err := svc.GetBaseService(interfaces.ModelIdVariable).GetList(query, opts)\n\tfor _, doc := range l.GetModels() {\n\t\td := doc.(*models2.Variable)\n\t\tres = append(res, *d)\n\t}\n\treturn res, nil\n}\n\nfunc (svc *Service) GetVariableByKey(key string, opts *mongo.FindOptions) (res *models2.Variable, err error) {\n\tquery := bson.M{\"key\": key}\n\treturn svc.GetVariable(query, opts)\n}\n"
  },
  {
    "path": "core/node/config/config.go",
    "content": "package config\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/spf13/viper\"\n)\n\ntype Config entity.NodeInfo\n\ntype Options struct {\n\tKey        string\n\tName       string\n\tIsMaster   bool\n\tAuthKey    string\n\tMaxRunners int\n}\n\nvar DefaultMaxRunner = 8\n\nvar DefaultConfigOptions = &Options{\n\tKey:        utils.NewUUIDString(),\n\tIsMaster:   utils.IsMaster(),\n\tAuthKey:    constants.DefaultGrpcAuthKey,\n\tMaxRunners: 0,\n}\n\nfunc NewConfig(opts *Options) (cfg *Config) {\n\tif opts == nil {\n\t\topts = DefaultConfigOptions\n\t}\n\tif opts.Key == \"\" {\n\t\tif viper.GetString(\"node.key\") != \"\" {\n\t\t\topts.Key = viper.GetString(\"node.key\")\n\t\t} else {\n\t\t\topts.Key = utils.NewUUIDString()\n\t\t}\n\t}\n\tif opts.Name == \"\" {\n\t\tif viper.GetString(\"node.name\") != \"\" {\n\t\t\topts.Name = viper.GetString(\"node.name\")\n\t\t} else {\n\t\t\topts.Name = opts.Key\n\t\t}\n\t}\n\tif opts.AuthKey == \"\" {\n\t\tif viper.GetString(\"grpc.authKey\") != \"\" {\n\t\t\topts.AuthKey = viper.GetString(\"grpc.authKey\")\n\t\t} else {\n\t\t\topts.AuthKey = constants.DefaultGrpcAuthKey\n\t\t}\n\t}\n\tif opts.MaxRunners == 0 {\n\t\tif viper.GetInt(\"task.handler.maxRunners\") != 0 {\n\t\t\topts.MaxRunners = viper.GetInt(\"task.handler.maxRunners\")\n\t\t} else {\n\t\t\topts.MaxRunners = DefaultMaxRunner\n\t\t}\n\t}\n\treturn &Config{\n\t\tKey:        opts.Key,\n\t\tName:       opts.Name,\n\t\tIsMaster:   opts.IsMaster,\n\t\tAuthKey:    opts.AuthKey,\n\t\tMaxRunners: opts.MaxRunners,\n\t}\n}\n"
  },
  {
    "path": "core/node/config/config_service.go",
    "content": "package config\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n)\n\ntype Service struct {\n\tcfg  *Config\n\tpath string\n}\n\nfunc (svc *Service) Init() (err error) {\n\t// check config directory path\n\tconfigDirPath := filepath.Dir(svc.path)\n\tif !utils.Exists(configDirPath) {\n\t\tif err := os.MkdirAll(configDirPath, os.FileMode(0766)); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\tif !utils.Exists(svc.path) {\n\t\t// not exists, set to default config\n\t\t// and create a config file for persistence\n\t\tsvc.cfg = NewConfig(nil)\n\t\tdata, err := json.Marshal(svc.cfg)\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\tif err := os.WriteFile(svc.path, data, os.FileMode(0766)); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t} else {\n\t\t// exists, read and set to config\n\t\tdata, err := os.ReadFile(svc.path)\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\tif err := json.Unmarshal(data, svc.cfg); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (svc *Service) Reload() (err error) {\n\treturn svc.Init()\n}\n\nfunc (svc *Service) GetBasicNodeInfo() (res interfaces.Entity) {\n\tres = &entity.NodeInfo{\n\t\tKey:        svc.GetNodeKey(),\n\t\tName:       svc.GetNodeName(),\n\t\tIsMaster:   svc.IsMaster(),\n\t\tAuthKey:    svc.GetAuthKey(),\n\t\tMaxRunners: svc.GetMaxRunners(),\n\t}\n\treturn res\n}\n\nfunc (svc *Service) GetNodeKey() (res string) {\n\treturn svc.cfg.Key\n}\n\nfunc (svc *Service) GetNodeName() (res string) {\n\treturn svc.cfg.Name\n}\n\nfunc (svc *Service) IsMaster() (res bool) {\n\treturn svc.cfg.IsMaster\n}\n\nfunc (svc *Service) GetAuthKey() (res string) {\n\treturn svc.cfg.AuthKey\n}\n\nfunc (svc *Service) GetMaxRunners() (res int) {\n\treturn svc.cfg.MaxRunners\n}\n\nfunc (svc *Service) GetConfigPath() (path string) {\n\treturn svc.path\n}\n\nfunc (svc *Service) SetConfigPath(path string) {\n\tsvc.path = path\n}\n\nfunc newNodeConfigService() (svc2 interfaces.NodeConfigService, err error) {\n\t// cfg\n\tcfg := NewConfig(nil)\n\n\t// config service\n\tsvc := &Service{\n\t\tcfg: cfg,\n\t}\n\n\t// normalize config path\n\tcfgPath := config.GetConfigPath()\n\tsvc.SetConfigPath(cfgPath)\n\n\t// init\n\tif err := svc.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nvar _service interfaces.NodeConfigService\nvar _serviceOnce = new(sync.Once)\n\nfunc GetNodeConfigService() interfaces.NodeConfigService {\n\t_serviceOnce.Do(func() {\n\t\tvar err error\n\t\t_service, err = newNodeConfigService()\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t})\n\treturn _service\n}\n"
  },
  {
    "path": "core/node/config/options.go",
    "content": "package config\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n)\n\ntype Option func(svc interfaces.NodeConfigService)\n\nfunc WithConfigPath(path string) Option {\n\treturn func(svc interfaces.NodeConfigService) {\n\t\tsvc.SetConfigPath(path)\n\t}\n}\n"
  },
  {
    "path": "core/node/service/master_service_v2.go",
    "content": "package service\n\nimport (\n\t\"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/cenkalti/backoff/v4\"\n\tconfig2 \"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/server\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/common\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/core/notification\"\n\t\"github.com/crawlab-team/crawlab/core/schedule\"\n\t\"github.com/crawlab-team/crawlab/core/system\"\n\t\"github.com/crawlab-team/crawlab/core/task/handler\"\n\t\"github.com/crawlab-team/crawlab/core/task/scheduler\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype MasterServiceV2 struct {\n\t// dependencies\n\tcfgSvc       interfaces.NodeConfigService\n\tserver       *server.GrpcServerV2\n\tschedulerSvc *scheduler.ServiceV2\n\thandlerSvc   *handler.ServiceV2\n\tscheduleSvc  *schedule.ServiceV2\n\tsystemSvc    *system.ServiceV2\n\n\t// settings\n\tcfgPath         string\n\taddress         interfaces.Address\n\tmonitorInterval time.Duration\n\tstopOnError     bool\n}\n\nfunc (svc *MasterServiceV2) Init() (err error) {\n\t// do nothing\n\treturn nil\n}\n\nfunc (svc *MasterServiceV2) Start() {\n\t// create indexes\n\tcommon.CreateIndexesV2()\n\n\t// start grpc server\n\tif err := svc.server.Start(); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// register to db\n\tif err := svc.Register(); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// start monitoring worker nodes\n\tgo svc.Monitor()\n\n\t// start task handler\n\tgo svc.handlerSvc.Start()\n\n\t// start task scheduler\n\tgo svc.schedulerSvc.Start()\n\n\t// start schedule service\n\tgo svc.scheduleSvc.Start()\n\n\t// wait for quit signal\n\tsvc.Wait()\n\n\t// stop\n\tsvc.Stop()\n}\n\nfunc (svc *MasterServiceV2) Wait() {\n\tutils.DefaultWait()\n}\n\nfunc (svc *MasterServiceV2) Stop() {\n\t_ = svc.server.Stop()\n\tlog.Infof(\"master[%s] service has stopped\", svc.GetConfigService().GetNodeKey())\n}\n\nfunc (svc *MasterServiceV2) Monitor() {\n\tlog.Infof(\"master[%s] monitoring started\", svc.GetConfigService().GetNodeKey())\n\n\t// ticker\n\tticker := time.NewTicker(svc.monitorInterval)\n\n\tfor {\n\t\t// monitor\n\t\terr := svc.monitor()\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\tif svc.stopOnError {\n\t\t\t\tlog.Errorf(\"master[%s] monitor error, now stopping...\", svc.GetConfigService().GetNodeKey())\n\t\t\t\tsvc.Stop()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\t// wait\n\t\t<-ticker.C\n\t}\n}\n\nfunc (svc *MasterServiceV2) GetConfigService() (cfgSvc interfaces.NodeConfigService) {\n\treturn svc.cfgSvc\n}\n\nfunc (svc *MasterServiceV2) GetConfigPath() (path string) {\n\treturn svc.cfgPath\n}\n\nfunc (svc *MasterServiceV2) SetConfigPath(path string) {\n\tsvc.cfgPath = path\n}\n\nfunc (svc *MasterServiceV2) GetAddress() (address interfaces.Address) {\n\treturn svc.address\n}\n\nfunc (svc *MasterServiceV2) SetAddress(address interfaces.Address) {\n\tsvc.address = address\n}\n\nfunc (svc *MasterServiceV2) SetMonitorInterval(duration time.Duration) {\n\tsvc.monitorInterval = duration\n}\n\nfunc (svc *MasterServiceV2) Register() (err error) {\n\tnodeKey := svc.GetConfigService().GetNodeKey()\n\tnodeName := svc.GetConfigService().GetNodeName()\n\tnode, err := service.NewModelServiceV2[models2.NodeV2]().GetOne(bson.M{\"key\": nodeKey}, nil)\n\tif err != nil && err.Error() == mongo2.ErrNoDocuments.Error() {\n\t\t// not exists\n\t\tlog.Infof(\"master[%s] does not exist in db\", nodeKey)\n\t\tnode := models2.NodeV2{\n\t\t\tKey:        nodeKey,\n\t\t\tName:       nodeName,\n\t\t\tMaxRunners: config.DefaultConfigOptions.MaxRunners,\n\t\t\tIsMaster:   true,\n\t\t\tStatus:     constants.NodeStatusOnline,\n\t\t\tEnabled:    true,\n\t\t\tActive:     true,\n\t\t\tActiveAt:   time.Now(),\n\t\t}\n\t\tnode.SetCreated(primitive.NilObjectID)\n\t\tnode.SetUpdated(primitive.NilObjectID)\n\t\tid, err := service.NewModelServiceV2[models2.NodeV2]().InsertOne(node)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlog.Infof(\"added master[%s] in db. id: %s\", nodeKey, id.Hex())\n\t\treturn nil\n\t} else if err == nil {\n\t\t// exists\n\t\tlog.Infof(\"master[%s] exists in db\", nodeKey)\n\t\tnode.Status = constants.NodeStatusOnline\n\t\tnode.Active = true\n\t\tnode.ActiveAt = time.Now()\n\t\terr = service.NewModelServiceV2[models2.NodeV2]().ReplaceById(node.Id, *node)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlog.Infof(\"updated master[%s] in db. id: %s\", nodeKey, node.Id.Hex())\n\t\treturn nil\n\t} else {\n\t\t// error\n\t\treturn err\n\t}\n}\n\nfunc (svc *MasterServiceV2) StopOnError() {\n\tsvc.stopOnError = true\n}\n\nfunc (svc *MasterServiceV2) GetServer() (svr interfaces.GrpcServer) {\n\treturn svc.server\n}\n\nfunc (svc *MasterServiceV2) monitor() (err error) {\n\t// update master node status in db\n\tif err := svc.updateMasterNodeStatus(); err != nil {\n\t\tif err.Error() == mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil\n\t\t}\n\t\treturn err\n\t}\n\n\t// all worker nodes\n\tworkerNodes, err := svc.getAllWorkerNodes()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// iterate all worker nodes\n\twg := sync.WaitGroup{}\n\twg.Add(len(workerNodes))\n\tfor _, n := range workerNodes {\n\t\tgo func(n *models2.NodeV2) {\n\t\t\tdefer wg.Done()\n\n\t\t\t// subscribe\n\t\t\tok := svc.subscribeNode(n)\n\t\t\tif !ok {\n\t\t\t\tgo svc.setWorkerNodeOffline(n)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// ping client\n\t\t\tok = svc.pingNodeClient(n)\n\t\t\tif !ok {\n\t\t\t\tgo svc.setWorkerNodeOffline(n)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// update node available runners\n\t\t\tif err := svc.updateNodeAvailableRunners(n); err != nil {\n\t\t\t\ttrace.PrintError(err)\n\t\t\t\treturn\n\t\t\t}\n\t\t}(&n)\n\t}\n\n\twg.Wait()\n\n\treturn nil\n}\n\nfunc (svc *MasterServiceV2) getAllWorkerNodes() (nodes []models2.NodeV2, err error) {\n\tquery := bson.M{\n\t\t\"key\":    bson.M{\"$ne\": svc.cfgSvc.GetNodeKey()}, // not self\n\t\t\"active\": true,                                   // active\n\t}\n\tnodes, err = service.NewModelServiceV2[models2.NodeV2]().GetMany(query, nil)\n\tif err != nil {\n\t\tif errors.Is(err, mongo2.ErrNoDocuments) {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, trace.TraceError(err)\n\t}\n\treturn nodes, nil\n}\n\nfunc (svc *MasterServiceV2) updateMasterNodeStatus() (err error) {\n\tnodeKey := svc.GetConfigService().GetNodeKey()\n\tnode, err := service.NewModelServiceV2[models2.NodeV2]().GetOne(bson.M{\"key\": nodeKey}, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\toldStatus := node.Status\n\n\tnode.Status = constants.NodeStatusOnline\n\tnode.Active = true\n\tnode.ActiveAt = time.Now()\n\tnewStatus := node.Status\n\n\terr = service.NewModelServiceV2[models2.NodeV2]().ReplaceById(node.Id, *node)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif utils.IsPro() {\n\t\tif oldStatus != newStatus {\n\t\t\tgo svc.sendNotification(node)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (svc *MasterServiceV2) setWorkerNodeOffline(node *models2.NodeV2) {\n\tnode.Status = constants.NodeStatusOffline\n\tnode.Active = false\n\terr := backoff.Retry(func() error {\n\t\treturn service.NewModelServiceV2[models2.NodeV2]().ReplaceById(node.Id, *node)\n\t}, backoff.WithMaxRetries(backoff.NewConstantBackOff(1*time.Second), 3))\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\tsvc.sendNotification(node)\n}\n\nfunc (svc *MasterServiceV2) subscribeNode(n *models2.NodeV2) (ok bool) {\n\t_, err := svc.server.GetSubscribe(\"node:\" + n.Key)\n\tif err != nil {\n\t\tlog.Errorf(\"cannot subscribe worker node[%s]: %v\", n.Key, err)\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc (svc *MasterServiceV2) pingNodeClient(n *models2.NodeV2) (ok bool) {\n\tif err := svc.server.SendStreamMessage(\"node:\"+n.Key, grpc.StreamMessageCode_PING); err != nil {\n\t\tlog.Errorf(\"cannot ping worker node client[%s]: %v\", n.Key, err)\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc (svc *MasterServiceV2) updateNodeAvailableRunners(node *models2.NodeV2) (err error) {\n\tquery := bson.M{\n\t\t\"node_id\": node.Id,\n\t\t\"status\":  constants.TaskStatusRunning,\n\t}\n\trunningTasksCount, err := service.NewModelServiceV2[models2.TaskV2]().Count(query)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tnode.AvailableRunners = node.MaxRunners - runningTasksCount\n\terr = service.NewModelServiceV2[models2.NodeV2]().ReplaceById(node.Id, *node)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *MasterServiceV2) sendNotification(node *models2.NodeV2) {\n\tif !utils.IsPro() {\n\t\treturn\n\t}\n\tgo notification.GetNotificationServiceV2().SendNodeNotification(node)\n}\n\nfunc newMasterServiceV2() (res *MasterServiceV2, err error) {\n\t// master service\n\tsvc := &MasterServiceV2{\n\t\tcfgPath:         config2.GetConfigPath(),\n\t\tmonitorInterval: 15 * time.Second,\n\t\tstopOnError:     false,\n\t}\n\n\t// node config service\n\tsvc.cfgSvc = config.GetNodeConfigService()\n\n\t// grpc server\n\tsvc.server, err = server.GetGrpcServerV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// scheduler service\n\tsvc.schedulerSvc, err = scheduler.GetTaskSchedulerServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// handler service\n\tsvc.handlerSvc, err = handler.GetTaskHandlerServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// schedule service\n\tsvc.scheduleSvc, err = schedule.GetScheduleServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// system service\n\tsvc.systemSvc = system.GetSystemServiceV2()\n\n\t// init\n\tif err := svc.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nvar masterServiceV2 *MasterServiceV2\nvar masterServiceV2Once = new(sync.Once)\n\nfunc GetMasterServiceV2() (res *MasterServiceV2, err error) {\n\tmasterServiceV2Once.Do(func() {\n\t\tmasterServiceV2, err = newMasterServiceV2()\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"failed to get master service: %v\", err)\n\t\t}\n\t})\n\treturn masterServiceV2, err\n\n}\n"
  },
  {
    "path": "core/node/service/options.go",
    "content": "package service\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype Option func(svc interfaces.NodeService)\n\nfunc WithConfigPath(path string) Option {\n\treturn func(svc interfaces.NodeService) {\n\t\tsvc.SetConfigPath(path)\n\t}\n}\n\nfunc WithAddress(address interfaces.Address) Option {\n\treturn func(svc interfaces.NodeService) {\n\t\tsvc.SetAddress(address)\n\t}\n}\n\nfunc WithMonitorInterval(duration time.Duration) Option {\n\treturn func(svc interfaces.NodeService) {\n\t\tsvc2, ok := svc.(interfaces.NodeMasterService)\n\t\tif ok {\n\t\t\tsvc2.SetMonitorInterval(duration)\n\t\t}\n\t}\n}\n\nfunc WithStopOnError() Option {\n\treturn func(svc interfaces.NodeService) {\n\t\tsvc2, ok := svc.(interfaces.NodeMasterService)\n\t\tif ok {\n\t\t\tsvc2.StopOnError()\n\t\t}\n\t}\n}\n\nfunc WithHeartbeatInterval(duration time.Duration) Option {\n\treturn func(svc interfaces.NodeService) {\n\t\tsvc2, ok := svc.(interfaces.NodeWorkerService)\n\t\tif ok {\n\t\t\tsvc2.SetHeartbeatInterval(duration)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "core/node/service/worker_service_v2.go",
    "content": "package service\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"github.com/apex/log\"\n\tconfig2 \"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/client\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tclient2 \"github.com/crawlab-team/crawlab/core/models/client\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/core/task/handler\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype WorkerServiceV2 struct {\n\t// dependencies\n\tcfgSvc     interfaces.NodeConfigService\n\tclient     *client.GrpcClientV2\n\thandlerSvc *handler.ServiceV2\n\n\t// settings\n\tcfgPath           string\n\taddress           interfaces.Address\n\theartbeatInterval time.Duration\n\n\t// internals\n\tn *models2.NodeV2\n\ts grpc.NodeService_SubscribeClient\n}\n\nfunc (svc *WorkerServiceV2) Init() (err error) {\n\t// do nothing\n\treturn nil\n}\n\nfunc (svc *WorkerServiceV2) Start() {\n\t// start grpc client\n\tif err := svc.client.Start(); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// register to master\n\tsvc.Register()\n\n\t// start receiving stream messages\n\tgo svc.Recv()\n\n\t// start sending heartbeat to master\n\tgo svc.ReportStatus()\n\n\t// start handler\n\tgo svc.handlerSvc.Start()\n\n\t// wait for quit signal\n\tsvc.Wait()\n\n\t// stop\n\tsvc.Stop()\n}\n\nfunc (svc *WorkerServiceV2) Wait() {\n\tutils.DefaultWait()\n}\n\nfunc (svc *WorkerServiceV2) Stop() {\n\t_ = svc.client.Stop()\n\tlog.Infof(\"worker[%s] service has stopped\", svc.cfgSvc.GetNodeKey())\n}\n\nfunc (svc *WorkerServiceV2) Register() {\n\tctx, cancel := svc.client.Context()\n\tdefer cancel()\n\t_, err := svc.client.NodeClient.Register(ctx, &grpc.NodeServiceRegisterRequest{\n\t\tKey:        svc.cfgSvc.GetNodeKey(),\n\t\tName:       svc.cfgSvc.GetNodeName(),\n\t\tIsMaster:   svc.cfgSvc.IsMaster(),\n\t\tAuthKey:    svc.cfgSvc.GetAuthKey(),\n\t\tMaxRunners: int32(svc.cfgSvc.GetMaxRunners()),\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tsvc.n, err = client2.NewModelServiceV2[models2.NodeV2]().GetOne(bson.M{\"key\": svc.GetConfigService().GetNodeKey()}, nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tlog.Infof(\"worker[%s] registered to master. id: %s\", svc.GetConfigService().GetNodeKey(), svc.n.Id.Hex())\n\treturn\n}\n\nfunc (svc *WorkerServiceV2) Recv() {\n\tmsgCh := svc.client.GetMessageChannel()\n\tfor {\n\t\t// return if client is closed\n\t\tif svc.client.IsClosed() {\n\t\t\treturn\n\t\t}\n\n\t\t// receive message from channel\n\t\tmsg := <-msgCh\n\n\t\t// handle message\n\t\tif err := svc.handleStreamMessage(msg); err != nil {\n\t\t\tcontinue\n\t\t}\n\t}\n}\n\nfunc (svc *WorkerServiceV2) handleStreamMessage(msg *grpc.StreamMessage) (err error) {\n\tlog.Debugf(\"[WorkerServiceV2] handle msg: %v\", msg)\n\tswitch msg.Code {\n\tcase grpc.StreamMessageCode_PING:\n\t\t_, err := svc.client.NodeClient.SendHeartbeat(context.Background(), &grpc.NodeServiceSendHeartbeatRequest{\n\t\t\tKey: svc.cfgSvc.GetNodeKey(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\tcase grpc.StreamMessageCode_RUN_TASK:\n\t\tvar t models.Task\n\t\tif err := json.Unmarshal(msg.Data, &t); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\tif err := svc.handlerSvc.Run(t.Id); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\tcase grpc.StreamMessageCode_CANCEL_TASK:\n\t\tvar t models.Task\n\t\tif err := json.Unmarshal(msg.Data, &t); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\tif err := svc.handlerSvc.Cancel(t.Id); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (svc *WorkerServiceV2) ReportStatus() {\n\tticker := time.NewTicker(svc.heartbeatInterval)\n\tfor {\n\t\t// return if client is closed\n\t\tif svc.client.IsClosed() {\n\t\t\tticker.Stop()\n\t\t\treturn\n\t\t}\n\n\t\t// report status\n\t\tsvc.reportStatus()\n\n\t\t// sleep\n\t\t<-ticker.C\n\t}\n}\n\nfunc (svc *WorkerServiceV2) GetConfigService() (cfgSvc interfaces.NodeConfigService) {\n\treturn svc.cfgSvc\n}\n\nfunc (svc *WorkerServiceV2) GetConfigPath() (path string) {\n\treturn svc.cfgPath\n}\n\nfunc (svc *WorkerServiceV2) SetConfigPath(path string) {\n\tsvc.cfgPath = path\n}\n\nfunc (svc *WorkerServiceV2) GetAddress() (address interfaces.Address) {\n\treturn svc.address\n}\n\nfunc (svc *WorkerServiceV2) SetAddress(address interfaces.Address) {\n\tsvc.address = address\n}\n\nfunc (svc *WorkerServiceV2) SetHeartbeatInterval(duration time.Duration) {\n\tsvc.heartbeatInterval = duration\n}\n\nfunc (svc *WorkerServiceV2) reportStatus() {\n\tctx, cancel := context.WithTimeout(context.Background(), svc.heartbeatInterval)\n\tdefer cancel()\n\t_, err := svc.client.NodeClient.SendHeartbeat(ctx, &grpc.NodeServiceSendHeartbeatRequest{\n\t\tKey: svc.cfgSvc.GetNodeKey(),\n\t})\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t}\n}\n\nvar workerServiceV2 *WorkerServiceV2\nvar workerServiceV2Once = new(sync.Once)\n\nfunc newWorkerServiceV2() (res *WorkerServiceV2, err error) {\n\tsvc := &WorkerServiceV2{\n\t\tcfgPath:           config2.GetConfigPath(),\n\t\theartbeatInterval: 15 * time.Second,\n\t}\n\n\t// dependency options\n\tvar clientOpts []client.Option\n\tif svc.address != nil {\n\t\tclientOpts = append(clientOpts, client.WithAddress(svc.address))\n\t}\n\n\t// node config service\n\tsvc.cfgSvc = nodeconfig.GetNodeConfigService()\n\n\t// grpc client\n\tsvc.client = client.GetGrpcClientV2()\n\n\t// handler service\n\tsvc.handlerSvc, err = handler.GetTaskHandlerServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// init\n\terr = svc.Init()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nfunc GetWorkerServiceV2() (res *WorkerServiceV2, err error) {\n\tworkerServiceV2Once.Do(func() {\n\t\tworkerServiceV2, err = newWorkerServiceV2()\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"failed to get worker service: %v\", err)\n\t\t}\n\t})\n\treturn workerServiceV2, err\n}\n"
  },
  {
    "path": "core/notification/constants.go",
    "content": "package notification\n\nconst (\n\tTypeMail = \"mail\"\n\tTypeIM   = \"im\"\n)\n\nconst (\n\tChannelMailProviderGmail   = \"gmail\"\n\tChannelMailProviderOutlook = \"outlook\"\n\tChannelMailProviderYahoo   = \"yahoo\"\n\tChannelMailProviderICloud  = \"icloud\"\n\tChannelMailProviderAol     = \"aol\"\n\tChannelMailProviderZoho    = \"zoho\"\n\tChannelMailProviderQQ      = \"qq\"\n\tChannelMailProvider163     = \"163\"\n\tChannelMailProviderExmail  = \"exmail\"\n\n\tChannelIMProviderSlack      = \"slack\"       // https://api.slack.com/messaging/webhooks\n\tChannelIMProviderTelegram   = \"telegram\"    // https://core.telegram.org/bots/api\n\tChannelIMProviderDiscord    = \"discord\"     // https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks\n\tChannelIMProviderMSTeams    = \"ms_teams\"    // https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=newteams%2Cjavascript\n\tChannelIMProviderWechatWork = \"wechat_work\" // https://developer.work.weixin.qq.com/document/path/91770\n\tChannelIMProviderDingtalk   = \"dingtalk\"    // https://open.dingtalk.com/document/orgapp/custom-robot-access\n\tChannelIMProviderLark       = \"lark\"        // https://www.larksuite.com/hc/en-US/articles/099698615114-use-webhook-triggers\n)\n\nconst (\n\tStatusSending = \"sending\"\n\tStatusSuccess = \"success\"\n\tStatusError   = \"error\"\n)\n"
  },
  {
    "path": "core/notification/entity.go",
    "content": "package notification\n\nimport \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\ntype VariableData struct {\n\tTask     *models.TaskV2              `json:\"task\"`\n\tTaskStat *models.TaskStatV2          `json:\"task_stat\"`\n\tSpider   *models.SpiderV2            `json:\"spider\"`\n\tNode     *models.NodeV2              `json:\"node\"`\n\tSchedule *models.ScheduleV2          `json:\"schedule\"`\n\tAlert    *models.NotificationAlertV2 `json:\"alert\"`\n\tMetric   *models.MetricV2            `json:\"metric\"`\n}\n"
  },
  {
    "path": "core/notification/im.go",
    "content": "package notification\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/imroc/req\"\n\t\"regexp\"\n\t\"strings\"\n)\n\ntype ResBody struct {\n\tErrCode int    `json:\"errcode\"`\n\tErrMsg  string `json:\"errmsg\"`\n}\n\nfunc SendIMNotification(ch *models.NotificationChannelV2, title, content string) error {\n\tswitch ch.Provider {\n\tcase ChannelIMProviderLark:\n\t\treturn sendIMLark(ch, title, content)\n\tcase ChannelIMProviderDingtalk:\n\t\treturn sendIMDingTalk(ch, title, content)\n\tcase ChannelIMProviderWechatWork:\n\t\treturn sendIMWechatWork(ch, title, content)\n\tcase ChannelIMProviderSlack:\n\t\treturn sendIMSlack(ch, title, content)\n\tcase ChannelIMProviderTelegram:\n\t\treturn sendIMTelegram(ch, title, content)\n\tcase ChannelIMProviderDiscord:\n\t\treturn sendIMDiscord(ch, title, content)\n\tcase ChannelIMProviderMSTeams:\n\t\treturn sendIMMSTeams(ch, title, content)\n\t}\n\n\t// request header\n\theader := req.Header{\n\t\t\"Content-Type\": \"application/json; charset=utf-8\",\n\t}\n\n\t// request data\n\tdata := req.Param{\n\t\t\"msgtype\": \"markdown\",\n\t\t\"markdown\": req.Param{\n\t\t\t\"title\":   title,\n\t\t\t\"text\":    content,\n\t\t\t\"content\": content,\n\t\t},\n\t\t\"at\": req.Param{\n\t\t\t\"atMobiles\": []string{},\n\t\t\t\"isAtAll\":   false,\n\t\t},\n\t\t\"text\": content,\n\t}\n\tif strings.Contains(strings.ToLower(ch.WebhookUrl), \"feishu\") {\n\t\tdata = req.Param{\n\t\t\t\"msg_type\": \"text\",\n\t\t\t\"content\": req.Param{\n\t\t\t\t\"text\": content,\n\t\t\t},\n\t\t}\n\t}\n\n\t// perform request\n\tres, err := req.Post(ch.WebhookUrl, header, req.BodyJSON(&data))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// parse response\n\tvar resBody ResBody\n\tif err := res.ToJSON(&resBody); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// validate response code\n\tif resBody.ErrCode != 0 {\n\t\treturn errors.New(resBody.ErrMsg)\n\t}\n\n\treturn nil\n}\n\nfunc getIMRequestHeader() req.Header {\n\treturn req.Header{\n\t\t\"Content-Type\": \"application/json; charset=utf-8\",\n\t}\n}\n\nfunc performIMRequest(webhookUrl string, data req.Param) (res *req.Resp, err error) {\n\t// perform request\n\tres, err = req.Post(webhookUrl, getIMRequestHeader(), req.BodyJSON(&data))\n\tif err != nil {\n\t\tlog.Errorf(\"IM request error: %v\", err)\n\t\treturn nil, err\n\t}\n\n\t// get response\n\tresponse := res.Response()\n\n\t// check status code\n\tif response.StatusCode >= 400 {\n\t\tlog.Errorf(\"IM response status code: %d\", res.Response().StatusCode)\n\t\treturn nil, errors.New(fmt.Sprintf(\"IM error response %d: %s\", response.StatusCode, res.String()))\n\t}\n\n\treturn res, nil\n}\n\nfunc performIMRequestWithJson[T any](webhookUrl string, data req.Param) (resBody T, err error) {\n\tres, err := performIMRequest(webhookUrl, data)\n\tif err != nil {\n\t\treturn resBody, err\n\t}\n\n\t// parse response\n\tif err := res.ToJSON(&resBody); err != nil {\n\t\tlog.Warnf(\"Parsing IM response error: %v\", err)\n\t\tresText, err := res.ToString()\n\t\tif err != nil {\n\t\t\tlog.Warnf(\"Converting response to string error: %v\", err)\n\t\t\treturn resBody, err\n\t\t}\n\t\tlog.Infof(\"IM response: %s\", resText)\n\t\treturn resBody, nil\n\t}\n\n\treturn resBody, nil\n}\n\nfunc convertMarkdownToSlack(markdown string) string {\n\t// Convert bold text\n\treBold := regexp.MustCompile(`\\*\\*(.*?)\\*\\*`)\n\tslack := reBold.ReplaceAllString(markdown, `*$1*`)\n\n\t// Convert italic text\n\treItalic := regexp.MustCompile(`\\*(.*?)\\*`)\n\tslack = reItalic.ReplaceAllString(slack, `_$1_`)\n\n\t// Convert links\n\treLink := regexp.MustCompile(`\\[(.*?)\\]\\((.*?)\\)`)\n\tslack = reLink.ReplaceAllString(slack, `<$2|$1>`)\n\n\t// Convert inline code\n\treInlineCode := regexp.MustCompile(\"`(.*?)`\")\n\tslack = reInlineCode.ReplaceAllString(slack, \"`$1`\")\n\n\t// Convert unordered list\n\tslack = strings.ReplaceAll(slack, \"- \", \"• \")\n\n\t// Convert ordered list\n\treOrderedList := regexp.MustCompile(`^\\d+\\. `)\n\tslack = reOrderedList.ReplaceAllStringFunc(slack, func(s string) string {\n\t\treturn strings.Replace(s, \". \", \". \", 1)\n\t})\n\n\t// Convert blockquote\n\treBlockquote := regexp.MustCompile(`^> (.*)`)\n\tslack = reBlockquote.ReplaceAllString(slack, `> $1`)\n\n\treturn slack\n}\n\nfunc convertMarkdownToTelegram(markdownText string) string {\n\t// Combined regex to handle bold and italic\n\tre := regexp.MustCompile(`(?m)(\\*\\*)(.*)(\\*\\*)|(__)(.*)(__)|(\\*)(.*)(\\*)|(_)(.*)(_)`)\n\tmarkdownText = re.ReplaceAllStringFunc(markdownText, func(match string) string {\n\t\tgroups := re.FindStringSubmatch(match)\n\t\tif groups[1] != \"\" || groups[4] != \"\" {\n\t\t\t// Handle bold\n\t\t\treturn \"*\" + match[2:len(match)-2] + \"*\"\n\t\t} else if groups[6] != \"\" || groups[9] != \"\" {\n\t\t\t// Handle italic\n\t\t\treturn \"_\" + match[1:len(match)-1] + \"_\"\n\t\t} else {\n\t\t\t// No match\n\t\t\treturn match\n\t\t}\n\t})\n\n\t// Convert unordered list\n\tre = regexp.MustCompile(`(?m)^- (.*)`)\n\tmarkdownText = re.ReplaceAllString(markdownText, \"• $1\")\n\n\t// Escape characters\n\tescapeChars := []string{\"#\", \"-\", \".\"}\n\tfor _, c := range escapeChars {\n\t\tmarkdownText = strings.ReplaceAll(markdownText, c, \"\\\\\"+c)\n\t}\n\n\treturn markdownText\n}\n\nfunc sendIMLark(ch *models.NotificationChannelV2, title, content string) error {\n\tdata := req.Param{\n\t\t\"msg_type\": \"interactive\",\n\t\t\"card\": req.Param{\n\t\t\t\"header\": req.Param{\n\t\t\t\t\"title\": req.Param{\n\t\t\t\t\t\"tag\":     \"plain_text\",\n\t\t\t\t\t\"content\": title,\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"elements\": []req.Param{\n\t\t\t\t{\n\t\t\t\t\t\"tag\":     \"markdown\",\n\t\t\t\t\t\"content\": content,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\tresBody, err := performIMRequestWithJson[ResBody](ch.WebhookUrl, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif resBody.ErrCode != 0 {\n\t\treturn errors.New(resBody.ErrMsg)\n\t}\n\treturn nil\n}\n\nfunc sendIMDingTalk(ch *models.NotificationChannelV2, title string, content string) error {\n\tdata := req.Param{\n\t\t\"msgtype\": \"markdown\",\n\t\t\"markdown\": req.Param{\n\t\t\t\"title\": title,\n\t\t\t\"text\":  fmt.Sprintf(\"# %s\\n\\n%s\", title, content),\n\t\t},\n\t}\n\tresBody, err := performIMRequestWithJson[ResBody](ch.WebhookUrl, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif resBody.ErrCode != 0 {\n\t\treturn errors.New(resBody.ErrMsg)\n\t}\n\treturn nil\n}\n\nfunc sendIMWechatWork(ch *models.NotificationChannelV2, title string, content string) error {\n\tdata := req.Param{\n\t\t\"msgtype\": \"markdown\",\n\t\t\"markdown\": req.Param{\n\t\t\t\"content\": fmt.Sprintf(\"# %s\\n\\n%s\", title, content),\n\t\t},\n\t}\n\tresBody, err := performIMRequestWithJson[ResBody](ch.WebhookUrl, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif resBody.ErrCode != 0 {\n\t\treturn errors.New(resBody.ErrMsg)\n\t}\n\treturn nil\n}\n\nfunc sendIMSlack(ch *models.NotificationChannelV2, title, content string) error {\n\tdata := req.Param{\n\t\t\"blocks\": []req.Param{\n\t\t\t{\"type\": \"header\", \"text\": req.Param{\"type\": \"plain_text\", \"text\": title}},\n\t\t\t{\"type\": \"section\", \"text\": req.Param{\"type\": \"mrkdwn\", \"text\": convertMarkdownToSlack(content)}},\n\t\t},\n\t}\n\t_, err := performIMRequest(ch.WebhookUrl, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc sendIMTelegram(ch *models.NotificationChannelV2, title string, content string) error {\n\ttype ResBody struct {\n\t\tOk          bool   `json:\"ok\"`\n\t\tDescription string `json:\"description\"`\n\t}\n\n\t// chat id\n\tchatId := ch.TelegramChatId\n\tif !strings.HasPrefix(\"@\", ch.TelegramChatId) {\n\t\tchatId = fmt.Sprintf(\"@%s\", ch.TelegramChatId)\n\t}\n\n\t// webhook url\n\twebhookUrl := fmt.Sprintf(\"https://api.telegram.org/bot%s/sendMessage\", ch.TelegramBotToken)\n\n\t// original Markdown text\n\ttext := fmt.Sprintf(\"**%s**\\n\\n%s\", title, content)\n\n\t// convert to Telegram MarkdownV2\n\ttext = convertMarkdownToTelegram(text)\n\n\t// request data\n\tdata := req.Param{\n\t\t\"chat_id\":    chatId,\n\t\t\"text\":       text,\n\t\t\"parse_mode\": \"MarkdownV2\",\n\t}\n\n\t// perform request\n\t_, err := performIMRequest(webhookUrl, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc sendIMDiscord(ch *models.NotificationChannelV2, title string, content string) error {\n\tdata := req.Param{\n\t\t\"embeds\": []req.Param{\n\t\t\t{\n\t\t\t\t\"title\":       title,\n\t\t\t\t\"description\": content,\n\t\t\t},\n\t\t},\n\t}\n\t_, err := performIMRequest(ch.WebhookUrl, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc sendIMMSTeams(ch *models.NotificationChannelV2, title string, content string) error {\n\tdata := req.Param{\n\t\t\"type\": \"message\",\n\t\t\"attachments\": []req.Param{{\n\t\t\t\"contentType\": \"application/vnd.microsoft.card.adaptive\",\n\t\t\t\"contentUrl\":  nil,\n\t\t\t\"content\": req.Param{\n\t\t\t\t\"$schema\": \"https://adaptivecards.io/schemas/adaptive-card.json\",\n\t\t\t\t\"type\":    \"AdaptiveCard\",\n\t\t\t\t\"version\": \"1.2\",\n\t\t\t\t\"body\": []req.Param{\n\t\t\t\t\t{\n\t\t\t\t\t\t\"type\": \"TextBlock\",\n\t\t\t\t\t\t\"text\": fmt.Sprintf(\"**%s**\", title),\n\t\t\t\t\t\t\"size\": \"Large\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"type\": \"TextBlock\",\n\t\t\t\t\t\t\"text\": content,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t}\n\t_, err := performIMRequest(ch.WebhookUrl, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "core/notification/mail.go",
    "content": "package notification\n\nimport (\n\t\"errors\"\n\t\"github.com/PuerkitoBio/goquery\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"gopkg.in/gomail.v2\"\n\t\"net/mail\"\n\t\"regexp\"\n\t\"strings\"\n)\n\nfunc SendMail(s *models.NotificationSettingV2, ch *models.NotificationChannelV2, to, cc, bcc []string, title, content string) error {\n\t// sender email\n\tsenderEmail := ch.SMTPUsername\n\tif s.UseCustomSenderEmail {\n\t\tsenderEmail = s.SenderEmail\n\t}\n\n\t// config\n\tsmtpConfig := smtpAuthentication{\n\t\tServer:         ch.SMTPServer,\n\t\tPort:           ch.SMTPPort,\n\t\tSenderIdentity: s.SenderName,\n\t\tSenderEmail:    senderEmail,\n\t\tSMTPUser:       ch.SMTPUsername,\n\t\tSMTPPassword:   ch.SMTPPassword,\n\t}\n\n\toptions := sendOptions{\n\t\tSubject: title,\n\t\tTo:      to,\n\t\tCc:      cc,\n\t\tBcc:     bcc,\n\t}\n\n\t// convert html to text\n\ttext := content\n\tif isHtml(text) {\n\t\ttext = convertHtmlToText(text)\n\t}\n\n\t// apply theme\n\tif isHtml(content) {\n\t\tcontent = GetTheme() + content\n\t}\n\n\tswitch ch.Provider {\n\tcase ChannelMailProviderGmail:\n\t\treturn sendMailGmail(ch, smtpConfig, options, content, text)\n\tdefault:\n\t\treturn sendMail(smtpConfig, options, content, text)\n\t}\n}\n\nfunc isHtml(content string) bool {\n\tregex := regexp.MustCompile(`(?i)<\\s*(html|head|body|div|span|p|a|img|table|tr|td|th|tbody|thead|tfoot|ul|ol|li|dl|dt|dd|form|input|textarea|button|select|option|optgroup|fieldset|legend|label|iframe|embed|object|param|video|audio|source|canvas|svg|math|style|link|script|meta|base|title|br|hr|b|strong|i|em|u|s|strike|del|ins|mark|small|sub|sup|big|pre|code|q|blockquote|abbr|address|bdo|cite|dfn|kbd|var|samp|ruby|rt|rp|time|progress|meter|output|area|map)`)\n\treturn regex.MatchString(content)\n}\n\nfunc convertHtmlToText(content string) string {\n\tdoc, err := goquery.NewDocumentFromReader(strings.NewReader(content))\n\tif err != nil {\n\t\tlog.Errorf(\"failed to convert html to text: %v\", err)\n\t\ttrace.PrintError(err)\n\t\treturn \"\"\n\t}\n\treturn doc.Text()\n}\n\ntype smtpAuthentication struct {\n\tServer         string\n\tPort           int\n\tSenderEmail    string\n\tSenderIdentity string\n\tSMTPUser       string\n\tSMTPPassword   string\n}\n\n// sendOptions are options for sending an email\ntype sendOptions struct {\n\tSubject string\n\tTo      []string\n\tCc      []string\n\tBcc     []string\n}\n\nfunc getMailMessage(smtpConfig smtpAuthentication, options sendOptions, htmlBody string, txtBody string) (m *gomail.Message, err error) {\n\tif len(options.To) == 0 {\n\t\treturn nil, errors.New(\"no receiver emails configured\")\n\t}\n\n\t// from\n\tfrom := mail.Address{\n\t\tName:    smtpConfig.SenderIdentity,\n\t\tAddress: smtpConfig.SenderEmail,\n\t}\n\n\t// message\n\tm = gomail.NewMessage()\n\tm.SetHeader(\"From\", from.String())\n\tm.SetHeader(\"To\", options.To...)\n\tm.SetHeader(\"Subject\", options.Subject)\n\tif len(options.Cc) > 0 {\n\t\tm.SetHeader(\"Cc\", options.Cc...)\n\t}\n\tif len(options.Bcc) > 0 {\n\t\tm.SetHeader(\"Bcc\", options.Bcc...)\n\t}\n\tm.SetBody(\"text/plain\", txtBody)\n\tm.AddAlternative(\"text/html\", htmlBody)\n\n\treturn m, nil\n}\n\n// send email\nfunc sendMail(smtpConfig smtpAuthentication, options sendOptions, htmlBody string, txtBody string) error {\n\tif smtpConfig.Server == \"\" {\n\t\treturn errors.New(\"SMTP server config is empty\")\n\t}\n\n\tif smtpConfig.Port == 0 {\n\t\treturn errors.New(\"SMTP port config is empty\")\n\t}\n\n\tif smtpConfig.SMTPUser == \"\" {\n\t\treturn errors.New(\"SMTP user is empty\")\n\t}\n\n\tm, err := getMailMessage(smtpConfig, options, htmlBody, txtBody)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// dialer\n\td := gomail.NewDialer(smtpConfig.Server, smtpConfig.Port, smtpConfig.SMTPUser, smtpConfig.SMTPPassword)\n\n\treturn d.DialAndSend(m)\n}\n"
  },
  {
    "path": "core/notification/mail_gmail.go",
    "content": "package notification\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"golang.org/x/oauth2/google\"\n\t\"google.golang.org/api/gmail/v1\"\n\t\"strings\"\n)\n\nfunc sendMailGmail(ch *models.NotificationChannelV2, smtpConfig smtpAuthentication, options sendOptions, htmlBody, txtBody string) error {\n\t// 读取服务账户 JSON 密钥\n\tb := []byte(ch.GoogleOAuth2Json)\n\n\t// 使用服务账户 JSON 密钥文件创建 JWT 配置\n\tconfig, err := google.JWTConfigFromJSON(b, gmail.GmailSendScope)\n\tif err != nil {\n\t\tlog.Errorf(\"Unable to parse service account key file to config: %v\", err)\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// 使用服务账户的电子邮件地址来模拟用户\n\tconfig.Subject = ch.SMTPUsername\n\n\t// 创建 Gmail 服务\n\tclient := config.Client(context.Background())\n\tsrv, err := gmail.New(client)\n\tif err != nil {\n\t\tlog.Errorf(\"Unable to create Gmail client: %v\", err)\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// 创建 MIME 邮件\n\tm, err := getMailMessage(smtpConfig, options, htmlBody, txtBody)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar buf strings.Builder\n\tif _, err := m.WriteTo(&buf); err != nil {\n\t\tlog.Errorf(\"Unable to write message: %v\", err)\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// 将邮件内容进行 base64 编码\n\tgmsg := &gmail.Message{\n\t\tRaw: base64.URLEncoding.EncodeToString([]byte(buf.String())),\n\t}\n\n\t// 发送邮件\n\t_, err = srv.Users.Messages.Send(\"me\", gmsg).Do()\n\tif err != nil {\n\t\tlog.Errorf(\"Unable to send email: %v\", err)\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "core/notification/oauth2_gmail.go",
    "content": "package notification\n\nimport (\n\t\"context\"\n\t\"github.com/apex/log\"\n\t\"golang.org/x/oauth2\"\n\t\"golang.org/x/oauth2/google\"\n\t\"net/smtp\"\n\t\"time\"\n)\n\n// 获取服务账户的OAuth2配置\nfunc getGmailOAuth2Token(oauth2Json string) (token *oauth2.Token, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)\n\tdefer cancel()\n\n\t// 读取服务账户 JSON 密钥\n\tb := []byte(oauth2Json)\n\n\t// 使用服务账户 JSON 密钥文件创建 JWT 配置\n\tconfig, err := google.JWTConfigFromJSON(b, \"https://mail.google.com/\")\n\tif err != nil {\n\t\tlog.Errorf(\"Unable to parse service account key file to config: %v\", err)\n\t\treturn nil, err\n\t}\n\n\t// 使用服务账户的电子邮件和访问令牌\n\ttoken, err = config.TokenSource(ctx).Token()\n\tif err != nil {\n\t\tlog.Errorf(\"Unable to generate token: %v\", err)\n\t\treturn nil, err\n\t}\n\treturn token, nil\n}\n\n// GmailOAuth2Auth 自定义OAuth2认证\ntype GmailOAuth2Auth struct {\n\tusername, accessToken string\n}\n\nfunc (a *GmailOAuth2Auth) Start(_ *smtp.ServerInfo) (string, []byte, error) {\n\treturn \"XOAUTH2\", []byte(\"user=\" + a.username + \"\\x01auth=Bearer \" + a.accessToken + \"\\x01\\x01\"), nil\n}\n\nfunc (a *GmailOAuth2Auth) Next(_ []byte, _ bool) ([]byte, error) {\n\treturn nil, nil\n}\n"
  },
  {
    "path": "core/notification/service_v2.go",
    "content": "package notification\n\nimport (\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gomarkdown/markdown\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"regexp\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype ServiceV2 struct {\n}\n\nfunc (svc *ServiceV2) Send(s *models.NotificationSettingV2, args ...any) {\n\ttitle := s.Title\n\n\twg := sync.WaitGroup{}\n\twg.Add(len(s.ChannelIds))\n\tfor _, chId := range s.ChannelIds {\n\t\tgo func(chId primitive.ObjectID) {\n\t\t\tdefer wg.Done()\n\t\t\tch, err := service.NewModelServiceV2[models.NotificationChannelV2]().GetById(chId)\n\t\t\tif err != nil {\n\t\t\t\tlog.Errorf(\"[NotificationServiceV2] get channel error: %v\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tcontent := svc.getContent(s, ch, args...)\n\t\t\tswitch ch.Type {\n\t\t\tcase TypeMail:\n\t\t\t\tsvc.SendMail(s, ch, title, content)\n\t\t\tcase TypeIM:\n\t\t\t\tsvc.SendIM(s, ch, title, content)\n\t\t\t}\n\t\t}(chId)\n\t}\n\twg.Wait()\n}\n\nfunc (svc *ServiceV2) SendMail(s *models.NotificationSettingV2, ch *models.NotificationChannelV2, title, content string) {\n\tmailTo := s.MailTo\n\tmailCc := s.MailCc\n\tmailBcc := s.MailBcc\n\n\t// request\n\tr, _ := svc.createRequest(s, ch, title, content)\n\n\t// send mail\n\terr := SendMail(s, ch, mailTo, mailCc, mailBcc, title, content)\n\tif err != nil {\n\t\tlog.Errorf(\"[NotificationServiceV2] send mail error: %v\", err)\n\t}\n\n\t// save request\n\tgo svc.saveRequest(r, err)\n}\n\nfunc (svc *ServiceV2) SendIM(s *models.NotificationSettingV2, ch *models.NotificationChannelV2, title, content string) {\n\t// request\n\tr, _ := svc.createRequest(s, ch, title, content)\n\n\t// send mobile notification\n\terr := SendIMNotification(ch, title, content)\n\tif err != nil {\n\t\tlog.Errorf(\"[NotificationServiceV2] send mobile notification error: %v\", err)\n\t}\n\n\t// save request\n\tgo svc.saveRequest(r, err)\n}\n\nfunc (svc *ServiceV2) getContent(s *models.NotificationSettingV2, ch *models.NotificationChannelV2, args ...any) (content string) {\n\tvd := svc.getVariableData(args...)\n\tswitch s.TemplateMode {\n\tcase constants.NotificationTemplateModeMarkdown:\n\t\tvariables := svc.parseTemplateVariables(s.TemplateMarkdown)\n\t\tcontent = svc.geContentWithVariables(s.TemplateMarkdown, variables, vd)\n\t\tif ch.Type == TypeMail {\n\t\t\tcontent = svc.convertMarkdownToHtml(content)\n\t\t}\n\t\treturn content\n\tcase constants.NotificationTemplateModeRichText:\n\t\ttemplate := s.TemplateRichText\n\t\tif ch.Type == TypeIM {\n\t\t\ttemplate = s.TemplateMarkdown\n\t\t}\n\t\tvariables := svc.parseTemplateVariables(template)\n\t\treturn svc.geContentWithVariables(template, variables, vd)\n\t}\n\n\treturn content\n}\n\nfunc (svc *ServiceV2) geContentWithVariables(template string, variables []entity.NotificationVariable, vd VariableData) (content string) {\n\tcontent = template\n\tfor _, v := range variables {\n\t\tswitch v.Category {\n\t\tcase \"task\":\n\t\t\tif vd.Task == nil {\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), \"N/A\")\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch v.Name {\n\t\t\tcase \"id\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Task.Id.Hex())\n\t\t\tcase \"status\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Task.Status)\n\t\t\tcase \"cmd\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Task.Cmd)\n\t\t\tcase \"param\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Task.Param)\n\t\t\tcase \"error\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Task.Error)\n\t\t\tcase \"pid\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%d\", vd.Task.Pid))\n\t\t\tcase \"type\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Task.Type)\n\t\t\tcase \"mode\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Task.Mode)\n\t\t\tcase \"priority\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%d\", vd.Task.Priority))\n\t\t\tcase \"created_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Task.CreatedAt))\n\t\t\tcase \"created_by\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getUsernameById(vd.Task.CreatedBy))\n\t\t\tcase \"updated_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Task.UpdatedAt))\n\t\t\tcase \"updated_by\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getUsernameById(vd.Task.UpdatedBy))\n\t\t\t}\n\n\t\tcase \"task_stat\":\n\t\t\tif vd.TaskStat == nil {\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), \"N/A\")\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch v.Name {\n\t\t\tcase \"start_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.TaskStat.StartTs))\n\t\t\tcase \"end_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.TaskStat.EndTs))\n\t\t\tcase \"wait_duration\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%ds\", vd.TaskStat.WaitDuration/1000))\n\t\t\tcase \"runtime_duration\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%ds\", vd.TaskStat.RuntimeDuration/1000))\n\t\t\tcase \"total_duration\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%ds\", vd.TaskStat.TotalDuration/1000))\n\t\t\tcase \"result_count\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%d\", vd.TaskStat.ResultCount))\n\t\t\t}\n\n\t\tcase \"spider\":\n\t\t\tif vd.Spider == nil {\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), \"N/A\")\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch v.Name {\n\t\t\tcase \"id\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Spider.Id.Hex())\n\t\t\tcase \"name\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Spider.Name)\n\t\t\tcase \"description\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Spider.Description)\n\t\t\tcase \"mode\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Spider.Mode)\n\t\t\tcase \"cmd\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Spider.Cmd)\n\t\t\tcase \"param\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Spider.Param)\n\t\t\tcase \"priority\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%d\", vd.Spider.Priority))\n\t\t\tcase \"created_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Spider.CreatedAt))\n\t\t\tcase \"created_by\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getUsernameById(vd.Spider.CreatedBy))\n\t\t\tcase \"updated_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Spider.UpdatedAt))\n\t\t\tcase \"updated_by\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getUsernameById(vd.Spider.UpdatedBy))\n\t\t\t}\n\n\t\tcase \"node\":\n\t\t\tif vd.Node == nil {\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), \"N/A\")\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch v.Name {\n\t\t\tcase \"id\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Node.Id.Hex())\n\t\t\tcase \"key\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Node.Key)\n\t\t\tcase \"name\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Node.Name)\n\t\t\tcase \"is_master\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%t\", vd.Node.IsMaster))\n\t\t\tcase \"ip\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Node.Ip)\n\t\t\tcase \"mac\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Node.Mac)\n\t\t\tcase \"hostname\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Node.Hostname)\n\t\t\tcase \"description\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Node.Description)\n\t\t\tcase \"status\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Node.Status)\n\t\t\tcase \"enabled\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%t\", vd.Node.Enabled))\n\t\t\tcase \"active\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%t\", vd.Node.Active))\n\t\t\tcase \"active_at\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Node.ActiveAt))\n\t\t\tcase \"available_runners\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%d\", vd.Node.AvailableRunners))\n\t\t\tcase \"max_runners\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%d\", vd.Node.MaxRunners))\n\t\t\tcase \"created_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Node.CreatedAt))\n\t\t\tcase \"created_by\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getUsernameById(vd.Node.CreatedBy))\n\t\t\tcase \"updated_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Node.UpdatedAt))\n\t\t\tcase \"updated_by\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getUsernameById(vd.Node.UpdatedBy))\n\t\t\t}\n\n\t\tcase \"schedule\":\n\t\t\tif vd.Schedule == nil {\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), \"N/A\")\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch v.Name {\n\t\t\tcase \"id\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Schedule.Id.Hex())\n\t\t\tcase \"name\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Schedule.Name)\n\t\t\tcase \"description\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Schedule.Description)\n\t\t\tcase \"cron\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Schedule.Cron)\n\t\t\tcase \"cmd\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Schedule.Cmd)\n\t\t\tcase \"param\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Schedule.Param)\n\t\t\tcase \"mode\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Schedule.Mode)\n\t\t\tcase \"priority\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%d\", vd.Schedule.Priority))\n\t\t\tcase \"enabled\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%t\", vd.Schedule.Enabled))\n\t\t\tcase \"created_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Schedule.CreatedAt))\n\t\t\tcase \"created_by\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getUsernameById(vd.Schedule.CreatedBy))\n\t\t\tcase \"updated_ts\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTime(vd.Schedule.UpdatedAt))\n\t\t\tcase \"updated_by\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getUsernameById(vd.Schedule.UpdatedBy))\n\t\t\t}\n\n\t\tcase \"alert\":\n\t\t\tswitch v.Name {\n\t\t\tcase \"id\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Alert.Id.Hex())\n\t\t\tcase \"name\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Alert.Name)\n\t\t\tcase \"description\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Alert.Description)\n\t\t\tcase \"enabled\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%t\", vd.Alert.Enabled))\n\t\t\tcase \"metric_name\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Alert.MetricName)\n\t\t\tcase \"operator\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Alert.Operator)\n\t\t\tcase \"lasting_seconds\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), fmt.Sprintf(\"%d\", vd.Alert.LastingSeconds))\n\t\t\tcase \"target_value\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedTargetValue(vd.Alert))\n\t\t\tcase \"level\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Alert.Level)\n\t\t\t}\n\n\t\tcase \"metric\":\n\t\t\tif vd.Metric == nil {\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), \"N/A\")\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tswitch v.Name {\n\t\t\tcase \"type\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Metric.Type)\n\t\t\tcase \"node_id\":\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), vd.Metric.NodeId.Hex())\n\t\t\tdefault:\n\t\t\t\tcontent = strings.ReplaceAll(content, v.GetKey(), svc.getFormattedMetricValue(v.Name, vd.Metric))\n\t\t\t}\n\n\t\t}\n\t}\n\treturn content\n}\n\nfunc (svc *ServiceV2) getVariableData(args ...any) (vd VariableData) {\n\tfor _, arg := range args {\n\t\tswitch arg.(type) {\n\t\tcase *models.TaskV2:\n\t\t\tvd.Task = arg.(*models.TaskV2)\n\t\tcase *models.TaskStatV2:\n\t\t\tvd.TaskStat = arg.(*models.TaskStatV2)\n\t\tcase *models.SpiderV2:\n\t\t\tvd.Spider = arg.(*models.SpiderV2)\n\t\tcase *models.NodeV2:\n\t\t\tvd.Node = arg.(*models.NodeV2)\n\t\tcase *models.ScheduleV2:\n\t\t\tvd.Schedule = arg.(*models.ScheduleV2)\n\t\tcase *models.NotificationAlertV2:\n\t\t\tvd.Alert = arg.(*models.NotificationAlertV2)\n\t\tcase *models.MetricV2:\n\t\t\tvd.Metric = arg.(*models.MetricV2)\n\t\t}\n\t}\n\treturn vd\n}\n\nfunc (svc *ServiceV2) parseTemplateVariables(template string) (variables []entity.NotificationVariable) {\n\t// regex pattern\n\tregex := regexp.MustCompile(\"\\\\$\\\\{(\\\\w+):(\\\\w+)}\")\n\n\t// find all matches\n\tmatches := regex.FindAllStringSubmatch(template, -1)\n\n\t// variables map\n\tvariablesMap := make(map[string]entity.NotificationVariable)\n\n\t// iterate over matches\n\tfor _, match := range matches {\n\t\tvariable := entity.NotificationVariable{\n\t\t\tCategory: match[1],\n\t\t\tName:     match[2],\n\t\t}\n\t\tkey := fmt.Sprintf(\"%s:%s\", variable.Category, variable.Name)\n\t\tif _, ok := variablesMap[key]; !ok {\n\t\t\tvariablesMap[key] = variable\n\t\t}\n\t}\n\n\t// convert map to slice\n\tfor _, variable := range variablesMap {\n\t\tvariables = append(variables, variable)\n\t}\n\n\treturn variables\n}\n\nfunc (svc *ServiceV2) getUsernameById(id primitive.ObjectID) (username string) {\n\tif id.IsZero() {\n\t\treturn \"\"\n\t}\n\tu, err := service.NewModelServiceV2[models.UserV2]().GetById(id)\n\tif err != nil {\n\t\tlog.Errorf(\"[NotificationServiceV2] get user error: %v\", err)\n\t\treturn \"\"\n\t}\n\treturn u.Username\n}\n\nfunc (svc *ServiceV2) getFormattedTime(t time.Time) (res string) {\n\tif t.IsZero() {\n\t\treturn \"N/A\"\n\t}\n\treturn t.Local().Format(time.DateTime)\n}\n\nfunc (svc *ServiceV2) getFormattedTargetValue(a *models.NotificationAlertV2) (res string) {\n\tif strings.HasSuffix(a.MetricName, \"_percent\") {\n\t\treturn fmt.Sprintf(\"%.2f%%\", a.TargetValue)\n\t} else if strings.HasSuffix(a.MetricName, \"_memory\") {\n\t\treturn fmt.Sprintf(\"%dMB\", int(a.TargetValue/(1024*1024)))\n\t} else if strings.HasSuffix(a.MetricName, \"_disk\") {\n\t\treturn fmt.Sprintf(\"%dGB\", int(a.TargetValue/(1024*1024*1024)))\n\t} else if strings.HasSuffix(a.MetricName, \"_rate\") {\n\t\treturn fmt.Sprintf(\"%.2fMB/s\", a.TargetValue/(1024*1024))\n\t} else {\n\t\treturn fmt.Sprintf(\"%f\", a.TargetValue)\n\t}\n}\n\nfunc (svc *ServiceV2) getFormattedMetricValue(metricName string, m *models.MetricV2) (res string) {\n\tswitch metricName {\n\tcase \"cpu_usage_percent\":\n\t\treturn fmt.Sprintf(\"%.2f%%\", m.CpuUsagePercent)\n\tcase \"total_memory\":\n\t\treturn fmt.Sprintf(\"%dMB\", m.TotalMemory/(1024*1024))\n\tcase \"available_memory\":\n\t\treturn fmt.Sprintf(\"%dMB\", m.AvailableMemory/(1024*1024))\n\tcase \"used_memory\":\n\t\treturn fmt.Sprintf(\"%dMB\", m.UsedMemory/(1024*1024))\n\tcase \"used_memory_percent\":\n\t\treturn fmt.Sprintf(\"%.2f%%\", m.UsedMemoryPercent)\n\tcase \"total_disk\":\n\t\treturn fmt.Sprintf(\"%dGB\", m.TotalDisk/(1024*1024*1024))\n\tcase \"available_disk\":\n\t\treturn fmt.Sprintf(\"%dGB\", m.AvailableDisk/(1024*1024*1024))\n\tcase \"used_disk\":\n\t\treturn fmt.Sprintf(\"%dGB\", m.UsedDisk/(1024*1024*1024))\n\tcase \"used_disk_percent\":\n\t\treturn fmt.Sprintf(\"%.2f%%\", m.UsedDiskPercent)\n\tcase \"disk_read_bytes_rate\":\n\t\treturn fmt.Sprintf(\"%.2fMB/s\", m.DiskReadBytesRate/(1024*1024))\n\tcase \"disk_write_bytes_rate\":\n\t\treturn fmt.Sprintf(\"%.2fMB/s\", m.DiskWriteBytesRate/(1024*1024))\n\tcase \"network_bytes_sent_rate\":\n\t\treturn fmt.Sprintf(\"%.2fMB/s\", m.NetworkBytesSentRate/(1024*1024))\n\tcase \"network_bytes_recv_rate\":\n\t\treturn fmt.Sprintf(\"%.2fMB/s\", m.NetworkBytesRecvRate/(1024*1024))\n\tdefault:\n\t\treturn \"N/A\"\n\t}\n}\n\nfunc (svc *ServiceV2) convertMarkdownToHtml(content string) (html string) {\n\treturn string(markdown.ToHTML([]byte(content), nil, nil))\n}\n\nfunc (svc *ServiceV2) SendNodeNotification(node *models.NodeV2) {\n\t// arguments\n\tvar args []any\n\targs = append(args, node)\n\n\t// settings\n\tsettings, err := service.NewModelServiceV2[models.NotificationSettingV2]().GetMany(bson.M{\n\t\t\"enabled\": true,\n\t\t\"trigger\": bson.M{\n\t\t\t\"$regex\": constants.NotificationTriggerPatternNode,\n\t\t},\n\t}, nil)\n\tif err != nil {\n\t\tlog.Errorf(\"get notification settings error: %v\", err)\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\n\tfor _, s := range settings {\n\t\t// send notification\n\t\tswitch s.Trigger {\n\t\tcase constants.NotificationTriggerNodeStatusChange:\n\t\t\tgo svc.Send(&s, args...)\n\t\tcase constants.NotificationTriggerNodeOnline:\n\t\t\tif node.Status == constants.NodeStatusOnline {\n\t\t\t\tgo svc.Send(&s, args...)\n\t\t\t}\n\t\tcase constants.NotificationTriggerNodeOffline:\n\t\t\tif node.Status == constants.NodeStatusOffline {\n\t\t\t\tgo svc.Send(&s, args...)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (svc *ServiceV2) createRequest(s *models.NotificationSettingV2, ch *models.NotificationChannelV2, title, content string) (res *models.NotificationRequestV2, err error) {\n\tsenderEmail := ch.SMTPUsername\n\tif s.UseCustomSenderEmail {\n\t\tsenderEmail = s.SenderEmail\n\t}\n\tr := models.NotificationRequestV2{\n\t\tStatus:      StatusSending,\n\t\tSettingId:   s.Id,\n\t\tChannelId:   ch.Id,\n\t\tTitle:       title,\n\t\tContent:     content,\n\t\tSenderEmail: senderEmail,\n\t\tSenderName:  s.SenderName,\n\t\tMailTo:      s.MailTo,\n\t\tMailCc:      s.MailCc,\n\t\tMailBcc:     s.MailBcc,\n\t}\n\tr.SetCreatedAt(time.Now())\n\tr.SetUpdatedAt(time.Now())\n\tr.Id, err = service.NewModelServiceV2[models.NotificationRequestV2]().InsertOne(r)\n\tif err != nil {\n\t\tlog.Errorf(\"[NotificationServiceV2] save request error: %v\", err)\n\t\treturn nil, err\n\t}\n\treturn &r, nil\n}\n\nfunc (svc *ServiceV2) saveRequest(r *models.NotificationRequestV2, err error) {\n\tif r == nil {\n\t\treturn\n\t}\n\n\tif err != nil {\n\t\tr.Status = StatusError\n\t\tr.Error = err.Error()\n\t} else {\n\t\tr.Status = StatusSuccess\n\t}\n\tr.SetUpdatedAt(time.Now())\n\terr = service.NewModelServiceV2[models.NotificationRequestV2]().ReplaceById(r.Id, *r)\n\tif err != nil {\n\t\tlog.Errorf(\"[NotificationServiceV2] save request error: %v\", err)\n\t}\n}\n\nfunc newNotificationServiceV2() *ServiceV2 {\n\treturn &ServiceV2{}\n}\n\nvar _serviceV2 *ServiceV2\nvar _serviceV2Once = new(sync.Once)\n\nfunc GetNotificationServiceV2() *ServiceV2 {\n\t_serviceV2Once.Do(func() {\n\t\t_serviceV2 = newNotificationServiceV2()\n\t})\n\treturn _serviceV2\n}\n"
  },
  {
    "path": "core/notification/service_v2_test.go",
    "content": "package notification\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestParseTemplateVariables_WithValidTemplate_ReturnsVariables(t *testing.T) {\n\tsvc := ServiceV2{}\n\ttemplate := \"Dear ${user:name}, your task ${task:id} is ${task:status}.\"\n\texpected := []entity.NotificationVariable{\n\t\t{Category: \"user\", Name: \"name\"},\n\t\t{Category: \"task\", Name: \"id\"},\n\t\t{Category: \"task\", Name: \"status\"},\n\t}\n\n\tvariables := svc.parseTemplateVariables(template)\n\n\t// contains all expected variables\n\tassert.ElementsMatch(t, expected, variables)\n}\n\nfunc TestParseTemplateVariables_WithRepeatedVariables_ReturnsUniqueVariables(t *testing.T) {\n\tsvc := ServiceV2{}\n\ttemplate := \"Dear ${user:name}, your task ${task:id} is ${task:status}. Again, ${user:name} and ${task:id}.\"\n\texpected := []entity.NotificationVariable{\n\t\t{Category: \"user\", Name: \"name\"},\n\t\t{Category: \"task\", Name: \"id\"},\n\t\t{Category: \"task\", Name: \"status\"},\n\t}\n\n\tvariables := svc.parseTemplateVariables(template)\n\n\t// contains all expected variables\n\tassert.ElementsMatch(t, expected, variables)\n}\n"
  },
  {
    "path": "core/notification/theme.go",
    "content": "package notification\n\nconst defaultTheme = `<style>\n.editor-container {\n  color: #000;\n  position: relative;\n  font-weight: 400;\n  text-align: left;\n  height: 100%;\n}\n\n.editor-inner {\n  height: calc(100% - 45px);\n  background: #fff;\n  position: relative;\n}\n\n.editor-placeholder {\n  color: #999;\n  overflow: hidden;\n  position: absolute;\n  text-overflow: ellipsis;\n  top: 15px;\n  left: 10px;\n  font-size: 15px;\n  user-select: none;\n  display: inline-block;\n  pointer-events: none;\n}\n\n.editor-input {\n  height: 100%;\n  resize: none;\n  font-size: 15px;\n  position: relative;\n  tab-size: 1;\n  outline: 0;\n  padding: 15px 10px;\n  caret-color: #444;\n}\n\n.ltr {\n  text-align: left;\n}\n\n.rtl {\n  text-align: right;\n}\n\n.editor-text-bold {\n  font-weight: bold;\n}\n\n.editor-text-italic {\n  font-style: italic;\n}\n\n.editor-text-underline {\n  text-decoration: underline;\n}\n\n.editor-text-strikethrough {\n  text-decoration: line-through;\n}\n\n.editor-text-underlineStrikethrough {\n  text-decoration: underline line-through;\n}\n\n.editor-text-code {\n  background-color: rgb(240, 242, 245);\n  padding: 1px 0.25rem;\n  font-family: Menlo, Consolas, Monaco, monospace;\n  font-size: 94%;\n}\n\n.editor-link {\n  color: rgb(33, 111, 219);\n  text-decoration: none;\n\n  &:hover {\n    color: rgb(33, 111, 219);\n    text-decoration: underline;\n  }\n}\n\n.tree-view-output {\n  display: block;\n  background: #222;\n  color: #fff;\n  padding: 5px;\n  font-size: 12px;\n  white-space: pre-wrap;\n  margin: 1px auto 10px auto;\n  max-height: 250px;\n  position: relative;\n  border-bottom-left-radius: 10px;\n  border-bottom-right-radius: 10px;\n  overflow: auto;\n  line-height: 14px;\n}\n\n.editor-code {\n  background-color: rgb(240, 242, 245);\n  font-family: Menlo, Consolas, Monaco, monospace;\n  display: block;\n  padding: 8px 8px 8px 52px;\n  line-height: 1.53;\n  font-size: 13px;\n  margin: 8px 0;\n  tab-size: 2;\n  overflow-x: auto;\n  position: relative;\n}\n\n.editor-code:before {\n  content: attr(data-gutter);\n  position: absolute;\n  background-color: #eee;\n  left: 0;\n  top: 0;\n  border-right: 1px solid #ccc;\n  padding: 8px;\n  color: #777;\n  white-space: pre-wrap;\n  text-align: right;\n  min-width: 25px;\n}\n\n.editor-code:after {\n  content: attr(data-highlight-language);\n  top: 0;\n  right: 3px;\n  padding: 3px;\n  font-size: 10px;\n  text-transform: uppercase;\n  position: absolute;\n  color: rgba(0, 0, 0, 0.5);\n}\n\n.editor-tokenComment {\n  color: slategray;\n}\n\n.editor-tokenPunctuation {\n  color: #999;\n}\n\n.editor-tokenProperty {\n  color: #905;\n}\n\n.editor-tokenSelector {\n  color: #690;\n}\n\n.editor-tokenOperator {\n  color: #9a6e3a;\n}\n\n.editor-tokenAttr {\n  color: #07a;\n}\n\n.editor-tokenVariable {\n  color: #e90;\n}\n\n.editor-tokenFunction {\n  color: #dd4a68;\n}\n\n.editor-paragraph {\n  margin: 0 0 8px;\n  position: relative;\n}\n\n.editor-paragraph:last-child {\n  margin-bottom: 0;\n}\n\n.editor-heading-h1 {\n  font-size: 24px;\n  color: rgb(5, 5, 5);\n  font-weight: 400;\n  margin: 0 0 12px;\n  padding: 0;\n}\n\n.editor-heading-h2 {\n  font-size: 20px;\n  color: rgb(101, 103, 107);\n  font-weight: 700;\n  margin: 10px 0 0;\n  padding: 0;\n}\n\n.editor-heading-h3 {\n  font-size: 16px;\n  color: rgb(101, 103, 107);\n  font-weight: 600;\n  margin: 10px 0 0;\n  padding: 0;\n}\n\n.editor-heading-h4 {\n  font-size: 14px;\n  color: rgb(101, 103, 107);\n  font-weight: 500;\n  margin: 10px 0 0;\n  padding: 0;\n}\n\n.editor-quote {\n  margin: 0 0 0 20px;\n  font-size: 15px;\n  color: rgb(101, 103, 107);\n  border-left-color: rgb(206, 208, 212);\n  border-left-width: 4px;\n  border-left-style: solid;\n  padding-left: 16px;\n}\n\n.editor-list-ol {\n  padding: 0;\n  margin: 0 0 0 16px;\n}\n\n.editor-list-ul {\n  padding: 0;\n  margin: 0 0 0 16px;\n}\n\n.editor-listitem {\n  margin: 8px 32px 8px 32px;\n}\n\n.editor-nested-listitem {\n  list-style-type: none;\n}\n\n.editor-table {\n  border-collapse: collapse;\n  border-spacing: 0;\n  overflow-y: scroll;\n  overflow-x: scroll;\n  table-layout: auto;\n  width: max-content;\n  margin: 0 25px 30px 0;\n}\n\n.editor-cell {\n  position: relative;\n  border: 1px solid #bbb;\n  min-width: 150px;\n  vertical-align: top;\n  text-align: start;\n  padding: 6px 8px;\n  outline: none;\n}\n</style>`\n\nfunc GetTheme() string {\n\treturn defaultTheme\n}\n"
  },
  {
    "path": "core/process/daemon.go",
    "content": "package process\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/sys_exec\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"math/rand\"\n\t\"os/exec\"\n\t\"time\"\n)\n\nconst (\n\tSignalCreate = iota\n\tSignalStart\n\tSignalStopped\n\tSignalError\n\tSignalExited\n\tSignalReachedMaxErrors\n)\n\ntype Daemon struct {\n\t// settings\n\tmaxErrors   int\n\texitTimeout time.Duration\n\n\t// internals\n\terrors   int\n\terrMsg   string\n\texitCode int\n\tnewCmdFn func() *exec.Cmd\n\tcmd      *exec.Cmd\n\tstopped  bool\n\tch       chan int\n}\n\nfunc (d *Daemon) Start() (err error) {\n\tgo d.handleSignal()\n\n\tfor {\n\t\t// command\n\t\td.cmd = d.newCmdFn()\n\t\td.ch <- SignalCreate\n\n\t\t// attempt to run\n\t\t_ = d.cmd.Start()\n\t\td.ch <- SignalStart\n\n\t\tif err := d.cmd.Wait(); err != nil {\n\t\t\t// stopped\n\t\t\td.ch <- SignalStopped\n\t\t\tif d.stopped {\n\t\t\t\tlog.Infof(\"daemon stopped\")\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\t// error\n\t\t\td.ch <- SignalError\n\t\t\td.errMsg = err.Error()\n\t\t\ttrace.PrintError(err)\n\t\t}\n\n\t\t// exited\n\t\td.ch <- SignalExited\n\n\t\t// exit code\n\t\td.exitCode = d.cmd.ProcessState.ExitCode()\n\n\t\t// check exit code\n\t\tif d.exitCode == 0 {\n\t\t\tlog.Infof(\"process exited with code 0\")\n\t\t\treturn\n\t\t}\n\n\t\t// error message\n\t\td.errMsg = errors.ErrorProcessDaemonProcessExited.Error()\n\n\t\t// increment errors\n\t\td.errors++\n\n\t\t// validate if error count exceeds max errors\n\t\tif d.errors >= d.maxErrors {\n\t\t\tlog.Infof(\"reached max errors: %d\", d.maxErrors)\n\t\t\td.ch <- SignalReachedMaxErrors\n\t\t\treturn errors.ErrorProcessReachedMaxErrors\n\t\t}\n\n\t\t// re-attempt\n\t\twaitSec := rand.Intn(5)\n\t\tlog.Infof(\"re-attempt to start process in %d seconds...\", waitSec)\n\t\ttime.Sleep(time.Duration(waitSec) * time.Second)\n\t}\n}\n\nfunc (d *Daemon) Stop() {\n\td.stopped = true\n\topts := &sys_exec.KillProcessOptions{\n\t\tTimeout: d.exitTimeout,\n\t\tForce:   false,\n\t}\n\t_ = sys_exec.KillProcess(d.cmd, opts)\n}\n\nfunc (d *Daemon) GetMaxErrors() (maxErrors int) {\n\treturn d.maxErrors\n}\n\nfunc (d *Daemon) SetMaxErrors(maxErrors int) {\n\td.maxErrors = maxErrors\n}\n\nfunc (d *Daemon) GetExitTimeout() (timeout time.Duration) {\n\treturn d.exitTimeout\n}\n\nfunc (d *Daemon) SetExitTimeout(timeout time.Duration) {\n\td.exitTimeout = timeout\n}\n\nfunc (d *Daemon) GetCmd() (cmd *exec.Cmd) {\n\treturn d.cmd\n}\n\nfunc (d *Daemon) GetCh() (ch chan int) {\n\treturn d.ch\n}\n\nfunc (d *Daemon) handleSignal() {\n\tfor {\n\t\tselect {\n\t\tcase signal := <-d.ch:\n\t\t\tswitch signal {\n\t\t\tcase SignalCreate:\n\t\t\t\tlog.Infof(\"process created\")\n\t\t\tcase SignalStart:\n\t\t\t\tlog.Infof(\"process started\")\n\t\t\tcase SignalStopped:\n\t\t\t\tlog.Infof(\"process stopped\")\n\t\t\tcase SignalError:\n\t\t\t\ttrace.PrintError(errors.NewProcessError(d.errMsg))\n\t\t\tcase SignalExited:\n\t\t\t\tlog.Infof(\"process exited\")\n\t\t\tcase SignalReachedMaxErrors:\n\t\t\t\tlog.Infof(\"reached max errors\")\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc NewProcessDaemon(newCmdFn func() *exec.Cmd, opts ...DaemonOption) (d interfaces.ProcessDaemon) {\n\t// daemon\n\td = &Daemon{\n\t\tmaxErrors:   5,\n\t\texitTimeout: 15 * time.Second,\n\t\terrors:      0,\n\t\terrMsg:      \"\",\n\t\tnewCmdFn:    newCmdFn,\n\t\tstopped:     false,\n\t\tch:          make(chan int),\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(d)\n\t}\n\n\treturn d\n}\n"
  },
  {
    "path": "core/process/daemon_test.go",
    "content": "package process\n\nimport (\n\t\"github.com/stretchr/testify/require\"\n\t\"os/exec\"\n\t\"testing\"\n)\n\nfunc TestDaemon(t *testing.T) {\n\td := NewProcessDaemon(func() *exec.Cmd {\n\t\treturn exec.Command(\"echo\", \"hello\")\n\t})\n\terr := d.Start()\n\trequire.Nil(t, err)\n\n\td = NewProcessDaemon(func() *exec.Cmd {\n\t\treturn exec.Command(\"return\", \"1\")\n\t})\n\terr = d.Start()\n\trequire.NotNil(t, err)\n}\n"
  },
  {
    "path": "core/process/manage.go",
    "content": "package process\n\nimport (\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"os/exec\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"strings\"\n)\n\nvar pidRegexp, _ = regexp.Compile(\"(?:^|\\\\s+)\\\\d+(?:$|\\\\s+)\")\n\nfunc ProcessIdExists(id int) (ok bool) {\n\tlines, err := ListProcess(string(rune(id)))\n\tif err != nil {\n\t\treturn false\n\t}\n\tfor _, line := range lines {\n\t\tmatched := pidRegexp.MatchString(line)\n\t\tif matched {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc ListProcess(text string) (lines []string, err error) {\n\tif runtime.GOOS == \"windows\" {\n\t\treturn listProcessWindow(text)\n\t} else {\n\t\treturn listProcessLinuxMac(text)\n\t}\n}\n\nfunc listProcessWindow(text string) (lines []string, err error) {\n\tcmd := exec.Command(\"tasklist\", \"/fi\", text)\n\tout, err := cmd.CombinedOutput()\n\t_, ok := err.(*exec.ExitError)\n\tif !ok {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tlines = strings.Split(string(out), \"\\n\")\n\treturn lines, nil\n}\n\nfunc listProcessLinuxMac(text string) (lines []string, err error) {\n\tcmd := exec.Command(\"ps\", \"aux\")\n\tout, err := cmd.CombinedOutput()\n\t_, ok := err.(*exec.ExitError)\n\tif !ok {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\t_lines := strings.Split(string(out), \"\\n\")\n\tfor _, l := range _lines {\n\t\tif strings.Contains(l, text) {\n\t\t\tlines = append(lines, l)\n\t\t}\n\t}\n\treturn lines, nil\n}\n"
  },
  {
    "path": "core/process/options.go",
    "content": "package process\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype DaemonOption func(d interfaces.ProcessDaemon)\n\nfunc WithDaemonMaxErrors(maxErrors int) DaemonOption {\n\treturn func(d interfaces.ProcessDaemon) {\n\t\td.SetMaxErrors(maxErrors)\n\t}\n}\n\nfunc WithExitTimeout(timeout time.Duration) DaemonOption {\n\treturn func(d interfaces.ProcessDaemon) {\n\n\t}\n}\n"
  },
  {
    "path": "core/result/options.go",
    "content": "package result\n\nimport \"go.mongodb.org/mongo-driver/bson/primitive\"\n\ntype Option func(opts *Options)\n\ntype Options struct {\n\tregistryKey string             // registry key\n\tSpiderId    primitive.ObjectID // data source id\n}\n\nfunc WithRegistryKey(key string) Option {\n\treturn func(opts *Options) {\n\t\topts.registryKey = key\n\t}\n}\n"
  },
  {
    "path": "core/result/service.go",
    "content": "package result\n\nimport (\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"sync\"\n)\n\nfunc NewResultService(registryKey string, s *models.Spider) (svc2 interfaces.ResultService, err error) {\n\t// result service function\n\tvar fn interfaces.ResultServiceRegistryFn\n\n\tif registryKey == \"\" {\n\t\t// default\n\t\tfn = NewResultServiceMongo\n\t} else {\n\t\t// from registry\n\t\treg := GetResultServiceRegistry()\n\t\tfn = reg.Get(registryKey)\n\t\tif fn == nil {\n\t\t\treturn nil, errors.NewResultError(fmt.Sprintf(\"%s is not implemented\", registryKey))\n\t\t}\n\t}\n\n\t// generate result service\n\tsvc, err := fn(s.ColId, s.DataSourceId)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\treturn svc, nil\n}\n\nvar store = sync.Map{}\n\nfunc GetResultService(spiderId primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// model service\n\tmodelSvc, err := service.GetService()\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// spider\n\ts, err := modelSvc.GetSpiderById(spiderId)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// store key\n\tstoreKey := s.ColId.Hex() + \":\" + s.DataSourceId.Hex()\n\n\t// attempt to load result service from store\n\tres, _ := store.Load(storeKey)\n\tif res != nil {\n\t\tsvc, ok := res.(interfaces.ResultService)\n\t\tif ok {\n\t\t\treturn svc, nil\n\t\t}\n\t}\n\n\t// registry key\n\tvar registryKey string\n\tds, _ := modelSvc.GetDataSourceById(s.DataSourceId)\n\tif ds != nil {\n\t\tregistryKey = ds.Type\n\t}\n\n\t// create a new result service if not exists\n\tsvc, err := NewResultService(registryKey, s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// save into store\n\tstore.Store(storeKey, svc)\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/result/service_mongo.go",
    "content": "package result\n\nimport (\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"time\"\n\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"go.mongodb.org/mongo-driver/mongo/options\"\n)\n\ntype ServiceMongo struct {\n\t// dependencies\n\tmodelSvc    service.ModelService\n\tmodelColSvc interfaces.ModelBaseService\n\n\t// internals\n\tcolId primitive.ObjectID     // _id of models.DataCollection\n\tdc    *models.DataCollection // models.DataCollection\n\tt     time.Time\n}\n\nfunc (svc *ServiceMongo) List(query generic.ListQuery, opts *generic.ListOptions) (results []interface{}, err error) {\n\t_query := svc.getQuery(query)\n\t_opts := svc.getOpts(opts)\n\treturn svc.getList(_query, _opts)\n}\n\nfunc (svc *ServiceMongo) Count(query generic.ListQuery) (n int, err error) {\n\t_query := svc.getQuery(query)\n\treturn svc.modelColSvc.Count(_query)\n}\n\nfunc (svc *ServiceMongo) Insert(docs ...interface{}) (err error) {\n\tif svc.dc.Dedup.Enabled && len(svc.dc.Dedup.Keys) > 0 {\n\t\tfor _, doc := range docs {\n\t\t\thash, err := utils.GetResultHash(doc, svc.dc.Dedup.Keys)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tdoc.(interfaces.Result).SetValue(constants.HashKey, hash)\n\t\t\tquery := bson.M{constants.HashKey: hash}\n\t\t\tswitch svc.dc.Dedup.Type {\n\t\t\tcase constants.DedupTypeOverwrite:\n\t\t\t\terr = mongo.GetMongoCol(svc.dc.Name).ReplaceWithOptions(query, doc, &options.ReplaceOptions{Upsert: &[]bool{true}[0]})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn trace.TraceError(err)\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tvar o bson.M\n\t\t\t\terr := mongo.GetMongoCol(svc.dc.Name).Find(query, &mongo.FindOptions{Limit: 1}).One(&o)\n\t\t\t\tif err == nil {\n\t\t\t\t\t// exists, ignore\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif err != mongo2.ErrNoDocuments {\n\t\t\t\t\t// error\n\t\t\t\t\treturn trace.TraceError(err)\n\t\t\t\t}\n\t\t\t\t// not exists, insert\n\t\t\t\t_, err = mongo.GetMongoCol(svc.dc.Name).Insert(doc)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn trace.TraceError(err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t_, err = mongo.GetMongoCol(svc.dc.Name).InsertMany(docs)\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (svc *ServiceMongo) Index(fields []string) {\n\tfor _, field := range fields {\n\t\t_ = mongo.GetMongoCol(svc.dc.Name).CreateIndex(mongo2.IndexModel{Keys: bson.M{field: 1}})\n\t}\n}\n\nfunc (svc *ServiceMongo) SetTime(t time.Time) {\n\tsvc.t = t\n}\n\nfunc (svc *ServiceMongo) GetTime() (t time.Time) {\n\treturn svc.t\n}\n\nfunc (svc *ServiceMongo) getList(query bson.M, opts *mongo.FindOptions) (results []interface{}, err error) {\n\tlist, err := svc.modelColSvc.GetList(query, opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, d := range list.GetModels() {\n\t\tr, ok := d.(interfaces.Result)\n\t\tif ok {\n\t\t\tresults = append(results, r)\n\t\t}\n\t}\n\treturn results, nil\n}\n\nfunc (svc *ServiceMongo) getQuery(query generic.ListQuery) (res bson.M) {\n\treturn utils.GetMongoQuery(query)\n}\n\nfunc (svc *ServiceMongo) getOpts(opts *generic.ListOptions) (res *mongo.FindOptions) {\n\treturn utils.GetMongoOpts(opts)\n}\n\nfunc NewResultServiceMongo(colId primitive.ObjectID, _ primitive.ObjectID) (svc2 interfaces.ResultService, err error) {\n\t// service\n\tsvc := &ServiceMongo{\n\t\tcolId: colId,\n\t\tt:     time.Now(),\n\t}\n\n\t// dependency injection\n\tsvc.modelSvc, err = service.GetService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// data collection\n\tsvc.dc, _ = svc.modelSvc.GetDataCollectionById(colId)\n\tgo func() {\n\t\tfor {\n\t\t\ttime.Sleep(1 * time.Second)\n\t\t\tsvc.dc, _ = svc.modelSvc.GetDataCollectionById(colId)\n\t\t}\n\t}()\n\n\t// data collection model service\n\tsvc.modelColSvc = service.GetBaseServiceByColName(interfaces.ModelIdResult, svc.dc.Name)\n\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/result/service_registry.go",
    "content": "package result\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"sync\"\n)\n\ntype ServiceRegistry struct {\n\t// internals\n\tservices sync.Map\n}\n\nfunc (r *ServiceRegistry) Register(key string, fn interfaces.ResultServiceRegistryFn) {\n\tr.services.Store(key, fn)\n}\n\nfunc (r *ServiceRegistry) Unregister(key string) {\n\tr.services.Delete(key)\n}\n\nfunc (r *ServiceRegistry) Get(key string) (fn interfaces.ResultServiceRegistryFn) {\n\tres, ok := r.services.Load(key)\n\tif ok {\n\t\tfn, ok = res.(interfaces.ResultServiceRegistryFn)\n\t\tif !ok {\n\t\t\treturn nil\n\t\t}\n\t\treturn fn\n\t}\n\treturn nil\n}\n\nfunc NewResultServiceRegistry() (r interfaces.ResultServiceRegistry) {\n\tr = &ServiceRegistry{\n\t\tservices: sync.Map{},\n\t}\n\treturn r\n}\n\nvar _svc interfaces.ResultServiceRegistry\n\nfunc GetResultServiceRegistry() (r interfaces.ResultServiceRegistry) {\n\tif _svc != nil {\n\t\treturn _svc\n\t}\n\t_svc = NewResultServiceRegistry()\n\treturn _svc\n}\n"
  },
  {
    "path": "core/schedule/logger.go",
    "content": "package schedule\n\nimport (\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/robfig/cron/v3\"\n\t\"strings\"\n)\n\ntype Logger struct {\n}\n\nfunc (l *Logger) Info(msg string, keysAndValues ...interface{}) {\n\tp := l.getPlaceholder(len(keysAndValues))\n\tlog.Infof(fmt.Sprintf(\"cron: %s %s\", msg, p), keysAndValues...)\n}\n\nfunc (l *Logger) Error(err error, msg string, keysAndValues ...interface{}) {\n\tp := l.getPlaceholder(len(keysAndValues))\n\tlog.Errorf(fmt.Sprintf(\"cron: %s %s\", msg, p), keysAndValues...)\n\ttrace.PrintError(err)\n}\n\nfunc (l *Logger) getPlaceholder(n int) (s string) {\n\tvar arr []string\n\tfor i := 0; i < n; i++ {\n\t\tarr = append(arr, \"%v\")\n\t}\n\treturn strings.Join(arr, \" \")\n}\n\nfunc NewLogger() cron.Logger {\n\treturn &Logger{}\n}\n"
  },
  {
    "path": "core/schedule/options.go",
    "content": "package schedule\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype Option func(svc interfaces.ScheduleService)\n\nfunc WithConfigPath(path string) Option {\n\treturn func(svc interfaces.ScheduleService) {\n\t\tsvc.SetConfigPath(path)\n\t}\n}\n\nfunc WithLocation(loc *time.Location) Option {\n\treturn func(svc interfaces.ScheduleService) {\n\t\tsvc.SetLocation(loc)\n\t}\n}\n\nfunc WithDelayIfStillRunning() Option {\n\treturn func(svc interfaces.ScheduleService) {\n\t\tsvc.SetDelay(true)\n\t}\n}\n\nfunc WithSkipIfStillRunning() Option {\n\treturn func(svc interfaces.ScheduleService) {\n\t\tsvc.SetSkip(true)\n\t}\n}\n\nfunc WithUpdateInterval(interval time.Duration) Option {\n\treturn func(svc interfaces.ScheduleService) {\n\t}\n}\n"
  },
  {
    "path": "core/schedule/service.go",
    "content": "package schedule\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/robfig/cron/v3\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype Service struct {\n\t// dependencies\n\tinterfaces.WithConfigPath\n\tmodelSvc service.ModelService\n\tadminSvc interfaces.SpiderAdminService\n\n\t// settings variables\n\tloc            *time.Location\n\tdelay          bool\n\tskip           bool\n\tupdateInterval time.Duration\n\n\t// internals\n\tcron      *cron.Cron\n\tlogger    cron.Logger\n\tschedules []models.Schedule\n\tstopped   bool\n\tmu        sync.Mutex\n}\n\nfunc (svc *Service) GetLocation() (loc *time.Location) {\n\treturn svc.loc\n}\n\nfunc (svc *Service) SetLocation(loc *time.Location) {\n\tsvc.loc = loc\n}\n\nfunc (svc *Service) GetDelay() (delay bool) {\n\treturn svc.delay\n}\n\nfunc (svc *Service) SetDelay(delay bool) {\n\tsvc.delay = delay\n}\n\nfunc (svc *Service) GetSkip() (skip bool) {\n\treturn svc.skip\n}\n\nfunc (svc *Service) SetSkip(skip bool) {\n\tsvc.skip = skip\n}\n\nfunc (svc *Service) GetUpdateInterval() (interval time.Duration) {\n\treturn svc.updateInterval\n}\n\nfunc (svc *Service) SetUpdateInterval(interval time.Duration) {\n\tsvc.updateInterval = interval\n}\n\nfunc (svc *Service) Init() (err error) {\n\treturn svc.fetch()\n}\n\nfunc (svc *Service) Start() {\n\tsvc.cron.Start()\n\tgo svc.Update()\n}\n\nfunc (svc *Service) Wait() {\n\tutils.DefaultWait()\n\tsvc.Stop()\n}\n\nfunc (svc *Service) Stop() {\n\tsvc.stopped = true\n\tsvc.cron.Stop()\n}\n\nfunc (svc *Service) Enable(s interfaces.Schedule, args ...interface{}) (err error) {\n\tsvc.mu.Lock()\n\tdefer svc.mu.Unlock()\n\n\tid, err := svc.cron.AddFunc(s.GetCron(), svc.schedule(s.GetId()))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\ts.SetEnabled(true)\n\ts.SetEntryId(id)\n\tu := utils.GetUserFromArgs(args...)\n\treturn delegate.NewModelDelegate(s, u).Save()\n}\n\nfunc (svc *Service) Disable(s interfaces.Schedule, args ...interface{}) (err error) {\n\tsvc.mu.Lock()\n\tdefer svc.mu.Unlock()\n\n\tsvc.cron.Remove(s.GetEntryId())\n\ts.SetEnabled(false)\n\ts.SetEntryId(-1)\n\tu := utils.GetUserFromArgs(args...)\n\treturn delegate.NewModelDelegate(s, u).Save()\n}\n\nfunc (svc *Service) Update() {\n\tfor {\n\t\tif svc.stopped {\n\t\t\treturn\n\t\t}\n\n\t\tsvc.update()\n\n\t\ttime.Sleep(svc.updateInterval)\n\t}\n}\n\nfunc (svc *Service) GetCron() (c *cron.Cron) {\n\treturn svc.cron\n}\n\nfunc (svc *Service) update() {\n\t// fetch enabled schedules\n\tif err := svc.fetch(); err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\n\t// entry id map\n\tentryIdsMap := svc.getEntryIdsMap()\n\n\t// iterate enabled schedules\n\tfor _, s := range svc.schedules {\n\t\t_, ok := entryIdsMap[s.EntryId]\n\t\tif ok {\n\t\t\tentryIdsMap[s.EntryId] = true\n\t\t} else {\n\t\t\tif err := svc.Enable(&s); err != nil {\n\t\t\t\ttrace.PrintError(err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t}\n\n\t// remove non-existent entries\n\tfor id, ok := range entryIdsMap {\n\t\tif !ok {\n\t\t\tsvc.cron.Remove(id)\n\t\t}\n\t}\n}\n\nfunc (svc *Service) getEntryIdsMap() (res map[cron.EntryID]bool) {\n\tres = map[cron.EntryID]bool{}\n\tfor _, e := range svc.cron.Entries() {\n\t\tres[e.ID] = false\n\t}\n\treturn res\n}\n\nfunc (svc *Service) fetch() (err error) {\n\tquery := bson.M{\n\t\t\"enabled\": true,\n\t}\n\tsvc.schedules, err = svc.modelSvc.GetScheduleList(query, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *Service) schedule(id primitive.ObjectID) (fn func()) {\n\treturn func() {\n\t\t// schedule\n\t\ts, err := svc.modelSvc.GetScheduleById(id)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\n\t\t// spider\n\t\tspider, err := svc.modelSvc.GetSpiderById(s.GetSpiderId())\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\n\t\t// options\n\t\topts := &interfaces.SpiderRunOptions{\n\t\t\tMode:       s.GetMode(),\n\t\t\tNodeIds:    s.GetNodeIds(),\n\t\t\tCmd:        s.GetCmd(),\n\t\t\tParam:      s.GetParam(),\n\t\t\tPriority:   s.GetPriority(),\n\t\t\tScheduleId: s.GetId(),\n\t\t\tUserId:     s.UserId,\n\t\t}\n\n\t\t// normalize options\n\t\tif opts.Mode == \"\" {\n\t\t\topts.Mode = spider.Mode\n\t\t}\n\t\tif len(opts.NodeIds) == 0 {\n\t\t\topts.NodeIds = spider.NodeIds\n\t\t}\n\t\tif opts.Cmd == \"\" {\n\t\t\topts.Cmd = spider.Cmd\n\t\t}\n\t\tif opts.Param == \"\" {\n\t\t\topts.Param = spider.Param\n\t\t}\n\t\tif opts.Priority == 0 {\n\t\t\tif spider.Priority > 0 {\n\t\t\t\topts.Priority = spider.Priority\n\t\t\t} else {\n\t\t\t\topts.Priority = 5\n\t\t\t}\n\t\t}\n\n\t\t// schedule or assign a task in the task queue\n\t\tif _, err := svc.adminSvc.Schedule(s.GetSpiderId(), opts); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t}\n\t}\n}\n\nfunc NewScheduleService() (svc2 interfaces.ScheduleService, err error) {\n\t// service\n\tsvc := &Service{\n\t\tWithConfigPath: config.NewConfigPathService(),\n\t\tloc:            time.Local,\n\t\t// TODO: implement delay and skip\n\t\tdelay:          false,\n\t\tskip:           false,\n\t\tupdateInterval: 1 * time.Minute,\n\t}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(\n\t\tmodelSvc service.ModelService,\n\t\tadminSvc interfaces.SpiderAdminService,\n\t) {\n\t\tsvc.modelSvc = modelSvc\n\t\tsvc.adminSvc = adminSvc\n\t}); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// logger\n\tsvc.logger = NewLogger()\n\n\t// cron\n\tsvc.cron = cron.New(\n\t\tcron.WithLogger(svc.logger),\n\t\tcron.WithLocation(svc.loc),\n\t\tcron.WithChain(cron.Recover(svc.logger)),\n\t)\n\n\t// initialize\n\tif err := svc.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nvar svc interfaces.ScheduleService\n\nfunc GetScheduleService() (res interfaces.ScheduleService, err error) {\n\tif svc != nil {\n\t\treturn svc, nil\n\t}\n\tsvc, err = NewScheduleService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/schedule/service_v2.go",
    "content": "package schedule\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/spider/admin\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/robfig/cron/v3\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype ServiceV2 struct {\n\t// dependencies\n\tinterfaces.WithConfigPath\n\tmodelSvc *service.ModelServiceV2[models2.ScheduleV2]\n\tadminSvc *admin.ServiceV2\n\n\t// settings variables\n\tloc            *time.Location\n\tdelay          bool\n\tskip           bool\n\tupdateInterval time.Duration\n\n\t// internals\n\tcron      *cron.Cron\n\tlogger    cron.Logger\n\tschedules []models2.ScheduleV2\n\tstopped   bool\n\tmu        sync.Mutex\n}\n\nfunc (svc *ServiceV2) GetLocation() (loc *time.Location) {\n\treturn svc.loc\n}\n\nfunc (svc *ServiceV2) SetLocation(loc *time.Location) {\n\tsvc.loc = loc\n}\n\nfunc (svc *ServiceV2) GetDelay() (delay bool) {\n\treturn svc.delay\n}\n\nfunc (svc *ServiceV2) SetDelay(delay bool) {\n\tsvc.delay = delay\n}\n\nfunc (svc *ServiceV2) GetSkip() (skip bool) {\n\treturn svc.skip\n}\n\nfunc (svc *ServiceV2) SetSkip(skip bool) {\n\tsvc.skip = skip\n}\n\nfunc (svc *ServiceV2) GetUpdateInterval() (interval time.Duration) {\n\treturn svc.updateInterval\n}\n\nfunc (svc *ServiceV2) SetUpdateInterval(interval time.Duration) {\n\tsvc.updateInterval = interval\n}\n\nfunc (svc *ServiceV2) Init() (err error) {\n\treturn svc.fetch()\n}\n\nfunc (svc *ServiceV2) Start() {\n\tsvc.cron.Start()\n\tgo svc.Update()\n}\n\nfunc (svc *ServiceV2) Wait() {\n\tutils.DefaultWait()\n\tsvc.Stop()\n}\n\nfunc (svc *ServiceV2) Stop() {\n\tsvc.stopped = true\n\tsvc.cron.Stop()\n}\n\nfunc (svc *ServiceV2) Enable(s models2.ScheduleV2, by primitive.ObjectID) (err error) {\n\tsvc.mu.Lock()\n\tdefer svc.mu.Unlock()\n\n\tid, err := svc.cron.AddFunc(s.Cron, svc.schedule(s.Id))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\ts.Enabled = true\n\ts.EntryId = id\n\ts.SetUpdated(by)\n\treturn svc.modelSvc.ReplaceById(s.Id, s)\n}\n\nfunc (svc *ServiceV2) Disable(s models2.ScheduleV2, by primitive.ObjectID) (err error) {\n\tsvc.mu.Lock()\n\tdefer svc.mu.Unlock()\n\n\tsvc.cron.Remove(s.EntryId)\n\ts.Enabled = false\n\ts.EntryId = -1\n\ts.SetUpdated(by)\n\treturn svc.modelSvc.ReplaceById(s.Id, s)\n}\n\nfunc (svc *ServiceV2) Update() {\n\tfor {\n\t\tif svc.stopped {\n\t\t\treturn\n\t\t}\n\n\t\tsvc.update()\n\n\t\ttime.Sleep(svc.updateInterval)\n\t}\n}\n\nfunc (svc *ServiceV2) GetCron() (c *cron.Cron) {\n\treturn svc.cron\n}\n\nfunc (svc *ServiceV2) update() {\n\t// fetch enabled schedules\n\tif err := svc.fetch(); err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\n\t// entry id map\n\tentryIdsMap := svc.getEntryIdsMap()\n\n\t// iterate enabled schedules\n\tfor _, s := range svc.schedules {\n\t\t_, ok := entryIdsMap[s.EntryId]\n\t\tif ok {\n\t\t\tentryIdsMap[s.EntryId] = true\n\t\t} else {\n\t\t\tif !s.Enabled {\n\t\t\t\terr := svc.Enable(s, s.GetCreatedBy())\n\t\t\t\tif err != nil {\n\t\t\t\t\ttrace.PrintError(err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// remove non-existent entries\n\tfor id, ok := range entryIdsMap {\n\t\tif !ok {\n\t\t\tsvc.cron.Remove(id)\n\t\t}\n\t}\n}\n\nfunc (svc *ServiceV2) getEntryIdsMap() (res map[cron.EntryID]bool) {\n\tres = map[cron.EntryID]bool{}\n\tfor _, e := range svc.cron.Entries() {\n\t\tres[e.ID] = false\n\t}\n\treturn res\n}\n\nfunc (svc *ServiceV2) fetch() (err error) {\n\tquery := bson.M{\n\t\t\"enabled\": true,\n\t}\n\tsvc.schedules, err = svc.modelSvc.GetMany(query, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ServiceV2) schedule(id primitive.ObjectID) (fn func()) {\n\treturn func() {\n\t\t// schedule\n\t\ts, err := svc.modelSvc.GetById(id)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\n\t\t// spider\n\t\tspider, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(s.SpiderId)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\n\t\t// options\n\t\topts := &interfaces.SpiderRunOptions{\n\t\t\tMode:       s.Mode,\n\t\t\tNodeIds:    s.NodeIds,\n\t\t\tCmd:        s.Cmd,\n\t\t\tParam:      s.Param,\n\t\t\tPriority:   s.Priority,\n\t\t\tScheduleId: s.Id,\n\t\t\tUserId:     s.GetCreatedBy(),\n\t\t}\n\n\t\t// normalize options\n\t\tif opts.Mode == \"\" {\n\t\t\topts.Mode = spider.Mode\n\t\t}\n\t\tif len(opts.NodeIds) == 0 {\n\t\t\topts.NodeIds = spider.NodeIds\n\t\t}\n\t\tif opts.Cmd == \"\" {\n\t\t\topts.Cmd = spider.Cmd\n\t\t}\n\t\tif opts.Param == \"\" {\n\t\t\topts.Param = spider.Param\n\t\t}\n\t\tif opts.Priority == 0 {\n\t\t\tif spider.Priority > 0 {\n\t\t\t\topts.Priority = spider.Priority\n\t\t\t} else {\n\t\t\t\topts.Priority = 5\n\t\t\t}\n\t\t}\n\n\t\t// schedule or assign a task in the task queue\n\t\tif _, err := svc.adminSvc.Schedule(s.SpiderId, opts); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t}\n\t}\n}\n\nfunc NewScheduleServiceV2() (svc2 *ServiceV2, err error) {\n\t// service\n\tsvc := &ServiceV2{\n\t\tWithConfigPath: config.NewConfigPathService(),\n\t\tloc:            time.Local,\n\t\t// TODO: implement delay and skip\n\t\tdelay:          false,\n\t\tskip:           false,\n\t\tupdateInterval: 1 * time.Minute,\n\t}\n\tsvc.adminSvc, err = admin.GetSpiderAdminServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tsvc.modelSvc = service.NewModelServiceV2[models2.ScheduleV2]()\n\n\t// logger\n\tsvc.logger = NewLogger()\n\n\t// cron\n\tsvc.cron = cron.New(\n\t\tcron.WithLogger(svc.logger),\n\t\tcron.WithLocation(svc.loc),\n\t\tcron.WithChain(cron.Recover(svc.logger)),\n\t)\n\n\t// initialize\n\tif err := svc.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nvar svcV2 *ServiceV2\nvar svcV2Once = new(sync.Once)\n\nfunc GetScheduleServiceV2() (res *ServiceV2, err error) {\n\tif svcV2 != nil {\n\t\treturn svcV2, nil\n\t}\n\tsvcV2Once.Do(func() {\n\t\tsvcV2, err = NewScheduleServiceV2()\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"failed to get schedule service: %v\", err)\n\t\t}\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn svcV2, nil\n}\n"
  },
  {
    "path": "core/schedule/test/base.go",
    "content": "package test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/schedule\"\n\t\"go.uber.org/dig\"\n\t\"testing\"\n)\n\nfunc init() {\n\tvar err error\n\tT, err = NewTest()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nvar T *Test\n\ntype Test struct {\n\t// dependencies\n\tmodelSvc    service.ModelService\n\tscheduleSvc interfaces.ScheduleService\n\n\t// test data\n\tTestSchedule interfaces.Schedule\n\tTestSpider   interfaces.Spider\n\tScriptName   string\n\tScript       string\n}\n\nfunc (t *Test) Setup(t2 *testing.T) {\n\tt.scheduleSvc.Start()\n\tt2.Cleanup(t.Cleanup)\n}\n\nfunc (t *Test) Cleanup() {\n\tt.scheduleSvc.Stop()\n\t_ = t.modelSvc.GetBaseService(interfaces.ModelIdTask).Delete(nil)\n}\n\nfunc NewTest() (t *Test, err error) {\n\t// test\n\tt = &Test{\n\t\tTestSpider: &models.Spider{\n\t\t\tName: \"test_spider\",\n\t\t\tCmd:  \"go run main.go\",\n\t\t},\n\t\tScriptName: \"main.go\",\n\t\tScript: `package main\nimport \"fmt\"\nfunc main() {\n  fmt.Println(\"it works\")\n}`,\n\t}\n\n\t// dependency injection\n\tc := dig.New()\n\tif err := c.Provide(service.GetService); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := c.Provide(schedule.NewScheduleService); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := c.Invoke(func(modelSvc service.ModelService, scheduleSvc interfaces.ScheduleService) {\n\t\tt.modelSvc = modelSvc\n\t\tt.scheduleSvc = scheduleSvc\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// add spider to db\n\tif err := delegate.NewModelDelegate(t.TestSpider).Add(); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// test schedule\n\tt.TestSchedule = &models.Schedule{\n\t\tName:     \"test_schedule\",\n\t\tSpiderId: t.TestSpider.GetId(),\n\t\tCron:     \"* * * * *\",\n\t}\n\tif err := delegate.NewModelDelegate(t.TestSchedule).Add(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn t, nil\n}\n"
  },
  {
    "path": "core/schedule/test/schedule_service_test.go",
    "content": "package test\n\nimport (\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestScheduleService_Enable_Disable(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\ttime.Sleep(1 * time.Second)\n\terr = T.scheduleSvc.Enable(T.TestSchedule)\n\trequire.Nil(t, err)\n\ttime.Sleep(1 * time.Second)\n\n\trequire.True(t, T.TestSchedule.GetEnabled())\n\trequire.Greater(t, int(T.TestSchedule.GetEntryId()), -1)\n\te := T.scheduleSvc.GetCron().Entry(T.TestSchedule.GetEntryId())\n\trequire.Equal(t, T.TestSchedule.GetEntryId(), e.ID)\n\ttime.Sleep(1 * time.Second)\n\n\terr = T.scheduleSvc.Disable(T.TestSchedule)\n\trequire.False(t, T.TestSchedule.GetEnabled())\n\trequire.Equal(t, 0, len(T.scheduleSvc.GetCron().Entries()))\n}\n\nfunc TestScheduleService_Run(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\ttime.Sleep(1 * time.Second)\n\terr = T.scheduleSvc.Enable(T.TestSchedule)\n\trequire.Nil(t, err)\n\ttime.Sleep(1 * time.Minute)\n\n\ttasks, err := T.modelSvc.GetTaskList(nil, nil)\n\trequire.Nil(t, err)\n\trequire.Greater(t, len(tasks), 0)\n\tfor _, task := range tasks {\n\t\trequire.False(t, task.ScheduleId.IsZero())\n\t}\n}\n"
  },
  {
    "path": "core/spider/admin/options.go",
    "content": "package admin\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\ntype Option func(svc interfaces.SpiderAdminService)\n\nfunc WithConfigPath(path string) Option {\n\treturn func(svc interfaces.SpiderAdminService) {\n\t\tsvc.SetConfigPath(path)\n\t}\n}\n"
  },
  {
    "path": "core/spider/admin/service.go",
    "content": "package admin\n\nimport (\n\t\"context\"\n\t\"github.com/apex/log\"\n\tconfig2 \"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/crawlab-team/crawlab/vcs\"\n\t\"github.com/google/uuid\"\n\t\"github.com/robfig/cron/v3\"\n\t\"github.com/spf13/viper\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype Service struct {\n\t// dependencies\n\tnodeCfgSvc   interfaces.NodeConfigService\n\tmodelSvc     service.ModelService\n\tschedulerSvc interfaces.TaskSchedulerService\n\tcron         *cron.Cron\n\tsyncLock     bool\n\n\t// settings\n\tcfgPath string\n}\n\nfunc (svc *Service) GetConfigPath() (path string) {\n\treturn svc.cfgPath\n}\n\nfunc (svc *Service) SetConfigPath(path string) {\n\tsvc.cfgPath = path\n}\n\nfunc (svc *Service) Start() (err error) {\n\treturn svc.SyncGit()\n}\n\nfunc (svc *Service) Schedule(id primitive.ObjectID, opts *interfaces.SpiderRunOptions) (taskIds []primitive.ObjectID, err error) {\n\t// spider\n\ts, err := svc.modelSvc.GetSpiderById(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// assign tasks\n\treturn svc.scheduleTasks(s, opts)\n}\n\nfunc (svc *Service) Clone(id primitive.ObjectID, opts *interfaces.SpiderCloneOptions) (err error) {\n\t// TODO: implement\n\treturn nil\n}\n\nfunc (svc *Service) Delete(id primitive.ObjectID) (err error) {\n\tpanic(\"implement me\")\n}\n\nfunc (svc *Service) SyncGit() (err error) {\n\tif _, err = svc.cron.AddFunc(\"* * * * *\", svc.syncGit); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tsvc.cron.Start()\n\treturn nil\n}\n\nfunc (svc *Service) SyncGitOne(g interfaces.Git) (err error) {\n\tsvc.syncGitOne(g)\n\treturn nil\n}\n\nfunc (svc *Service) Export(id primitive.ObjectID) (filePath string, err error) {\n\t// spider fs\n\tworkspacePath := viper.GetString(\"workspace\")\n\tspiderFolderPath := filepath.Join(workspacePath, id.Hex())\n\n\t// zip files in workspace\n\tdirPath := spiderFolderPath\n\tzipFilePath := path.Join(os.TempDir(), uuid.New().String()+\".zip\")\n\tif err := utils.ZipDirectory(dirPath, zipFilePath); err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\n\treturn zipFilePath, nil\n}\n\nfunc (svc *Service) scheduleTasks(s *models.Spider, opts *interfaces.SpiderRunOptions) (taskIds []primitive.ObjectID, err error) {\n\t// main task\n\tmainTask := &models.Task{\n\t\tSpiderId:   s.Id,\n\t\tMode:       opts.Mode,\n\t\tNodeIds:    opts.NodeIds,\n\t\tCmd:        opts.Cmd,\n\t\tParam:      opts.Param,\n\t\tScheduleId: opts.ScheduleId,\n\t\tPriority:   opts.Priority,\n\t\tUserId:     opts.UserId,\n\t\tCreateTs:   time.Now(),\n\t}\n\n\t// normalize\n\tif mainTask.Mode == \"\" {\n\t\tmainTask.Mode = s.Mode\n\t}\n\tif mainTask.NodeIds == nil {\n\t\tmainTask.NodeIds = s.NodeIds\n\t}\n\tif mainTask.Cmd == \"\" {\n\t\tmainTask.Cmd = s.Cmd\n\t}\n\tif mainTask.Param == \"\" {\n\t\tmainTask.Param = s.Param\n\t}\n\tif mainTask.Priority == 0 {\n\t\tmainTask.Priority = s.Priority\n\t}\n\n\tif svc.isMultiTask(opts) {\n\t\t// multi tasks\n\t\tnodeIds, err := svc.getNodeIds(opts)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, nodeId := range nodeIds {\n\t\t\tt := &models.Task{\n\t\t\t\tSpiderId:   s.Id,\n\t\t\t\tMode:       opts.Mode,\n\t\t\t\tCmd:        opts.Cmd,\n\t\t\t\tParam:      opts.Param,\n\t\t\t\tNodeId:     nodeId,\n\t\t\t\tScheduleId: opts.ScheduleId,\n\t\t\t\tPriority:   opts.Priority,\n\t\t\t\tUserId:     opts.UserId,\n\t\t\t\tCreateTs:   time.Now(),\n\t\t\t}\n\t\t\tt2, err := svc.schedulerSvc.Enqueue(t)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\ttaskIds = append(taskIds, t2.GetId())\n\t\t}\n\t} else {\n\t\t// single task\n\t\tnodeIds, err := svc.getNodeIds(opts)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif len(nodeIds) > 0 {\n\t\t\tmainTask.NodeId = nodeIds[0]\n\t\t}\n\t\tt2, err := svc.schedulerSvc.Enqueue(mainTask)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ttaskIds = append(taskIds, t2.GetId())\n\t}\n\n\treturn taskIds, nil\n}\n\nfunc (svc *Service) getNodeIds(opts *interfaces.SpiderRunOptions) (nodeIds []primitive.ObjectID, err error) {\n\tif opts.Mode == constants.RunTypeAllNodes {\n\t\tquery := bson.M{\n\t\t\t\"active\":  true,\n\t\t\t\"enabled\": true,\n\t\t\t\"status\":  constants.NodeStatusOnline,\n\t\t}\n\t\tnodes, err := svc.modelSvc.GetNodeList(query, nil)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, node := range nodes {\n\t\t\tnodeIds = append(nodeIds, node.GetId())\n\t\t}\n\t} else if opts.Mode == constants.RunTypeSelectedNodes {\n\t\tnodeIds = opts.NodeIds\n\t}\n\treturn nodeIds, nil\n}\n\nfunc (svc *Service) isMultiTask(opts *interfaces.SpiderRunOptions) (res bool) {\n\tif opts.Mode == constants.RunTypeAllNodes {\n\t\tquery := bson.M{\n\t\t\t\"active\":  true,\n\t\t\t\"enabled\": true,\n\t\t\t\"status\":  constants.NodeStatusOnline,\n\t\t}\n\t\tnodes, err := svc.modelSvc.GetNodeList(query, nil)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn false\n\t\t}\n\t\treturn len(nodes) > 1\n\t} else if opts.Mode == constants.RunTypeRandom {\n\t\treturn false\n\t} else if opts.Mode == constants.RunTypeSelectedNodes {\n\t\treturn len(opts.NodeIds) > 1\n\t} else {\n\t\treturn false\n\t}\n}\n\nfunc (svc *Service) syncGit() {\n\tif svc.syncLock {\n\t\tlog.Infof(\"[SpiderAdminService] sync git is locked, skip\")\n\t\treturn\n\t}\n\tlog.Infof(\"[SpiderAdminService] start to sync git\")\n\n\tsvc.syncLock = true\n\tdefer func() {\n\t\tsvc.syncLock = false\n\t}()\n\n\t// spiders\n\tspiders, err := svc.modelSvc.GetSpiderList(nil, nil)\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\n\t// spider ids\n\tvar spiderIds []primitive.ObjectID\n\tfor _, s := range spiders {\n\t\tspiderIds = append(spiderIds, s.Id)\n\t}\n\n\tif len(spiderIds) > 0 {\n\t\t// gits\n\t\tgits, err := svc.modelSvc.GetGitList(bson.M{\n\t\t\t\"_id\": bson.M{\n\t\t\t\t\"$in\": spiderIds,\n\t\t\t},\n\t\t\t\"auto_pull\": true,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\n\t\twg := sync.WaitGroup{}\n\t\twg.Add(len(gits))\n\t\tfor _, g := range gits {\n\t\t\tgo func(g models.Git) {\n\t\t\t\tsvc.syncGitOne(&g)\n\t\t\t\twg.Done()\n\t\t\t}(g)\n\t\t}\n\t\twg.Wait()\n\t}\n\n\tlog.Infof(\"[SpiderAdminService] finished sync git\")\n}\n\nfunc (svc *Service) syncGitOne(g interfaces.Git) {\n\tlog.Infof(\"[SpiderAdminService] sync git %s\", g.GetId())\n\n\tctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)\n\tdefer cancel()\n\n\t// git client\n\tworkspacePath := viper.GetString(\"workspace\")\n\tgitClient, err := vcs.NewGitClient(vcs.WithPath(filepath.Join(workspacePath, g.GetId().Hex())))\n\tif err != nil {\n\t\treturn\n\t}\n\n\t// set auth\n\tutils.InitGitClientAuth(g, gitClient)\n\n\t// check if remote has changes\n\tok, err := gitClient.IsRemoteChanged()\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\tif !ok {\n\t\t// no change\n\t\treturn\n\t}\n\n\t// pull and sync to workspace\n\tif err := gitClient.Reset(); err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\tif err := gitClient.Pull(); err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\n\t// wait for context to end\n\t<-ctx.Done()\n}\n\nfunc NewSpiderAdminService(opts ...Option) (svc2 interfaces.SpiderAdminService, err error) {\n\tsvc := &Service{\n\t\tcfgPath: config2.GetConfigPath(),\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(svc)\n\t}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(nodeCfgSvc interfaces.NodeConfigService, modelSvc service.ModelService, schedulerSvc interfaces.TaskSchedulerService) {\n\t\tsvc.nodeCfgSvc = nodeCfgSvc\n\t\tsvc.modelSvc = modelSvc\n\t\tsvc.schedulerSvc = schedulerSvc\n\t}); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// cron\n\tsvc.cron = cron.New()\n\n\t// validate node type\n\tif !svc.nodeCfgSvc.IsMaster() {\n\t\treturn nil, trace.TraceError(errors.ErrorSpiderForbidden)\n\t}\n\n\treturn svc, nil\n}\n\nvar _service interfaces.SpiderAdminService\n\nfunc GetSpiderAdminService() (svc2 interfaces.SpiderAdminService, err error) {\n\tif _service != nil {\n\t\treturn _service, nil\n\t}\n\n\t_service, err = NewSpiderAdminService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn _service, nil\n}\n"
  },
  {
    "path": "core/spider/admin/service_v2.go",
    "content": "package admin\n\nimport (\n\tlog2 \"github.com/apex/log\"\n\tconfig2 \"github.com/crawlab-team/crawlab/core/config\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/core/task/scheduler\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/robfig/cron/v3\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"sync\"\n)\n\ntype ServiceV2 struct {\n\t// dependencies\n\tnodeCfgSvc   interfaces.NodeConfigService\n\tschedulerSvc *scheduler.ServiceV2\n\tcron         *cron.Cron\n\tsyncLock     bool\n\n\t// settings\n\tcfgPath string\n}\n\nfunc (svc *ServiceV2) Schedule(id primitive.ObjectID, opts *interfaces.SpiderRunOptions) (taskIds []primitive.ObjectID, err error) {\n\t// spider\n\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// assign tasks\n\treturn svc.scheduleTasks(s, opts)\n}\n\nfunc (svc *ServiceV2) scheduleTasks(s *models2.SpiderV2, opts *interfaces.SpiderRunOptions) (taskIds []primitive.ObjectID, err error) {\n\t// main task\n\tt := &models2.TaskV2{\n\t\tSpiderId:   s.Id,\n\t\tMode:       opts.Mode,\n\t\tNodeIds:    opts.NodeIds,\n\t\tCmd:        opts.Cmd,\n\t\tParam:      opts.Param,\n\t\tScheduleId: opts.ScheduleId,\n\t\tPriority:   opts.Priority,\n\t}\n\tt.SetId(primitive.NewObjectID())\n\n\t// normalize\n\tif t.Mode == \"\" {\n\t\tt.Mode = s.Mode\n\t}\n\tif t.NodeIds == nil {\n\t\tt.NodeIds = s.NodeIds\n\t}\n\tif t.Cmd == \"\" {\n\t\tt.Cmd = s.Cmd\n\t}\n\tif t.Param == \"\" {\n\t\tt.Param = s.Param\n\t}\n\tif t.Priority == 0 {\n\t\tt.Priority = s.Priority\n\t}\n\n\tnodeIds, err := svc.getNodeIds(opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(nodeIds) > 0 {\n\t\tt.NodeId = nodeIds[0]\n\t}\n\tt2, err := svc.schedulerSvc.Enqueue(t, opts.UserId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ttaskIds = append(taskIds, t2.Id)\n\n\treturn taskIds, nil\n}\n\nfunc (svc *ServiceV2) getNodeIds(opts *interfaces.SpiderRunOptions) (nodeIds []primitive.ObjectID, err error) {\n\tif opts.Mode == constants.RunTypeAllNodes {\n\t\tquery := bson.M{\n\t\t\t\"active\":  true,\n\t\t\t\"enabled\": true,\n\t\t\t\"status\":  constants.NodeStatusOnline,\n\t\t}\n\t\tnodes, err := service.NewModelServiceV2[models2.NodeV2]().GetMany(query, nil)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, node := range nodes {\n\t\t\tnodeIds = append(nodeIds, node.Id)\n\t\t}\n\t} else if opts.Mode == constants.RunTypeSelectedNodes {\n\t\tnodeIds = opts.NodeIds\n\t}\n\treturn nodeIds, nil\n}\n\nfunc (svc *ServiceV2) isMultiTask(opts *interfaces.SpiderRunOptions) (res bool) {\n\tif opts.Mode == constants.RunTypeAllNodes {\n\t\tquery := bson.M{\n\t\t\t\"active\":  true,\n\t\t\t\"enabled\": true,\n\t\t\t\"status\":  constants.NodeStatusOnline,\n\t\t}\n\t\tnodes, err := service.NewModelServiceV2[models2.NodeV2]().GetMany(query, nil)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn false\n\t\t}\n\t\treturn len(nodes) > 1\n\t} else if opts.Mode == constants.RunTypeRandom {\n\t\treturn false\n\t} else if opts.Mode == constants.RunTypeSelectedNodes {\n\t\treturn len(opts.NodeIds) > 1\n\t} else {\n\t\treturn false\n\t}\n}\n\nfunc newSpiderAdminServiceV2() (svc2 *ServiceV2, err error) {\n\tsvc := &ServiceV2{\n\t\tnodeCfgSvc: config.GetNodeConfigService(),\n\t\tcfgPath:    config2.GetConfigPath(),\n\t}\n\tsvc.schedulerSvc, err = scheduler.GetTaskSchedulerServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// cron\n\tsvc.cron = cron.New()\n\n\t// validate node type\n\tif !svc.nodeCfgSvc.IsMaster() {\n\t\treturn nil, trace.TraceError(errors.ErrorSpiderForbidden)\n\t}\n\n\treturn svc, nil\n}\n\nvar svcV2 *ServiceV2\nvar svcV2Once = new(sync.Once)\n\nfunc GetSpiderAdminServiceV2() (svc2 *ServiceV2, err error) {\n\tif svcV2 != nil {\n\t\treturn svcV2, nil\n\t}\n\tsvcV2Once.Do(func() {\n\t\tsvcV2, err = newSpiderAdminServiceV2()\n\t\tif err != nil {\n\t\t\tlog2.Errorf(\"[GetSpiderAdminServiceV2] error: %v\", err)\n\t\t}\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn svcV2, nil\n}\n"
  },
  {
    "path": "core/stats/options.go",
    "content": "package stats\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\ntype Option func(svc interfaces.StatsService)\n"
  },
  {
    "path": "core/stats/service.go",
    "content": "package stats\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n)\n\ntype Service struct {\n}\n\nfunc (svc *Service) GetOverviewStats(query bson.M) (data interface{}, err error) {\n\tstats := bson.M{}\n\n\t// nodes\n\tstats[\"nodes\"], err = mongo.GetMongoCol(interfaces.ModelColNameNode).Count(bson.M{\"active\": true})\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil, err\n\t\t}\n\t\tstats[\"nodes\"] = 0\n\t}\n\n\t// projects\n\tstats[\"projects\"], err = mongo.GetMongoCol(interfaces.ModelColNameProject).Count(nil)\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil, err\n\t\t}\n\t\tstats[\"projects\"] = 0\n\t}\n\n\t// spiders\n\tstats[\"spiders\"], err = mongo.GetMongoCol(interfaces.ModelColNameSpider).Count(nil)\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil, err\n\t\t}\n\t\tstats[\"spiders\"] = 0\n\t}\n\n\t// schedules\n\tstats[\"schedules\"], err = mongo.GetMongoCol(interfaces.ModelColNameSchedule).Count(nil)\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil, err\n\t\t}\n\t\tstats[\"schedules\"] = 0\n\t}\n\n\t// tasks\n\tstats[\"tasks\"], err = mongo.GetMongoCol(interfaces.ModelColNameTask).Count(nil)\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil, err\n\t\t}\n\t\tstats[\"tasks\"] = 0\n\t}\n\n\t// error tasks\n\tstats[\"error_tasks\"], err = mongo.GetMongoCol(interfaces.ModelColNameTask).Count(bson.M{\"status\": constants.TaskStatusError})\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil, err\n\t\t}\n\t\tstats[\"error_tasks\"] = 0\n\t}\n\n\t// results\n\tstats[\"results\"], err = svc.getOverviewResults(query)\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil, err\n\t\t}\n\t\tstats[\"results\"] = 0\n\t}\n\n\t// users\n\tstats[\"users\"], err = mongo.GetMongoCol(interfaces.ModelColNameUser).Count(nil)\n\tif err != nil {\n\t\tif err.Error() != mongo2.ErrNoDocuments.Error() {\n\t\t\treturn nil, err\n\t\t}\n\t\tstats[\"users\"] = 0\n\t}\n\n\treturn stats, nil\n}\n\nfunc (svc *Service) GetDailyStats(query bson.M) (data interface{}, err error) {\n\ttasksStats, err := svc.getDailyTasksStats(query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn tasksStats, nil\n}\n\nfunc (svc *Service) GetTaskStats(query bson.M) (data interface{}, err error) {\n\tstats := bson.M{}\n\n\t// by status\n\tstats[\"by_status\"], err = svc.getTaskStatsByStatus(query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// by node\n\tstats[\"by_node\"], err = svc.getTaskStatsByNode(query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// by spider\n\tstats[\"by_spider\"], err = svc.getTaskStatsBySpider(query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn stats, nil\n}\n\nfunc (svc *Service) getDailyTasksStats(query bson.M) (data interface{}, err error) {\n\tpipeline := mongo2.Pipeline{\n\t\t{{\n\t\t\t\"$match\", query,\n\t\t}},\n\t\t{{\n\t\t\t\"$addFields\",\n\t\t\tbson.M{\n\t\t\t\t\"date\": bson.M{\n\t\t\t\t\t\"$dateToString\": bson.M{\n\t\t\t\t\t\t\"date\":     bson.M{\"$toDate\": \"$_id\"},\n\t\t\t\t\t\t\"format\":   \"%Y-%m-%d\",\n\t\t\t\t\t\t\"timezone\": \"Asia/Shanghai\", // TODO: parameterization\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t\t{{\n\t\t\t\"$group\",\n\t\t\tbson.M{\n\t\t\t\t\"_id\":     \"$date\",\n\t\t\t\t\"tasks\":   bson.M{\"$sum\": 1},\n\t\t\t\t\"results\": bson.M{\"$sum\": \"$result_count\"},\n\t\t\t},\n\t\t}},\n\t\t{{\n\t\t\t\"$sort\",\n\t\t\tbson.D{{\"_id\", 1}},\n\t\t}},\n\t}\n\tvar results []entity.StatsDailyItem\n\tif err := mongo.GetMongoCol(interfaces.ModelColNameTaskStat).Aggregate(pipeline, nil).All(&results); err != nil {\n\t\treturn nil, err\n\t}\n\treturn results, nil\n}\n\nfunc (svc *Service) getOverviewResults(query bson.M) (data interface{}, err error) {\n\tpipeline := mongo2.Pipeline{\n\t\t{{\"$match\", query}},\n\t\t{{\n\t\t\t\"$group\",\n\t\t\tbson.M{\n\t\t\t\t\"_id\":     nil,\n\t\t\t\t\"results\": bson.M{\"$sum\": \"$result_count\"},\n\t\t\t},\n\t\t}},\n\t}\n\tvar res bson.M\n\tif err := mongo.GetMongoCol(interfaces.ModelColNameTaskStat).Aggregate(pipeline, nil).One(&res); err != nil {\n\t\treturn nil, err\n\t}\n\treturn res[\"results\"], nil\n}\n\nfunc (svc *Service) getTaskStatsByStatus(query bson.M) (data interface{}, err error) {\n\tpipeline := mongo2.Pipeline{\n\t\t{{\"$match\", query}},\n\t\t{{\n\t\t\t\"$group\",\n\t\t\tbson.M{\n\t\t\t\t\"_id\":   \"$status\",\n\t\t\t\t\"tasks\": bson.M{\"$sum\": 1},\n\t\t\t},\n\t\t}},\n\t\t{{\n\t\t\t\"$project\",\n\t\t\tbson.M{\n\t\t\t\t\"status\": \"$_id\",\n\t\t\t\t\"tasks\":  \"$tasks\",\n\t\t\t},\n\t\t}},\n\t}\n\tvar results []bson.M\n\tif err := mongo.GetMongoCol(interfaces.ModelColNameTask).Aggregate(pipeline, nil).All(&results); err != nil {\n\t\treturn nil, err\n\t}\n\treturn results, nil\n}\n\nfunc (svc *Service) getTaskStatsByNode(query bson.M) (data interface{}, err error) {\n\tpipeline := mongo2.Pipeline{\n\t\t{{\"$match\", query}},\n\t\t{{\n\t\t\t\"$group\",\n\t\t\tbson.M{\n\t\t\t\t\"_id\":   \"$node_id\",\n\t\t\t\t\"tasks\": bson.M{\"$sum\": 1},\n\t\t\t},\n\t\t}},\n\t\t{{\n\t\t\t\"$lookup\",\n\t\t\tbson.M{\n\t\t\t\t\"from\":         interfaces.ModelColNameNode,\n\t\t\t\t\"localField\":   \"_id\",\n\t\t\t\t\"foreignField\": \"_id\",\n\t\t\t\t\"as\":           \"_n\",\n\t\t\t},\n\t\t}},\n\t\t{{\n\t\t\t\"$project\",\n\t\t\tbson.M{\n\t\t\t\t\"node_id\":   \"$node_id\",\n\t\t\t\t\"node\":      bson.M{\"$arrayElemAt\": bson.A{\"$_n\", 0}},\n\t\t\t\t\"node_name\": bson.M{\"$arrayElemAt\": bson.A{\"$_n.name\", 0}},\n\t\t\t\t\"tasks\":     \"$tasks\",\n\t\t\t},\n\t\t}},\n\t}\n\tvar results []bson.M\n\tif err := mongo.GetMongoCol(interfaces.ModelColNameTask).Aggregate(pipeline, nil).All(&results); err != nil {\n\t\treturn nil, err\n\t}\n\treturn results, nil\n}\n\nfunc (svc *Service) getTaskStatsBySpider(query bson.M) (data interface{}, err error) {\n\tpipeline := mongo2.Pipeline{\n\t\t{{\"$match\", query}},\n\t\t{{\n\t\t\t\"$group\",\n\t\t\tbson.M{\n\t\t\t\t\"_id\":   \"$spider_id\",\n\t\t\t\t\"tasks\": bson.M{\"$sum\": 1},\n\t\t\t},\n\t\t}},\n\t\t{{\n\t\t\t\"$lookup\",\n\t\t\tbson.M{\n\t\t\t\t\"from\":         interfaces.ModelColNameSpider,\n\t\t\t\t\"localField\":   \"_id\",\n\t\t\t\t\"foreignField\": \"_id\",\n\t\t\t\t\"as\":           \"_s\",\n\t\t\t},\n\t\t}},\n\t\t{{\n\t\t\t\"$project\",\n\t\t\tbson.M{\n\t\t\t\t\"spider_id\":   \"$spider_id\",\n\t\t\t\t\"spider\":      bson.M{\"$arrayElemAt\": bson.A{\"$_s\", 0}},\n\t\t\t\t\"spider_name\": bson.M{\"$arrayElemAt\": bson.A{\"$_s.name\", 0}},\n\t\t\t\t\"tasks\":       \"$tasks\",\n\t\t\t},\n\t\t}},\n\t\t{{\"$limit\", 10}},\n\t}\n\tvar results []bson.M\n\tif err := mongo.GetMongoCol(interfaces.ModelColNameTask).Aggregate(pipeline, nil).All(&results); err != nil {\n\t\treturn nil, err\n\t}\n\treturn results, nil\n}\n\nfunc (svc *Service) getTaskStatsHistogram(query bson.M) (data interface{}, err error) {\n\tpipeline := mongo2.Pipeline{\n\t\t{{\"$match\", query}},\n\t\t{{\n\t\t\t\"$lookup\",\n\t\t\tbson.M{\n\t\t\t\t\"from\":         interfaces.ModelColNameTaskStat,\n\t\t\t\t\"localField\":   \"_id\",\n\t\t\t\t\"foreignField\": \"_id\",\n\t\t\t\t\"as\":           \"_ts\",\n\t\t\t},\n\t\t}},\n\t\t{{\n\t\t\t\"$facet\",\n\t\t\tbson.M{\n\t\t\t\t\"total_duration\": bson.A{\n\t\t\t\t\tbson.M{\n\t\t\t\t\t\t\"$bucketAuto\": bson.M{\n\t\t\t\t\t\t\t\"groupBy\":     \"$_ts.td\",\n\t\t\t\t\t\t\t\"buckets\":     10,\n\t\t\t\t\t\t\t\"granularity\": \"1-2-5\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}},\n\t}\n\tvar res bson.M\n\tif err := mongo.GetMongoCol(interfaces.ModelColNameTask).Aggregate(pipeline, nil).One(&res); err != nil {\n\t\treturn nil, err\n\t}\n\treturn res, nil\n}\n\nvar svc interfaces.StatsService\n\nfunc GetStatsService() interfaces.StatsService {\n\tif svc != nil {\n\t\treturn svc\n\t}\n\n\t// service\n\tsvc = &Service{}\n\n\treturn svc\n}\n"
  },
  {
    "path": "core/sys_exec/sys_exec.go",
    "content": "package sys_exec\n\nimport (\n\t\"bufio\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/shirou/gopsutil/process\"\n\t\"os/exec\"\n\t\"time\"\n)\n\ntype KillProcessOptions struct {\n\tTimeout time.Duration\n\tForce   bool\n}\n\nfunc KillProcess(cmd *exec.Cmd, opts *KillProcessOptions) error {\n\t// process\n\tp, err := process.NewProcess(int32(cmd.Process.Pid))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// kill function\n\tkillFunc := func(p *process.Process) error {\n\t\treturn killProcessRecursive(p, opts.Force)\n\t}\n\n\tif opts.Timeout != 0 {\n\t\t// with timeout\n\t\treturn killProcessWithTimeout(p, opts.Timeout, killFunc)\n\t} else {\n\t\t// without timeout\n\t\treturn killFunc(p)\n\t}\n}\n\nfunc killProcessWithTimeout(p *process.Process, timeout time.Duration, killFunc func(*process.Process) error) error {\n\tgo func() {\n\t\tif err := killFunc(p); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t}\n\t}()\n\tfor i := 0; i < int(timeout.Seconds()); i++ {\n\t\tok, err := process.PidExists(p.Pid)\n\t\tif err == nil && !ok {\n\t\t\treturn nil\n\t\t}\n\t\ttime.Sleep(1 * time.Second)\n\t}\n\treturn killProcess(p, true)\n}\n\nfunc killProcessRecursive(p *process.Process, force bool) (err error) {\n\t// children processes\n\tcps, err := p.Children()\n\tif err != nil {\n\t\treturn killProcess(p, force)\n\t}\n\n\t// iterate children processes\n\tfor _, cp := range cps {\n\t\tif err := killProcessRecursive(cp, force); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc killProcess(p *process.Process, force bool) (err error) {\n\tif force {\n\t\terr = p.Kill()\n\t} else {\n\t\terr = p.Terminate()\n\t}\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc ConfigureCmdLogging(cmd *exec.Cmd, fn func(scanner *bufio.Scanner)) {\n\tstdout, _ := (*cmd).StdoutPipe()\n\tstderr, _ := (*cmd).StderrPipe()\n\tscannerStdout := bufio.NewScanner(stdout)\n\tscannerStderr := bufio.NewScanner(stderr)\n\tgo fn(scannerStdout)\n\tgo fn(scannerStderr)\n}\n"
  },
  {
    "path": "core/sys_exec/sys_exec_darwin.go",
    "content": "//go:build darwin\n// +build darwin\n\npackage sys_exec\n\nimport (\n\t\"errors\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"syscall\"\n)\n\nfunc BuildCmd(cmdStr string) (cmd *exec.Cmd, err error) {\n\tif cmdStr == \"\" {\n\t\treturn nil, errors.New(\"command string is empty\")\n\t}\n\targs := strings.Split(cmdStr, \" \")\n\treturn exec.Command(args[0], args[1:]...), nil\n}\n\nfunc SetPgid(cmd *exec.Cmd) {\n\tif cmd == nil {\n\t\treturn\n\t}\n\tif cmd.SysProcAttr == nil {\n\t\tcmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}\n\t} else {\n\t\tcmd.SysProcAttr.Setpgid = true\n\t}\n}\n"
  },
  {
    "path": "core/sys_exec/sys_exec_linux.go",
    "content": "//go:build linux\n// +build linux\n\npackage sys_exec\n\nimport (\n\t\"errors\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"syscall\"\n)\n\nfunc BuildCmd(cmdStr string) (cmd *exec.Cmd, err error) {\n\tif cmdStr == \"\" {\n\t\treturn nil, errors.New(\"command string is empty\")\n\t}\n\targs := strings.Split(cmdStr, \" \")\n\treturn exec.Command(args[0], args[1:]...), nil\n}\n\nfunc SetPgid(cmd *exec.Cmd) {\n\tif cmd == nil {\n\t\treturn\n\t}\n\tif cmd.SysProcAttr == nil {\n\t\tcmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}\n\t} else {\n\t\tcmd.SysProcAttr.Setpgid = true\n\t}\n}\n"
  },
  {
    "path": "core/sys_exec/sys_exec_windows.go",
    "content": "//go:build windows\n// +build windows\n\npackage sys_exec\n\nimport (\n\t\"errors\"\n\t\"os/exec\"\n\t\"strings\"\n)\n\nfunc BuildCmd(cmdStr string) (cmd *exec.Cmd, err error) {\n\tif cmdStr == \"\" {\n\t\treturn nil, errors.New(\"command string is empty\")\n\t}\n\targs := strings.Split(cmdStr, \" \")\n\treturn exec.Command(args[0], args[1:]...), nil\n}\n"
  },
  {
    "path": "core/system/service.go",
    "content": "package system\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tmongo2 \"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\ntype Service struct {\n\tcol      *mongo2.Col\n\tmodelSvc service.ModelService\n}\n\nfunc (svc *Service) Init() (err error) {\n\t// initialize data\n\tif err := svc.initData(); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (svc *Service) initData() (err error) {\n\ttotal, err := svc.col.Count(bson.M{\n\t\t\"key\": \"customize\",\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\tif total > 0 {\n\t\treturn nil\n\t}\n\n\t// data to initialize\n\tsettings := []models.Setting{\n\t\t{\n\t\t\tId:  primitive.NewObjectID(),\n\t\t\tKey: \"customize\",\n\t\t\tValue: bson.M{\n\t\t\t\t\"show_custom_title\":     false,\n\t\t\t\t\"custom_title\":          \"\",\n\t\t\t\t\"show_custom_logo\":      false,\n\t\t\t\t\"custom_logo\":           \"\",\n\t\t\t\t\"hide_platform_version\": false,\n\t\t\t},\n\t\t},\n\t}\n\tvar data []interface{}\n\tfor _, s := range settings {\n\t\tdata = append(data, s)\n\t}\n\t_, err = svc.col.InsertMany(data)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc NewService() *Service {\n\t// service\n\tsvc := &Service{\n\t\tcol: mongo2.GetMongoCol(interfaces.ModelColNameSetting),\n\t}\n\n\t// model service\n\tmodelSvc, err := service.GetService()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tsvc.modelSvc = modelSvc\n\n\tif err := svc.Init(); err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn svc\n}\n\nvar _service *Service\n\nfunc GetService() *Service {\n\tif _service == nil {\n\t\t_service = NewService()\n\t}\n\treturn _service\n}\n"
  },
  {
    "path": "core/system/service_v2.go",
    "content": "package system\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"sync\"\n)\n\ntype ServiceV2 struct {\n}\n\nfunc (svc *ServiceV2) Init() (err error) {\n\t// initialize data\n\tif err := svc.initData(); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (svc *ServiceV2) initData() (err error) {\n\ttotal, err := service.NewModelServiceV2[models.SettingV2]().Count(bson.M{\n\t\t\"key\": \"site_title\",\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\tif total > 0 {\n\t\treturn nil\n\t}\n\n\t// data to initialize\n\tsettings := []models.SettingV2{\n\t\t{\n\t\t\tKey: \"site_title\",\n\t\t\tValue: bson.M{\n\t\t\t\t\"customize_site_title\": false,\n\t\t\t\t\"site_title\":           \"\",\n\t\t\t},\n\t\t},\n\t}\n\t_, err = service.NewModelServiceV2[models.SettingV2]().InsertMany(settings)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc newSystemServiceV2() *ServiceV2 {\n\t// service\n\tsvc := &ServiceV2{}\n\n\tif err := svc.Init(); err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn svc\n}\n\nvar _serviceV2 *ServiceV2\nvar _serviceV2Once = new(sync.Once)\n\nfunc GetSystemServiceV2() *ServiceV2 {\n\tif _serviceV2 == nil {\n\t\t_serviceV2 = newSystemServiceV2()\n\t}\n\t_serviceV2Once.Do(func() {\n\t\t_serviceV2 = newSystemServiceV2()\n\t})\n\treturn _serviceV2\n}\n"
  },
  {
    "path": "core/task/handler/options.go",
    "content": "package handler\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype Option func(svc interfaces.TaskHandlerService)\n\nfunc WithConfigPath(path string) Option {\n\treturn func(svc interfaces.TaskHandlerService) {\n\t\tsvc.SetConfigPath(path)\n\t}\n}\n\nfunc WithExitWatchDuration(duration time.Duration) Option {\n\treturn func(svc interfaces.TaskHandlerService) {\n\t\tsvc.SetExitWatchDuration(duration)\n\t}\n}\n\nfunc WithReportInterval(interval time.Duration) Option {\n\treturn func(svc interfaces.TaskHandlerService) {\n\t\tsvc.SetReportInterval(interval)\n\t}\n}\n\nfunc WithCancelTimeout(timeout time.Duration) Option {\n\treturn func(svc interfaces.TaskHandlerService) {\n\t\tsvc.SetCancelTimeout(timeout)\n\t}\n}\n\ntype RunnerOption func(r interfaces.TaskRunner)\n\nfunc WithSubscribeTimeout(timeout time.Duration) RunnerOption {\n\treturn func(r interfaces.TaskRunner) {\n\t\tr.SetSubscribeTimeout(timeout)\n\t}\n}\n"
  },
  {
    "path": "core/task/handler/runner_test.go",
    "content": "package handler\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/google/uuid\"\n\t\"github.com/spf13/viper\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/mock\"\n)\n\ntype MockRunner struct {\n\tmock.Mock\n\tRunner\n}\n\nfunc (m *MockRunner) downloadFile(url string, filePath string) error {\n\targs := m.Called(url, filePath)\n\treturn args.Error(0)\n}\n\nfunc newMockRunner() *MockRunner {\n\tr := &MockRunner{}\n\tr.s = &models.Spider{}\n\treturn r\n}\n\nfunc TestSyncFiles_SuccessWithDummyFiles(t *testing.T) {\n\t// Create a test server that responds with a list of files\n\tts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tif strings.HasSuffix(r.URL.Path, \"/scan\") {\n\t\t\tw.Write([]byte(`{\"file1.txt\":{\"path\": \"file1.txt\", \"hash\": \"hash1\"}, \"file2.txt\":{\"path\": \"file2.txt\", \"hash\": \"hash2\"}}`))\n\t\t\treturn\n\t\t}\n\n\t\tif strings.HasSuffix(r.URL.Path, \"/download\") {\n\t\t\tw.Write([]byte(\"file content\"))\n\t\t\treturn\n\t\t}\n\t}))\n\tdefer ts.Close()\n\n\t// Create a mock runner\n\tr := newMockRunner()\n\tr.On(\"downloadFile\", mock.Anything, mock.Anything).Return(nil)\n\n\t// Set the master URL to the test server URL\n\tviper.Set(\"api.endpoint\", ts.URL)\n\n\tlocalPath := filepath.Join(os.TempDir(), uuid.New().String())\n\tos.MkdirAll(filepath.Join(localPath, r.s.GetId().Hex()), os.ModePerm)\n\tdefer os.RemoveAll(localPath)\n\tviper.Set(\"workspace\", localPath)\n\n\t// Call the method under test\n\terr := r.syncFiles()\n\tassert.NoError(t, err)\n\n\t// Assert that the files were downloaded\n\tassert.FileExists(t, filepath.Join(localPath, r.s.GetId().Hex(), \"file1.txt\"))\n\tassert.FileExists(t, filepath.Join(localPath, r.s.GetId().Hex(), \"file2.txt\"))\n}\n\nfunc TestSyncFiles_DeletesFilesNotOnMaster(t *testing.T) {\n\t// Create a test server that responds with an empty list of files\n\tts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tif strings.HasSuffix(r.URL.Path, \"/scan\") {\n\t\t\tw.Write([]byte(`{}`))\n\t\t\treturn\n\t\t}\n\t}))\n\tdefer ts.Close()\n\n\t// Create a mock runner\n\tr := newMockRunner()\n\tr.On(\"downloadFile\", mock.Anything, mock.Anything).Return(nil)\n\n\t// Set the master URL to the test server URL\n\tviper.Set(\"api.endpoint\", ts.URL)\n\n\tlocalPath := filepath.Join(os.TempDir(), uuid.New().String())\n\tos.MkdirAll(filepath.Join(localPath, r.s.GetId().Hex()), os.ModePerm)\n\tdefer os.RemoveAll(localPath)\n\tviper.Set(\"workspace\", localPath)\n\n\t// Create a dummy file that should be deleted\n\tdummyFilePath := filepath.Join(localPath, r.s.GetId().Hex(), \"dummy.txt\")\n\tdummyFile, _ := os.Create(dummyFilePath)\n\tdummyFile.Close()\n\n\t// Call the method under test\n\terr := r.syncFiles()\n\tassert.NoError(t, err)\n\n\t// Assert that the dummy file was deleted\n\tassert.NoFileExists(t, dummyFilePath)\n}\n"
  },
  {
    "path": "core/task/handler/runner_v2.go",
    "content": "package handler\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\tfs2 \"github.com/crawlab-team/crawlab/core/fs\"\n\tclient2 \"github.com/crawlab-team/crawlab/core/grpc/client\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/client\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\tservice2 \"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/sys_exec\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/shirou/gopsutil/process\"\n\t\"github.com/spf13/viper\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype RunnerV2 struct {\n\t// dependencies\n\tsvc   *ServiceV2             // task handler service\n\tfsSvc interfaces.FsServiceV2 // task fs service\n\n\t// settings\n\tsubscribeTimeout time.Duration\n\tbufferSize       int\n\n\t// internals\n\tcmd  *exec.Cmd                        // process command instance\n\tpid  int                              // process id\n\ttid  primitive.ObjectID               // task id\n\tt    *models2.TaskV2                  // task model.Task\n\ts    *models2.SpiderV2                // spider model.Spider\n\tch   chan constants.TaskSignal        // channel to communicate between Service and RunnerV2\n\terr  error                            // standard process error\n\tenvs []models.Env                     // environment variables\n\tcwd  string                           // working directory\n\tc    *client2.GrpcClientV2            // grpc client\n\tsub  grpc.TaskService_SubscribeClient // grpc task service stream client\n\n\t// log internals\n\tscannerStdout *bufio.Reader\n\tscannerStderr *bufio.Reader\n\tlogBatchSize  int\n}\n\nfunc (r *RunnerV2) Init() (err error) {\n\t// update task\n\tif err := r.updateTask(\"\", nil); err != nil {\n\t\treturn err\n\t}\n\n\t// start grpc client\n\tif !r.c.IsStarted() {\n\t\terr := r.c.Start()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// grpc task service stream client\n\tif err := r.initSub(); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (r *RunnerV2) Run() (err error) {\n\t// log task started\n\tlog.Infof(\"task[%s] started\", r.tid.Hex())\n\n\t// configure working directory\n\tr.configureCwd()\n\n\t// sync files worker nodes\n\tif !utils.IsMaster() {\n\t\tif err := r.syncFiles(); err != nil {\n\t\t\treturn r.updateTask(constants.TaskStatusError, err)\n\t\t}\n\t}\n\n\t// configure cmd\n\terr = r.configureCmd()\n\tif err != nil {\n\t\treturn r.updateTask(constants.TaskStatusError, err)\n\t}\n\n\t// configure environment variables\n\tr.configureEnv()\n\n\t// configure logging\n\tr.configureLogging()\n\n\t// start process\n\tif err := r.cmd.Start(); err != nil {\n\t\treturn r.updateTask(constants.TaskStatusError, err)\n\t}\n\n\t// start logging\n\tgo r.startLogging()\n\n\t// process id\n\tif r.cmd.Process == nil {\n\t\treturn r.updateTask(constants.TaskStatusError, constants.ErrNotExists)\n\t}\n\tr.pid = r.cmd.Process.Pid\n\tr.t.Pid = r.pid\n\n\t// update task status (processing)\n\tif err := r.updateTask(constants.TaskStatusRunning, nil); err != nil {\n\t\treturn err\n\t}\n\n\t// wait for process to finish\n\tgo r.wait()\n\n\t// start health check\n\tgo r.startHealthCheck()\n\n\t// declare task status\n\tstatus := \"\"\n\n\t// wait for signal\n\tsignal := <-r.ch\n\tswitch signal {\n\tcase constants.TaskSignalFinish:\n\t\terr = nil\n\t\tstatus = constants.TaskStatusFinished\n\tcase constants.TaskSignalCancel:\n\t\terr = constants.ErrTaskCancelled\n\t\tstatus = constants.TaskStatusCancelled\n\tcase constants.TaskSignalError:\n\t\terr = r.err\n\t\tstatus = constants.TaskStatusError\n\tcase constants.TaskSignalLost:\n\t\terr = constants.ErrTaskLost\n\t\tstatus = constants.TaskStatusError\n\tdefault:\n\t\terr = constants.ErrInvalidSignal\n\t\tstatus = constants.TaskStatusError\n\t}\n\n\t// update task status\n\tif err := r.updateTask(status, err); err != nil {\n\t\treturn err\n\t}\n\n\treturn err\n}\n\nfunc (r *RunnerV2) Cancel() (err error) {\n\t// kill process\n\topts := &sys_exec.KillProcessOptions{\n\t\tTimeout: r.svc.GetCancelTimeout(),\n\t\tForce:   true,\n\t}\n\tif err := sys_exec.KillProcess(r.cmd, opts); err != nil {\n\t\treturn err\n\t}\n\n\t// make sure the process does not exist\n\top := func() error {\n\t\tif exists, _ := process.PidExists(int32(r.pid)); exists {\n\t\t\treturn errors.New(fmt.Sprintf(\"task process %d still exists\", r.pid))\n\t\t}\n\t\treturn nil\n\t}\n\tctx, cancel := context.WithTimeout(context.Background(), r.svc.GetExitWatchDuration())\n\tdefer cancel()\n\tb := backoff.WithContext(backoff.NewConstantBackOff(1*time.Second), ctx)\n\tif err := backoff.Retry(op, b); err != nil {\n\t\tlog.Errorf(\"Error canceling task %s: %v\", r.tid, err)\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\n// CleanUp clean up task runner\nfunc (r *RunnerV2) CleanUp() (err error) {\n\treturn nil\n}\n\nfunc (r *RunnerV2) SetSubscribeTimeout(timeout time.Duration) {\n\tr.subscribeTimeout = timeout\n}\n\nfunc (r *RunnerV2) GetTaskId() (id primitive.ObjectID) {\n\treturn r.tid\n}\n\nfunc (r *RunnerV2) configureCmd() (err error) {\n\tvar cmdStr string\n\n\t// customized spider\n\tif r.t.Cmd == \"\" {\n\t\tcmdStr = r.s.Cmd\n\t} else {\n\t\tcmdStr = r.t.Cmd\n\t}\n\n\t// parameters\n\tif r.t.Param != \"\" {\n\t\tcmdStr += \" \" + r.t.Param\n\t} else if r.s.Param != \"\" {\n\t\tcmdStr += \" \" + r.s.Param\n\t}\n\n\t// get cmd instance\n\tr.cmd, err = sys_exec.BuildCmd(cmdStr)\n\tif err != nil {\n\t\tlog.Errorf(\"Error building command: %v\", err)\n\t\ttrace.PrintError(err)\n\t\treturn err\n\t}\n\n\t// set working directory\n\tr.cmd.Dir = r.cwd\n\n\treturn nil\n}\n\nfunc (r *RunnerV2) configureLogging() {\n\t// set stdout reader\n\tstdout, _ := r.cmd.StdoutPipe()\n\tr.scannerStdout = bufio.NewReaderSize(stdout, r.bufferSize)\n\n\t// set stderr reader\n\tstderr, _ := r.cmd.StderrPipe()\n\tr.scannerStderr = bufio.NewReaderSize(stderr, r.bufferSize)\n}\n\nfunc (r *RunnerV2) startLogging() {\n\t// start reading stdout\n\tgo r.startLoggingReaderStdout()\n\n\t// start reading stderr\n\tgo r.startLoggingReaderStderr()\n}\n\nfunc (r *RunnerV2) startLoggingReaderStdout() {\n\tfor {\n\t\tline, err := r.scannerStdout.ReadString(byte('\\n'))\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t\tline = strings.TrimSuffix(line, \"\\n\")\n\t\tr.writeLogLines([]string{line})\n\t}\n}\n\nfunc (r *RunnerV2) startLoggingReaderStderr() {\n\tfor {\n\t\tline, err := r.scannerStderr.ReadString(byte('\\n'))\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t\tline = strings.TrimSuffix(line, \"\\n\")\n\t\tr.writeLogLines([]string{line})\n\t}\n}\n\nfunc (r *RunnerV2) startHealthCheck() {\n\tif r.cmd.ProcessState == nil || r.cmd.ProcessState.Exited() {\n\t\treturn\n\t}\n\tfor {\n\t\texists, _ := process.PidExists(int32(r.pid))\n\t\tif !exists {\n\t\t\t// process lost\n\t\t\tr.ch <- constants.TaskSignalLost\n\t\t\treturn\n\t\t}\n\t\ttime.Sleep(1 * time.Second)\n\t}\n}\n\nfunc (r *RunnerV2) configureEnv() {\n\t// 默认把Node.js的全局node_modules加入环境变量\n\tenvPath := os.Getenv(\"PATH\")\n\tnodePath := \"/usr/lib/node_modules\"\n\tif !strings.Contains(envPath, nodePath) {\n\t\t_ = os.Setenv(\"PATH\", nodePath+\":\"+envPath)\n\t}\n\t_ = os.Setenv(\"NODE_PATH\", nodePath)\n\n\t// default envs\n\tr.cmd.Env = append(os.Environ(), \"CRAWLAB_TASK_ID=\"+r.tid.Hex())\n\tif viper.GetString(\"grpc.address\") != \"\" {\n\t\tr.cmd.Env = append(r.cmd.Env, \"CRAWLAB_GRPC_ADDRESS=\"+viper.GetString(\"grpc.address\"))\n\t}\n\tif viper.GetString(\"grpc.authKey\") != \"\" {\n\t\tr.cmd.Env = append(r.cmd.Env, \"CRAWLAB_GRPC_AUTH_KEY=\"+viper.GetString(\"grpc.authKey\"))\n\t} else {\n\t\tr.cmd.Env = append(r.cmd.Env, \"CRAWLAB_GRPC_AUTH_KEY=\"+constants.DefaultGrpcAuthKey)\n\t}\n\n\t// global environment variables\n\tenvs, err := client.NewModelServiceV2[models2.EnvironmentV2]().GetMany(nil, nil)\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\tfor _, env := range envs {\n\t\tr.cmd.Env = append(r.cmd.Env, env.Key+\"=\"+env.Value)\n\t}\n}\n\nfunc (r *RunnerV2) syncFiles() (err error) {\n\tvar id string\n\tvar workingDir string\n\tif r.s.GitId.IsZero() {\n\t\tid = r.s.Id.Hex()\n\t\tworkingDir = \"\"\n\t} else {\n\t\tid = r.s.GitId.Hex()\n\t\tworkingDir = r.s.GitRootPath\n\t}\n\tmasterURL := fmt.Sprintf(\"%s/sync/%s\", viper.GetString(\"api.endpoint\"), id)\n\n\t// get file list from master\n\tresp, err := http.Get(masterURL + \"/scan?path=\" + workingDir)\n\tif err != nil {\n\t\tlog.Errorf(\"Error getting file list from master: %v\", err)\n\t\treturn trace.TraceError(err)\n\t}\n\tdefer resp.Body.Close()\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\tlog.Errorf(\"Error reading response body: %v\", err)\n\t\treturn trace.TraceError(err)\n\t}\n\tvar masterFiles map[string]entity.FsFileInfo\n\terr = json.Unmarshal(body, &masterFiles)\n\tif err != nil {\n\t\tlog.Errorf(\"Error unmarshaling JSON: %v\", err)\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// create a map for master files\n\tmasterFilesMap := make(map[string]entity.FsFileInfo)\n\tfor _, file := range masterFiles {\n\t\tmasterFilesMap[file.Path] = file\n\t}\n\n\t// create working directory if not exists\n\tif _, err := os.Stat(r.cwd); os.IsNotExist(err) {\n\t\tif err := os.MkdirAll(r.cwd, os.ModePerm); err != nil {\n\t\t\tlog.Errorf(\"Error creating worker directory: %v\", err)\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\t// get file list from worker\n\tworkerFiles, err := utils.ScanDirectory(r.cwd)\n\tif err != nil {\n\t\tlog.Errorf(\"Error scanning worker directory: %v\", err)\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// delete files that are deleted on master node\n\tfor path, workerFile := range workerFiles {\n\t\tif _, exists := masterFilesMap[path]; !exists {\n\t\t\tlog.Infof(\"Deleting file: %s\", path)\n\t\t\terr := os.Remove(workerFile.FullPath)\n\t\t\tif err != nil {\n\t\t\t\tlog.Errorf(\"Error deleting file: %v\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\t// set up wait group and error channel\n\tvar wg sync.WaitGroup\n\tpool := make(chan struct{}, 10)\n\n\t// download files that are new or modified on master node\n\tfor path, masterFile := range masterFilesMap {\n\t\tworkerFile, exists := workerFiles[path]\n\t\tif !exists || masterFile.Hash != workerFile.Hash {\n\t\t\twg.Add(1)\n\n\t\t\t// acquire token\n\t\t\tpool <- struct{}{}\n\n\t\t\t// start goroutine to synchronize file or directory\n\t\t\tgo func(path string, masterFile *entity.FsFileInfo) {\n\t\t\t\tdefer wg.Done()\n\n\t\t\t\tif masterFile.IsDir {\n\t\t\t\t\tlog.Infof(\"Directory needs to be synchronized: %s\", path)\n\t\t\t\t\t_err := os.MkdirAll(filepath.Join(r.cwd, path), masterFile.Mode)\n\t\t\t\t\tif _err != nil {\n\t\t\t\t\t\tlog.Errorf(\"Error creating directory: %v\", _err)\n\t\t\t\t\t\terr = errors.Join(err, _err)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlog.Infof(\"File needs to be synchronized: %s\", path)\n\t\t\t\t\t_err := r.downloadFile(masterURL+\"/download?path=\"+filepath.Join(workingDir, path), filepath.Join(r.cwd, path), masterFile)\n\t\t\t\t\tif _err != nil {\n\t\t\t\t\t\tlog.Errorf(\"Error downloading file: %v\", _err)\n\t\t\t\t\t\terr = errors.Join(err, _err)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// release token\n\t\t\t\t<-pool\n\n\t\t\t}(path, &masterFile)\n\t\t}\n\t}\n\n\t// wait for all files and directories to be synchronized\n\twg.Wait()\n\n\treturn err\n}\n\nfunc (r *RunnerV2) downloadFile(url string, filePath string, fileInfo *entity.FsFileInfo) error {\n\t// get file response\n\tresp, err := http.Get(url)\n\tif err != nil {\n\t\tlog.Errorf(\"Error getting file response: %v\", err)\n\t\treturn err\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\tlog.Errorf(\"Error downloading file: %s\", resp.Status)\n\t\treturn errors.New(resp.Status)\n\t}\n\tdefer resp.Body.Close()\n\n\t// create directory if not exists\n\tdirPath := filepath.Dir(filePath)\n\tutils.Exists(dirPath)\n\terr = os.MkdirAll(dirPath, os.ModePerm)\n\tif err != nil {\n\t\tlog.Errorf(\"Error creating directory: %v\", err)\n\t\treturn err\n\t}\n\n\t// create local file\n\tout, err := os.OpenFile(filePath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, fileInfo.Mode)\n\tif err != nil {\n\t\tlog.Errorf(\"Error creating file: %v\", err)\n\t\treturn err\n\t}\n\tdefer out.Close()\n\n\t// copy file content to local file\n\t_, err = io.Copy(out, resp.Body)\n\tif err != nil {\n\t\tlog.Errorf(\"Error copying file: %v\", err)\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// wait for process to finish and send task signal (constants.TaskSignal)\n// to task runner's channel (RunnerV2.ch) according to exit code\nfunc (r *RunnerV2) wait() {\n\t// wait for process to finish\n\tif err := r.cmd.Wait(); err != nil {\n\t\tvar exitError *exec.ExitError\n\t\tok := errors.As(err, &exitError)\n\t\tif !ok {\n\t\t\tr.ch <- constants.TaskSignalError\n\t\t\treturn\n\t\t}\n\t\texitCode := exitError.ExitCode()\n\t\tif exitCode == -1 {\n\t\t\t// cancel error\n\t\t\tr.ch <- constants.TaskSignalCancel\n\t\t\treturn\n\t\t}\n\n\t\t// standard error\n\t\tr.err = err\n\t\tr.ch <- constants.TaskSignalError\n\t\treturn\n\t}\n\n\t// success\n\tr.ch <- constants.TaskSignalFinish\n}\n\n// updateTask update and get updated info of task (RunnerV2.t)\nfunc (r *RunnerV2) updateTask(status string, e error) (err error) {\n\tif r.t != nil && status != \"\" {\n\t\t// update task status\n\t\tr.t.Status = status\n\t\tif e != nil {\n\t\t\tr.t.Error = e.Error()\n\t\t}\n\t\tif r.svc.GetNodeConfigService().IsMaster() {\n\t\t\terr = service2.NewModelServiceV2[models2.TaskV2]().ReplaceById(r.t.Id, *r.t)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\terr = client.NewModelServiceV2[models2.TaskV2]().ReplaceById(r.t.Id, *r.t)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\t// update stats\n\t\tr._updateTaskStat(status)\n\t\tr._updateSpiderStat(status)\n\n\t\t// send notification\n\t\tgo r.sendNotification()\n\t}\n\n\t// get task\n\tr.t, err = r.svc.GetTaskById(r.tid)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (r *RunnerV2) initSub() (err error) {\n\tr.sub, err = r.c.TaskClient.Subscribe(context.Background())\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (r *RunnerV2) writeLogLines(lines []string) {\n\tdata, err := json.Marshal(&entity.StreamMessageTaskData{\n\t\tTaskId: r.tid,\n\t\tLogs:   lines,\n\t})\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\tmsg := &grpc.StreamMessage{\n\t\tCode: grpc.StreamMessageCode_INSERT_LOGS,\n\t\tData: data,\n\t}\n\tif err := r.sub.Send(msg); err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n}\n\nfunc (r *RunnerV2) _updateTaskStat(status string) {\n\tts, err := client.NewModelServiceV2[models2.TaskStatV2]().GetById(r.tid)\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\tswitch status {\n\tcase constants.TaskStatusPending:\n\t\t// do nothing\n\tcase constants.TaskStatusRunning:\n\t\tts.StartTs = time.Now()\n\t\tts.WaitDuration = ts.StartTs.Sub(ts.BaseModelV2.CreatedAt).Milliseconds()\n\tcase constants.TaskStatusFinished, constants.TaskStatusError, constants.TaskStatusCancelled:\n\t\tif ts.StartTs.IsZero() {\n\t\t\tts.StartTs = time.Now()\n\t\t\tts.WaitDuration = ts.StartTs.Sub(ts.BaseModelV2.CreatedAt).Milliseconds()\n\t\t}\n\t\tts.EndTs = time.Now()\n\t\tts.RuntimeDuration = ts.EndTs.Sub(ts.StartTs).Milliseconds()\n\t\tts.TotalDuration = ts.EndTs.Sub(ts.BaseModelV2.CreatedAt).Milliseconds()\n\t}\n\tif r.svc.GetNodeConfigService().IsMaster() {\n\t\terr = service2.NewModelServiceV2[models2.TaskStatV2]().ReplaceById(ts.Id, *ts)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t} else {\n\t\terr = client.NewModelServiceV2[models2.TaskStatV2]().ReplaceById(ts.Id, *ts)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (r *RunnerV2) sendNotification() {\n\treq := &grpc.TaskServiceSendNotificationRequest{\n\t\tNodeKey: r.svc.GetNodeConfigService().GetNodeKey(),\n\t\tTaskId:  r.tid.Hex(),\n\t}\n\t_, err := r.c.TaskClient.SendNotification(context.Background(), req)\n\tif err != nil {\n\t\tlog.Errorf(\"Error sending notification: %v\", err)\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n}\n\nfunc (r *RunnerV2) _updateSpiderStat(status string) {\n\t// task stat\n\tts, err := client.NewModelServiceV2[models2.TaskStatV2]().GetById(r.tid)\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\n\t// update\n\tvar update bson.M\n\tswitch status {\n\tcase constants.TaskStatusPending, constants.TaskStatusRunning:\n\t\tupdate = bson.M{\n\t\t\t\"$set\": bson.M{\n\t\t\t\t\"last_task_id\": r.tid, // last task id\n\t\t\t},\n\t\t\t\"$inc\": bson.M{\n\t\t\t\t\"tasks\":         1,               // task count\n\t\t\t\t\"wait_duration\": ts.WaitDuration, // wait duration\n\t\t\t},\n\t\t}\n\tcase constants.TaskStatusFinished, constants.TaskStatusError, constants.TaskStatusCancelled:\n\t\tupdate = bson.M{\n\t\t\t\"$set\": bson.M{\n\t\t\t\t\"last_task_id\": r.tid, // last task id\n\t\t\t},\n\t\t\t\"$inc\": bson.M{\n\t\t\t\t\"results\":          ts.ResultCount,            // results\n\t\t\t\t\"runtime_duration\": ts.RuntimeDuration / 1000, // runtime duration\n\t\t\t\t\"total_duration\":   ts.TotalDuration / 1000,   // total duration\n\t\t\t},\n\t\t}\n\tdefault:\n\t\tlog.Errorf(\"Invalid task status: %s\", status)\n\t\ttrace.PrintError(errors.New(\"invalid task status\"))\n\t\treturn\n\t}\n\n\t// perform update\n\tif r.svc.GetNodeConfigService().IsMaster() {\n\t\terr = service2.NewModelServiceV2[models2.SpiderStatV2]().UpdateById(r.s.Id, update)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t} else {\n\t\terr = client.NewModelServiceV2[models2.SpiderStatV2]().UpdateById(r.s.Id, update)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (r *RunnerV2) configureCwd() {\n\tworkspacePath := viper.GetString(\"workspace\")\n\tif r.s.GitId.IsZero() {\n\t\t// not git\n\t\tr.cwd = filepath.Join(workspacePath, r.s.Id.Hex())\n\t} else {\n\t\t// git\n\t\tr.cwd = filepath.Join(workspacePath, r.s.GitId.Hex(), r.s.GitRootPath)\n\t}\n}\n\nfunc NewTaskRunnerV2(id primitive.ObjectID, svc *ServiceV2) (r2 *RunnerV2, err error) {\n\t// validate options\n\tif id.IsZero() {\n\t\treturn nil, constants.ErrInvalidOptions\n\t}\n\n\t// runner\n\tr := &RunnerV2{\n\t\tsubscribeTimeout: 30 * time.Second,\n\t\tbufferSize:       1024 * 1024,\n\t\tsvc:              svc,\n\t\ttid:              id,\n\t\tch:               make(chan constants.TaskSignal),\n\t\tlogBatchSize:     20,\n\t}\n\n\t// task\n\tr.t, err = svc.GetTaskById(id)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// spider\n\tr.s, err = svc.GetSpiderById(r.t.SpiderId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// task fs service\n\tr.fsSvc = fs2.NewFsServiceV2(filepath.Join(viper.GetString(\"workspace\"), r.s.Id.Hex()))\n\n\t// grpc client\n\tr.c = client2.GetGrpcClientV2()\n\n\t// initialize task runner\n\tif err := r.Init(); err != nil {\n\t\treturn r, err\n\t}\n\n\treturn r, nil\n}\n"
  },
  {
    "path": "core/task/handler/service_v2.go",
    "content": "package handler\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\terrors2 \"github.com/crawlab-team/crawlab/core/errors\"\n\tgrpcclient \"github.com/crawlab-team/crawlab/core/grpc/client\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/client\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype ServiceV2 struct {\n\t// dependencies\n\tcfgSvc interfaces.NodeConfigService\n\tc      *grpcclient.GrpcClientV2 // grpc client\n\n\t// settings\n\t//maxRunners        int\n\texitWatchDuration time.Duration\n\treportInterval    time.Duration\n\tfetchInterval     time.Duration\n\tfetchTimeout      time.Duration\n\tcancelTimeout     time.Duration\n\n\t// internals variables\n\tstopped   bool\n\tmu        sync.Mutex\n\trunners   sync.Map // pool of task runners started\n\tsyncLocks sync.Map // files sync locks map of task runners\n}\n\nfunc (svc *ServiceV2) Start() {\n\t// Initialize gRPC if not started\n\tif !svc.c.IsStarted() {\n\t\terr := svc.c.Start()\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t}\n\n\tgo svc.ReportStatus()\n\tgo svc.Fetch()\n}\n\nfunc (svc *ServiceV2) Run(taskId primitive.ObjectID) (err error) {\n\treturn svc.run(taskId)\n}\n\nfunc (svc *ServiceV2) Reset() {\n\tsvc.mu.Lock()\n\tdefer svc.mu.Unlock()\n}\n\nfunc (svc *ServiceV2) Cancel(taskId primitive.ObjectID) (err error) {\n\tr, err := svc.getRunner(taskId)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := r.Cancel(); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *ServiceV2) Fetch() {\n\tticker := time.NewTicker(svc.fetchInterval)\n\tfor {\n\t\t// wait\n\t\t<-ticker.C\n\n\t\t// current node\n\t\tn, err := svc.GetCurrentNode()\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\t// skip if node is not active or enabled\n\t\tif !n.Active || !n.Enabled {\n\t\t\tcontinue\n\t\t}\n\n\t\t// validate if there are available runners\n\t\tif svc.getRunnerCount() >= n.MaxRunners {\n\t\t\tcontinue\n\t\t}\n\n\t\t// stop\n\t\tif svc.stopped {\n\t\t\tticker.Stop()\n\t\t\treturn\n\t\t}\n\n\t\t// fetch task\n\t\ttid, err := svc.fetch()\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\tcontinue\n\t\t}\n\n\t\t// skip if no task id\n\t\tif tid.IsZero() {\n\t\t\tcontinue\n\t\t}\n\n\t\t// run task\n\t\tif err := svc.run(tid); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\tt, err := svc.GetTaskById(tid)\n\t\t\tif err != nil && t.Status != constants.TaskStatusCancelled {\n\t\t\t\tt.Error = err.Error()\n\t\t\t\tt.Status = constants.TaskStatusError\n\t\t\t\tt.SetUpdated(t.CreatedBy)\n\t\t\t\t_ = client.NewModelServiceV2[models2.TaskV2]().ReplaceById(t.Id, *t)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t}\n}\n\nfunc (svc *ServiceV2) ReportStatus() {\n\tfor {\n\t\tif svc.stopped {\n\t\t\treturn\n\t\t}\n\n\t\t// report handler status\n\t\tif err := svc.reportStatus(); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t}\n\n\t\t// wait\n\t\ttime.Sleep(svc.reportInterval)\n\t}\n}\n\nfunc (svc *ServiceV2) IsSyncLocked(path string) (ok bool) {\n\t_, ok = svc.syncLocks.Load(path)\n\treturn ok\n}\n\nfunc (svc *ServiceV2) LockSync(path string) {\n\tsvc.syncLocks.Store(path, true)\n}\n\nfunc (svc *ServiceV2) UnlockSync(path string) {\n\tsvc.syncLocks.Delete(path)\n}\n\n//func (svc *ServiceV2) GetMaxRunners() (maxRunners int) {\n//\treturn svc.maxRunners\n//}\n//\n//func (svc *ServiceV2) SetMaxRunners(maxRunners int) {\n//\tsvc.maxRunners = maxRunners\n//}\n\nfunc (svc *ServiceV2) GetExitWatchDuration() (duration time.Duration) {\n\treturn svc.exitWatchDuration\n}\n\nfunc (svc *ServiceV2) SetExitWatchDuration(duration time.Duration) {\n\tsvc.exitWatchDuration = duration\n}\n\nfunc (svc *ServiceV2) GetFetchInterval() (interval time.Duration) {\n\treturn svc.fetchInterval\n}\n\nfunc (svc *ServiceV2) SetFetchInterval(interval time.Duration) {\n\tsvc.fetchInterval = interval\n}\n\nfunc (svc *ServiceV2) GetReportInterval() (interval time.Duration) {\n\treturn svc.reportInterval\n}\n\nfunc (svc *ServiceV2) SetReportInterval(interval time.Duration) {\n\tsvc.reportInterval = interval\n}\n\nfunc (svc *ServiceV2) GetCancelTimeout() (timeout time.Duration) {\n\treturn svc.cancelTimeout\n}\n\nfunc (svc *ServiceV2) SetCancelTimeout(timeout time.Duration) {\n\tsvc.cancelTimeout = timeout\n}\n\nfunc (svc *ServiceV2) GetNodeConfigService() (cfgSvc interfaces.NodeConfigService) {\n\treturn svc.cfgSvc\n}\n\nfunc (svc *ServiceV2) GetCurrentNode() (n *models2.NodeV2, err error) {\n\t// node key\n\tnodeKey := svc.cfgSvc.GetNodeKey()\n\n\t// current node\n\tif svc.cfgSvc.IsMaster() {\n\t\tn, err = service.NewModelServiceV2[models2.NodeV2]().GetOne(bson.M{\"key\": nodeKey}, nil)\n\t} else {\n\t\tn, err = client.NewModelServiceV2[models2.NodeV2]().GetOne(bson.M{\"key\": nodeKey}, nil)\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn n, nil\n}\n\nfunc (svc *ServiceV2) GetTaskById(id primitive.ObjectID) (t *models2.TaskV2, err error) {\n\tif svc.cfgSvc.IsMaster() {\n\t\tt, err = service.NewModelServiceV2[models2.TaskV2]().GetById(id)\n\t} else {\n\t\tt, err = client.NewModelServiceV2[models2.TaskV2]().GetById(id)\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn t, nil\n}\n\nfunc (svc *ServiceV2) GetSpiderById(id primitive.ObjectID) (s *models2.SpiderV2, err error) {\n\tif svc.cfgSvc.IsMaster() {\n\t\ts, err = service.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\t} else {\n\t\ts, err = client.NewModelServiceV2[models2.SpiderV2]().GetById(id)\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn s, nil\n}\n\nfunc (svc *ServiceV2) getRunners() (runners []*RunnerV2) {\n\tsvc.mu.Lock()\n\tdefer svc.mu.Unlock()\n\tsvc.runners.Range(func(key, value interface{}) bool {\n\t\tr := value.(RunnerV2)\n\t\trunners = append(runners, &r)\n\t\treturn true\n\t})\n\treturn runners\n}\n\nfunc (svc *ServiceV2) getRunnerCount() (count int) {\n\tn, err := svc.GetCurrentNode()\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn\n\t}\n\tquery := bson.M{\n\t\t\"node_id\": n.Id,\n\t\t\"status\":  constants.TaskStatusRunning,\n\t}\n\tif svc.cfgSvc.IsMaster() {\n\t\tcount, err = service.NewModelServiceV2[models2.TaskV2]().Count(query)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t} else {\n\t\tcount, err = client.NewModelServiceV2[models2.TaskV2]().Count(query)\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t}\n\treturn count\n}\n\nfunc (svc *ServiceV2) getRunner(taskId primitive.ObjectID) (r interfaces.TaskRunner, err error) {\n\tlog.Debugf(\"[TaskHandlerService] getRunner: taskId[%v]\", taskId)\n\tv, ok := svc.runners.Load(taskId)\n\tif !ok {\n\t\treturn nil, trace.TraceError(errors2.ErrorTaskNotExists)\n\t}\n\tswitch v.(type) {\n\tcase interfaces.TaskRunner:\n\t\tr = v.(interfaces.TaskRunner)\n\tdefault:\n\t\treturn nil, trace.TraceError(errors2.ErrorModelInvalidType)\n\t}\n\treturn r, nil\n}\n\nfunc (svc *ServiceV2) addRunner(taskId primitive.ObjectID, r interfaces.TaskRunner) {\n\tlog.Debugf(\"[TaskHandlerService] addRunner: taskId[%v]\", taskId)\n\tsvc.runners.Store(taskId, r)\n}\n\nfunc (svc *ServiceV2) deleteRunner(taskId primitive.ObjectID) {\n\tlog.Debugf(\"[TaskHandlerService] deleteRunner: taskId[%v]\", taskId)\n\tsvc.runners.Delete(taskId)\n}\n\nfunc (svc *ServiceV2) reportStatus() (err error) {\n\t// current node\n\tn, err := svc.GetCurrentNode()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// available runners of handler\n\tar := n.MaxRunners - svc.getRunnerCount()\n\n\t// set available runners\n\tn.AvailableRunners = ar\n\n\t// save node\n\tn.SetUpdated(n.CreatedBy)\n\tif svc.cfgSvc.IsMaster() {\n\t\terr = service.NewModelServiceV2[models2.NodeV2]().ReplaceById(n.Id, *n)\n\t} else {\n\t\terr = client.NewModelServiceV2[models2.NodeV2]().ReplaceById(n.Id, *n)\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (svc *ServiceV2) fetch() (tid primitive.ObjectID, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), svc.fetchTimeout)\n\tdefer cancel()\n\tres, err := svc.c.TaskClient.Fetch(ctx, svc.c.NewRequest(nil))\n\tif err != nil {\n\t\treturn tid, trace.TraceError(err)\n\t}\n\tif err := json.Unmarshal(res.Data, &tid); err != nil {\n\t\treturn tid, trace.TraceError(err)\n\t}\n\treturn tid, nil\n}\n\nfunc (svc *ServiceV2) run(taskId primitive.ObjectID) (err error) {\n\t// attempt to get runner from pool\n\t_, ok := svc.runners.Load(taskId)\n\tif ok {\n\t\treturn trace.TraceError(errors2.ErrorTaskAlreadyExists)\n\t}\n\n\t// create a new task runner\n\tr, err := NewTaskRunnerV2(taskId, svc)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// add runner to pool\n\tsvc.addRunner(taskId, r)\n\n\t// create a goroutine to run task\n\tgo func() {\n\t\t// delete runner from pool\n\t\tdefer svc.deleteRunner(r.GetTaskId())\n\t\tdefer func(r interfaces.TaskRunner) {\n\t\t\terr := r.CleanUp()\n\t\t\tif err != nil {\n\t\t\t\tlog.Errorf(\"task[%s] clean up error: %v\", r.GetTaskId().Hex(), err)\n\t\t\t}\n\t\t}(r)\n\t\t// run task process (blocking)\n\t\t// error or finish after task runner ends\n\t\tif err := r.Run(); err != nil {\n\t\t\tswitch {\n\t\t\tcase errors.Is(err, constants.ErrTaskError):\n\t\t\t\tlog.Errorf(\"task[%s] finished with error: %v\", r.GetTaskId().Hex(), err)\n\t\t\tcase errors.Is(err, constants.ErrTaskCancelled):\n\t\t\t\tlog.Errorf(\"task[%s] cancelled\", r.GetTaskId().Hex())\n\t\t\tdefault:\n\t\t\t\tlog.Errorf(\"task[%s] finished with unknown error: %v\", r.GetTaskId().Hex(), err)\n\t\t\t}\n\t\t}\n\t\tlog.Infof(\"task[%s] finished\", r.GetTaskId().Hex())\n\t}()\n\n\treturn nil\n}\n\nfunc newTaskHandlerServiceV2() (svc2 *ServiceV2, err error) {\n\t// service\n\tsvc := &ServiceV2{\n\t\texitWatchDuration: 60 * time.Second,\n\t\tfetchInterval:     1 * time.Second,\n\t\tfetchTimeout:      15 * time.Second,\n\t\treportInterval:    5 * time.Second,\n\t\tcancelTimeout:     5 * time.Second,\n\t\tmu:                sync.Mutex{},\n\t\trunners:           sync.Map{},\n\t\tsyncLocks:         sync.Map{},\n\t}\n\n\t// dependency injection\n\tsvc.cfgSvc = nodeconfig.GetNodeConfigService()\n\n\t// grpc client\n\tsvc.c = grpcclient.GetGrpcClientV2()\n\n\tlog.Debugf(\"[NewTaskHandlerService] svc[cfgPath: %s]\", svc.cfgSvc.GetConfigPath())\n\n\treturn svc, nil\n}\n\nvar _serviceV2 *ServiceV2\nvar _serviceV2Once = new(sync.Once)\n\nfunc GetTaskHandlerServiceV2() (svr *ServiceV2, err error) {\n\tif _serviceV2 != nil {\n\t\treturn _serviceV2, nil\n\t}\n\t_serviceV2Once.Do(func() {\n\t\t_serviceV2, err = newTaskHandlerServiceV2()\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"failed to create task handler service: %v\", err)\n\t\t}\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn _serviceV2, nil\n}\n"
  },
  {
    "path": "core/task/log/constants.go",
    "content": "package log\n\nconst (\n\tMetadataName = \"metadata.json\"\n)\n\nconst (\n\tDriverTypeFile  = \"file\"  // raw file\n\tDriverTypeFs    = \"fs\"    // file system (SeaweedFS)\n\tDriverTypeMongo = \"mongo\" // mongodb\n\tDriverTypeEs    = \"es\"    // elastic search\n)\n"
  },
  {
    "path": "core/task/log/default.go",
    "content": "package log\n\nimport \"time\"\n\nvar DefaultLogTtl = 30 * 24 * time.Hour\n"
  },
  {
    "path": "core/task/log/driver.go",
    "content": "package log\n\nfunc GetLogDriver(logDriverType string) (driver Driver, err error) {\n\tswitch logDriverType {\n\tcase DriverTypeFile:\n\t\tdriver, err = GetFileLogDriver()\n\t\tif err != nil {\n\t\t\treturn driver, err\n\t\t}\n\tcase DriverTypeMongo:\n\t\treturn driver, ErrNotImplemented\n\tcase DriverTypeEs:\n\t\treturn driver, ErrNotImplemented\n\tdefault:\n\t\treturn driver, ErrInvalidType\n\t}\n\treturn driver, nil\n}\n"
  },
  {
    "path": "core/task/log/entity.go",
    "content": "package log\n\nimport \"time\"\n\ntype Message struct {\n\tId  int64     `json:\"id\" bson:\"id\"`\n\tMsg string    `json:\"msg\" bson:\"msg\"`\n\tTs  time.Time `json:\"ts\" bson:\"ts\"`\n}\n\ntype Metadata struct {\n\tSize       int64  `json:\"size,omitempty\" bson:\"size\"`\n\tTotalLines int64  `json:\"total_lines,omitempty\" bson:\"total_lines\"`\n\tTotalBytes int64  `json:\"total_bytes,omitempty\" bson:\"total_bytes\"`\n\tMd5        string `json:\"md5,omitempty\" bson:\"md5\"`\n}\n"
  },
  {
    "path": "core/task/log/errors.go",
    "content": "package log\n\nimport \"errors\"\n\nvar (\n\tErrInvalidType    = errors.New(\"invalid type\")\n\tErrNotImplemented = errors.New(\"not implemented\")\n)\n"
  },
  {
    "path": "core/task/log/file_driver.go",
    "content": "package log\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/spf13/viper\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype FileLogDriver struct {\n\t// settings\n\tlogFileName string\n\trootPath    string\n\n\t// internals\n\tmu sync.Mutex\n}\n\nfunc (d *FileLogDriver) Init() (err error) {\n\tgo d.cleanup()\n\n\treturn nil\n}\n\nfunc (d *FileLogDriver) Close() (err error) {\n\treturn nil\n}\n\nfunc (d *FileLogDriver) WriteLine(id string, line string) (err error) {\n\td.initDir(id)\n\n\td.mu.Lock()\n\tdefer d.mu.Unlock()\n\tfilePath := d.getLogFilePath(id, d.logFileName)\n\n\tf, err := os.OpenFile(filePath, os.O_WRONLY|os.O_APPEND|os.O_CREATE, os.FileMode(0760))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tdefer func(f *os.File) {\n\t\terr := f.Close()\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"close file error: %s\", err.Error())\n\t\t}\n\t}(f)\n\n\t_, err = f.WriteString(line + \"\\n\")\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc (d *FileLogDriver) WriteLines(id string, lines []string) (err error) {\n\tlinesString := strings.Join(lines, \"\\n\")\n\tif err := d.WriteLine(id, linesString); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (d *FileLogDriver) Find(id string, pattern string, skip int, limit int) (lines []string, err error) {\n\tif pattern != \"\" {\n\t\treturn lines, errors.New(\"not implemented\")\n\t}\n\tif !utils.Exists(d.getLogFilePath(id, d.logFileName)) {\n\t\treturn nil, nil\n\t}\n\n\tf, err := os.Open(d.getLogFilePath(id, d.logFileName))\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tdefer f.Close()\n\n\tsc := bufio.NewReaderSize(f, 1024*1024*10)\n\n\ti := -1\n\tfor {\n\t\tline, err := sc.ReadString(byte('\\n'))\n\t\tif err != nil {\n\t\t\tbreak\n\t\t}\n\t\tline = strings.TrimSuffix(line, \"\\n\")\n\n\t\ti++\n\n\t\tif i < skip {\n\t\t\tcontinue\n\t\t}\n\n\t\tif i >= skip+limit {\n\t\t\tbreak\n\t\t}\n\n\t\tlines = append(lines, line)\n\t}\n\n\treturn lines, nil\n}\n\nfunc (d *FileLogDriver) Count(id string, pattern string) (n int, err error) {\n\tif pattern != \"\" {\n\t\treturn n, errors.New(\"not implemented\")\n\t}\n\tif !utils.Exists(d.getLogFilePath(id, d.logFileName)) {\n\t\treturn 0, nil\n\t}\n\n\tf, err := os.Open(d.getLogFilePath(id, d.logFileName))\n\tif err != nil {\n\t\treturn n, trace.TraceError(err)\n\t}\n\treturn d.lineCounter(f)\n}\n\nfunc (d *FileLogDriver) Flush() (err error) {\n\treturn nil\n}\n\nfunc (d *FileLogDriver) getLogPath() (logPath string) {\n\treturn viper.GetString(\"log.path\")\n}\n\nfunc (d *FileLogDriver) getBasePath(id string) (filePath string) {\n\treturn filepath.Join(d.getLogPath(), id)\n}\n\nfunc (d *FileLogDriver) getMetadataPath(id string) (filePath string) {\n\treturn filepath.Join(d.getBasePath(id), MetadataName)\n}\n\nfunc (d *FileLogDriver) getLogFilePath(id, fileName string) (filePath string) {\n\treturn filepath.Join(d.getBasePath(id), fileName)\n}\n\nfunc (d *FileLogDriver) getLogFiles(id string) (files []os.FileInfo) {\n\t// 增加了对返回异常的捕获\n\tfiles, err := utils.ListDir(d.getBasePath(id))\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t\treturn nil\n\t}\n\treturn\n}\n\nfunc (d *FileLogDriver) initDir(id string) {\n\tif !utils.Exists(d.getBasePath(id)) {\n\t\tif err := os.MkdirAll(d.getBasePath(id), os.FileMode(0770)); err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t}\n\t}\n}\n\nfunc (d *FileLogDriver) lineCounter(r io.Reader) (n int, err error) {\n\tbuf := make([]byte, 32*1024)\n\tcount := 0\n\tlineSep := []byte{'\\n'}\n\n\tfor {\n\t\tc, err := r.Read(buf)\n\t\tcount += bytes.Count(buf[:c], lineSep)\n\n\t\tswitch {\n\t\tcase err == io.EOF:\n\t\t\treturn count, nil\n\n\t\tcase err != nil:\n\t\t\treturn count, err\n\t\t}\n\t}\n}\n\nfunc (d *FileLogDriver) getTtl() time.Duration {\n\tttl := viper.GetString(\"log.ttl\")\n\tif ttl == \"\" {\n\t\treturn DefaultLogTtl\n\t}\n\n\tif strings.HasSuffix(ttl, \"s\") {\n\t\tttl = strings.TrimSuffix(ttl, \"s\")\n\t\tn, err := strconv.Atoi(ttl)\n\t\tif err != nil {\n\t\t\treturn DefaultLogTtl\n\t\t}\n\t\treturn time.Duration(n) * time.Second\n\t} else if strings.HasSuffix(ttl, \"m\") {\n\t\tttl = strings.TrimSuffix(ttl, \"m\")\n\t\tn, err := strconv.Atoi(ttl)\n\t\tif err != nil {\n\t\t\treturn DefaultLogTtl\n\t\t}\n\t\treturn time.Duration(n) * time.Minute\n\t} else if strings.HasSuffix(ttl, \"h\") {\n\t\tttl = strings.TrimSuffix(ttl, \"h\")\n\t\tn, err := strconv.Atoi(ttl)\n\t\tif err != nil {\n\t\t\treturn DefaultLogTtl\n\t\t}\n\t\treturn time.Duration(n) * time.Hour\n\n\t} else if strings.HasSuffix(ttl, \"d\") {\n\t\tttl = strings.TrimSuffix(ttl, \"d\")\n\t\tn, err := strconv.Atoi(ttl)\n\t\tif err != nil {\n\t\t\treturn DefaultLogTtl\n\t\t}\n\t\treturn time.Duration(n) * 24 * time.Hour\n\t} else {\n\t\treturn DefaultLogTtl\n\t}\n}\n\nfunc (d *FileLogDriver) cleanup() {\n\tif d.getLogPath() == \"\" {\n\t\treturn\n\t}\n\tif !utils.Exists(d.getLogPath()) {\n\t\tif err := os.MkdirAll(d.getLogPath(), os.FileMode(0770)); err != nil {\n\t\t\tlog.Errorf(\"failed to create log directory: %s\", d.getLogPath())\n\t\t\ttrace.PrintError(err)\n\t\t\treturn\n\t\t}\n\t}\n\tfor {\n\t\t// 增加对目录不存在的判断\n\t\tdirs, err := utils.ListDir(d.getLogPath())\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\ttime.Sleep(10 * time.Minute)\n\t\t\tcontinue\n\t\t}\n\t\tfor _, dir := range dirs {\n\t\t\tif time.Now().After(dir.ModTime().Add(d.getTtl())) {\n\t\t\t\tif err := os.RemoveAll(d.getBasePath(dir.Name())); err != nil {\n\t\t\t\t\ttrace.PrintError(err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tlog.Infof(\"removed outdated log directory: %s\", d.getBasePath(dir.Name()))\n\t\t\t}\n\t\t}\n\n\t\ttime.Sleep(10 * time.Minute)\n\t}\n}\n\nvar logDriver Driver\n\nfunc newFileLogDriver() (driver Driver, err error) {\n\t// driver\n\tdriver = &FileLogDriver{\n\t\tlogFileName: \"log.txt\",\n\t\tmu:          sync.Mutex{},\n\t}\n\n\t// init\n\tif err := driver.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn driver, nil\n}\n\nfunc GetFileLogDriver() (driver Driver, err error) {\n\tif logDriver != nil {\n\t\treturn logDriver, nil\n\t}\n\tlogDriver, err = newFileLogDriver()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn logDriver, nil\n}\n"
  },
  {
    "path": "core/task/log/file_driver_test.go",
    "content": "package log\n\nimport (\n\t\"fmt\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc setupFileDriverTest() {\n\tcleanupFileDriverTest()\n\t_ = os.MkdirAll(\"./tmp\", os.ModePerm)\n}\n\nfunc cleanupFileDriverTest() {\n\t_ = os.RemoveAll(\"./tmp\")\n}\n\nfunc TestFileDriver_WriteLine(t *testing.T) {\n\tsetupFileDriverTest()\n\tt.Cleanup(cleanupFileDriverTest)\n\n\td, err := newFileLogDriver(nil)\n\trequire.Nil(t, err)\n\tdefer d.Close()\n\n\tid := primitive.NewObjectID()\n\n\terr = d.WriteLine(id.Hex(), \"it works\")\n\trequire.Nil(t, err)\n\n\tlogFilePath := fmt.Sprintf(\"/var/log/crawlab/%s/log.txt\", id.Hex())\n\trequire.FileExists(t, logFilePath)\n\ttext, err := os.ReadFile(logFilePath)\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"it works\\n\", string(text))\n}\n\nfunc TestFileDriver_WriteLines(t *testing.T) {\n\tsetupFileDriverTest()\n\tt.Cleanup(cleanupFileDriverTest)\n\n\td, err := newFileLogDriver(nil)\n\trequire.Nil(t, err)\n\tdefer d.Close()\n\n\tid := primitive.NewObjectID()\n\n\tfor i := 0; i < 100; i++ {\n\t\terr = d.WriteLine(id.Hex(), \"it works\")\n\t\trequire.Nil(t, err)\n\t}\n\n\tlogFilePath := fmt.Sprintf(\"/var/log/crawlab/%s/log.txt\", id.Hex())\n\trequire.FileExists(t, logFilePath)\n\ttext, err := os.ReadFile(logFilePath)\n\trequire.Nil(t, err)\n\trequire.Contains(t, string(text), \"it works\\n\")\n\tlines := strings.Split(string(text), \"\\n\")\n\trequire.Equal(t, 101, len(lines))\n}\n\nfunc TestFileDriver_Find(t *testing.T) {\n\tsetupFileDriverTest()\n\tt.Cleanup(cleanupFileDriverTest)\n\n\td, err := newFileLogDriver(nil)\n\trequire.Nil(t, err)\n\tdefer d.Close()\n\n\tid := primitive.NewObjectID()\n\n\tbatch := 1000\n\tvar lines []string\n\tfor i := 0; i < 10; i++ {\n\t\tfor j := 0; j < batch; j++ {\n\t\t\tline := fmt.Sprintf(\"line: %d\", i*batch+j+1)\n\t\t\tlines = append(lines, line)\n\t\t}\n\t\terr = d.WriteLines(id.Hex(), lines)\n\t\trequire.Nil(t, err)\n\t\tlines = []string{}\n\t}\n\n\tdriver := d\n\n\tlines, err = driver.Find(id.Hex(), \"\", 0, 10)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 10, len(lines))\n\trequire.Equal(t, \"line: 1\", lines[0])\n\trequire.Equal(t, \"line: 10\", lines[len(lines)-1])\n\n\tlines, err = driver.Find(id.Hex(), \"\", 0, 1)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 1, len(lines))\n\trequire.Equal(t, \"line: 1\", lines[0])\n\trequire.Equal(t, \"line: 1\", lines[len(lines)-1])\n\n\tlines, err = driver.Find(id.Hex(), \"\", 0, 1000)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 1000, len(lines))\n\trequire.Equal(t, \"line: 1\", lines[0])\n\trequire.Equal(t, \"line: 1000\", lines[len(lines)-1])\n\n\tlines, err = driver.Find(id.Hex(), \"\", 1000, 1000)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 1000, len(lines))\n\trequire.Equal(t, \"line: 1001\", lines[0])\n\trequire.Equal(t, \"line: 2000\", lines[len(lines)-1])\n\n\tlines, err = driver.Find(id.Hex(), \"\", 1001, 1000)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 1000, len(lines))\n\trequire.Equal(t, \"line: 1002\", lines[0])\n\trequire.Equal(t, \"line: 2001\", lines[len(lines)-1])\n\n\tlines, err = driver.Find(id.Hex(), \"\", 1001, 999)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 999, len(lines))\n\trequire.Equal(t, \"line: 1002\", lines[0])\n\trequire.Equal(t, \"line: 2000\", lines[len(lines)-1])\n\n\tlines, err = driver.Find(id.Hex(), \"\", 999, 2001)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 2001, len(lines))\n\trequire.Equal(t, \"line: 1000\", lines[0])\n\trequire.Equal(t, \"line: 3000\", lines[len(lines)-1])\n\n\tcleanupFileDriverTest()\n}\n"
  },
  {
    "path": "core/task/log/interface.go",
    "content": "package log\n\ntype Driver interface {\n\tInit() (err error)\n\tClose() (err error)\n\tWriteLine(id string, line string) (err error)\n\tWriteLines(id string, lines []string) (err error)\n\tFind(id string, pattern string, skip int, limit int) (lines []string, err error)\n\tCount(id string, pattern string) (n int, err error)\n}\n"
  },
  {
    "path": "core/task/scheduler/options.go",
    "content": "package scheduler\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"time\"\n)\n\ntype Option func(svc interfaces.TaskSchedulerService)\n\nfunc WithConfigPath(path string) Option {\n\treturn func(svc interfaces.TaskSchedulerService) {\n\t\tsvc.SetConfigPath(path)\n\t}\n}\n\nfunc WithInterval(interval time.Duration) Option {\n\treturn func(svc interfaces.TaskSchedulerService) {\n\t\tsvc.SetInterval(interval)\n\t}\n}\n"
  },
  {
    "path": "core/task/scheduler/service_v2.go",
    "content": "package scheduler\n\nimport (\n\terrors2 \"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/grpc/server\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/core/task/handler\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tgrpc \"github.com/crawlab-team/crawlab/grpc\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"time\"\n)\n\ntype ServiceV2 struct {\n\t// dependencies\n\tnodeCfgSvc interfaces.NodeConfigService\n\tsvr        *server.GrpcServerV2\n\thandlerSvc *handler.ServiceV2\n\n\t// settings\n\tinterval time.Duration\n}\n\nfunc (svc *ServiceV2) Start() {\n\tgo svc.initTaskStatus()\n\tgo svc.cleanupTasks()\n\tutils.DefaultWait()\n}\n\nfunc (svc *ServiceV2) Enqueue(t *models2.TaskV2, by primitive.ObjectID) (t2 *models2.TaskV2, err error) {\n\t// set task status\n\tt.Status = constants.TaskStatusPending\n\tt.SetCreated(by)\n\tt.SetUpdated(by)\n\n\t// add task\n\ttaskModelSvc := service.NewModelServiceV2[models2.TaskV2]()\n\tid, err := taskModelSvc.InsertOne(*t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// task queue item\n\ttq := models2.TaskQueueItemV2{\n\t\tPriority: t.Priority,\n\t\tNodeId:   t.NodeId,\n\t}\n\ttq.SetId(id)\n\ttq.SetCreated(by)\n\ttq.SetUpdated(by)\n\n\t// task stat\n\tts := models2.TaskStatV2{}\n\tts.SetId(id)\n\tts.SetCreated(by)\n\tts.SetUpdated(by)\n\n\t// enqueue task\n\t_, err = service.NewModelServiceV2[models2.TaskQueueItemV2]().InsertOne(tq)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// add task stat\n\t_, err = service.NewModelServiceV2[models2.TaskStatV2]().InsertOne(ts)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// success\n\treturn t, nil\n}\n\nfunc (svc *ServiceV2) Cancel(id primitive.ObjectID, by primitive.ObjectID) (err error) {\n\t// task\n\tt, err := service.NewModelServiceV2[models2.TaskV2]().GetById(id)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// initial status\n\tinitialStatus := t.Status\n\n\t// set task status as \"cancelled\"\n\tt.Status = constants.TaskStatusCancelled\n\t_ = svc.SaveTask(t, by)\n\n\t// set status of pending tasks as \"cancelled\" and remove from task item queue\n\tif initialStatus == constants.TaskStatusPending {\n\t\t// remove from task item queue\n\t\tif err := service.NewModelServiceV2[models2.TaskQueueItemV2]().DeleteById(t.Id); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\treturn nil\n\t}\n\n\t// whether task is running on master node\n\tisMasterTask, err := svc.isMasterNode(t)\n\tif err != nil {\n\t\t// when error, force status being set as \"cancelled\"\n\t\tt.Status = constants.TaskStatusCancelled\n\t\treturn svc.SaveTask(t, by)\n\t}\n\n\t// node\n\tn, err := service.NewModelServiceV2[models2.NodeV2]().GetById(t.NodeId)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\tif isMasterTask {\n\t\t// cancel task on master\n\t\tif err := svc.handlerSvc.Cancel(id); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\t// cancel success\n\t\treturn nil\n\t} else {\n\t\t// send to cancel task on worker nodes\n\t\tif err := svc.svr.SendStreamMessageWithData(\"node:\"+n.Key, grpc.StreamMessageCode_CANCEL_TASK, t); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\t// cancel success\n\t\treturn nil\n\t}\n}\n\nfunc (svc *ServiceV2) SetInterval(interval time.Duration) {\n\tsvc.interval = interval\n}\n\nfunc (svc *ServiceV2) SaveTask(t *models2.TaskV2, by primitive.ObjectID) (err error) {\n\tif t.Id.IsZero() {\n\t\tt.SetCreated(by)\n\t\tt.SetUpdated(by)\n\t\t_, err = service.NewModelServiceV2[models2.TaskV2]().InsertOne(*t)\n\t\treturn err\n\t} else {\n\t\tt.SetUpdated(by)\n\t\treturn service.NewModelServiceV2[models2.TaskV2]().ReplaceById(t.Id, *t)\n\t}\n}\n\n// initTaskStatus initialize task status of existing tasks\nfunc (svc *ServiceV2) initTaskStatus() {\n\t// set status of running tasks as TaskStatusAbnormal\n\trunningTasks, err := service.NewModelServiceV2[models2.TaskV2]().GetMany(bson.M{\n\t\t\"status\": bson.M{\n\t\t\t\"$in\": []string{\n\t\t\t\tconstants.TaskStatusPending,\n\t\t\t\tconstants.TaskStatusRunning,\n\t\t\t},\n\t\t},\n\t}, nil)\n\tif err != nil {\n\t\tif errors2.Is(err, mongo2.ErrNoDocuments) {\n\t\t\treturn\n\t\t}\n\t\ttrace.PrintError(err)\n\t}\n\tfor _, t := range runningTasks {\n\t\tgo func(t *models2.TaskV2) {\n\t\t\tt.Status = constants.TaskStatusAbnormal\n\t\t\tif err := svc.SaveTask(t, primitive.NilObjectID); err != nil {\n\t\t\t\ttrace.PrintError(err)\n\t\t\t}\n\t\t}(&t)\n\t}\n\tif err := service.NewModelServiceV2[models2.TaskQueueItemV2]().DeleteMany(nil); err != nil {\n\t\treturn\n\t}\n}\n\nfunc (svc *ServiceV2) isMasterNode(t *models2.TaskV2) (ok bool, err error) {\n\tif t.NodeId.IsZero() {\n\t\treturn false, trace.TraceError(errors.ErrorTaskNoNodeId)\n\t}\n\tn, err := service.NewModelServiceV2[models2.NodeV2]().GetById(t.NodeId)\n\tif err != nil {\n\t\tif errors2.Is(err, mongo2.ErrNoDocuments) {\n\t\t\treturn false, trace.TraceError(errors.ErrorTaskNodeNotFound)\n\t\t}\n\t\treturn false, trace.TraceError(err)\n\t}\n\treturn n.IsMaster, nil\n}\n\nfunc (svc *ServiceV2) cleanupTasks() {\n\tfor {\n\t\t// task stats over 30 days ago\n\t\ttaskStats, err := service.NewModelServiceV2[models2.TaskStatV2]().GetMany(bson.M{\n\t\t\t\"create_ts\": bson.M{\n\t\t\t\t\"$lt\": time.Now().Add(-30 * 24 * time.Hour),\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\ttime.Sleep(30 * time.Minute)\n\t\t\tcontinue\n\t\t}\n\n\t\t// task ids\n\t\tvar ids []primitive.ObjectID\n\t\tfor _, ts := range taskStats {\n\t\t\tids = append(ids, ts.Id)\n\t\t}\n\n\t\tif len(ids) > 0 {\n\t\t\t// remove tasks\n\t\t\tif err := service.NewModelServiceV2[models2.TaskV2]().DeleteMany(bson.M{\n\t\t\t\t\"_id\": bson.M{\"$in\": ids},\n\t\t\t}); err != nil {\n\t\t\t\ttrace.PrintError(err)\n\t\t\t}\n\n\t\t\t// remove task stats\n\t\t\tif err := service.NewModelServiceV2[models2.TaskStatV2]().DeleteMany(bson.M{\n\t\t\t\t\"_id\": bson.M{\"$in\": ids},\n\t\t\t}); err != nil {\n\t\t\t\ttrace.PrintError(err)\n\t\t\t}\n\t\t}\n\n\t\ttime.Sleep(30 * time.Minute)\n\t}\n}\n\nfunc NewTaskSchedulerServiceV2() (svc2 *ServiceV2, err error) {\n\t// service\n\tsvc := &ServiceV2{\n\t\tinterval: 5 * time.Second,\n\t}\n\tsvc.nodeCfgSvc = nodeconfig.GetNodeConfigService()\n\tsvc.svr, err = server.GetGrpcServerV2()\n\tif err != nil {\n\t\tlog.Errorf(\"failed to get grpc server: %v\", err)\n\t\treturn nil, err\n\t}\n\tsvc.handlerSvc, err = handler.GetTaskHandlerServiceV2()\n\tif err != nil {\n\t\tlog.Errorf(\"failed to get task handler service: %v\", err)\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nvar svcV2 *ServiceV2\n\nfunc GetTaskSchedulerServiceV2() (svr *ServiceV2, err error) {\n\tif svcV2 != nil {\n\t\treturn svcV2, nil\n\t}\n\tsvcV2, err = NewTaskSchedulerServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn svcV2, nil\n}\n"
  },
  {
    "path": "core/task/stats/options.go",
    "content": "package stats\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\ntype Option func(service interfaces.TaskStatsService)\n\nfunc WithConfigPath(path string) Option {\n\treturn func(svc interfaces.TaskStatsService) {\n\t\tsvc.SetConfigPath(path)\n\t}\n}\n"
  },
  {
    "path": "core/task/stats/service_v2.go",
    "content": "package stats\n\nimport (\n\tlog2 \"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/database\"\n\tinterfaces2 \"github.com/crawlab-team/crawlab/core/database/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\tnodeconfig \"github.com/crawlab-team/crawlab/core/node/config\"\n\t\"github.com/crawlab-team/crawlab/core/task/log\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype databaseServiceItem struct {\n\ttaskId    primitive.ObjectID\n\tdbId      primitive.ObjectID\n\tdbSvc     interfaces2.DatabaseService\n\ttableName string\n\ttime      time.Time\n}\n\ntype ServiceV2 struct {\n\t// dependencies\n\tnodeCfgSvc interfaces.NodeConfigService\n\n\t// internals\n\tmu                   sync.Mutex\n\tdatabaseServiceItems map[string]*databaseServiceItem\n\tdatabaseServiceTll   time.Duration\n\tlogDriver            log.Driver\n}\n\nfunc (svc *ServiceV2) Init() (err error) {\n\tgo svc.cleanup()\n\treturn nil\n}\n\nfunc (svc *ServiceV2) InsertData(taskId primitive.ObjectID, records ...map[string]interface{}) (err error) {\n\tcount := 0\n\n\titem, err := svc.getDatabaseServiceItem(taskId)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdbId := item.dbId\n\tdbSvc := item.dbSvc\n\ttableName := item.tableName\n\tif utils.IsPro() && dbSvc != nil {\n\t\tfor _, record := range records {\n\t\t\tif err := dbSvc.CreateRow(dbId, \"\", tableName, record); err != nil {\n\t\t\t\tlog2.Errorf(\"failed to insert data: %v\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tcount++\n\t\t}\n\t} else {\n\t\tvar records2 []interface{}\n\t\tfor _, record := range records {\n\t\t\trecords2 = append(records2, record)\n\t\t}\n\t\t_, err = mongo.GetMongoCol(tableName).InsertMany(records2)\n\t\tif err != nil {\n\t\t\tlog2.Errorf(\"failed to insert data: %v\", err)\n\t\t\treturn err\n\t\t}\n\t\tcount = len(records)\n\t}\n\n\tgo svc.updateTaskStats(taskId, count)\n\n\treturn nil\n}\n\nfunc (svc *ServiceV2) InsertLogs(id primitive.ObjectID, logs ...string) (err error) {\n\treturn svc.logDriver.WriteLines(id.Hex(), logs)\n}\n\nfunc (svc *ServiceV2) getDatabaseServiceItem(taskId primitive.ObjectID) (item *databaseServiceItem, err error) {\n\t// atomic operation\n\tsvc.mu.Lock()\n\tdefer svc.mu.Unlock()\n\n\t// attempt to get from cache\n\titem, ok := svc.databaseServiceItems[taskId.Hex()]\n\tif ok {\n\t\t// hit in cache\n\t\titem.time = time.Now()\n\t\treturn item, nil\n\t}\n\n\t// task\n\tt, err := service.NewModelServiceV2[models2.TaskV2]().GetById(taskId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// spider\n\ts, err := service.NewModelServiceV2[models2.SpiderV2]().GetById(t.SpiderId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// database service\n\tvar dbSvc interfaces2.DatabaseService\n\tif utils.IsPro() {\n\t\tif dbRegSvc := database.GetDatabaseRegistryService(); dbRegSvc != nil {\n\t\t\tdbSvc, err = dbRegSvc.GetDatabaseService(s.DataSourceId)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t}\n\n\t// store in cache\n\tsvc.databaseServiceItems[taskId.Hex()] = &databaseServiceItem{\n\t\ttaskId:    taskId,\n\t\tdbId:      s.DataSourceId,\n\t\tdbSvc:     dbSvc,\n\t\ttableName: s.ColName,\n\t\ttime:      time.Now(),\n\t}\n\n\treturn item, nil\n}\n\nfunc (svc *ServiceV2) updateTaskStats(id primitive.ObjectID, resultCount int) {\n\terr := service.NewModelServiceV2[models2.TaskStatV2]().UpdateById(id, bson.M{\n\t\t\"$inc\": bson.M{\n\t\t\t\"result_count\": resultCount,\n\t\t},\n\t})\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t}\n}\n\nfunc (svc *ServiceV2) cleanup() {\n\tfor {\n\t\t// atomic operation\n\t\tsvc.mu.Lock()\n\n\t\tfor k, v := range svc.databaseServiceItems {\n\t\t\tif time.Now().After(v.time.Add(svc.databaseServiceTll)) {\n\t\t\t\tdelete(svc.databaseServiceItems, k)\n\t\t\t}\n\t\t}\n\n\t\tsvc.mu.Unlock()\n\n\t\ttime.Sleep(10 * time.Minute)\n\t}\n}\n\nfunc NewTaskStatsServiceV2() (svc2 *ServiceV2, err error) {\n\t// service\n\tsvc := &ServiceV2{\n\t\tmu:                   sync.Mutex{},\n\t\tdatabaseServiceItems: map[string]*databaseServiceItem{},\n\t\tdatabaseServiceTll:   10 * time.Minute,\n\t}\n\n\tsvc.nodeCfgSvc = nodeconfig.GetNodeConfigService()\n\n\t// log driver\n\tsvc.logDriver, err = log.GetLogDriver(log.DriverTypeFile)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn svc, nil\n}\n\nvar _serviceV2 *ServiceV2\n\nfunc GetTaskStatsServiceV2() (svr *ServiceV2, err error) {\n\tif _serviceV2 != nil {\n\t\treturn _serviceV2, nil\n\t}\n\t_serviceV2, err = NewTaskStatsServiceV2()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn _serviceV2, nil\n}\n"
  },
  {
    "path": "core/user/options.go",
    "content": "package user\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\ntype Option func(svc interfaces.UserService)\n\nfunc WithJwtSecret(secret string) Option {\n\treturn func(svc interfaces.UserService) {\n\t\tsvc.SetJwtSecret(secret)\n\t}\n}\n"
  },
  {
    "path": "core/user/service.go",
    "content": "package user\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/container\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/delegate\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tmongo2 \"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/golang-jwt/jwt/v5\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n\t\"time\"\n)\n\ntype Service struct {\n\t// settings variables\n\tjwtSecret        string\n\tjwtSigningMethod jwt.SigningMethod\n\n\t// dependencies\n\tmodelSvc service.ModelService\n}\n\nfunc (svc *Service) Init() (err error) {\n\t_, err = svc.modelSvc.GetUserByUsername(constants.DefaultAdminUsername, nil)\n\tif err == nil {\n\t\treturn nil\n\t}\n\tif err.Error() != mongo.ErrNoDocuments.Error() {\n\t\treturn err\n\t}\n\treturn svc.Create(&interfaces.UserCreateOptions{\n\t\tUsername: constants.DefaultAdminUsername,\n\t\tPassword: constants.DefaultAdminPassword,\n\t\tRole:     constants.RoleAdmin,\n\t})\n}\n\nfunc (svc *Service) SetJwtSecret(secret string) {\n\tsvc.jwtSecret = secret\n}\n\nfunc (svc *Service) SetJwtSigningMethod(method jwt.SigningMethod) {\n\tsvc.jwtSigningMethod = method\n}\n\nfunc (svc *Service) Create(opts *interfaces.UserCreateOptions, args ...interface{}) (err error) {\n\tactor := utils.GetUserFromArgs(args...)\n\n\t// validate options\n\tif opts.Username == \"\" || opts.Password == \"\" {\n\t\treturn trace.TraceError(errors.ErrorUserMissingRequiredFields)\n\t}\n\tif len(opts.Password) < 5 {\n\t\treturn trace.TraceError(errors.ErrorUserInvalidPassword)\n\t}\n\n\t// normalize options\n\tif opts.Role == \"\" {\n\t\topts.Role = constants.RoleNormal\n\t}\n\n\t// check if user exists\n\tif u, err := svc.modelSvc.GetUserByUsername(opts.Username, nil); err == nil && u != nil && !u.Id.IsZero() {\n\t\treturn trace.TraceError(errors.ErrorUserAlreadyExists)\n\t}\n\n\t// transaction\n\treturn mongo2.RunTransaction(func(ctx mongo.SessionContext) error {\n\t\t// add user\n\t\tu := &models.User{\n\t\t\tUsername: opts.Username,\n\t\t\tRole:     opts.Role,\n\t\t\tEmail:    opts.Email,\n\t\t}\n\t\tif err := delegate.NewModelDelegate(u, actor).Add(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// add password\n\t\tp := &models.Password{\n\t\t\tId:       u.Id,\n\t\t\tPassword: utils.EncryptMd5(opts.Password),\n\t\t}\n\t\tif err := delegate.NewModelDelegate(p, actor).Add(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t})\n}\n\nfunc (svc *Service) Login(opts *interfaces.UserLoginOptions) (token string, u interfaces.User, err error) {\n\tu, err = svc.modelSvc.GetUserByUsername(opts.Username, nil)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\tp, err := svc.modelSvc.GetPasswordById(u.GetId())\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\tif p.Password != utils.EncryptMd5(opts.Password) {\n\t\treturn \"\", nil, errors.ErrorUserMismatch\n\t}\n\ttoken, err = svc.makeToken(u)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\treturn token, u, nil\n}\n\nfunc (svc *Service) CheckToken(tokenStr string) (u interfaces.User, err error) {\n\treturn svc.checkToken(tokenStr)\n}\n\nfunc (svc *Service) ChangePassword(id primitive.ObjectID, password string, args ...interface{}) (err error) {\n\tactor := utils.GetUserFromArgs(args...)\n\n\tp, err := svc.modelSvc.GetPasswordById(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.Password = utils.EncryptMd5(password)\n\tif err := delegate.NewModelDelegate(p, actor).Save(); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (svc *Service) MakeToken(user interfaces.User) (tokenStr string, err error) {\n\treturn svc.makeToken(user)\n}\n\nfunc (svc *Service) GetCurrentUser(c *gin.Context) (user interfaces.User, err error) {\n\t// token string\n\ttokenStr := c.GetHeader(\"Authorization\")\n\n\t// user\n\tu, err := userSvc.CheckToken(tokenStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn u, nil\n}\n\nfunc (svc *Service) makeToken(user interfaces.User) (tokenStr string, err error) {\n\ttoken := jwt.NewWithClaims(svc.jwtSigningMethod, jwt.MapClaims{\n\t\t\"id\":       user.GetId(),\n\t\t\"username\": user.GetUsername(),\n\t\t\"nbf\":      time.Now().Unix(),\n\t})\n\treturn token.SignedString([]byte(svc.jwtSecret))\n}\n\nfunc (svc *Service) checkToken(tokenStr string) (user interfaces.User, err error) {\n\ttoken, err := jwt.Parse(tokenStr, svc.getSecretFunc())\n\tif err != nil {\n\t\treturn\n\t}\n\n\tclaim, ok := token.Claims.(jwt.MapClaims)\n\tif !ok {\n\t\terr = errors.ErrorUserInvalidType\n\t\treturn\n\t}\n\n\tif !token.Valid {\n\t\terr = errors.ErrorUserInvalidToken\n\t\treturn\n\t}\n\n\tid, err := primitive.ObjectIDFromHex(claim[\"id\"].(string))\n\tif err != nil {\n\t\treturn user, err\n\t}\n\tusername := claim[\"username\"].(string)\n\tuser, err = svc.modelSvc.GetUserById(id)\n\tif err != nil {\n\t\terr = errors.ErrorUserNotExists\n\t\treturn\n\t}\n\n\tif username != user.GetUsername() {\n\t\terr = errors.ErrorUserMismatch\n\t\treturn\n\t}\n\n\treturn\n}\n\nfunc (svc *Service) getSecretFunc() jwt.Keyfunc {\n\treturn func(token *jwt.Token) (interface{}, error) {\n\t\treturn []byte(svc.jwtSecret), nil\n\t}\n}\n\nfunc NewUserService() (svc2 interfaces.UserService, err error) {\n\t// service\n\tsvc := &Service{\n\t\tjwtSecret:        \"crawlab\",\n\t\tjwtSigningMethod: jwt.SigningMethodHS256,\n\t}\n\n\t// dependency injection\n\tif err := container.GetContainer().Invoke(func(modelSvc service.ModelService) {\n\t\tsvc.modelSvc = modelSvc\n\t}); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// initialize\n\tif err := svc.Init(); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\treturn svc, nil\n}\n\nvar userSvc interfaces.UserService\n\nfunc GetUserService() (svc interfaces.UserService, err error) {\n\tif userSvc != nil {\n\t\treturn userSvc, nil\n\t}\n\tsvc, err = NewUserService()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tuserSvc = svc\n\treturn svc, nil\n}\n"
  },
  {
    "path": "core/user/service_v2.go",
    "content": "package user\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\tmongo2 \"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/golang-jwt/jwt/v5\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype ServiceV2 struct {\n\tjwtSecret        string\n\tjwtSigningMethod jwt.SigningMethod\n\tmodelSvc         *service.ModelServiceV2[models.UserV2]\n}\n\nfunc (svc *ServiceV2) Init() (err error) {\n\t_, err = svc.modelSvc.GetOne(bson.M{\"username\": constants.DefaultAdminUsername}, nil)\n\tif err == nil {\n\t\treturn nil\n\t}\n\tif err.Error() != mongo.ErrNoDocuments.Error() {\n\t\treturn err\n\t}\n\treturn svc.Create(\n\t\tconstants.DefaultAdminUsername,\n\t\tconstants.DefaultAdminPassword,\n\t\tconstants.RoleAdmin,\n\t\t\"\",\n\t\tprimitive.NilObjectID,\n\t)\n}\n\nfunc (svc *ServiceV2) SetJwtSecret(secret string) {\n\tsvc.jwtSecret = secret\n}\n\nfunc (svc *ServiceV2) SetJwtSigningMethod(method jwt.SigningMethod) {\n\tsvc.jwtSigningMethod = method\n}\n\nfunc (svc *ServiceV2) Create(username, password, role, email string, by primitive.ObjectID) (err error) {\n\t// validate options\n\tif username == \"\" || password == \"\" {\n\t\treturn trace.TraceError(errors.ErrorUserMissingRequiredFields)\n\t}\n\tif len(password) < 5 {\n\t\treturn trace.TraceError(errors.ErrorUserInvalidPassword)\n\t}\n\n\t// normalize options\n\tif role == \"\" {\n\t\trole = constants.RoleNormal\n\t}\n\n\t// check if user exists\n\tif u, err := svc.modelSvc.GetOne(bson.M{\"username\": username}, nil); err == nil && u != nil && !u.Id.IsZero() {\n\t\treturn trace.TraceError(errors.ErrorUserAlreadyExists)\n\t}\n\n\t// transaction\n\treturn mongo2.RunTransaction(func(ctx mongo.SessionContext) error {\n\t\t// add user\n\t\tu := models.UserV2{\n\t\t\tUsername: username,\n\t\t\tRole:     role,\n\t\t\tPassword: utils.EncryptMd5(password),\n\t\t\tEmail:    email,\n\t\t}\n\t\tu.SetCreated(by)\n\t\tu.SetUpdated(by)\n\t\t_, err = svc.modelSvc.InsertOne(u)\n\n\t\treturn err\n\t})\n}\n\nfunc (svc *ServiceV2) Login(username, password string) (token string, u *models.UserV2, err error) {\n\tu, err = svc.modelSvc.GetOne(bson.M{\"username\": username}, nil)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\tif u.Password != utils.EncryptMd5(password) {\n\t\treturn \"\", nil, errors.ErrorUserMismatch\n\t}\n\ttoken, err = svc.makeToken(u)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\treturn token, u, nil\n}\n\nfunc (svc *ServiceV2) CheckToken(tokenStr string) (u *models.UserV2, err error) {\n\treturn svc.checkToken(tokenStr)\n}\n\nfunc (svc *ServiceV2) ChangePassword(id primitive.ObjectID, password string, by primitive.ObjectID) (err error) {\n\tu, err := svc.modelSvc.GetById(id)\n\tif err != nil {\n\t\treturn err\n\t}\n\tu.Password = utils.EncryptMd5(password)\n\tu.SetCreatedBy(by)\n\treturn svc.modelSvc.ReplaceById(id, *u)\n}\n\nfunc (svc *ServiceV2) MakeToken(user *models.UserV2) (tokenStr string, err error) {\n\treturn svc.makeToken(user)\n}\n\nfunc (svc *ServiceV2) GetCurrentUser(c *gin.Context) (user interfaces.User, err error) {\n\t// token string\n\ttokenStr := c.GetHeader(\"Authorization\")\n\n\t// user\n\tu, err := userSvc.CheckToken(tokenStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn u, nil\n}\n\nfunc (svc *ServiceV2) makeToken(user *models.UserV2) (tokenStr string, err error) {\n\ttoken := jwt.NewWithClaims(svc.jwtSigningMethod, jwt.MapClaims{\n\t\t\"id\":       user.Id,\n\t\t\"username\": user.Username,\n\t\t\"nbf\":      time.Now().Unix(),\n\t})\n\treturn token.SignedString([]byte(svc.jwtSecret))\n}\n\nfunc (svc *ServiceV2) checkToken(tokenStr string) (user *models.UserV2, err error) {\n\ttoken, err := jwt.Parse(tokenStr, svc.getSecretFunc())\n\tif err != nil {\n\t\treturn\n\t}\n\n\tclaim, ok := token.Claims.(jwt.MapClaims)\n\tif !ok {\n\t\terr = errors.ErrorUserInvalidType\n\t\treturn\n\t}\n\n\tif !token.Valid {\n\t\terr = errors.ErrorUserInvalidToken\n\t\treturn\n\t}\n\n\tid, err := primitive.ObjectIDFromHex(claim[\"id\"].(string))\n\tif err != nil {\n\t\treturn user, err\n\t}\n\tusername := claim[\"username\"].(string)\n\tuser, err = svc.modelSvc.GetById(id)\n\tif err != nil {\n\t\terr = errors.ErrorUserNotExists\n\t\treturn\n\t}\n\n\tif username != user.Username {\n\t\terr = errors.ErrorUserMismatch\n\t\treturn\n\t}\n\n\treturn\n}\n\nfunc (svc *ServiceV2) getSecretFunc() jwt.Keyfunc {\n\treturn func(token *jwt.Token) (interface{}, error) {\n\t\treturn []byte(svc.jwtSecret), nil\n\t}\n}\n\nfunc newUserServiceV2() (svc *ServiceV2, err error) {\n\t// service\n\tsvc = &ServiceV2{\n\t\tmodelSvc:         service.NewModelServiceV2[models.UserV2](),\n\t\tjwtSecret:        \"crawlab\",\n\t\tjwtSigningMethod: jwt.SigningMethodHS256,\n\t}\n\n\t// initialize\n\tif err := svc.Init(); err != nil {\n\t\tlog.Errorf(\"failed to initialize user service: %v\", err)\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\treturn svc, nil\n}\n\nvar userSvcV2 *ServiceV2\nvar userSvcV2Once sync.Once\n\nfunc GetUserServiceV2() (svc *ServiceV2, err error) {\n\tuserSvcV2Once.Do(func() {\n\t\tuserSvcV2, err = newUserServiceV2()\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t})\n\treturn userSvcV2, nil\n}\n"
  },
  {
    "path": "core/user/test/base.go",
    "content": "package test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/models/service\"\n\t\"github.com/crawlab-team/crawlab/core/user\"\n\t\"go.uber.org/dig\"\n\t\"testing\"\n)\n\nfunc init() {\n\tvar err error\n\tT, err = NewTest()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nvar T *Test\n\ntype Test struct {\n\t// dependencies\n\tmodelSvc service.ModelService\n\tuserSvc  interfaces.UserService\n\n\t// test data\n\tTestUsername    string\n\tTestPassword    string\n\tTestNewPassword string\n}\n\nfunc (t *Test) Setup(t2 *testing.T) {\n\tvar err error\n\tt.userSvc, err = user.NewUserService()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tt2.Cleanup(t.Cleanup)\n}\n\nfunc (t *Test) Cleanup() {\n\t_ = t.modelSvc.GetBaseService(interfaces.ModelIdUser).DeleteList(nil)\n}\n\nfunc NewTest() (t *Test, err error) {\n\t// test\n\tt = &Test{\n\t\tTestUsername:    \"test_username\",\n\t\tTestPassword:    \"test_password\",\n\t\tTestNewPassword: \"test_new_password\",\n\t}\n\n\t// dependency injection\n\tc := dig.New()\n\tif err := c.Provide(service.GetService); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := c.Invoke(func(modelSvc service.ModelService) {\n\t\tt.modelSvc = modelSvc\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn t, nil\n}\n"
  },
  {
    "path": "core/user/test/user_service_test.go",
    "content": "package test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"github.com/crawlab-team/crawlab/core/utils\"\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n)\n\nfunc TestUserService_Init(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tu, err := T.modelSvc.GetUserByUsernameWithPassword(constants.DefaultAdminUsername, nil)\n\trequire.Nil(t, err)\n\trequire.Equal(t, constants.DefaultAdminUsername, u.Username)\n\trequire.Equal(t, utils.EncryptMd5(constants.DefaultAdminPassword), u.Password)\n}\n\nfunc TestUserService_Create_Login_CheckToken(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.userSvc.Create(&interfaces.UserCreateOptions{\n\t\tUsername: T.TestUsername,\n\t\tPassword: T.TestPassword,\n\t})\n\trequire.Nil(t, err)\n\n\tu, err := T.modelSvc.GetUserByUsernameWithPassword(T.TestUsername, nil)\n\trequire.Nil(t, err)\n\trequire.Equal(t, T.TestUsername, u.Username)\n\trequire.Equal(t, utils.EncryptMd5(T.TestPassword), u.Password)\n\n\ttoken, u2, err := T.userSvc.Login(&interfaces.UserLoginOptions{\n\t\tUsername: T.TestUsername,\n\t\tPassword: T.TestPassword,\n\t})\n\trequire.Nil(t, err)\n\trequire.Greater(t, len(token), 10)\n\trequire.Equal(t, u.Username, u2.GetUsername())\n\n\tu3, err := T.userSvc.CheckToken(token)\n\trequire.Nil(t, err)\n\trequire.Equal(t, u.Username, u3.GetUsername())\n}\n\nfunc TestUserService_ChangePassword(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tu, err := T.modelSvc.GetUserByUsernameWithPassword(constants.DefaultAdminUsername, nil)\n\trequire.Nil(t, err)\n\terr = T.userSvc.ChangePassword(u.Id, T.TestNewPassword)\n\trequire.Nil(t, err)\n\n\tu2, err := T.modelSvc.GetUserByUsernameWithPassword(constants.DefaultAdminUsername, nil)\n\trequire.Nil(t, err)\n\trequire.Equal(t, utils.EncryptMd5(T.TestNewPassword), u2.Password)\n}\n"
  },
  {
    "path": "core/utils/args.go",
    "content": "package utils\n\nimport \"github.com/crawlab-team/crawlab/core/interfaces\"\n\nfunc GetUserFromArgs(args ...interface{}) (u interfaces.User) {\n\tfor _, arg := range args {\n\t\tswitch arg.(type) {\n\t\tcase interfaces.User:\n\t\t\tvar ok bool\n\t\t\tu, ok = arg.(interfaces.User)\n\t\t\tif ok {\n\t\t\t\treturn u\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "core/utils/array.go",
    "content": "package utils\n\nimport (\n\t\"errors\"\n\t\"math/rand\"\n\t\"reflect\"\n\t\"time\"\n)\n\nfunc StringArrayContains(arr []string, str string) bool {\n\tfor _, s := range arr {\n\t\tif s == str {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc GetArrayItems(array interface{}) (res []interface{}, err error) {\n\tswitch reflect.TypeOf(array).Kind() {\n\tcase reflect.Slice, reflect.Array:\n\t\ts := reflect.ValueOf(array)\n\t\tfor i := 0; i < s.Len(); i++ {\n\t\t\tobj, ok := s.Index(i).Interface().(interface{})\n\t\t\tif !ok {\n\t\t\t\treturn nil, errors.New(\"invalid type\")\n\t\t\t}\n\t\t\tres = append(res, obj)\n\t\t}\n\tdefault:\n\t\treturn nil, errors.New(\"invalid type\")\n\t}\n\treturn res, nil\n}\n\nfunc ShuffleArray(slice []interface{}) (err error) {\n\tr := rand.New(rand.NewSource(time.Now().Unix()))\n\tfor len(slice) > 0 {\n\t\tn := len(slice)\n\t\trandIndex := r.Intn(n)\n\t\tslice[n-1], slice[randIndex] = slice[randIndex], slice[n-1]\n\t\tslice = slice[:n-1]\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "core/utils/backoff.go",
    "content": "package utils\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"time\"\n)\n\nfunc BackoffErrorNotify(prefix string) backoff.Notify {\n\treturn func(err error, duration time.Duration) {\n\t\tlog.Errorf(\"%s error: %v. reattempt in %.1f seconds...\", prefix, err, duration.Seconds())\n\t\ttrace.PrintError(err)\n\t}\n}\n"
  },
  {
    "path": "core/utils/binders/binder_col_name.go",
    "content": "package binders\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n)\n\nfunc NewColNameBinder(id interfaces.ModelId) (b *ColNameBinder) {\n\treturn &ColNameBinder{id: id}\n}\n\ntype ColNameBinder struct {\n\tid interfaces.ModelId\n}\n\nfunc (b *ColNameBinder) Bind() (res interface{}, err error) {\n\tswitch b.id {\n\t// system models\n\tcase interfaces.ModelIdArtifact:\n\t\treturn interfaces.ModelColNameArtifact, nil\n\tcase interfaces.ModelIdTag:\n\t\treturn interfaces.ModelColNameTag, nil\n\n\t// operation models\n\tcase interfaces.ModelIdNode:\n\t\treturn interfaces.ModelColNameNode, nil\n\tcase interfaces.ModelIdProject:\n\t\treturn interfaces.ModelColNameProject, nil\n\tcase interfaces.ModelIdSpider:\n\t\treturn interfaces.ModelColNameSpider, nil\n\tcase interfaces.ModelIdTask:\n\t\treturn interfaces.ModelColNameTask, nil\n\tcase interfaces.ModelIdJob:\n\t\treturn interfaces.ModelColNameJob, nil\n\tcase interfaces.ModelIdSchedule:\n\t\treturn interfaces.ModelColNameSchedule, nil\n\tcase interfaces.ModelIdUser:\n\t\treturn interfaces.ModelColNameUser, nil\n\tcase interfaces.ModelIdSetting:\n\t\treturn interfaces.ModelColNameSetting, nil\n\tcase interfaces.ModelIdToken:\n\t\treturn interfaces.ModelColNameToken, nil\n\tcase interfaces.ModelIdVariable:\n\t\treturn interfaces.ModelColNameVariable, nil\n\tcase interfaces.ModelIdTaskQueue:\n\t\treturn interfaces.ModelColNameTaskQueue, nil\n\tcase interfaces.ModelIdTaskStat:\n\t\treturn interfaces.ModelColNameTaskStat, nil\n\tcase interfaces.ModelIdSpiderStat:\n\t\treturn interfaces.ModelColNameSpiderStat, nil\n\tcase interfaces.ModelIdDataSource:\n\t\treturn interfaces.ModelColNameDataSource, nil\n\tcase interfaces.ModelIdDataCollection:\n\t\treturn interfaces.ModelColNameDataCollection, nil\n\tcase interfaces.ModelIdPassword:\n\t\treturn interfaces.ModelColNamePasswords, nil\n\tcase interfaces.ModelIdExtraValue:\n\t\treturn interfaces.ModelColNameExtraValues, nil\n\tcase interfaces.ModelIdGit:\n\t\treturn interfaces.ModelColNameGit, nil\n\tcase interfaces.ModelIdRole:\n\t\treturn interfaces.ModelColNameRole, nil\n\tcase interfaces.ModelIdUserRole:\n\t\treturn interfaces.ModelColNameUserRole, nil\n\tcase interfaces.ModelIdPermission:\n\t\treturn interfaces.ModelColNamePermission, nil\n\tcase interfaces.ModelIdRolePermission:\n\t\treturn interfaces.ModelColNameRolePermission, nil\n\tcase interfaces.ModelIdEnvironment:\n\t\treturn interfaces.ModelColNameEnvironment, nil\n\tcase interfaces.ModelIdDependencySetting:\n\t\treturn interfaces.ModelColNameDependencySetting, nil\n\n\t// invalid\n\tdefault:\n\t\treturn res, errors.ErrorModelNotImplemented\n\t}\n}\n\nfunc (b *ColNameBinder) MustBind() (res interface{}) {\n\tres, err := b.Bind()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn res\n}\n\nfunc (b *ColNameBinder) BindString() (res string, err error) {\n\tres_, err := b.Bind()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tres = res_.(string)\n\treturn res, nil\n}\n\nfunc (b *ColNameBinder) MustBindString() (res string) {\n\treturn b.MustBind().(string)\n}\n"
  },
  {
    "path": "core/utils/bool.go",
    "content": "package utils\n\nimport \"github.com/spf13/viper\"\n\nfunc EnvIsTrue(key string, defaultOk bool) bool {\n\tisTrueBool := viper.GetBool(key)\n\tisTrueString := viper.GetString(key)\n\tif isTrueString == \"\" {\n\t\treturn defaultOk\n\t}\n\treturn isTrueBool || isTrueString == \"Y\"\n}\n"
  },
  {
    "path": "core/utils/bson.go",
    "content": "package utils\n\nimport (\n\t\"github.com/emirpasic/gods/sets/hashset\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"reflect\"\n)\n\nfunc BsonMEqual(v1, v2 bson.M) (ok bool) {\n\t//ok = reflect.DeepEqual(v1, v2)\n\tok = bsonMEqual(v1, v2)\n\treturn ok\n}\n\nfunc bsonMEqual(v1, v2 bson.M) (ok bool) {\n\t// all keys\n\tallKeys := hashset.New()\n\tfor key := range v1 {\n\t\tallKeys.Add(key)\n\t}\n\tfor key := range v2 {\n\t\tallKeys.Add(key)\n\t}\n\n\tfor _, keyRes := range allKeys.Values() {\n\t\tkey := keyRes.(string)\n\t\tv1Value, ok := v1[key]\n\t\tif !ok {\n\t\t\treturn false\n\t\t}\n\t\tv2Value, ok := v2[key]\n\t\tif !ok {\n\t\t\treturn false\n\t\t}\n\n\t\tmode := 0\n\n\t\tvar v1ValueBsonM bson.M\n\t\tvar v1ValueBsonA bson.A\n\t\tswitch v1Value.(type) {\n\t\tcase bson.M:\n\t\t\tmode = 1\n\t\t\tv1ValueBsonM = v1Value.(bson.M)\n\t\tcase bson.A:\n\t\t\tmode = 2\n\t\t\tv1ValueBsonA = v1Value.(bson.A)\n\t\t}\n\n\t\tvar v2ValueBsonM bson.M\n\t\tvar v2ValueBsonA bson.A\n\t\tswitch v2Value.(type) {\n\t\tcase bson.M:\n\t\t\tif mode != 1 {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tv2ValueBsonM = v2Value.(bson.M)\n\t\tcase bson.A:\n\t\t\tif mode != 2 {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tv2ValueBsonA = v2Value.(bson.A)\n\t\t}\n\n\t\tswitch mode {\n\t\tcase 0:\n\t\t\tif v1Value != v2Value {\n\t\t\t\treturn false\n\t\t\t}\n\t\tcase 1:\n\t\t\tif !bsonMEqual(v1ValueBsonM, v2ValueBsonM) {\n\t\t\t\treturn false\n\t\t\t}\n\t\tcase 2:\n\t\t\tif !reflect.DeepEqual(v1ValueBsonA, v2ValueBsonA) {\n\t\t\t\treturn false\n\t\t\t}\n\t\tdefault:\n\t\t\t// not reachable\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc NormalizeBsonMObjectId(m bson.M) (res bson.M) {\n\tfor k, v := range m {\n\t\tswitch v.(type) {\n\t\tcase string:\n\t\t\toid, err := primitive.ObjectIDFromHex(v.(string))\n\t\t\tif err == nil {\n\t\t\t\tm[k] = oid\n\t\t\t}\n\t\tcase bson.M:\n\t\t\tm[k] = NormalizeBsonMObjectId(v.(bson.M))\n\t\t}\n\t}\n\treturn m\n}\n\nfunc DenormalizeBsonMObjectId(m bson.M) (res bson.M) {\n\tfor k, v := range m {\n\t\tswitch v.(type) {\n\t\tcase primitive.ObjectID:\n\t\t\tm[k] = v.(primitive.ObjectID).Hex()\n\t\tcase bson.M:\n\t\t\tm[k] = NormalizeBsonMObjectId(v.(bson.M))\n\t\t}\n\t}\n\treturn m\n}\n\nfunc NormalizeObjectId(v interface{}) (res interface{}) {\n\tswitch v.(type) {\n\tcase string:\n\t\toid, err := primitive.ObjectIDFromHex(v.(string))\n\t\tif err != nil {\n\t\t\treturn v\n\t\t}\n\t\treturn oid\n\tdefault:\n\t\treturn v\n\t}\n}\n"
  },
  {
    "path": "core/utils/cache.go",
    "content": "package utils\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"time\"\n)\n\nfunc GetFromDbCache(key string, getFn func() (string, error)) (res string, err error) {\n\tcol := mongo.GetMongoCol(constants.CacheColName)\n\n\tvar d bson.M\n\tif err := col.Find(bson.M{\n\t\tconstants.CacheColKey: key,\n\t}, nil).One(&d); err != nil {\n\t\tif err != mongo2.ErrNoDocuments {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\t// get cache value\n\t\tres, err = getFn()\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\t// save cache\n\t\td = bson.M{\n\t\t\tconstants.CacheColKey:   key,\n\t\t\tconstants.CacheColValue: res,\n\t\t\tconstants.CacheColTime:  time.Now(),\n\t\t}\n\t\tif _, err := col.Insert(d); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn res, nil\n\t}\n\n\t// type conversion\n\tr, ok := d[constants.CacheColValue]\n\tif !ok {\n\t\tif err := col.Delete(bson.M{constants.CacheColKey: key}); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn GetFromDbCache(key, getFn)\n\t}\n\tres, ok = r.(string)\n\tif !ok {\n\t\tif err := col.Delete(bson.M{constants.CacheColKey: key}); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn GetFromDbCache(key, getFn)\n\t}\n\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/utils/chan.go",
    "content": "package utils\n\nimport (\n\t\"sync\"\n)\n\nvar TaskExecChanMap = NewChanMap()\n\ntype ChanMap struct {\n\tm sync.Map\n}\n\nfunc NewChanMap() *ChanMap {\n\treturn &ChanMap{m: sync.Map{}}\n}\n\nfunc (cm *ChanMap) Chan(key string) chan string {\n\tif ch, ok := cm.m.Load(key); ok {\n\t\treturn ch.(interface{}).(chan string)\n\t}\n\tch := make(chan string, 10)\n\tcm.m.Store(key, ch)\n\treturn ch\n}\n\nfunc (cm *ChanMap) ChanBlocked(key string) chan string {\n\tif ch, ok := cm.m.Load(key); ok {\n\t\treturn ch.(interface{}).(chan string)\n\t}\n\tch := make(chan string)\n\tcm.m.Store(key, ch)\n\treturn ch\n}\n\nfunc (cm *ChanMap) HasChanKey(key string) bool {\n\tif _, ok := cm.m.Load(key); ok {\n\t\treturn true\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "core/utils/chan_test.go",
    "content": "package utils\n\nimport (\n\t. \"github.com/smartystreets/goconvey/convey\"\n\t\"sync\"\n\t\"testing\"\n)\n\nfunc TestNewChanMap(t *testing.T) {\n\tmapTest := sync.Map{}\n\tchanTest := make(chan string)\n\ttest := \"test\"\n\n\tConvey(\"Call NewChanMap to generate ChanMap\", t, func() {\n\t\tmapTest.Store(\"test\", chanTest)\n\t\tchanMapTest := ChanMap{mapTest}\n\t\tchanMap := NewChanMap()\n\t\tchanMap.m.Store(\"test\", chanTest)\n\n\t\tConvey(test, func() {\n\t\t\tv1, ok := chanMap.m.Load(\"test\")\n\t\t\tSo(ok, ShouldBeTrue)\n\t\t\tv2, ok := chanMapTest.m.Load(\"test\")\n\t\t\tSo(ok, ShouldBeTrue)\n\t\t\tSo(v1, ShouldResemble, v2)\n\t\t})\n\t})\n}\n\nfunc TestChan(t *testing.T) {\n\tmapTest := sync.Map{}\n\tchanTest := make(chan string)\n\tmapTest.Store(\"test\", chanTest)\n\tchanMapTest := ChanMap{mapTest}\n\n\tConvey(\"Test Chan use exist key\", t, func() {\n\t\tch1 := chanMapTest.Chan(\"test\")\n\t\tConvey(\"ch1 should equal chanTest\", func() {\n\t\t\tSo(ch1, ShouldEqual, chanTest)\n\t\t})\n\t})\n\tConvey(\"Test Chan use no-exist key\", t, func() {\n\t\tch2 := chanMapTest.Chan(\"test2\")\n\t\tConvey(\"ch2 should equal chanMapTest.m[test2]\", func() {\n\t\t\tv, ok := chanMapTest.m.Load(\"test2\")\n\t\t\tSo(ok, ShouldBeTrue)\n\t\t\tSo(v, ShouldEqual, ch2)\n\t\t})\n\t\tConvey(\"Cap of chanMapTest.m[test2] should equal 10\", func() {\n\t\t\tSo(10, ShouldEqual, cap(ch2))\n\t\t})\n\t})\n}\n\nfunc TestChanBlocked(t *testing.T) {\n\tmapTest := sync.Map{}\n\tchanTest := make(chan string)\n\tmapTest.Store(\"test\", chanTest)\n\tchanMapTest := ChanMap{mapTest}\n\n\tConvey(\"Test Chan use exist key\", t, func() {\n\t\tch1 := chanMapTest.ChanBlocked(\"test\")\n\t\tConvey(\"ch1 should equal chanTest\", func() {\n\t\t\tSo(ch1, ShouldEqual, chanTest)\n\t\t})\n\t})\n\tConvey(\"Test Chan use no-exist key\", t, func() {\n\t\tch2 := chanMapTest.ChanBlocked(\"test2\")\n\t\tConvey(\"ch2 should equal chanMapTest.m[test2]\", func() {\n\t\t\tv, ok := chanMapTest.m.Load(\"test2\")\n\t\t\tSo(ok, ShouldBeTrue)\n\t\t\tSo(v, ShouldEqual, ch2)\n\t\t})\n\t\tConvey(\"Cap of chanMapTest.m[test2] should equal 10\", func() {\n\t\t\tSo(0, ShouldEqual, cap(ch2))\n\t\t})\n\t})\n}\n"
  },
  {
    "path": "core/utils/cockroachdb.go",
    "content": "package utils\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/upper/db/v4\"\n\t\"github.com/upper/db/v4/adapter/mssql\"\n\t\"time\"\n)\n\nfunc GetCockroachdbSession(ds *models.DataSource) (s db.Session, err error) {\n\treturn getCockroachdbSession(context.Background(), ds)\n}\n\nfunc GetCockroachdbSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getCockroachdbSession(ctx, ds)\n}\n\nfunc getCockroachdbSession(ctx context.Context, ds *models.DataSource) (s db.Session, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultCockroachdbPort\n\t}\n\n\t// connect settings\n\tsettings := mssql.ConnectionURL{\n\t\tUser:     ds.Username,\n\t\tPassword: ds.Password,\n\t\tDatabase: ds.Database,\n\t\tHost:     fmt.Sprintf(\"%s:%s\", host, port),\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = mssql.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n\nfunc GetCockroachdbSessionWithTimeoutV2(ds *models2.DatabaseV2, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getCockroachdbSessionV2(ctx, ds)\n}\n\nfunc getCockroachdbSessionV2(ctx context.Context, ds *models2.DatabaseV2) (s db.Session, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultCockroachdbPort\n\t}\n\n\t// connect settings\n\tsettings := mssql.ConnectionURL{\n\t\tUser:     ds.Username,\n\t\tPassword: ds.Password,\n\t\tDatabase: ds.Database,\n\t\tHost:     fmt.Sprintf(\"%s:%s\", host, port),\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = mssql.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n"
  },
  {
    "path": "core/utils/cron.go",
    "content": "package utils\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// cronBounds provides a range of acceptable values (plus a map of name to value).\ntype cronBounds struct {\n\tmin, max uint\n\tnames    map[string]uint\n}\n\ntype cronUtils struct {\n\t// The cronBounds for each field.\n\tseconds cronBounds\n\tminutes cronBounds\n\thours   cronBounds\n\tdom     cronBounds\n\tmonths  cronBounds\n\tdow     cronBounds\n\n\t// Set the top bit if a star was included in the expression.\n\tstarBit uint64\n}\n\n// getRange returns the bits indicated by the given expression:\n//   number | number \"-\" number [ \"/\" number ]\n// or error parsing range.\nfunc (u *cronUtils) getRange(expr string, r cronBounds) (uint64, error) {\n\tvar (\n\t\tstart, end, step uint\n\t\trangeAndStep     = strings.Split(expr, \"/\")\n\t\tlowAndHigh       = strings.Split(rangeAndStep[0], \"-\")\n\t\tsingleDigit      = len(lowAndHigh) == 1\n\t\terr              error\n\t)\n\n\tvar extra uint64\n\tif lowAndHigh[0] == \"*\" || lowAndHigh[0] == \"?\" {\n\t\tstart = r.min\n\t\tend = r.max\n\t\textra = CronUtils.starBit\n\t} else {\n\t\tstart, err = u.parseIntOrName(lowAndHigh[0], r.names)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tswitch len(lowAndHigh) {\n\t\tcase 1:\n\t\t\tend = start\n\t\tcase 2:\n\t\t\tend, err = u.parseIntOrName(lowAndHigh[1], r.names)\n\t\t\tif err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\t\tdefault:\n\t\t\treturn 0, fmt.Errorf(\"too many hyphens: %s\", expr)\n\t\t}\n\t}\n\n\tswitch len(rangeAndStep) {\n\tcase 1:\n\t\tstep = 1\n\tcase 2:\n\t\tstep, err = u.mustParseInt(rangeAndStep[1])\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\n\t\t// Special handling: \"N/step\" means \"N-max/step\".\n\t\tif singleDigit {\n\t\t\tend = r.max\n\t\t}\n\t\tif step > 1 {\n\t\t\textra = 0\n\t\t}\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"too many slashes: %s\", expr)\n\t}\n\n\tif start < r.min {\n\t\treturn 0, fmt.Errorf(\"beginning of range (%d) below minimum (%d): %s\", start, r.min, expr)\n\t}\n\tif end > r.max {\n\t\treturn 0, fmt.Errorf(\"end of range (%d) above maximum (%d): %s\", end, r.max, expr)\n\t}\n\tif start > end {\n\t\treturn 0, fmt.Errorf(\"beginning of range (%d) beyond end of range (%d): %s\", start, end, expr)\n\t}\n\tif step == 0 {\n\t\treturn 0, fmt.Errorf(\"step of range should be a positive number: %s\", expr)\n\t}\n\n\treturn u.getBits(start, end, step) | extra, nil\n}\n\n// parseIntOrName returns the (possibly-named) integer contained in expr.\nfunc (u *cronUtils) parseIntOrName(expr string, names map[string]uint) (uint, error) {\n\tif names != nil {\n\t\tif namedInt, ok := names[strings.ToLower(expr)]; ok {\n\t\t\treturn namedInt, nil\n\t\t}\n\t}\n\treturn u.mustParseInt(expr)\n}\n\n// mustParseInt parses the given expression as an int or returns an error.\nfunc (u *cronUtils) mustParseInt(expr string) (uint, error) {\n\tnum, err := strconv.Atoi(expr)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"failed to parse int from %s: %s\", expr, err)\n\t}\n\tif num < 0 {\n\t\treturn 0, fmt.Errorf(\"negative number (%d) not allowed: %s\", num, expr)\n\t}\n\n\treturn uint(num), nil\n}\n\n// getBits sets all bits in the range [min, max], modulo the given step size.\nfunc (u *cronUtils) getBits(min, max, step uint) uint64 {\n\tvar bits uint64\n\n\t// If step is 1, use shifts.\n\tif step == 1 {\n\t\treturn ^(math.MaxUint64 << (max + 1)) & (math.MaxUint64 << min)\n\t}\n\n\t// Else, use a simple loop.\n\tfor i := min; i <= max; i += step {\n\t\tbits |= 1 << i\n\t}\n\treturn bits\n}\n\n// all returns all bits within the given cronBounds.  (plus the star bit)\nfunc (u *cronUtils) all(r cronBounds) uint64 {\n\treturn u.getBits(r.min, r.max, 1) | CronUtils.starBit\n}\n\nvar CronUtils = cronUtils{\n\t// The cronBounds for each field.\n\tseconds: cronBounds{0, 59, nil},\n\tminutes: cronBounds{0, 59, nil},\n\thours:   cronBounds{0, 23, nil},\n\tdom:     cronBounds{1, 31, nil},\n\tmonths: cronBounds{1, 12, map[string]uint{\n\t\t\"jan\": 1,\n\t\t\"feb\": 2,\n\t\t\"mar\": 3,\n\t\t\"apr\": 4,\n\t\t\"may\": 5,\n\t\t\"jun\": 6,\n\t\t\"jul\": 7,\n\t\t\"aug\": 8,\n\t\t\"sep\": 9,\n\t\t\"oct\": 10,\n\t\t\"nov\": 11,\n\t\t\"dec\": 12,\n\t}},\n\tdow: cronBounds{0, 6, map[string]uint{\n\t\t\"sun\": 0,\n\t\t\"mon\": 1,\n\t\t\"tue\": 2,\n\t\t\"wed\": 3,\n\t\t\"thu\": 4,\n\t\t\"fri\": 5,\n\t\t\"sat\": 6,\n\t}},\n\n\t// Set the top bit if a star was included in the expression.\n\tstarBit: 1 << 63,\n}\n"
  },
  {
    "path": "core/utils/debug.go",
    "content": "package utils\n\nimport (\n\t\"fmt\"\n\t\"github.com/spf13/viper\"\n\t\"time\"\n)\n\nfunc IsDebug() bool {\n\treturn viper.GetBool(\"debug\")\n}\n\nfunc LogDebug(msg string) {\n\tif !IsDebug() {\n\t\treturn\n\t}\n\tfmt.Println(fmt.Sprintf(\"[DEBUG] %s: %s\", time.Now().Format(\"2006-01-02 15:04:05\"), msg))\n}\n"
  },
  {
    "path": "core/utils/demo.go",
    "content": "package utils\n\nimport (\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/sys_exec\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/spf13/viper\"\n)\n\nfunc GetApiAddress() (res string) {\n\tapiAddress := viper.GetString(\"api.address\")\n\tif apiAddress == \"\" {\n\t\treturn \"http://localhost:8000\"\n\t}\n\treturn apiAddress\n}\n\nfunc IsDemo() (ok bool) {\n\treturn EnvIsTrue(\"demo\", true)\n}\n\nfunc InitializedDemo() (ok bool) {\n\tcol := mongo.GetMongoCol(\"users\")\n\tn, err := col.Count(nil)\n\tif err != nil {\n\t\treturn true\n\t}\n\treturn n > 0\n}\n\nfunc ImportDemo() (err error) {\n\tcmdStr := fmt.Sprintf(\"crawlab-cli login -a %s && crawlab-demo import\", GetApiAddress())\n\tcmd, err := sys_exec.BuildCmd(cmdStr)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := cmd.Run(); err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\treturn nil\n}\n\nfunc ReimportDemo() (err error) {\n\tcmdStr := fmt.Sprintf(\"crawlab-cli login -a %s && crawlab-demo reimport\", GetApiAddress())\n\tcmd, err := sys_exec.BuildCmd(cmdStr)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := cmd.Run(); err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\treturn nil\n}\n\nfunc CleanupDemo() (err error) {\n\tcmdStr := fmt.Sprintf(\"crawlab-cli login -a %s && crawlab-demo reimport\", GetApiAddress())\n\tcmd, err := sys_exec.BuildCmd(cmdStr)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := cmd.Run(); err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "core/utils/di.go",
    "content": "package utils\n\nimport (\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/spf13/viper\"\n\t\"go.uber.org/dig\"\n\t\"os\"\n)\n\nfunc VisualizeContainer(c *dig.Container) (err error) {\n\tif !viper.GetBool(\"debug.di.visualize\") {\n\t\treturn nil\n\t}\n\tif err := dig.Visualize(c, os.Stdout); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "core/utils/docker.go",
    "content": "package utils\n\nfunc IsDocker() (ok bool) {\n\treturn EnvIsTrue(\"docker\", false)\n}\n"
  },
  {
    "path": "core/utils/encrypt.go",
    "content": "package utils\n\nimport (\n\t\"bytes\"\n\t\"crypto/aes\"\n\t\"crypto/cipher\"\n\t\"crypto/hmac\"\n\t\"crypto/md5\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"io\"\n)\n\nfunc GetSecretKey() string {\n\treturn constants.DefaultEncryptServerKey\n}\n\nfunc GetSecretKeyBytes() []byte {\n\treturn []byte(GetSecretKey())\n}\n\nfunc ComputeHmacSha256(message string, secret string) string {\n\tkey := []byte(secret)\n\th := hmac.New(sha256.New, key)\n\th.Write([]byte(message))\n\tsha := hex.EncodeToString(h.Sum(nil))\n\treturn base64.StdEncoding.EncodeToString([]byte(sha))\n}\n\nfunc EncryptMd5(str string) string {\n\tw := md5.New()\n\t_, _ = io.WriteString(w, str)\n\tmd5str := fmt.Sprintf(\"%x\", w.Sum(nil))\n\treturn md5str\n}\n\nfunc padding(src []byte, blockSize int) []byte {\n\tpadNum := blockSize - len(src)%blockSize\n\tpad := bytes.Repeat([]byte{byte(padNum)}, padNum)\n\treturn append(src, pad...)\n}\n\nfunc unPadding(src []byte) []byte {\n\tn := len(src)\n\tunPadNum := int(src[n-1])\n\treturn src[:n-unPadNum]\n}\n\nfunc EncryptAES(src string) (res string, err error) {\n\tsrcBytes := []byte(src)\n\tkey := GetSecretKeyBytes()\n\tblock, err := aes.NewCipher(key)\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tsrcBytes = padding(srcBytes, block.BlockSize())\n\tblockMode := cipher.NewCBCEncrypter(block, key)\n\tblockMode.CryptBlocks(srcBytes, srcBytes)\n\tres = hex.EncodeToString(srcBytes)\n\treturn res, nil\n}\n\nfunc DecryptAES(src string) (res string, err error) {\n\tsrcBytes, err := hex.DecodeString(src)\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tkey := GetSecretKeyBytes()\n\tblock, err := aes.NewCipher(key)\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tblockMode := cipher.NewCBCDecrypter(block, key)\n\tblockMode.CryptBlocks(srcBytes, srcBytes)\n\tres = string(unPadding(srcBytes))\n\treturn res, nil\n}\n"
  },
  {
    "path": "core/utils/encrypt_test.go",
    "content": "package utils\n\nimport (\n\t\"fmt\"\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n)\n\nfunc TestEncryptAesPassword(t *testing.T) {\n\tplainText := \"crawlab\"\n\tencryptedText, err := EncryptAES(plainText)\n\trequire.Nil(t, err)\n\tdecryptedText, err := DecryptAES(encryptedText)\n\trequire.Nil(t, err)\n\tfmt.Println(fmt.Sprintf(\"plainText: %s\", plainText))\n\tfmt.Println(fmt.Sprintf(\"encryptedText: %s\", encryptedText))\n\tfmt.Println(fmt.Sprintf(\"decryptedText: %s\", decryptedText))\n\trequire.Equal(t, decryptedText, plainText)\n\trequire.NotEqual(t, decryptedText, encryptedText)\n}\n"
  },
  {
    "path": "core/utils/es.go",
    "content": "package utils\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/elastic/go-elasticsearch/v8\"\n\t\"github.com/elastic/go-elasticsearch/v8/esapi\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"time\"\n)\n\nfunc GetElasticsearchClient(ds *models.DataSource) (c *elasticsearch.Client, err error) {\n\treturn getElasticsearchClient(context.Background(), ds)\n}\n\nfunc GetElasticsearchClientWithTimeout(ds *models.DataSource, timeout time.Duration) (c *elasticsearch.Client, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getElasticsearchClient(ctx, ds)\n}\n\nfunc getElasticsearchClient(ctx context.Context, ds *models.DataSource) (c *elasticsearch.Client, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultElasticsearchPort\n\t}\n\n\t// es hosts\n\taddresses := []string{\n\t\tfmt.Sprintf(\"http://%s:%s\", host, port),\n\t}\n\n\t// retry backoff\n\trb := backoff.NewExponentialBackOff()\n\n\t// es client options\n\tcfg := elasticsearch.Config{\n\t\tAddresses: addresses,\n\t\tUsername:  ds.Username,\n\t\tPassword:  ds.Password,\n\t\tRetryBackoff: func(i int) time.Duration {\n\t\t\tif i == 1 {\n\t\t\t\trb.Reset()\n\t\t\t}\n\t\t\treturn rb.NextBackOff()\n\t\t},\n\t}\n\n\t// es client\n\tdone := make(chan struct{})\n\tgo func() {\n\t\tc, err = elasticsearch.NewClient(cfg)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tvar res *esapi.Response\n\t\tres, err = c.Info()\n\t\tfmt.Println(res)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn c, err\n}\n\nfunc GetElasticsearchClientWithTimeoutV2(ds *models2.DatabaseV2, timeout time.Duration) (c *elasticsearch.Client, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getElasticsearchClientV2(ctx, ds)\n}\n\nfunc getElasticsearchClientV2(ctx context.Context, ds *models2.DatabaseV2) (c *elasticsearch.Client, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultElasticsearchPort\n\t}\n\n\t// es hosts\n\taddresses := []string{\n\t\tfmt.Sprintf(\"http://%s:%s\", host, port),\n\t}\n\n\t// retry backoff\n\trb := backoff.NewExponentialBackOff()\n\n\t// es client options\n\tcfg := elasticsearch.Config{\n\t\tAddresses: addresses,\n\t\tUsername:  ds.Username,\n\t\tPassword:  ds.Password,\n\t\tRetryBackoff: func(i int) time.Duration {\n\t\t\tif i == 1 {\n\t\t\t\trb.Reset()\n\t\t\t}\n\t\t\treturn rb.NextBackOff()\n\t\t},\n\t}\n\n\t// es client\n\tdone := make(chan struct{})\n\tgo func() {\n\t\tc, err = elasticsearch.NewClient(cfg)\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tvar res *esapi.Response\n\t\tres, err = c.Info()\n\t\tfmt.Println(res)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn c, err\n}\n\nfunc GetElasticsearchQuery(query generic.ListQuery) (buf *bytes.Buffer) {\n\tq := map[string]interface{}{}\n\tif len(query) > 0 {\n\t\tmatch := getElasticsearchQueryMatch(query)\n\t\tq[\"query\"] = map[string]interface{}{\n\t\t\t\"match\": match,\n\t\t}\n\t}\n\tbuf = &bytes.Buffer{}\n\tif err := json.NewEncoder(buf).Encode(q); err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\treturn buf\n}\n\nfunc GetElasticsearchQueryWithOptions(query generic.ListQuery, opts *generic.ListOptions) (buf *bytes.Buffer) {\n\tq := map[string]interface{}{\n\t\t\"size\": opts.Limit,\n\t\t\"from\": opts.Skip,\n\t\t// TODO: sort\n\t}\n\tif len(query) > 0 {\n\t\tmatch := getElasticsearchQueryMatch(query)\n\t\tq[\"query\"] = map[string]interface{}{\n\t\t\t\"match\": match,\n\t\t}\n\t}\n\tbuf = &bytes.Buffer{}\n\tif err := json.NewEncoder(buf).Encode(q); err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\treturn buf\n}\n\nfunc getElasticsearchQueryMatch(query generic.ListQuery) (match map[string]interface{}) {\n\tmatch = map[string]interface{}{}\n\tfor _, c := range query {\n\t\tswitch c.Value.(type) {\n\t\tcase primitive.ObjectID:\n\t\t\tc.Value = c.Value.(primitive.ObjectID).Hex()\n\t\t}\n\t\tswitch c.Op {\n\t\tcase generic.OpEqual:\n\t\t\tmatch[c.Key] = c.Value\n\t\tdefault:\n\t\t\tmatch[c.Key] = map[string]interface{}{\n\t\t\t\tc.Op: c.Value,\n\t\t\t}\n\t\t}\n\t}\n\treturn match\n}\n"
  },
  {
    "path": "core/utils/file.go",
    "content": "package utils\n\nimport (\n\t\"archive/zip\"\n\t\"crypto/md5\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"runtime/debug\"\n)\n\nfunc OpenFile(fileName string) *os.File {\n\tfile, err := os.OpenFile(fileName, os.O_CREATE|os.O_RDWR, os.ModePerm)\n\tif err != nil {\n\t\tlog.Errorf(\"create file error: %s, file_name: %s\", err.Error(), fileName)\n\t\tdebug.PrintStack()\n\t\treturn nil\n\t}\n\treturn file\n}\n\nfunc Exists(path string) bool {\n\t_, err := os.Stat(path) //os.Stat获取文件信息\n\tif err != nil {\n\t\treturn os.IsExist(err)\n\t}\n\treturn true\n}\n\nfunc IsDir(path string) bool {\n\ts, err := os.Stat(path)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn s.IsDir()\n}\n\n// ListDir Add: 增加error类型作为第二返回值\n// 在其他函数如 /task/log/file_driver.go中的 *FileLogDriver.cleanup()函数调用时\n// 可以通过判断err是否为nil来判断是否有错误发生\nfunc ListDir(path string) ([]fs.FileInfo, error) {\n\tlist, err := os.ReadDir(path)\n\tif err != nil {\n\t\tlog.Errorf(err.Error())\n\t\tdebug.PrintStack()\n\t\treturn nil, err\n\t}\n\n\tvar res []fs.FileInfo\n\tfor _, item := range list {\n\t\tinfo, err := item.Info()\n\t\tif err != nil {\n\t\t\tlog.Errorf(err.Error())\n\t\t\tdebug.PrintStack()\n\t\t\treturn nil, err\n\t\t}\n\t\tres = append(res, info)\n\t}\n\treturn res, nil\n}\n\nfunc DeCompress(srcFile *os.File, dstPath string) error {\n\t// 如果保存路径不存在，创建一个\n\tif !Exists(dstPath) {\n\t\tif err := os.MkdirAll(dstPath, os.ModePerm); err != nil {\n\t\t\tdebug.PrintStack()\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// 读取zip文件\n\tzipFile, err := zip.OpenReader(srcFile.Name())\n\tif err != nil {\n\t\tlog.Errorf(\"Unzip File Error：\" + err.Error())\n\t\tdebug.PrintStack()\n\t\treturn err\n\t}\n\tdefer Close(zipFile)\n\n\t// 遍历zip内所有文件和目录\n\tfor _, innerFile := range zipFile.File {\n\t\t// 获取该文件数据\n\t\tinfo := innerFile.FileInfo()\n\n\t\t// 如果是目录，则创建一个\n\t\tif info.IsDir() {\n\t\t\terr = os.MkdirAll(filepath.Join(dstPath, innerFile.Name), os.ModeDir|os.ModePerm)\n\t\t\tif err != nil {\n\t\t\t\tlog.Errorf(\"Unzip File Error : \" + err.Error())\n\t\t\t\tdebug.PrintStack()\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// 如果文件目录不存在，则创建一个\n\t\tdirPath := filepath.Join(dstPath, filepath.Dir(innerFile.Name))\n\t\tif !Exists(dirPath) {\n\t\t\tif err = os.MkdirAll(dirPath, os.ModeDir|os.ModePerm); err != nil {\n\t\t\t\tlog.Errorf(\"Unzip File Error : \" + err.Error())\n\t\t\t\tdebug.PrintStack()\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\t// 打开该文件\n\t\tsrcFile, err := innerFile.Open()\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Unzip File Error : \" + err.Error())\n\t\t\tdebug.PrintStack()\n\t\t\tcontinue\n\t\t}\n\n\t\t// 创建新文件\n\t\tnewFilePath := filepath.Join(dstPath, innerFile.Name)\n\t\tnewFile, err := os.OpenFile(newFilePath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, info.Mode())\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"Unzip File Error : \" + err.Error())\n\t\t\tdebug.PrintStack()\n\t\t\tcontinue\n\t\t}\n\n\t\t// 拷贝该文件到新文件中\n\t\tif _, err := io.Copy(newFile, srcFile); err != nil {\n\t\t\tdebug.PrintStack()\n\t\t\treturn err\n\t\t}\n\n\t\t// 关闭该文件\n\t\tif err := srcFile.Close(); err != nil {\n\t\t\tdebug.PrintStack()\n\t\t\treturn err\n\t\t}\n\n\t\t// 关闭新文件\n\t\tif err := newFile.Close(); err != nil {\n\t\t\tdebug.PrintStack()\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Compress 压缩文件\n// files 文件数组，可以是不同dir下的文件或者文件夹\n// dest 压缩文件存放地址\nfunc Compress(files []*os.File, dest string) error {\n\td, _ := os.Create(dest)\n\tdefer Close(d)\n\tw := zip.NewWriter(d)\n\tdefer Close(w)\n\tfor _, file := range files {\n\t\tif err := _Compress(file, \"\", w); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc _Compress(file *os.File, prefix string, zw *zip.Writer) error {\n\tinfo, err := file.Stat()\n\tif err != nil {\n\t\tdebug.PrintStack()\n\t\treturn err\n\t}\n\tif info.IsDir() {\n\t\tprefix = prefix + \"/\" + info.Name()\n\t\tfileInfos, err := file.Readdir(-1)\n\t\tif err != nil {\n\t\t\tdebug.PrintStack()\n\t\t\treturn err\n\t\t}\n\t\tfor _, fi := range fileInfos {\n\t\t\tf, err := os.Open(file.Name() + \"/\" + fi.Name())\n\t\t\tif err != nil {\n\t\t\t\tdebug.PrintStack()\n\t\t\t\treturn err\n\t\t\t}\n\t\t\terr = _Compress(f, prefix, zw)\n\t\t\tif err != nil {\n\t\t\t\tdebug.PrintStack()\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t} else {\n\t\theader, err := zip.FileInfoHeader(info)\n\t\tif err != nil {\n\t\t\tdebug.PrintStack()\n\t\t\treturn err\n\t\t}\n\t\theader.Name = prefix + \"/\" + header.Name\n\t\twriter, err := zw.CreateHeader(header)\n\t\tif err != nil {\n\t\t\tdebug.PrintStack()\n\t\t\treturn err\n\t\t}\n\t\t_, err = io.Copy(writer, file)\n\t\tClose(file)\n\t\tif err != nil {\n\t\t\tdebug.PrintStack()\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc TrimFileData(data []byte) (res []byte) {\n\tif string(data) == constants.EmptyFileData {\n\t\treturn res\n\t}\n\treturn data\n}\n\nfunc ZipDirectory(dir, zipfile string) error {\n\tzipFile, err := os.Create(zipfile)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer zipFile.Close()\n\n\tzipWriter := zip.NewWriter(zipFile)\n\tdefer zipWriter.Close()\n\n\tbaseDir := filepath.Dir(dir)\n\n\terr = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif info.IsDir() {\n\t\t\treturn nil\n\t\t}\n\n\t\trelPath, err := filepath.Rel(baseDir, path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tzipFile, err := zipWriter.Create(relPath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfile, err := os.Open(path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer file.Close()\n\n\t\t_, err = io.Copy(zipFile, file)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn nil\n\t})\n\n\treturn err\n}\n\n// CopyFile File copies a single file from src to dst\nfunc CopyFile(src, dst string) error {\n\tvar err error\n\tvar srcFd *os.File\n\tvar dstFd *os.File\n\tvar srcInfo os.FileInfo\n\n\tif srcFd, err = os.Open(src); err != nil {\n\t\treturn err\n\t}\n\tdefer srcFd.Close()\n\n\tif dstFd, err = os.Create(dst); err != nil {\n\t\treturn err\n\t}\n\tdefer dstFd.Close()\n\n\tif _, err = io.Copy(dstFd, srcFd); err != nil {\n\t\treturn err\n\t}\n\tif srcInfo, err = os.Stat(src); err != nil {\n\t\treturn err\n\t}\n\treturn os.Chmod(dst, srcInfo.Mode())\n}\n\n// CopyDir Dir copies a whole directory recursively\nfunc CopyDir(src string, dst string) error {\n\tvar err error\n\tvar fds []os.DirEntry\n\tvar srcInfo os.FileInfo\n\n\tif srcInfo, err = os.Stat(src); err != nil {\n\t\treturn err\n\t}\n\n\tif err = os.MkdirAll(dst, srcInfo.Mode()); err != nil {\n\t\treturn err\n\t}\n\n\tif fds, err = os.ReadDir(src); err != nil {\n\t\treturn err\n\t}\n\tfor _, fd := range fds {\n\t\tsrcfp := path.Join(src, fd.Name())\n\t\tdstfp := path.Join(dst, fd.Name())\n\n\t\tif fd.IsDir() {\n\t\t\tif err = CopyDir(srcfp, dstfp); err != nil {\n\t\t\t\tfmt.Println(err)\n\t\t\t}\n\t\t} else {\n\t\t\tif err = CopyFile(srcfp, dstfp); err != nil {\n\t\t\t\tfmt.Println(err)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc GetFileHash(filePath string) (res string, err error) {\n\tfile, err := os.Open(filePath)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer file.Close()\n\n\thash := md5.New()\n\tif _, err := io.Copy(hash, file); err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn hex.EncodeToString(hash.Sum(nil)), nil\n}\n\nfunc ScanDirectory(dir string) (res map[string]entity.FsFileInfo, err error) {\n\tfiles := make(map[string]entity.FsFileInfo)\n\n\terr = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tvar hash string\n\t\tif !info.IsDir() {\n\t\t\thash, err = GetFileHash(path)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\trelPath, err := filepath.Rel(dir, path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfiles[relPath] = entity.FsFileInfo{\n\t\t\tName:      info.Name(),\n\t\t\tPath:      relPath,\n\t\t\tFullPath:  path,\n\t\t\tExtension: filepath.Ext(path),\n\t\t\tIsDir:     info.IsDir(),\n\t\t\tFileSize:  info.Size(),\n\t\t\tModTime:   info.ModTime(),\n\t\t\tMode:      info.Mode(),\n\t\t\tHash:      hash,\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn files, nil\n}\n"
  },
  {
    "path": "core/utils/file_test.go",
    "content": "package utils\n\nimport (\n\t\"archive/zip\"\n\t. \"github.com/smartystreets/goconvey/convey\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"runtime/debug\"\n\t\"testing\"\n)\n\nfunc TestExists(t *testing.T) {\n\tvar pathString = \"../config\"\n\tvar wrongPathString = \"test\"\n\n\tConvey(\"Test path or file is Exists or not\", t, func() {\n\t\tres := Exists(pathString)\n\t\tConvey(\"The result should be true\", func() {\n\t\t\tSo(res, ShouldEqual, true)\n\t\t})\n\t\twrongRes := Exists(wrongPathString)\n\t\tConvey(\"The result should be false\", func() {\n\t\t\tSo(wrongRes, ShouldEqual, false)\n\t\t})\n\t})\n}\n\nfunc TestIsDir(t *testing.T) {\n\tvar pathString = \"../config\"\n\tvar fileString = \"../config/config.go\"\n\tvar wrongString = \"test\"\n\n\tConvey(\"Test path is folder or not\", t, func() {\n\t\tres := IsDir(pathString)\n\t\tSo(res, ShouldEqual, true)\n\t\tfileRes := IsDir(fileString)\n\t\tSo(fileRes, ShouldEqual, false)\n\t\twrongRes := IsDir(wrongString)\n\t\tSo(wrongRes, ShouldEqual, false)\n\t})\n}\n\nfunc TestCompress(t *testing.T) {\n\terr := os.Mkdir(\"testCompress\", os.ModePerm)\n\tif err != nil {\n\t\tt.Error(\"create testCompress failed\")\n\t}\n\tvar pathString = \"testCompress\"\n\tvar files []*os.File\n\tvar disPath = \"testCompress\"\n\tfile, err := os.Open(pathString)\n\tif err != nil {\n\t\tt.Error(\"open source path failed\")\n\t}\n\tfiles = append(files, file)\n\tConvey(\"Verify dispath is valid path\", t, func() {\n\t\ter := Compress(files, disPath)\n\t\tConvey(\"err should be nil\", func() {\n\t\t\tSo(er, ShouldEqual, nil)\n\t\t})\n\t})\n\t_ = os.RemoveAll(\"testCompress\")\n\n}\nfunc Zip(zipFile string, fileList []string) error {\n\t// 创建 zip 包文件\n\tfw, err := os.Create(zipFile)\n\tif err != nil {\n\t\tlog.Fatal()\n\t}\n\tdefer Close(fw)\n\n\t// 实例化新的 zip.Writer\n\tzw := zip.NewWriter(fw)\n\tdefer Close(zw)\n\n\tfor _, fileName := range fileList {\n\t\tfr, err := os.Open(fileName)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfi, err := fr.Stat()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// 写入文件的头信息\n\t\tfh, err := zip.FileInfoHeader(fi)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tw, err := zw.CreateHeader(fh)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// 写入文件内容\n\t\t_, err = io.Copy(w, fr)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc TestDeCompress(t *testing.T) {\n\terr := os.Mkdir(\"testDeCompress\", os.ModePerm)\n\tif err != nil {\n\t\tt.Error(err)\n\n\t}\n\terr = Zip(\"demo.zip\", []string{})\n\tif err != nil {\n\t\tt.Error(\"create zip file failed\")\n\t}\n\ttmpFile, err := os.OpenFile(\"demo.zip\", os.O_RDONLY, 0777)\n\tif err != nil {\n\t\tdebug.PrintStack()\n\t\tt.Error(\"open demo.zip failed\")\n\t}\n\tvar dstPath = \"./testDeCompress\"\n\tConvey(\"Test DeCopmress func\", t, func() {\n\n\t\terr := DeCompress(tmpFile, dstPath)\n\t\tSo(err, ShouldEqual, nil)\n\t})\n\t_ = os.RemoveAll(\"testDeCompress\")\n\t_ = os.Remove(\"demo.zip\")\n\n}\n"
  },
  {
    "path": "core/utils/filter.go",
    "content": "package utils\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/errors\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n)\n\n// FilterToQuery Translate entity.Filter to bson.M\nfunc FilterToQuery(f interfaces.Filter) (q bson.M, err error) {\n\tif f == nil || f.IsNil() {\n\t\treturn nil, nil\n\t}\n\n\tq = bson.M{}\n\tfor _, cond := range f.GetConditions() {\n\t\tkey := cond.GetKey()\n\t\top := cond.GetOp()\n\t\tvalue := cond.GetValue()\n\t\tswitch op {\n\t\tcase constants.FilterOpNotSet:\n\t\t\t// do nothing\n\t\tcase constants.FilterOpEqual:\n\t\t\tq[key] = cond.GetValue()\n\t\tcase constants.FilterOpNotEqual:\n\t\t\tq[key] = bson.M{\"$ne\": value}\n\t\tcase constants.FilterOpContains, constants.FilterOpRegex, constants.FilterOpSearch:\n\t\t\tq[key] = bson.M{\"$regex\": value, \"$options\": \"i\"}\n\t\tcase constants.FilterOpNotContains:\n\t\t\tq[key] = bson.M{\"$not\": bson.M{\"$regex\": value}}\n\t\tcase constants.FilterOpIn:\n\t\t\tq[key] = bson.M{\"$in\": value}\n\t\tcase constants.FilterOpNotIn:\n\t\t\tq[key] = bson.M{\"$nin\": value}\n\t\tcase constants.FilterOpGreaterThan:\n\t\t\tq[key] = bson.M{\"$gt\": value}\n\t\tcase constants.FilterOpGreaterThanEqual:\n\t\t\tq[key] = bson.M{\"$gte\": value}\n\t\tcase constants.FilterOpLessThan:\n\t\t\tq[key] = bson.M{\"$lt\": value}\n\t\tcase constants.FilterOpLessThanEqual:\n\t\t\tq[key] = bson.M{\"$lte\": value}\n\t\tdefault:\n\t\t\treturn nil, errors.ErrorFilterInvalidOperation\n\t\t}\n\t}\n\treturn q, nil\n}\n"
  },
  {
    "path": "core/utils/git.go",
    "content": "package utils\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\tvcs \"github.com/crawlab-team/crawlab/vcs\"\n)\n\nfunc InitGitClientAuth(g interfaces.Git, gitClient *vcs.GitClient) {\n\t// set auth\n\tswitch g.GetAuthType() {\n\tcase constants.GitAuthTypeHttp:\n\t\tgitClient.SetAuthType(vcs.GitAuthTypeHTTP)\n\t\tgitClient.SetUsername(g.GetUsername())\n\t\tgitClient.SetPassword(g.GetPassword())\n\tcase constants.GitAuthTypeSsh:\n\t\tgitClient.SetAuthType(vcs.GitAuthTypeSSH)\n\t\tgitClient.SetUsername(g.GetUsername())\n\t\tgitClient.SetPrivateKey(g.GetPassword())\n\t}\n}\n"
  },
  {
    "path": "core/utils/hash.go",
    "content": "package utils\n\nimport \"encoding/json\"\n\nfunc GetObjectHash(obj any) string {\n\tdata, _ := json.Marshal(obj)\n\tif data == nil {\n\t\t// random hash\n\t\treturn EncryptMd5(NewUUIDString())\n\t}\n\treturn EncryptMd5(string(data))\n}\n"
  },
  {
    "path": "core/utils/helpers.go",
    "content": "package utils\n\nimport (\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"io\"\n\t\"reflect\"\n\t\"unsafe\"\n)\n\nfunc BytesToString(b []byte) string {\n\treturn *(*string)(unsafe.Pointer(&b))\n}\n\nfunc Close(c io.Closer) {\n\terr := c.Close()\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t}\n}\n\nfunc Contains(array interface{}, val interface{}) (fla bool) {\n\tfla = false\n\tswitch reflect.TypeOf(array).Kind() {\n\tcase reflect.Slice:\n\t\t{\n\t\t\ts := reflect.ValueOf(array)\n\t\t\tfor i := 0; i < s.Len(); i++ {\n\t\t\t\tif reflect.DeepEqual(val, s.Index(i).Interface()) {\n\t\t\t\t\tfla = true\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n"
  },
  {
    "path": "core/utils/http.go",
    "content": "package utils\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/entity\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gin-gonic/gin\"\n\t\"net/http\"\n)\n\nfunc handleError(statusCode int, c *gin.Context, err error, print bool) {\n\tif print {\n\t\ttrace.PrintError(err)\n\t}\n\tc.AbortWithStatusJSON(statusCode, entity.Response{\n\t\tStatus:  constants.HttpResponseStatusOk,\n\t\tMessage: constants.HttpResponseMessageError,\n\t\tError:   err.Error(),\n\t})\n}\n\nfunc HandleError(statusCode int, c *gin.Context, err error) {\n\thandleError(statusCode, c, err, true)\n}\n\nfunc HandleErrorUnauthorized(c *gin.Context, err error) {\n\tHandleError(http.StatusUnauthorized, c, err)\n}\n\nfunc HandleErrorInternalServerError(c *gin.Context, err error) {\n\tHandleError(http.StatusInternalServerError, c, err)\n}\n"
  },
  {
    "path": "core/utils/init.go",
    "content": "package utils\n\nimport (\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n\t\"sync\"\n)\n\nvar moduleInitializedMap = sync.Map{}\n\nfunc InitModule(id interfaces.ModuleId, fn func() error) (err error) {\n\tres, ok := moduleInitializedMap.Load(id)\n\tif ok {\n\t\tinitialized, _ := res.(bool)\n\t\tif initialized {\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tif err := fn(); err != nil {\n\t\treturn err\n\t}\n\n\tmoduleInitializedMap.Store(id, true)\n\n\treturn nil\n}\n\nfunc ForceInitModule(fn func() error) (err error) {\n\treturn fn()\n}\n"
  },
  {
    "path": "core/utils/json.go",
    "content": "package utils\n\nimport \"encoding/json\"\n\nfunc JsonToBytes(d interface{}) (bytes []byte, err error) {\n\tswitch d.(type) {\n\tcase []byte:\n\t\treturn d.([]byte), nil\n\tdefault:\n\t\treturn json.Marshal(d)\n\t}\n}\n"
  },
  {
    "path": "core/utils/kafka.go",
    "content": "package utils\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/segmentio/kafka-go\"\n\t\"time\"\n)\n\nfunc GetKafkaConnection(ds *models.DataSource) (c *kafka.Conn, err error) {\n\treturn getKafkaConnection(context.Background(), ds)\n}\n\nfunc GetKafkaConnectionWithTimeout(ds *models.DataSource, timeout time.Duration) (c *kafka.Conn, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getKafkaConnection(ctx, ds)\n}\n\nfunc getKafkaConnection(ctx context.Context, ds *models.DataSource) (c *kafka.Conn, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultKafkaPort\n\t}\n\n\t// kafka connection address\n\tnetwork := \"tcp\"\n\taddress := fmt.Sprintf(\"%s:%s\", host, port)\n\ttopic := ds.Database\n\tpartition := 0 // TODO: parameterize\n\n\t// kafka connection\n\treturn kafka.DialLeader(ctx, network, address, topic, partition)\n}\n\nfunc GetKafkaConnectionWithTimeoutV2(ds *models2.DatabaseV2, timeout time.Duration) (c *kafka.Conn, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getKafkaConnectionV2(ctx, ds)\n}\n\nfunc getKafkaConnectionV2(ctx context.Context, ds *models2.DatabaseV2) (c *kafka.Conn, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultKafkaPort\n\t}\n\n\t// kafka connection address\n\tnetwork := \"tcp\"\n\taddress := fmt.Sprintf(\"%s:%s\", host, port)\n\ttopic := ds.Database\n\tpartition := 0 // TODO: parameterize\n\n\t// kafka connection\n\treturn kafka.DialLeader(ctx, network, address, topic, partition)\n}\n"
  },
  {
    "path": "core/utils/mongo.go",
    "content": "package utils\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\tmongo2 \"go.mongodb.org/mongo-driver/mongo\"\n\t\"time\"\n)\n\nfunc GetMongoQuery(query generic.ListQuery) (res bson.M) {\n\tres = bson.M{}\n\tfor _, c := range query {\n\t\tswitch c.Op {\n\t\tcase generic.OpEqual:\n\t\t\tres[c.Key] = c.Value\n\t\tdefault:\n\t\t\tres[c.Key] = bson.M{\n\t\t\t\tc.Op: c.Value,\n\t\t\t}\n\t\t}\n\t}\n\treturn res\n}\n\nfunc GetMongoOpts(opts *generic.ListOptions) (res *mongo.FindOptions) {\n\tvar sort bson.D\n\tfor _, s := range opts.Sort {\n\t\tdirection := 1\n\t\tif s.Direction == generic.SortDirectionAsc {\n\t\t\tdirection = 1\n\t\t} else if s.Direction == generic.SortDirectionDesc {\n\t\t\tdirection = -1\n\t\t}\n\t\tsort = append(sort, bson.E{Key: s.Key, Value: direction})\n\t}\n\treturn &mongo.FindOptions{\n\t\tSkip:  opts.Skip,\n\t\tLimit: opts.Limit,\n\t\tSort:  sort,\n\t}\n}\n\nfunc GetMongoClient(ds *models.DataSource) (c *mongo2.Client, err error) {\n\treturn getMongoClient(context.Background(), ds)\n}\n\nfunc GetMongoClientWithTimeout(ds *models.DataSource, timeout time.Duration) (c *mongo2.Client, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getMongoClient(ctx, ds)\n}\n\nfunc GetMongoClientWithTimeoutV2(ds *models2.DatabaseV2, timeout time.Duration) (c *mongo2.Client, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getMongoClientV2(ctx, ds)\n}\n\nfunc getMongoClient(ctx context.Context, ds *models.DataSource) (c *mongo2.Client, err error) {\n\t// normalize settings\n\tif ds.Host == \"\" {\n\t\tds.Host = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tds.Port = constants.DefaultMongoPort\n\t}\n\n\t// options\n\tvar opts []mongo.ClientOption\n\topts = append(opts, mongo.WithContext(ctx))\n\topts = append(opts, mongo.WithUri(ds.Url))\n\topts = append(opts, mongo.WithHost(ds.Host))\n\topts = append(opts, mongo.WithPort(ds.Port))\n\topts = append(opts, mongo.WithDb(ds.Database))\n\topts = append(opts, mongo.WithUsername(ds.Username))\n\topts = append(opts, mongo.WithPassword(ds.Password))\n\n\t// extra\n\tif ds.Extra != nil {\n\t\t// auth source\n\t\tauthSource, ok := ds.Extra[\"auth_source\"]\n\t\tif ok {\n\t\t\topts = append(opts, mongo.WithAuthSource(authSource))\n\t\t}\n\n\t\t// auth mechanism\n\t\tauthMechanism, ok := ds.Extra[\"auth_mechanism\"]\n\t\tif ok {\n\t\t\topts = append(opts, mongo.WithAuthMechanism(authMechanism))\n\t\t}\n\t}\n\n\t// client\n\treturn mongo.GetMongoClient(opts...)\n}\n\nfunc getMongoClientV2(ctx context.Context, ds *models2.DatabaseV2) (c *mongo2.Client, err error) {\n\t// normalize settings\n\tif ds.Host == \"\" {\n\t\tds.Host = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tds.Port = constants.DefaultMongoPort\n\t}\n\n\t// options\n\tvar opts []mongo.ClientOption\n\topts = append(opts, mongo.WithContext(ctx))\n\topts = append(opts, mongo.WithUri(ds.URI))\n\topts = append(opts, mongo.WithHost(ds.Host))\n\topts = append(opts, mongo.WithPort(ds.Port))\n\topts = append(opts, mongo.WithDb(ds.Database))\n\topts = append(opts, mongo.WithUsername(ds.Username))\n\topts = append(opts, mongo.WithPassword(ds.Password))\n\n\t// client\n\treturn mongo.GetMongoClient(opts...)\n}\n"
  },
  {
    "path": "core/utils/mssql.go",
    "content": "package utils\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/upper/db/v4\"\n\t\"github.com/upper/db/v4/adapter/mssql\"\n\t\"time\"\n)\n\nfunc GetMssqlSession(ds *models.DataSource) (s db.Session, err error) {\n\treturn getMssqlSession(context.Background(), ds)\n}\n\nfunc GetMssqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getMssqlSession(ctx, ds)\n}\n\nfunc getMssqlSession(ctx context.Context, ds *models.DataSource) (s db.Session, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultMssqlPort\n\t}\n\n\t// connect settings\n\tsettings := mssql.ConnectionURL{\n\t\tUser:     ds.Username,\n\t\tPassword: ds.Password,\n\t\tDatabase: ds.Database,\n\t\tHost:     fmt.Sprintf(\"%s:%s\", host, port),\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = mssql.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n\nfunc GetMssqlSessionWithTimeoutV2(ds *models2.DatabaseV2, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getMssqlSessionV2(ctx, ds)\n}\n\nfunc getMssqlSessionV2(ctx context.Context, ds *models2.DatabaseV2) (s db.Session, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultMssqlPort\n\t}\n\n\t// connect settings\n\tsettings := mssql.ConnectionURL{\n\t\tUser:     ds.Username,\n\t\tPassword: ds.Password,\n\t\tDatabase: ds.Database,\n\t\tHost:     fmt.Sprintf(\"%s:%s\", host, port),\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = mssql.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n"
  },
  {
    "path": "core/utils/mysql.go",
    "content": "package utils\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/upper/db/v4\"\n\t\"github.com/upper/db/v4/adapter/mysql\"\n\t\"time\"\n)\n\nfunc GetMysqlSession(ds *models.DataSource) (s db.Session, err error) {\n\treturn getMysqlSession(context.Background(), ds)\n}\n\nfunc GetMysqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getMysqlSession(ctx, ds)\n}\n\nfunc getMysqlSession(ctx context.Context, ds *models.DataSource) (s db.Session, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultMysqlPort\n\t}\n\n\t// connect settings\n\tsettings := mysql.ConnectionURL{\n\t\tUser:     ds.Username,\n\t\tPassword: ds.Password,\n\t\tDatabase: ds.Database,\n\t\tHost:     fmt.Sprintf(\"%s:%s\", host, port),\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = mysql.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n\nfunc GetMysqlSessionWithTimeoutV2(ds *models2.DatabaseV2, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getMysqlSessionV2(ctx, ds)\n}\n\nfunc getMysqlSessionV2(ctx context.Context, ds *models2.DatabaseV2) (s db.Session, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultMysqlPort\n\t}\n\n\t// connect settings\n\tsettings := mysql.ConnectionURL{\n\t\tUser:     ds.Username,\n\t\tPassword: ds.Password,\n\t\tDatabase: ds.Database,\n\t\tHost:     fmt.Sprintf(\"%s:%s\", host, port),\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = mysql.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n"
  },
  {
    "path": "core/utils/node.go",
    "content": "package utils\n\nfunc IsMaster() bool {\n\treturn EnvIsTrue(\"node.master\", false)\n}\n\nfunc GetNodeType() string {\n\tif IsMaster() {\n\t\treturn \"master\"\n\t} else {\n\t\treturn \"worker\"\n\t}\n}\n"
  },
  {
    "path": "core/utils/os.go",
    "content": "package utils\n\nimport (\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n)\n\nfunc DefaultWait() {\n\tquit := make(chan os.Signal, 1)\n\tsignal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)\n\t<-quit\n}\n"
  },
  {
    "path": "core/utils/postgresql.go",
    "content": "package utils\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/core/constants\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/upper/db/v4\"\n\t\"github.com/upper/db/v4/adapter/postgresql\"\n\t\"time\"\n)\n\nfunc GetPostgresqlSession(ds *models.DataSource) (s db.Session, err error) {\n\treturn getPostgresqlSession(context.Background(), ds)\n}\n\nfunc GetPostgresqlSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getPostgresqlSession(ctx, ds)\n}\n\nfunc getPostgresqlSession(ctx context.Context, ds *models.DataSource) (s db.Session, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultPostgresqlPort\n\t}\n\n\t// connect settings\n\tsettings := postgresql.ConnectionURL{\n\t\tUser:     ds.Username,\n\t\tPassword: ds.Password,\n\t\tDatabase: ds.Database,\n\t\tHost:     fmt.Sprintf(\"%s:%s\", host, port),\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = postgresql.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n\nfunc GetPostgresqlSessionWithTimeoutV2(ds *models2.DatabaseV2, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getPostgresqlSessionV2(ctx, ds)\n}\n\nfunc getPostgresqlSessionV2(ctx context.Context, ds *models2.DatabaseV2) (s db.Session, err error) {\n\t// normalize settings\n\thost := ds.Host\n\tport := ds.Port\n\tif ds.Host == \"\" {\n\t\thost = constants.DefaultHost\n\t}\n\tif ds.Port == 0 {\n\t\tport = constants.DefaultPostgresqlPort\n\t}\n\n\t// connect settings\n\tsettings := postgresql.ConnectionURL{\n\t\tUser:     ds.Username,\n\t\tPassword: ds.Password,\n\t\tDatabase: ds.Database,\n\t\tHost:     fmt.Sprintf(\"%s:%s\", host, port),\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = postgresql.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n"
  },
  {
    "path": "core/utils/result.go",
    "content": "package utils\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/crawlab-team/crawlab/core/interfaces\"\n)\n\nfunc GetResultHash(value interface{}, keys []string) (res string, err error) {\n\tm := make(map[string]interface{})\n\tfor _, k := range keys {\n\t\t_value, ok := value.(interfaces.Result)\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\tv := _value.GetValue(k)\n\t\tm[k] = v\n\t}\n\tdata, err := json.Marshal(m)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn EncryptMd5(string(data)), nil\n}\n"
  },
  {
    "path": "core/utils/rpc.go",
    "content": "package utils\n\nimport \"encoding/json\"\n\n// Object 转化为 String\nfunc ObjectToString(params interface{}) string {\n\tbytes, _ := json.Marshal(params)\n\treturn BytesToString(bytes)\n}\n\n// 获取 RPC 参数\nfunc GetRpcParam(key string, params map[string]string) string {\n\treturn params[key]\n}\n"
  },
  {
    "path": "core/utils/spider.go",
    "content": "package utils\n\nfunc GetSpiderCol(col string, name string) string {\n\tif col == \"\" {\n\t\treturn \"results_\" + name\n\t}\n\treturn col\n}\n"
  },
  {
    "path": "core/utils/sql.go",
    "content": "package utils\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/generic\"\n\t\"github.com/upper/db/v4\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n)\n\nfunc GetSqlQuery(query generic.ListQuery) (res db.Cond) {\n\tres = db.Cond{}\n\tfor _, c := range query {\n\t\tswitch c.Value.(type) {\n\t\tcase primitive.ObjectID:\n\t\t\tc.Value = c.Value.(primitive.ObjectID).Hex()\n\t\t}\n\t\tswitch c.Op {\n\t\tcase generic.OpEqual:\n\t\t\tres[c.Key] = c.Value\n\t\tdefault:\n\t\t\tres[c.Key] = db.Cond{\n\t\t\t\tc.Op: c.Value,\n\t\t\t}\n\t\t}\n\t}\n\t// TODO: sort\n\treturn res\n}\n"
  },
  {
    "path": "core/utils/sqlite.go",
    "content": "package utils\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/core/models/models\"\n\tmodels2 \"github.com/crawlab-team/crawlab/core/models/models/v2\"\n\t\"github.com/upper/db/v4\"\n\t\"github.com/upper/db/v4/adapter/sqlite\"\n\t\"time\"\n)\n\nfunc GetSqliteSession(ds *models.DataSource) (s db.Session, err error) {\n\treturn getSqliteSession(context.Background(), ds)\n}\n\nfunc GetSqliteSessionWithTimeout(ds *models.DataSource, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getSqliteSession(ctx, ds)\n}\n\nfunc getSqliteSession(ctx context.Context, ds *models.DataSource) (s db.Session, err error) {\n\t// connect settings\n\tsettings := sqlite.ConnectionURL{\n\t\tDatabase: ds.Database,\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = sqlite.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n\nfunc GetSqliteSessionWithTimeoutV2(ds *models2.DatabaseV2, timeout time.Duration) (s db.Session, err error) {\n\tctx, cancel := context.WithTimeout(context.Background(), timeout)\n\tdefer cancel()\n\treturn getSqliteSessionV2(ctx, ds)\n}\n\nfunc getSqliteSessionV2(ctx context.Context, ds *models2.DatabaseV2) (s db.Session, err error) {\n\t// connect settings\n\tsettings := sqlite.ConnectionURL{\n\t\tDatabase: ds.Database,\n\t\tOptions:  nil,\n\t}\n\n\t// session\n\tdone := make(chan struct{})\n\tgo func() {\n\t\ts, err = sqlite.Open(settings)\n\t\tclose(done)\n\t}()\n\n\t// wait for done\n\tselect {\n\tcase <-ctx.Done():\n\t\tif ctx.Err() != nil {\n\t\t\terr = ctx.Err()\n\t\t}\n\tcase <-done:\n\t}\n\n\treturn s, err\n}\n"
  },
  {
    "path": "core/utils/stats.go",
    "content": "package utils\n"
  },
  {
    "path": "core/utils/system.go",
    "content": "package utils\n\nimport \"github.com/spf13/viper\"\n\nfunc IsPro() bool {\n\treturn viper.GetString(\"edition\") == \"global.edition.pro\"\n}\n"
  },
  {
    "path": "core/utils/task.go",
    "content": "package utils\n\nimport \"github.com/crawlab-team/crawlab/core/constants\"\n\nfunc IsCancellable(status string) bool {\n\tswitch status {\n\tcase constants.TaskStatusPending,\n\t\tconstants.TaskStatusRunning:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n"
  },
  {
    "path": "core/utils/time.go",
    "content": "package utils\n\nimport (\n\t\"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"time\"\n)\n\nfunc GetLocalTime(t time.Time) time.Time {\n\treturn t.In(time.Local)\n}\n\nfunc GetTimeString(t time.Time) string {\n\treturn t.Format(\"2006-01-02 15:04:05\")\n}\n\nfunc GetLocalTimeString(t time.Time) string {\n\tt = GetLocalTime(t)\n\treturn GetTimeString(t)\n}\n\nfunc GetTimeUnitParts(timeUnit string) (num int, unit string, err error) {\n\tre := regexp.MustCompile(`^(\\d+)([a-zA-Z])$`)\n\tgroups := re.FindStringSubmatch(timeUnit)\n\tif len(groups) < 3 {\n\t\terr = errors.New(\"failed to parse duration text\")\n\t\tlog.Errorf(\"failed to parse duration text: %v\", err)\n\t\ttrace.PrintError(err)\n\t\treturn 0, \"\", err\n\t}\n\tnum, err = strconv.Atoi(groups[1])\n\tif err != nil {\n\t\tlog.Errorf(\"failed to convert string to int: %v\", err)\n\t\ttrace.PrintError(err)\n\t\treturn 0, \"\", err\n\t}\n\tunit = groups[2]\n\treturn num, unit, nil\n}\n\nfunc GetTimeDuration(num string, unit string) (d time.Duration, err error) {\n\tnumInt, err := strconv.Atoi(num)\n\tif err != nil {\n\t\tlog.Errorf(\"failed to convert string to int: %v\", err)\n\t\ttrace.PrintError(err)\n\t\treturn d, err\n\t}\n\tswitch unit {\n\tcase \"s\":\n\t\td = time.Duration(numInt) * time.Second\n\tcase \"m\":\n\t\td = time.Duration(numInt) * time.Minute\n\tcase \"h\":\n\t\td = time.Duration(numInt) * time.Hour\n\tcase \"d\":\n\t\td = time.Duration(numInt) * 24 * time.Hour\n\tcase \"w\":\n\t\td = time.Duration(numInt) * 7 * 24 * time.Hour\n\tcase \"M\":\n\t\td = time.Duration(numInt) * 30 * 24 * time.Hour\n\tcase \"y\":\n\t\td = time.Duration(numInt) * 365 * 24 * time.Hour\n\tdefault:\n\t\terr = errors.New(\"invalid time unit\")\n\t\tlog.Errorf(\"invalid time unit: %v\", unit)\n\t\ttrace.PrintError(err)\n\t\treturn d, err\n\t}\n\treturn d, nil\n}\n"
  },
  {
    "path": "core/utils/uuid.go",
    "content": "package utils\n\nimport \"github.com/google/uuid\"\n\nfunc NewUUIDString() (res string) {\n\tid, _ := uuid.NewUUID()\n\treturn id.String()\n}\n"
  },
  {
    "path": "db/.editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = tab\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": "db/.gitignore",
    "content": ".idea\n.DS_Store\ntmp/\nvendor/\ngo.sum"
  },
  {
    "path": "db/LICENSE",
    "content": "BSD 3-Clause License\n\nCopyright (c) 2020, Crawlab Team\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "db/README.md",
    "content": "# crawlab-db\nBackend database module for Crawlab\n"
  },
  {
    "path": "db/errors/base.go",
    "content": "package errors\n\nconst (\n\terrorPrefixMongo = \"mongo\"\n\terrorPrefixRedis = \"redis\"\n)\n"
  },
  {
    "path": "db/errors/errors.go",
    "content": "package errors\n\nimport \"errors\"\n\nvar (\n\tErrInvalidType   = errors.New(\"invalid type\")\n\tErrMissingValue  = errors.New(\"missing value\")\n\tErrNoCursor      = errors.New(\"no cursor\")\n\tErrAlreadyLocked = errors.New(\"already locked\")\n)\n"
  },
  {
    "path": "db/errors/redis.go",
    "content": "package errors\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar (\n\tErrorRedisInvalidType = NewRedisError(\"invalid type\")\n\tErrorRedisLocked      = NewRedisError(\"locked\")\n)\n\nfunc NewRedisError(msg string) (err error) {\n\treturn errors.New(fmt.Sprintf(\"%s: %s\", errorPrefixRedis, msg))\n}\n"
  },
  {
    "path": "db/generic/base.go",
    "content": "package generic\n\nconst (\n\tDataSourceTypeMongo         = \"mongo\"\n\tDataSourceTypeMysql         = \"mysql\"\n\tDataSourceTypePostgres      = \"postgres\"\n\tDataSourceTypeElasticSearch = \"postgres\"\n)\n"
  },
  {
    "path": "db/generic/list.go",
    "content": "package generic\n\ntype ListQueryCondition struct {\n\tKey   string\n\tOp    string\n\tValue interface{}\n}\n\ntype ListQuery []ListQueryCondition\n\ntype ListOptions struct {\n\tSkip  int\n\tLimit int\n\tSort  []ListSort\n}\n"
  },
  {
    "path": "db/generic/op.go",
    "content": "package generic\n\ntype Op string\n\nconst (\n\tOpEqual = \"eq\"\n)\n"
  },
  {
    "path": "db/generic/sort.go",
    "content": "package generic\n\ntype SortDirection string\n\nconst (\n\tSortDirectionAsc  SortDirection = \"asc\"\n\tSortDirectionDesc SortDirection = \"desc\"\n)\n\ntype ListSort struct {\n\tKey       string\n\tDirection SortDirection\n}\n"
  },
  {
    "path": "db/go.mod",
    "content": "module github.com/crawlab-team/crawlab/db\n\ngo 1.22\n\nreplace github.com/crawlab-team/crawlab/trace => ../trace\n\nrequire (\n\tgithub.com/apex/log v1.9.0\n\tgithub.com/cenkalti/backoff/v4 v4.3.0\n\tgithub.com/crawlab-team/crawlab/trace v0.0.0-20240614095218-7b4ee8399ab0\n\tgithub.com/gomodule/redigo v2.0.0+incompatible\n\tgithub.com/jmoiron/sqlx v1.2.0\n\tgithub.com/spf13/viper v1.19.0\n\tgithub.com/stretchr/testify v1.9.0\n\tgo.mongodb.org/mongo-driver v1.15.1\n)\n\nrequire (\n\tgithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect\n\tgithub.com/fsnotify/fsnotify v1.7.0 // indirect\n\tgithub.com/go-sql-driver/mysql v1.6.0 // indirect\n\tgithub.com/golang/snappy v0.0.4 // indirect\n\tgithub.com/google/go-cmp v0.6.0 // indirect\n\tgithub.com/hashicorp/hcl v1.0.0 // indirect\n\tgithub.com/klauspost/compress v1.17.7 // indirect\n\tgithub.com/lib/pq v1.10.4 // indirect\n\tgithub.com/magiconair/properties v1.8.7 // indirect\n\tgithub.com/mattn/go-sqlite3 v1.14.9 // indirect\n\tgithub.com/mitchellh/mapstructure v1.5.0 // indirect\n\tgithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect\n\tgithub.com/pelletier/go-toml/v2 v2.2.2 // indirect\n\tgithub.com/pkg/errors v0.9.1 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect\n\tgithub.com/rogpeppe/go-internal v1.11.0 // indirect\n\tgithub.com/sagikazarmark/locafero v0.4.0 // indirect\n\tgithub.com/sagikazarmark/slog-shim v0.1.0 // indirect\n\tgithub.com/sourcegraph/conc v0.3.0 // indirect\n\tgithub.com/spf13/afero v1.11.0 // indirect\n\tgithub.com/spf13/cast v1.6.0 // indirect\n\tgithub.com/spf13/pflag v1.0.5 // indirect\n\tgithub.com/subosito/gotenv v1.6.0 // indirect\n\tgithub.com/xdg-go/pbkdf2 v1.0.0 // indirect\n\tgithub.com/xdg-go/scram v1.1.2 // indirect\n\tgithub.com/xdg-go/stringprep v1.0.4 // indirect\n\tgithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect\n\tgithub.com/ztrue/tracerr v0.4.0 // indirect\n\tgo.uber.org/atomic v1.9.0 // indirect\n\tgo.uber.org/multierr v1.9.0 // indirect\n\tgolang.org/x/crypto v0.23.0 // indirect\n\tgolang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect\n\tgolang.org/x/sync v0.7.0 // indirect\n\tgolang.org/x/sys v0.20.0 // indirect\n\tgolang.org/x/text v0.15.0 // indirect\n\tgopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect\n\tgopkg.in/ini.v1 v1.67.0 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "db/interfaces.go",
    "content": "package db\n\nimport \"time\"\n\ntype RedisClient interface {\n\tPing() (err error)\n\tKeys(pattern string) (values []string, err error)\n\tAllKeys() (values []string, err error)\n\tGet(collection string) (value string, err error)\n\tSet(collection string, value string) (err error)\n\tDel(collection string) (err error)\n\tRPush(collection string, value interface{}) (err error)\n\tLPush(collection string, value interface{}) (err error)\n\tLPop(collection string) (value string, err error)\n\tRPop(collection string) (value string, err error)\n\tLLen(collection string) (count int, err error)\n\tBRPop(collection string, timeout int) (value string, err error)\n\tBLPop(collection string, timeout int) (value string, err error)\n\tHSet(collection string, key string, value string) (err error)\n\tHGet(collection string, key string) (value string, err error)\n\tHDel(collection string, key string) (err error)\n\tHScan(collection string) (results map[string]string, err error)\n\tHKeys(collection string) (results []string, err error)\n\tZAdd(collection string, score float32, value interface{}) (err error)\n\tZCount(collection string, min string, max string) (count int, err error)\n\tZCountAll(collection string) (count int, err error)\n\tZScan(collection string, pattern string, count int) (results []string, err error)\n\tZPopMax(collection string, count int) (results []string, err error)\n\tZPopMin(collection string, count int) (results []string, err error)\n\tZPopMaxOne(collection string) (value string, err error)\n\tZPopMinOne(collection string) (value string, err error)\n\tBZPopMax(collection string, timeout int) (value string, err error)\n\tBZPopMin(collection string, timeout int) (value string, err error)\n\tLock(lockKey string) (value int64, err error)\n\tUnLock(lockKey string, value int64)\n\tMemoryStats() (stats map[string]int64, err error)\n\tSetBackoffMaxInterval(interval time.Duration)\n\tSetTimeout(timeout int)\n}\n"
  },
  {
    "path": "db/mongo/client.go",
    "content": "package mongo\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/spf13/viper\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n\t\"go.mongodb.org/mongo-driver/mongo/options\"\n\t\"sync\"\n)\n\nvar AppName = \"crawlab-db\"\n\nvar _clientMap = map[string]*mongo.Client{}\nvar _mu sync.Mutex\n\nfunc GetMongoClient(opts ...ClientOption) (c *mongo.Client, err error) {\n\t// client options\n\t_opts := &ClientOptions{}\n\tfor _, op := range opts {\n\t\top(_opts)\n\t}\n\tif _opts.Uri == \"\" {\n\t\t_opts.Uri = viper.GetString(\"mongo.uri\")\n\t}\n\tif _opts.Host == \"\" {\n\t\t_opts.Host = viper.GetString(\"mongo.host\")\n\t\tif _opts.Host == \"\" {\n\t\t\t_opts.Host = \"localhost\"\n\t\t}\n\t}\n\tif _opts.Port == 0 {\n\t\t_opts.Port = viper.GetInt(\"mongo.port\")\n\t\tif _opts.Port == 0 {\n\t\t\t_opts.Port = 27017\n\t\t}\n\t}\n\tif _opts.Db == \"\" {\n\t\t_opts.Db = viper.GetString(\"mongo.db\")\n\t\tif _opts.Db == \"\" {\n\t\t\t_opts.Db = \"admin\"\n\t\t}\n\t}\n\tif len(_opts.Hosts) == 0 {\n\t\t_opts.Hosts = viper.GetStringSlice(\"mongo.hosts\")\n\t}\n\tif _opts.Username == \"\" {\n\t\t_opts.Username = viper.GetString(\"mongo.username\")\n\t}\n\tif _opts.Password == \"\" {\n\t\t_opts.Password = viper.GetString(\"mongo.password\")\n\t}\n\tif _opts.AuthSource == \"\" {\n\t\t_opts.AuthSource = viper.GetString(\"mongo.authSource\")\n\t\tif _opts.AuthSource == \"\" {\n\t\t\t_opts.AuthSource = \"admin\"\n\t\t}\n\t}\n\tif _opts.AuthMechanism == \"\" {\n\t\t_opts.AuthMechanism = viper.GetString(\"mongo.authMechanism\")\n\t}\n\tif _opts.AuthMechanismProperties == nil {\n\t\t_opts.AuthMechanismProperties = viper.GetStringMapString(\"mongo.authMechanismProperties\")\n\t}\n\n\t// client options key json string\n\t_optsKeyBytes, err := json.Marshal(_opts)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\t_optsKey := string(_optsKeyBytes)\n\n\t// attempt to get client by client options\n\tc, ok := _clientMap[_optsKey]\n\tif ok {\n\t\treturn c, nil\n\t}\n\n\t// create new mongo client\n\tc, err = newMongoClient(_opts.Context, _opts)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// add to map\n\t_mu.Lock()\n\t_clientMap[_optsKey] = c\n\t_mu.Unlock()\n\n\treturn c, nil\n}\n\nfunc newMongoClient(ctx context.Context, _opts *ClientOptions) (c *mongo.Client, err error) {\n\t// mongo client options\n\tmongoOpts := &options.ClientOptions{\n\t\tAppName: &AppName,\n\t}\n\n\tif _opts.Uri != \"\" {\n\t\t// uri is set\n\t\tmongoOpts.ApplyURI(_opts.Uri)\n\t} else {\n\t\t// uri is unset\n\n\t\t// username and password are set\n\t\tif _opts.Username != \"\" && _opts.Password != \"\" {\n\t\t\tmongoOpts.SetAuth(options.Credential{\n\t\t\t\tAuthMechanism:           _opts.AuthMechanism,\n\t\t\t\tAuthMechanismProperties: _opts.AuthMechanismProperties,\n\t\t\t\tAuthSource:              _opts.AuthSource,\n\t\t\t\tUsername:                _opts.Username,\n\t\t\t\tPassword:                _opts.Password,\n\t\t\t\tPasswordSet:             true,\n\t\t\t})\n\t\t}\n\n\t\tif len(_opts.Hosts) > 0 {\n\t\t\t// hosts are set\n\t\t\tmongoOpts.SetHosts(_opts.Hosts)\n\t\t} else {\n\t\t\t// hosts are unset\n\t\t\tmongoOpts.ApplyURI(fmt.Sprintf(\"mongodb://%s:%d/%s\", _opts.Host, _opts.Port, _opts.Db))\n\t\t}\n\t}\n\n\t// attempt to connect with retry\n\tbp := backoff.NewExponentialBackOff()\n\terr = backoff.Retry(func() error {\n\t\terrMsg := fmt.Sprintf(\"waiting for connect mongo database, after %f seconds try again.\", bp.NextBackOff().Seconds())\n\t\tc, err = mongo.NewClient(mongoOpts)\n\t\tif err != nil {\n\t\t\tlog.WithError(err).Warnf(errMsg)\n\t\t\treturn err\n\t\t}\n\t\tif err := c.Connect(ctx); err != nil {\n\t\t\tlog.WithError(err).Warnf(errMsg)\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}, bp)\n\n\treturn c, nil\n}\n"
  },
  {
    "path": "db/mongo/client_options.go",
    "content": "package mongo\n\nimport \"context\"\n\ntype ClientOption func(options *ClientOptions)\n\ntype ClientOptions struct {\n\tContext                 context.Context\n\tUri                     string\n\tHost                    string\n\tPort                    int\n\tDb                      string\n\tHosts                   []string\n\tUsername                string\n\tPassword                string\n\tAuthSource              string\n\tAuthMechanism           string\n\tAuthMechanismProperties map[string]string\n}\n\nfunc WithContext(ctx context.Context) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.Context = ctx\n\t}\n}\n\nfunc WithUri(value string) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.Uri = value\n\t}\n}\n\nfunc WithHost(value string) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.Host = value\n\t}\n}\n\nfunc WithPort(value int) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.Port = value\n\t}\n}\n\nfunc WithDb(value string) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.Db = value\n\t}\n}\n\nfunc WithHosts(value []string) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.Hosts = value\n\t}\n}\n\nfunc WithUsername(value string) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.Username = value\n\t}\n}\n\nfunc WithPassword(value string) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.Password = value\n\t}\n}\n\nfunc WithAuthSource(value string) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.AuthSource = value\n\t}\n}\n\nfunc WithAuthMechanism(value string) ClientOption {\n\treturn func(options *ClientOptions) {\n\t\toptions.AuthMechanism = value\n\t}\n}\n"
  },
  {
    "path": "db/mongo/client_test.go",
    "content": "package mongo\n\nimport (\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n)\n\nfunc setupMongoTest() (err error) {\n\treturn nil\n}\n\nfunc cleanupMongoTest() {\n}\n\nfunc TestMongoInitMongo(t *testing.T) {\n\terr := setupMongoTest()\n\trequire.Nil(t, err)\n\n\t_, err = GetMongoClient()\n\trequire.Nil(t, err)\n\n\tcleanupMongoTest()\n}\n"
  },
  {
    "path": "db/mongo/col.go",
    "content": "package mongo\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/db/errors\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n\t\"go.mongodb.org/mongo-driver/mongo/options\"\n)\n\ntype ColInterface interface {\n\tInsert(doc interface{}) (id primitive.ObjectID, err error)\n\tInsertMany(docs []interface{}) (ids []primitive.ObjectID, err error)\n\tUpdateId(id primitive.ObjectID, update interface{}) (err error)\n\tUpdate(query bson.M, update interface{}) (err error)\n\tUpdateWithOptions(query bson.M, update interface{}, opts *options.UpdateOptions) (err error)\n\tReplaceId(id primitive.ObjectID, doc interface{}) (err error)\n\tReplace(query bson.M, doc interface{}) (err error)\n\tReplaceWithOptions(query bson.M, doc interface{}, opts *options.ReplaceOptions) (err error)\n\tDeleteId(id primitive.ObjectID) (err error)\n\tDelete(query bson.M) (err error)\n\tDeleteWithOptions(query bson.M, opts *options.DeleteOptions) (err error)\n\tFind(query bson.M, opts *FindOptions) (fr *FindResult)\n\tFindId(id primitive.ObjectID) (fr *FindResult)\n\tCount(query bson.M) (total int, err error)\n\tAggregate(pipeline mongo.Pipeline, opts *options.AggregateOptions) (fr *FindResult)\n\tCreateIndex(indexModel mongo.IndexModel) (err error)\n\tCreateIndexes(indexModels []mongo.IndexModel) (err error)\n\tMustCreateIndex(indexModel mongo.IndexModel)\n\tMustCreateIndexes(indexModels []mongo.IndexModel)\n\tDeleteIndex(name string) (err error)\n\tDeleteAllIndexes() (err error)\n\tListIndexes() (indexes []map[string]interface{}, err error)\n\tGetContext() (ctx context.Context)\n\tGetName() (name string)\n\tGetCollection() (c *mongo.Collection)\n}\n\ntype FindOptions struct {\n\tSkip  int\n\tLimit int\n\tSort  bson.D\n}\n\ntype Col struct {\n\tctx context.Context\n\tdb  *mongo.Database\n\tc   *mongo.Collection\n}\n\nfunc (col *Col) Insert(doc interface{}) (id primitive.ObjectID, err error) {\n\tres, err := col.c.InsertOne(col.ctx, doc)\n\tif err != nil {\n\t\treturn primitive.NilObjectID, trace.TraceError(err)\n\t}\n\tif id, ok := res.InsertedID.(primitive.ObjectID); ok {\n\t\treturn id, nil\n\t}\n\treturn primitive.NilObjectID, trace.TraceError(errors.ErrInvalidType)\n}\n\nfunc (col *Col) InsertMany(docs []interface{}) (ids []primitive.ObjectID, err error) {\n\tres, err := col.c.InsertMany(col.ctx, docs)\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tfor _, v := range res.InsertedIDs {\n\t\tswitch v.(type) {\n\t\tcase primitive.ObjectID:\n\t\t\tid := v.(primitive.ObjectID)\n\t\t\tids = append(ids, id)\n\t\tdefault:\n\t\t\treturn nil, trace.TraceError(errors.ErrInvalidType)\n\t\t}\n\t}\n\treturn ids, nil\n}\n\nfunc (col *Col) UpdateId(id primitive.ObjectID, update interface{}) (err error) {\n\t_, err = col.c.UpdateOne(col.ctx, bson.M{\"_id\": id}, update)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) Update(query bson.M, update interface{}) (err error) {\n\treturn col.UpdateWithOptions(query, update, nil)\n}\n\nfunc (col *Col) UpdateWithOptions(query bson.M, update interface{}, opts *options.UpdateOptions) (err error) {\n\tif opts == nil {\n\t\t_, err = col.c.UpdateMany(col.ctx, query, update)\n\t} else {\n\t\t_, err = col.c.UpdateMany(col.ctx, query, update, opts)\n\t}\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) ReplaceId(id primitive.ObjectID, doc interface{}) (err error) {\n\treturn col.Replace(bson.M{\"_id\": id}, doc)\n}\n\nfunc (col *Col) Replace(query bson.M, doc interface{}) (err error) {\n\treturn col.ReplaceWithOptions(query, doc, nil)\n}\n\nfunc (col *Col) ReplaceWithOptions(query bson.M, doc interface{}, opts *options.ReplaceOptions) (err error) {\n\tif opts == nil {\n\t\t_, err = col.c.ReplaceOne(col.ctx, query, doc)\n\t} else {\n\t\t_, err = col.c.ReplaceOne(col.ctx, query, doc, opts)\n\t}\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) DeleteId(id primitive.ObjectID) (err error) {\n\t_, err = col.c.DeleteOne(col.ctx, bson.M{\"_id\": id})\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) Delete(query bson.M) (err error) {\n\treturn col.DeleteWithOptions(query, nil)\n}\n\nfunc (col *Col) DeleteWithOptions(query bson.M, opts *options.DeleteOptions) (err error) {\n\tif opts == nil {\n\t\t_, err = col.c.DeleteMany(col.ctx, query)\n\t} else {\n\t\t_, err = col.c.DeleteMany(col.ctx, query, opts)\n\t}\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) Find(query bson.M, opts *FindOptions) (fr *FindResult) {\n\t_opts := &options.FindOptions{}\n\tif opts != nil {\n\t\tif opts.Skip != 0 {\n\t\t\tskipInt64 := int64(opts.Skip)\n\t\t\t_opts.Skip = &skipInt64\n\t\t}\n\t\tif opts.Limit != 0 {\n\t\t\tlimitInt64 := int64(opts.Limit)\n\t\t\t_opts.Limit = &limitInt64\n\t\t}\n\t\tif opts.Sort != nil {\n\t\t\t_opts.Sort = opts.Sort\n\t\t}\n\t}\n\tcur, err := col.c.Find(col.ctx, query, _opts)\n\tif err != nil {\n\t\treturn &FindResult{\n\t\t\tcol: col,\n\t\t\terr: err,\n\t\t}\n\t}\n\tfr = &FindResult{\n\t\tcol: col,\n\t\tcur: cur,\n\t}\n\treturn fr\n}\n\nfunc (col *Col) FindId(id primitive.ObjectID) (fr *FindResult) {\n\tres := col.c.FindOne(col.ctx, bson.M{\"_id\": id})\n\tif res.Err() != nil {\n\t\treturn &FindResult{\n\t\t\tcol: col,\n\t\t\terr: res.Err(),\n\t\t}\n\t}\n\tfr = &FindResult{\n\t\tcol: col,\n\t\tres: res,\n\t}\n\treturn fr\n}\n\nfunc (col *Col) Count(query bson.M) (total int, err error) {\n\ttotalInt64, err := col.c.CountDocuments(col.ctx, query)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\ttotal = int(totalInt64)\n\treturn total, nil\n}\n\nfunc (col *Col) Aggregate(pipeline mongo.Pipeline, opts *options.AggregateOptions) (fr *FindResult) {\n\tcur, err := col.c.Aggregate(col.ctx, pipeline, opts)\n\tif err != nil {\n\t\treturn &FindResult{\n\t\t\tcol: col,\n\t\t\terr: err,\n\t\t}\n\t}\n\tif cur.Err() != nil {\n\t\treturn &FindResult{\n\t\t\tcol: col,\n\t\t\terr: cur.Err(),\n\t\t}\n\t}\n\tfr = &FindResult{\n\t\tcol: col,\n\t\tcur: cur,\n\t}\n\treturn fr\n}\n\nfunc (col *Col) CreateIndex(indexModel mongo.IndexModel) (err error) {\n\t_, err = col.c.Indexes().CreateOne(col.ctx, indexModel)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) CreateIndexes(indexModels []mongo.IndexModel) (err error) {\n\t_, err = col.c.Indexes().CreateMany(col.ctx, indexModels)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) MustCreateIndex(indexModel mongo.IndexModel) {\n\t_, _ = col.c.Indexes().CreateOne(col.ctx, indexModel)\n}\n\nfunc (col *Col) MustCreateIndexes(indexModels []mongo.IndexModel) {\n\t_, _ = col.c.Indexes().CreateMany(col.ctx, indexModels)\n}\n\nfunc (col *Col) DeleteIndex(name string) (err error) {\n\t_, err = col.c.Indexes().DropOne(col.ctx, name)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) DeleteAllIndexes() (err error) {\n\t_, err = col.c.Indexes().DropAll(col.ctx)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (col *Col) ListIndexes() (indexes []map[string]interface{}, err error) {\n\tcur, err := col.c.Indexes().List(col.ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := cur.All(col.ctx, &indexes); err != nil {\n\t\treturn nil, err\n\t}\n\treturn indexes, nil\n}\n\nfunc (col *Col) GetContext() (ctx context.Context) {\n\treturn col.ctx\n}\n\nfunc (col *Col) GetName() (name string) {\n\treturn col.c.Name()\n}\n\nfunc (col *Col) GetCollection() (c *mongo.Collection) {\n\treturn col.c\n}\n\nfunc GetMongoCol(colName string) (col *Col) {\n\treturn GetMongoColWithDb(colName, nil)\n}\n\nfunc GetMongoColWithDb(colName string, db *mongo.Database) (col *Col) {\n\tctx := context.Background()\n\tif db == nil {\n\t\tdb = GetMongoDb(\"\")\n\t}\n\tc := db.Collection(colName)\n\tcol = &Col{\n\t\tctx: ctx,\n\t\tdb:  db,\n\t\tc:   c,\n\t}\n\treturn col\n}\n"
  },
  {
    "path": "db/mongo/col_test.go",
    "content": "package mongo\n\nimport (\n\t\"fmt\"\n\t\"github.com/spf13/viper\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n\t\"strconv\"\n\t\"testing\"\n)\n\ntype ColTestObject struct {\n\tdbName  string\n\tcolName string\n\tcol     *Col\n}\n\ntype TestDocument struct {\n\tKey   string   `bson:\"key\"`\n\tValue int      `bson:\"value\"`\n\tTags  []string `bson:\"tags\"`\n}\n\ntype TestAggregateResult struct {\n\tId    string `bson:\"_id\"`\n\tCount int    `bson:\"count\"`\n\tValue int    `bson:\"value\"`\n}\n\nfunc setupColTest() (to *ColTestObject, err error) {\n\tdbName := \"test_db\"\n\tcolName := \"test_col\"\n\tviper.Set(\"mongo.db\", dbName)\n\tcol := GetMongoCol(colName)\n\tif err := col.db.Drop(col.ctx); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &ColTestObject{\n\t\tdbName:  dbName,\n\t\tcolName: colName,\n\t\tcol:     col,\n\t}, nil\n}\n\nfunc cleanupColTest(to *ColTestObject) {\n\t_ = to.col.db.Drop(to.col.ctx)\n}\n\nfunc TestGetMongoCol(t *testing.T) {\n\tcolName := \"test_col\"\n\n\tcol := GetMongoCol(colName)\n\trequire.Equal(t, colName, col.c.Name())\n}\n\nfunc TestGetMongoColWithDb(t *testing.T) {\n\tdbName := \"test_db\"\n\tcolName := \"test_col\"\n\n\tcol := GetMongoColWithDb(colName, dbName)\n\trequire.Equal(t, colName, col.c.Name())\n\trequire.Equal(t, dbName, col.db.Name())\n}\n\nfunc TestCol_Insert(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tid, err := to.col.Insert(bson.M{\"key\": \"value\"})\n\trequire.Nil(t, err)\n\trequire.IsType(t, primitive.ObjectID{}, id)\n\n\tvar doc map[string]string\n\terr = to.col.FindId(id).One(&doc)\n\trequire.Nil(t, err)\n\trequire.Equal(t, doc[\"key\"], \"value\")\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_InsertMany(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tn := 10\n\tvar docs []interface{}\n\tfor i := 0; i < n; i++ {\n\t\tdocs = append(docs, bson.M{\"key\": fmt.Sprintf(\"value-%d\", i)})\n\t}\n\tids, err := to.col.InsertMany(docs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n, len(ids))\n\n\tvar resDocs []map[string]string\n\terr = to.col.Find(nil, &FindOptions{Sort: bson.D{{\"_id\", 1}}}).All(&resDocs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n, len(resDocs))\n\tfor i, doc := range resDocs {\n\t\trequire.Equal(t, fmt.Sprintf(\"value-%d\", i), doc[\"key\"])\n\t}\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_UpdateId(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tid, err := to.col.Insert(bson.M{\"key\": \"old-value\"})\n\trequire.Nil(t, err)\n\n\terr = to.col.UpdateId(id, bson.M{\n\t\t\"$set\": bson.M{\n\t\t\t\"key\": \"new-value\",\n\t\t},\n\t})\n\trequire.Nil(t, err)\n\n\tvar doc map[string]string\n\terr = to.col.FindId(id).One(&doc)\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"new-value\", doc[\"key\"])\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_Update(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tn := 10\n\tvar docs []interface{}\n\tfor i := 0; i < n; i++ {\n\t\tdocs = append(docs, bson.M{\"key\": fmt.Sprintf(\"old-value-%d\", i)})\n\t}\n\n\terr = to.col.Update(nil, bson.M{\n\t\t\"$set\": bson.M{\n\t\t\t\"key\": \"new-value\",\n\t\t},\n\t})\n\trequire.Nil(t, err)\n\n\tvar resDocs []map[string]string\n\terr = to.col.Find(nil, &FindOptions{Sort: bson.D{{\"_id\", 1}}}).All(&resDocs)\n\trequire.Nil(t, err)\n\tfor _, doc := range resDocs {\n\t\trequire.Equal(t, \"new-value\", doc[\"key\"])\n\t}\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_ReplaceId(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tid, err := to.col.Insert(bson.M{\"key\": \"old-value\"})\n\trequire.Nil(t, err)\n\n\tvar doc map[string]interface{}\n\terr = to.col.FindId(id).One(&doc)\n\trequire.Nil(t, err)\n\tdoc[\"key\"] = \"new-value\"\n\n\terr = to.col.ReplaceId(id, doc)\n\trequire.Nil(t, err)\n\n\terr = to.col.FindId(id).One(doc)\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"new-value\", doc[\"key\"])\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_Replace(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tid, err := to.col.Insert(bson.M{\"key\": \"old-value\"})\n\trequire.Nil(t, err)\n\n\tvar doc map[string]interface{}\n\terr = to.col.FindId(id).One(&doc)\n\trequire.Nil(t, err)\n\tdoc[\"key\"] = \"new-value\"\n\n\terr = to.col.Replace(bson.M{\"key\": \"old-value\"}, doc)\n\trequire.Nil(t, err)\n\n\terr = to.col.FindId(id).One(&doc)\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"new-value\", doc[\"key\"])\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_DeleteId(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tid, err := to.col.Insert(bson.M{\"key\": \"value\"})\n\trequire.Nil(t, err)\n\n\terr = to.col.DeleteId(id)\n\trequire.Nil(t, err)\n\n\ttotal, err := to.col.Count(nil)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 0, total)\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_Delete(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tn := 10\n\tvar docs []interface{}\n\tfor i := 0; i < n; i++ {\n\t\tdocs = append(docs, bson.M{\"key\": fmt.Sprintf(\"value-%d\", i)})\n\t}\n\tids, err := to.col.InsertMany(docs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n, len(ids))\n\n\terr = to.col.Delete(bson.M{\"key\": \"value-0\"})\n\trequire.Nil(t, err)\n\n\ttotal, err := to.col.Count(nil)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n-1, total)\n\n\terr = to.col.Delete(nil)\n\trequire.Nil(t, err)\n\n\ttotal, err = to.col.Count(nil)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 0, total)\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_FindId(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tid, err := to.col.Insert(bson.M{\"key\": \"value\"})\n\trequire.Nil(t, err)\n\n\tvar doc map[string]string\n\terr = to.col.FindId(id).One(&doc)\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"value\", doc[\"key\"])\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_Find(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tn := 10\n\tvar docs []interface{}\n\tfor i := 0; i < n; i++ {\n\t\tdocs = append(docs, TestDocument{\n\t\t\tKey:  fmt.Sprintf(\"value-%d\", i),\n\t\t\tTags: []string{\"test tag\"},\n\t\t})\n\t}\n\tids, err := to.col.InsertMany(docs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n, len(ids))\n\n\terr = to.col.Find(nil, nil).All(&docs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n, len(docs))\n\n\terr = to.col.Find(bson.M{\"key\": bson.M{\"$gte\": fmt.Sprintf(\"value-%d\", 5)}}, nil).All(&docs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n-5, len(docs))\n\n\terr = to.col.Find(nil, &FindOptions{\n\t\tSkip: 5,\n\t}).All(&docs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n-5, len(docs))\n\n\terr = to.col.Find(nil, &FindOptions{\n\t\tLimit: 5,\n\t}).All(&docs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 5, len(docs))\n\n\tvar resDocs []TestDocument\n\terr = to.col.Find(nil, &FindOptions{\n\t\tSort: bson.D{{\"key\", 1}},\n\t}).All(&resDocs)\n\trequire.Nil(t, err)\n\trequire.Greater(t, len(resDocs), 0)\n\trequire.Equal(t, \"value-0\", resDocs[0].Key)\n\n\terr = to.col.Find(nil, &FindOptions{\n\t\tSort: bson.D{{\"key\", -1}},\n\t}).All(&resDocs)\n\trequire.Nil(t, err)\n\trequire.Greater(t, len(resDocs), 0)\n\trequire.Equal(t, fmt.Sprintf(\"value-%d\", n-1), resDocs[0].Key)\n\n\tvar resDocs2 []TestDocument\n\terr = to.col.Find(bson.M{\"tags\": bson.M{\"$in\": []string{\"test tag\"}}}, nil).All(&resDocs2)\n\trequire.Nil(t, err)\n\trequire.Greater(t, len(resDocs2), 0)\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_CreateIndex(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\terr = to.col.CreateIndex(mongo.IndexModel{\n\t\tKeys: bson.D{{\"key\", 1}},\n\t})\n\trequire.Nil(t, err)\n\n\tindexes, err := to.col.ListIndexes()\n\trequire.Nil(t, err)\n\trequire.Equal(t, 2, len(indexes))\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_Aggregate(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\tn := 10\n\tv := 2\n\tvar docs []interface{}\n\tfor i := 0; i < n; i++ {\n\t\tdocs = append(docs, TestDocument{\n\t\t\tKey:   fmt.Sprintf(\"%d\", i%2),\n\t\t\tValue: v,\n\t\t})\n\t}\n\tids, err := to.col.InsertMany(docs)\n\trequire.Nil(t, err)\n\trequire.Equal(t, n, len(ids))\n\n\tpipeline := mongo.Pipeline{\n\t\t{\n\t\t\t{\n\t\t\t\t\"$group\",\n\t\t\t\tbson.D{\n\t\t\t\t\t{\"_id\", \"$key\"},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"count\",\n\t\t\t\t\t\tbson.D{{\"$sum\", 1}},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"value\",\n\t\t\t\t\t\tbson.D{{\"$sum\", \"$value\"}},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t{\n\t\t\t\t\"$sort\",\n\t\t\t\tbson.D{{\"_id\", 1}},\n\t\t\t},\n\t\t},\n\t}\n\tvar results []TestAggregateResult\n\terr = to.col.Aggregate(pipeline, nil).All(&results)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 2, len(results))\n\n\tfor i, r := range results {\n\t\trequire.Equal(t, strconv.Itoa(i), r.Id)\n\t\trequire.Equal(t, n/2, r.Count)\n\t\trequire.Equal(t, n*v/2, r.Value)\n\t}\n}\n\nfunc TestCol_CreateIndexes(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\terr = to.col.CreateIndexes([]mongo.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{{\"key\", 1}},\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{{\"empty-key\", 1}},\n\t\t},\n\t})\n\trequire.Nil(t, err)\n\n\tindexes, err := to.col.ListIndexes()\n\trequire.Nil(t, err)\n\trequire.Equal(t, 3, len(indexes))\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_DeleteIndex(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\terr = to.col.CreateIndex(mongo.IndexModel{\n\t\tKeys: bson.D{{\"key\", 1}},\n\t})\n\trequire.Nil(t, err)\n\n\tindexes, err := to.col.ListIndexes()\n\trequire.Nil(t, err)\n\trequire.Equal(t, 2, len(indexes))\n\tfor _, index := range indexes {\n\t\tname, ok := index[\"name\"].(string)\n\t\trequire.True(t, ok)\n\n\t\tif name != \"_id_\" {\n\t\t\terr = to.col.DeleteIndex(name)\n\t\t\trequire.Nil(t, err)\n\t\t\tbreak\n\t\t}\n\t}\n\n\tindexes, err = to.col.ListIndexes()\n\trequire.Nil(t, err)\n\trequire.Equal(t, 1, len(indexes))\n\n\tcleanupColTest(to)\n}\n\nfunc TestCol_DeleteIndexes(t *testing.T) {\n\tto, err := setupColTest()\n\trequire.Nil(t, err)\n\n\terr = to.col.CreateIndexes([]mongo.IndexModel{\n\t\t{\n\t\t\tKeys: bson.D{{\"key\", 1}},\n\t\t},\n\t\t{\n\t\t\tKeys: bson.D{{\"empty-key\", 1}},\n\t\t},\n\t})\n\trequire.Nil(t, err)\n\n\terr = to.col.DeleteAllIndexes()\n\trequire.Nil(t, err)\n\n\tindexes, err := to.col.ListIndexes()\n\trequire.Nil(t, err)\n\trequire.Equal(t, 1, len(indexes))\n\n\tcleanupColTest(to)\n}\n"
  },
  {
    "path": "db/mongo/db.go",
    "content": "package mongo\n\nimport (\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/spf13/viper\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n)\n\nfunc GetMongoDb(dbName string, opts ...DbOption) (db *mongo.Database) {\n\tif dbName == \"\" {\n\t\tdbName = viper.GetString(\"mongo.db\")\n\t}\n\tif dbName == \"\" {\n\t\tdbName = \"test\"\n\t}\n\n\t_opts := &DbOptions{}\n\tfor _, op := range opts {\n\t\top(_opts)\n\t}\n\n\tvar c *mongo.Client\n\tif _opts.client == nil {\n\t\tvar err error\n\t\tc, err = GetMongoClient()\n\t\tif err != nil {\n\t\t\ttrace.PrintError(err)\n\t\t\treturn nil\n\t\t}\n\t} else {\n\t\tc = _opts.client\n\t}\n\n\treturn c.Database(dbName, nil)\n}\n"
  },
  {
    "path": "db/mongo/db_options.go",
    "content": "package mongo\n\nimport \"go.mongodb.org/mongo-driver/mongo\"\n\ntype DbOption func(options *DbOptions)\n\ntype DbOptions struct {\n\tclient *mongo.Client\n}\n\nfunc WithDbClient(c *mongo.Client) DbOption {\n\treturn func(options *DbOptions) {\n\t\toptions.client = c\n\t}\n}\n"
  },
  {
    "path": "db/mongo/db_test.go",
    "content": "package mongo\n\nimport (\n\t\"github.com/spf13/viper\"\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n)\n\nfunc TestMongoGetDb(t *testing.T) {\n\tdbName := \"test_db\"\n\tviper.Set(\"mongo.db\", dbName)\n\terr := InitMongo()\n\trequire.Nil(t, err)\n\n\tdb := GetMongoDb(\"\")\n\trequire.Equal(t, dbName, db.Name())\n}\n"
  },
  {
    "path": "db/mongo/result.go",
    "content": "package mongo\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/db/errors\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n)\n\ntype FindResultInterface interface {\n\tOne(val interface{}) (err error)\n\tAll(val interface{}) (err error)\n\tGetCol() (col *Col)\n\tGetSingleResult() (res *mongo.SingleResult)\n\tGetCursor() (cur *mongo.Cursor)\n\tGetError() (err error)\n}\n\nfunc NewFindResult() (fr *FindResult) {\n\treturn &FindResult{}\n}\n\nfunc NewFindResultWithError(err error) (fr *FindResult) {\n\treturn &FindResult{\n\t\terr: err,\n\t}\n}\n\ntype FindResult struct {\n\tcol *Col\n\tres *mongo.SingleResult\n\tcur *mongo.Cursor\n\terr error\n}\n\nfunc (fr *FindResult) GetError() (err error) {\n\t//TODO implement me\n\tpanic(\"implement me\")\n}\n\nfunc (fr *FindResult) One(val interface{}) (err error) {\n\tif fr.err != nil {\n\t\treturn fr.err\n\t}\n\tif fr.cur != nil {\n\t\tif !fr.cur.TryNext(fr.col.ctx) {\n\t\t\treturn mongo.ErrNoDocuments\n\t\t}\n\t\treturn fr.cur.Decode(val)\n\t}\n\treturn fr.res.Decode(val)\n}\n\nfunc (fr *FindResult) All(val interface{}) (err error) {\n\tif fr.err != nil {\n\t\treturn fr.err\n\t}\n\tvar ctx context.Context\n\tif fr.col == nil {\n\t\tctx = context.Background()\n\t} else {\n\t\tctx = fr.col.ctx\n\t}\n\tif fr.cur == nil {\n\t\treturn errors.ErrNoCursor\n\t}\n\tif !fr.cur.TryNext(ctx) {\n\t\treturn ctx.Err()\n\t}\n\treturn fr.cur.All(ctx, val)\n}\n\nfunc (fr *FindResult) GetCol() (col *Col) {\n\treturn fr.col\n}\n\nfunc (fr *FindResult) GetSingleResult() (res *mongo.SingleResult) {\n\treturn fr.res\n}\n\nfunc (fr *FindResult) GetCursor() (cur *mongo.Cursor) {\n\treturn fr.cur\n}\n"
  },
  {
    "path": "db/mongo/transaction.go",
    "content": "package mongo\n\nimport (\n\t\"context\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"go.mongodb.org/mongo-driver/mongo\"\n)\n\nfunc RunTransaction(fn func(mongo.SessionContext) error) (err error) {\n\treturn RunTransactionWithContext(context.Background(), fn)\n}\n\nfunc RunTransactionWithContext(ctx context.Context, fn func(mongo.SessionContext) error) (err error) {\n\t// default client\n\tc, err := GetMongoClient()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// start session\n\ts, err := c.StartSession()\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// start transaction\n\tif err := s.StartTransaction(); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// perform operation\n\tif err := mongo.WithSession(ctx, s, func(sc mongo.SessionContext) error {\n\t\tif err := fn(sc); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\tif err = s.CommitTransaction(sc); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\treturn nil\n\t}); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "db/redis/client.go",
    "content": "package redis\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/db\"\n\t\"github.com/crawlab-team/crawlab/db/errors\"\n\t\"github.com/crawlab-team/crawlab/db/utils\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gomodule/redigo/redis\"\n\t\"reflect\"\n\t\"strings\"\n\t\"time\"\n)\n\ntype Client struct {\n\t// settings\n\tbackoffMaxInterval time.Duration\n\ttimeout            int\n\n\t// internals\n\tpool *redis.Pool\n}\n\nfunc (client *Client) Ping() error {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\tif _, err := redis.String(c.Do(\"PING\")); err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (client *Client) Keys(pattern string) (values []string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalues, err = redis.Strings(c.Do(\"KEYS\", pattern))\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\treturn values, nil\n}\n\nfunc (client *Client) AllKeys() (values []string, err error) {\n\treturn client.Keys(\"*\")\n}\n\nfunc (client *Client) Get(collection string) (value string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalue, err = redis.String(c.Do(\"GET\", collection))\n\tif err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\treturn value, nil\n}\n\nfunc (client *Client) Set(collection string, value string) (err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalue, err = redis.String(c.Do(\"SET\", collection, value))\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (client *Client) Del(collection string) error {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tif _, err := c.Do(\"DEL\", collection); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (client *Client) RPush(collection string, value interface{}) error {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tif _, err := c.Do(\"RPUSH\", collection, value); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (client *Client) LPush(collection string, value interface{}) error {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tif _, err := c.Do(\"LPUSH\", collection, value); err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (client *Client) LPop(collection string) (string, error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalue, err := redis.String(c.Do(\"LPOP\", collection))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn value, trace.TraceError(err)\n\t\t}\n\t\treturn value, err\n\t}\n\treturn value, nil\n}\n\nfunc (client *Client) RPop(collection string) (string, error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalue, err := redis.String(c.Do(\"RPOP\", collection))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn value, trace.TraceError(err)\n\t\t}\n\t\treturn value, err\n\t}\n\treturn value, nil\n}\n\nfunc (client *Client) LLen(collection string) (int, error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalue, err := redis.Int(c.Do(\"LLEN\", collection))\n\tif err != nil {\n\t\treturn 0, trace.TraceError(err)\n\t}\n\treturn value, nil\n}\n\nfunc (client *Client) BRPop(collection string, timeout int) (value string, err error) {\n\tif timeout <= 0 {\n\t\ttimeout = 60\n\t}\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalues, err := redis.Strings(c.Do(\"BRPOP\", collection, timeout))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn value, trace.TraceError(err)\n\t\t}\n\t\treturn value, err\n\t}\n\treturn values[1], nil\n}\n\nfunc (client *Client) BLPop(collection string, timeout int) (value string, err error) {\n\tif timeout <= 0 {\n\t\ttimeout = 60\n\t}\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalues, err := redis.Strings(c.Do(\"BLPOP\", collection, timeout))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn value, trace.TraceError(err)\n\t\t}\n\t\treturn value, err\n\t}\n\treturn values[1], nil\n}\n\nfunc (client *Client) HSet(collection string, key string, value string) error {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tif _, err := c.Do(\"HSET\", collection, key, value); err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (client *Client) HGet(collection string, key string) (string, error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\tvalue, err := redis.String(c.Do(\"HGET\", collection, key))\n\tif err != nil && err != redis.ErrNil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn value, trace.TraceError(err)\n\t\t}\n\t\treturn value, err\n\t}\n\treturn value, nil\n}\n\nfunc (client *Client) HDel(collection string, key string) error {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tif _, err := c.Do(\"HDEL\", collection, key); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (client *Client) HScan(collection string) (results map[string]string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvar (\n\t\tcursor int64\n\t\titems  []string\n\t)\n\n\tresults = map[string]string{}\n\n\tfor {\n\t\tvalues, err := redis.Values(c.Do(\"HSCAN\", collection, cursor))\n\t\tif err != nil {\n\t\t\tif err != redis.ErrNil {\n\t\t\t\treturn nil, trace.TraceError(err)\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvalues, err = redis.Scan(values, &cursor, &items)\n\t\tif err != nil {\n\t\t\tif err != redis.ErrNil {\n\t\t\t\treturn nil, trace.TraceError(err)\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\tfor i := 0; i < len(items); i += 2 {\n\t\t\tkey := items[i]\n\t\t\tvalue := items[i+1]\n\t\t\tresults[key] = value\n\t\t}\n\t\tif cursor == 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn results, nil\n}\n\nfunc (client *Client) HKeys(collection string) (results []string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tresults, err = redis.Strings(c.Do(\"HKEYS\", collection))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn results, trace.TraceError(err)\n\t\t}\n\t\treturn results, err\n\t}\n\treturn results, nil\n}\n\nfunc (client *Client) ZAdd(collection string, score float32, value interface{}) (err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tif _, err := c.Do(\"ZADD\", collection, score, value); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (client *Client) ZCount(collection string, min string, max string) (count int, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tcount, err = redis.Int(c.Do(\"ZCOUNT\", collection, min, max))\n\tif err != nil {\n\t\treturn 0, trace.TraceError(err)\n\t}\n\treturn count, nil\n}\n\nfunc (client *Client) ZCountAll(collection string) (count int, err error) {\n\treturn client.ZCount(collection, \"-inf\", \"+inf\")\n}\n\nfunc (client *Client) ZScan(collection string, pattern string, count int) (values []string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalues, err = redis.Strings(c.Do(\"ZSCAN\", collection, 0, pattern, count))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t\treturn nil, err\n\t}\n\treturn values, nil\n}\n\nfunc (client *Client) ZPopMax(collection string, count int) (results []string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tresults = []string{}\n\n\tvalues, err := redis.Strings(c.Do(\"ZPOPMAX\", collection, count))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t\treturn nil, err\n\t}\n\n\tfor i := 0; i < len(values); i += 2 {\n\t\tv := values[i]\n\t\tresults = append(results, v)\n\t}\n\n\treturn results, nil\n}\n\nfunc (client *Client) ZPopMin(collection string, count int) (results []string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tresults = []string{}\n\n\tvalues, err := redis.Strings(c.Do(\"ZPOPMIN\", collection, count))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t\treturn nil, err\n\t}\n\n\tfor i := 0; i < len(values); i += 2 {\n\t\tv := values[i]\n\t\tresults = append(results, v)\n\t}\n\n\treturn results, nil\n}\n\nfunc (client *Client) ZPopMaxOne(collection string) (value string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalues, err := client.ZPopMax(collection, 1)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif values == nil || len(values) == 0 {\n\t\treturn \"\", nil\n\t}\n\treturn values[0], nil\n}\n\nfunc (client *Client) ZPopMinOne(collection string) (value string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalues, err := client.ZPopMin(collection, 1)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif values == nil || len(values) == 0 {\n\t\treturn \"\", nil\n\t}\n\treturn values[0], nil\n}\n\nfunc (client *Client) BZPopMax(collection string, timeout int) (value string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalues, err := redis.Strings(c.Do(\"BZPOPMAX\", collection, timeout))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn \"\", trace.TraceError(err)\n\t\t}\n\t\treturn \"\", err\n\t}\n\tif len(values) < 3 {\n\t\treturn \"\", trace.TraceError(errors.ErrorRedisInvalidType)\n\t}\n\treturn values[1], nil\n}\n\nfunc (client *Client) BZPopMin(collection string, timeout int) (value string, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\n\tvalues, err := redis.Strings(c.Do(\"BZPOPMIN\", collection, timeout))\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn \"\", trace.TraceError(err)\n\t\t}\n\t\treturn \"\", err\n\t}\n\tif len(values) < 3 {\n\t\treturn \"\", trace.TraceError(errors.ErrorRedisInvalidType)\n\t}\n\treturn values[1], nil\n}\n\nfunc (client *Client) Lock(lockKey string) (value int64, err error) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\tlockKey = client.getLockKey(lockKey)\n\n\tts := time.Now().Unix()\n\tok, err := c.Do(\"SET\", lockKey, ts, \"NX\", \"PX\", 30000)\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn value, trace.TraceError(err)\n\t\t}\n\t\treturn value, err\n\t}\n\tif ok == nil {\n\t\treturn 0, trace.TraceError(errors.ErrorRedisLocked)\n\t}\n\treturn ts, nil\n}\n\nfunc (client *Client) UnLock(lockKey string, value int64) {\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\tlockKey = client.getLockKey(lockKey)\n\n\tgetValue, err := redis.Int64(c.Do(\"GET\", lockKey))\n\tif err != nil {\n\t\tlog.Errorf(\"get lockKey error: %s\", err.Error())\n\t\treturn\n\t}\n\n\tif getValue != value {\n\t\tlog.Errorf(\"the lockKey value diff: %d, %d\", value, getValue)\n\t\treturn\n\t}\n\n\tv, err := redis.Int64(c.Do(\"DEL\", lockKey))\n\tif err != nil {\n\t\tlog.Errorf(\"unlock failed, error: %s\", err.Error())\n\t\treturn\n\t}\n\n\tif v == 0 {\n\t\tlog.Errorf(\"unlock failed: key=%s\", lockKey)\n\t\treturn\n\t}\n}\n\nfunc (client *Client) MemoryStats() (stats map[string]int64, err error) {\n\tstats = map[string]int64{}\n\tc := client.pool.Get()\n\tdefer utils.Close(c)\n\tvalues, err := redis.Values(c.Do(\"MEMORY\", \"STATS\"))\n\tfor i, v := range values {\n\t\tt := reflect.TypeOf(v)\n\t\tif t.Kind() == reflect.Slice {\n\t\t\tvc, _ := redis.String(v, err)\n\t\t\tif utils.ContainsString(MemoryStatsMetrics, vc) {\n\t\t\t\tstats[vc], _ = redis.Int64(values[i+1], err)\n\t\t\t}\n\t\t}\n\t}\n\tif err != nil {\n\t\tif err != redis.ErrNil {\n\t\t\treturn stats, trace.TraceError(err)\n\t\t}\n\t\treturn stats, err\n\t}\n\treturn stats, nil\n}\n\nfunc (client *Client) SetBackoffMaxInterval(interval time.Duration) {\n\tclient.backoffMaxInterval = interval\n}\n\nfunc (client *Client) SetTimeout(timeout int) {\n\tclient.timeout = timeout\n}\n\nfunc (client *Client) init() (err error) {\n\tb := backoff.NewExponentialBackOff()\n\tb.MaxInterval = client.backoffMaxInterval\n\tif err := backoff.Retry(func() error {\n\t\terr := client.Ping()\n\t\tif err != nil {\n\t\t\tlog.WithError(err).Warnf(\"waiting for redis pool active connection. will after %f seconds try again.\", b.NextBackOff().Seconds())\n\t\t}\n\t\treturn nil\n\t}, b); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (client *Client) getLockKey(lockKey string) string {\n\tlockKey = strings.ReplaceAll(lockKey, \":\", \"-\")\n\treturn \"nodes:lock:\" + lockKey\n}\n\nfunc (client *Client) getTimeout(timeout int) (res int) {\n\tif timeout == 0 {\n\t\treturn client.timeout\n\t}\n\treturn timeout\n}\n\nvar client db.RedisClient\n\nfunc NewRedisClient(opts ...Option) (client *Client, err error) {\n\t// client\n\tclient = &Client{\n\t\tbackoffMaxInterval: 20 * time.Second,\n\t\tpool:               NewRedisPool(),\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(client)\n\t}\n\n\t// init\n\tif err := client.init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn client, nil\n}\n\nfunc GetRedisClient() (c db.RedisClient, err error) {\n\tif client != nil {\n\t\treturn client, nil\n\t}\n\tc, err = NewRedisClient()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn c, nil\n}\n"
  },
  {
    "path": "db/redis/constants.go",
    "content": "package redis\n\nvar MemoryStatsMetrics = []string{\n\t\"peak.allocated\",\n\t\"total.allocated\",\n\t\"startup.allocated\",\n\t\"overhead.total\",\n\t\"keys.count\",\n\t\"dataset.bytes\",\n}\n"
  },
  {
    "path": "db/redis/options.go",
    "content": "package redis\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db\"\n\t\"time\"\n)\n\ntype Option func(c db.RedisClient)\n\nfunc WithBackoffMaxInterval(interval time.Duration) Option {\n\treturn func(c db.RedisClient) {\n\t\tc.SetBackoffMaxInterval(interval)\n\t}\n}\n\nfunc WithTimeout(timeout int) Option {\n\treturn func(c db.RedisClient) {\n\t\tc.SetTimeout(timeout)\n\t}\n}\n"
  },
  {
    "path": "db/redis/pool.go",
    "content": "package redis\n\nimport (\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/gomodule/redigo/redis\"\n\t\"github.com/spf13/viper\"\n\t\"time\"\n)\n\nfunc NewRedisPool() *redis.Pool {\n\tvar address = viper.GetString(\"redis.address\")\n\tvar port = viper.GetString(\"redis.port\")\n\tvar database = viper.GetString(\"redis.database\")\n\tvar password = viper.GetString(\"redis.password\")\n\n\t// normalize params\n\tif address == \"\" {\n\t\taddress = \"localhost\"\n\t}\n\tif port == \"\" {\n\t\tport = \"6379\"\n\t}\n\tif database == \"\" {\n\t\tdatabase = \"1\"\n\t}\n\n\tvar url string\n\tif password == \"\" {\n\t\turl = \"redis://\" + address + \":\" + port + \"/\" + database\n\t} else {\n\t\turl = \"redis://x:\" + password + \"@\" + address + \":\" + port + \"/\" + database\n\t}\n\treturn &redis.Pool{\n\t\tDial: func() (conn redis.Conn, e error) {\n\t\t\treturn redis.DialURL(url,\n\t\t\t\tredis.DialConnectTimeout(time.Second*10),\n\t\t\t\tredis.DialReadTimeout(time.Second*600),\n\t\t\t\tredis.DialWriteTimeout(time.Second*10),\n\t\t\t)\n\t\t},\n\t\tTestOnBorrow: func(c redis.Conn, t time.Time) error {\n\t\t\tif time.Since(t) < time.Minute {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\t_, err := c.Do(\"PING\")\n\t\t\treturn trace.TraceError(err)\n\t\t},\n\t\tMaxIdle:         10,\n\t\tMaxActive:       0,\n\t\tIdleTimeout:     300 * time.Second,\n\t\tWait:            false,\n\t\tMaxConnLifetime: 0,\n\t}\n}\n"
  },
  {
    "path": "db/redis/test/base.go",
    "content": "package test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db\"\n\t\"github.com/crawlab-team/crawlab/db/redis\"\n\t\"testing\"\n)\n\nfunc init() {\n\tvar err error\n\tT, err = NewTest()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\ntype Test struct {\n\tclient          db.RedisClient\n\tTestCollection  string\n\tTestMessage     string\n\tTestMessages    []string\n\tTestMessagesMap map[string]string\n\tTestKeysAlpha   []string\n\tTestKeysBeta    []string\n\tTestLockKey     string\n}\n\nfunc (t *Test) Setup(t2 *testing.T) {\n\tt2.Cleanup(t.Cleanup)\n}\n\nfunc (t *Test) Cleanup() {\n\tkeys, _ := t.client.AllKeys()\n\tfor _, key := range keys {\n\t\t_ = t.client.Del(key)\n\t}\n}\n\nvar T *Test\n\nfunc NewTest() (t *Test, err error) {\n\t// test\n\tt = &Test{}\n\n\t// client\n\tt.client, err = redis.GetRedisClient()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// test collection\n\tt.TestCollection = \"test_collection\"\n\n\t// test message\n\tt.TestMessage = \"this is a test message\"\n\n\t// test messages\n\tt.TestMessages = []string{\n\t\t\"test message 1\",\n\t\t\"test message 2\",\n\t\t\"test message 3\",\n\t}\n\n\t// test messages map\n\tt.TestMessagesMap = map[string]string{\n\t\t\"test key 1\": \"test value 1\",\n\t\t\"test key 2\": \"test value 2\",\n\t\t\"test key 3\": \"test value 3\",\n\t}\n\n\t// test keys alpha\n\tt.TestKeysAlpha = []string{\n\t\t\"test key alpha 1\",\n\t\t\"test key alpha 2\",\n\t\t\"test key alpha 3\",\n\t}\n\n\t// test keys beta\n\tt.TestKeysBeta = []string{\n\t\t\"test key beta 1\",\n\t\t\"test key beta 2\",\n\t\t\"test key beta 3\",\n\t\t\"test key beta 4\",\n\t\t\"test key beta 5\",\n\t}\n\n\t// test lock key\n\tt.TestLockKey = \"test lock key\"\n\n\treturn t, nil\n}\n"
  },
  {
    "path": "db/redis/test/client_test.go",
    "content": "package test\n\nimport (\n\t\"github.com/crawlab-team/crawlab/db/redis\"\n\t\"github.com/stretchr/testify/require\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestRedisClient_Ping(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.client.Ping()\n\trequire.Nil(t, err)\n}\n\nfunc TestRedisClient_Get_Set(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.client.Set(T.TestCollection, T.TestMessage)\n\trequire.Nil(t, err)\n\n\tvalue, err := T.client.Get(T.TestCollection)\n\trequire.Nil(t, err)\n\trequire.Equal(t, T.TestMessage, value)\n}\n\nfunc TestRedisClient_Keys_AllKeys(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tfor _, key := range T.TestKeysAlpha {\n\t\terr = T.client.Set(key, key)\n\t\trequire.Nil(t, err)\n\t}\n\tfor _, key := range T.TestKeysBeta {\n\t\terr = T.client.Set(key, key)\n\t\trequire.Nil(t, err)\n\t}\n\n\tkeys, err := T.client.Keys(\"*alpha*\")\n\trequire.Nil(t, err)\n\trequire.Len(t, keys, len(T.TestKeysAlpha))\n\n\tkeys, err = T.client.Keys(\"*beta*\")\n\trequire.Nil(t, err)\n\trequire.Len(t, keys, len(T.TestKeysBeta))\n\n\tkeys, err = T.client.AllKeys()\n\trequire.Nil(t, err)\n\trequire.Len(t, keys, len(T.TestKeysAlpha)+len(T.TestKeysBeta))\n}\n\nfunc TestRedisClient_RPush_LPop_LLen(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tfor _, msg := range T.TestMessages {\n\t\terr = T.client.RPush(T.TestCollection, msg)\n\t\trequire.Nil(t, err)\n\t}\n\n\tn, err := T.client.LLen(T.TestCollection)\n\trequire.Nil(t, err)\n\trequire.Equal(t, len(T.TestMessages), n)\n\n\tvalue, err := T.client.LPop(T.TestCollection)\n\trequire.Nil(t, err)\n\trequire.Equal(t, T.TestMessages[0], value)\n}\n\nfunc TestRedisClient_LPush_RPop(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tfor _, msg := range T.TestMessages {\n\t\terr = T.client.LPush(T.TestCollection, msg)\n\t\trequire.Nil(t, err)\n\t}\n\n\tn, err := T.client.LLen(T.TestCollection)\n\trequire.Nil(t, err)\n\trequire.Equal(t, len(T.TestMessages), n)\n\n\tvalue, err := T.client.RPop(T.TestCollection)\n\trequire.Nil(t, err)\n\trequire.Equal(t, T.TestMessages[0], value)\n}\n\nfunc TestRedisClient_BRPop(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tisErr := true\n\tgo func(t *testing.T) {\n\t\tvalue, err := T.client.BRPop(T.TestCollection, 0)\n\t\trequire.Nil(t, err)\n\t\trequire.Equal(t, T.TestMessage, value)\n\t\tisErr = false\n\t}(t)\n\n\terr = T.client.LPush(T.TestCollection, T.TestMessage)\n\trequire.Nil(t, err)\n\ttime.Sleep(500 * time.Millisecond)\n\trequire.False(t, isErr)\n}\n\nfunc TestRedisClient_BLPop(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tisErr := true\n\tgo func(t *testing.T) {\n\t\tvalue, err := T.client.BLPop(T.TestCollection, 0)\n\t\trequire.Nil(t, err)\n\t\trequire.Equal(t, T.TestMessage, value)\n\t\tisErr = false\n\t}(t)\n\n\terr = T.client.RPush(T.TestCollection, T.TestMessage)\n\trequire.Nil(t, err)\n\ttime.Sleep(500 * time.Millisecond)\n\trequire.False(t, isErr)\n}\n\nfunc TestRedisClient_HSet_HGet_HDel(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tfor k, v := range T.TestMessagesMap {\n\t\terr = T.client.HSet(T.TestCollection, k, v)\n\t\trequire.Nil(t, err)\n\t}\n\n\tfor k, v := range T.TestMessagesMap {\n\t\tvr, err := T.client.HGet(T.TestCollection, k)\n\t\trequire.Nil(t, err)\n\t\trequire.Equal(t, v, vr)\n\t}\n\n\tfor k := range T.TestMessagesMap {\n\t\terr = T.client.HDel(T.TestCollection, k)\n\t\trequire.Nil(t, err)\n\n\t\tv, err := T.client.HGet(T.TestCollection, k)\n\t\trequire.Nil(t, err)\n\t\trequire.Empty(t, v)\n\t}\n}\n\nfunc TestRedisClient_HScan(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tfor k, v := range T.TestMessagesMap {\n\t\terr = T.client.HSet(T.TestCollection, k, v)\n\t\trequire.Nil(t, err)\n\t}\n\n\tresults, err := T.client.HScan(T.TestCollection)\n\trequire.Nil(t, err)\n\n\tfor k, vr := range results {\n\t\tv, ok := T.TestMessagesMap[k]\n\t\trequire.True(t, ok)\n\t\trequire.Equal(t, v, vr)\n\t}\n}\n\nfunc TestRedisClient_HKeys(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tfor k, v := range T.TestMessagesMap {\n\t\terr = T.client.HSet(T.TestCollection, k, v)\n\t\trequire.Nil(t, err)\n\t}\n\n\tkeys, err := T.client.HKeys(T.TestCollection)\n\trequire.Nil(t, err)\n\n\tfor _, k := range keys {\n\t\t_, ok := T.TestMessagesMap[k]\n\t\trequire.True(t, ok)\n\t}\n}\n\nfunc TestRedisClient_ZAdd_ZCount_ZCountAll_ZPopMax_ZPopMin(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tfor i, v := range T.TestMessages {\n\t\tscore := float32(i)\n\t\terr = T.client.ZAdd(T.TestCollection, score, v)\n\t\trequire.Nil(t, err)\n\t}\n\n\tcount, err := T.client.ZCountAll(T.TestCollection)\n\trequire.Nil(t, err)\n\trequire.Equal(t, len(T.TestMessages), count)\n\n\tvalue, err := T.client.ZPopMaxOne(T.TestCollection)\n\trequire.Nil(t, err)\n\trequire.Equal(t, T.TestMessages[len(T.TestMessages)-1], value)\n\n\tvalue, err = T.client.ZPopMinOne(T.TestCollection)\n\trequire.Nil(t, err)\n\trequire.Equal(t, T.TestMessages[0], value)\n}\n\nfunc TestRedisClient_BZPopMax_BZPopMin(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tisErr := true\n\tgo func(t *testing.T) {\n\t\tvalue, err := T.client.BZPopMax(T.TestCollection, 0)\n\t\trequire.Nil(t, err)\n\t\trequire.Equal(t, T.TestMessage, value)\n\t\tisErr = false\n\t}(t)\n\n\terr = T.client.ZAdd(T.TestCollection, 1, T.TestMessage)\n\trequire.Nil(t, err)\n\ttime.Sleep(500 * time.Millisecond)\n\trequire.False(t, isErr)\n\n\tisErr = true\n\tgo func(t *testing.T) {\n\t\tvalue, err := T.client.BZPopMin(T.TestCollection, 0)\n\t\trequire.Nil(t, err)\n\t\trequire.Equal(t, T.TestMessage, value)\n\t\tisErr = false\n\t}(t)\n\n\terr = T.client.ZAdd(T.TestCollection, 1, T.TestMessage)\n\trequire.Nil(t, err)\n\ttime.Sleep(500 * time.Millisecond)\n\trequire.False(t, isErr)\n}\n\nfunc TestRedisClient_Lock_Unlock(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tts, err := T.client.Lock(T.TestLockKey)\n\trequire.Nil(t, err)\n\n\t_, err = T.client.Lock(T.TestLockKey)\n\trequire.NotNil(t, err)\n\n\tT.client.UnLock(T.TestLockKey, ts)\n\n\tts, err = T.client.Lock(T.TestLockKey)\n\trequire.Nil(t, err)\n\n}\n\nfunc TestRedisClient_MemoryStats(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tstats, err := T.client.MemoryStats()\n\trequire.Nil(t, err)\n\n\tfor _, k := range redis.MemoryStatsMetrics {\n\t\tv, ok := stats[k]\n\t\trequire.True(t, ok)\n\t\trequire.Greater(t, v, int64(-1))\n\t}\n}\n"
  },
  {
    "path": "db/sql/sql.go",
    "content": "package sql\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/jmoiron/sqlx\"\n)\n\nfunc GetSqlDatabaseConnectionString(dataSourceType string, host string, port string, username string, password string, database string) (connStr string, err error) {\n\tif dataSourceType == \"mysql\" {\n\t\tconnStr = fmt.Sprintf(\"%s:%s@(%s:%s)/%s?charset=utf8&parseTime=True&loc=Local\", username, password, host, port, database)\n\t} else if dataSourceType == \"postgres\" {\n\t\tconnStr = fmt.Sprintf(\"host=%s port=%s user=%s dbname=%s password=%s sslmode=%s\", host, port, username, database, password, \"disable\")\n\t} else {\n\t\terr = errors.New(dataSourceType + \" is not implemented\")\n\t\treturn connStr, trace.TraceError(err)\n\t}\n\treturn connStr, nil\n}\n\nfunc GetSqlConn(dataSourceType string, host string, port string, username string, password string, database string) (db *sqlx.DB, err error) {\n\t// get database connection string\n\tconnStr, err := GetSqlDatabaseConnectionString(dataSourceType, host, port, username, password, database)\n\tif err != nil {\n\t\treturn db, trace.TraceError(err)\n\t}\n\n\t// get database instance\n\tdb, err = sqlx.Open(dataSourceType, connStr)\n\tif err != nil {\n\t\treturn db, trace.TraceError(err)\n\t}\n\n\treturn db, nil\n}\n"
  },
  {
    "path": "db/utils/utils.go",
    "content": "package utils\n\nimport \"io\"\n\nfunc Close(c io.Closer) {\n\terr := c.Close()\n\tif err != nil {\n\t\t//log.WithError(err).Error(\"关闭资源文件失败。\")\n\t}\n}\n\nfunc ContainsString(list []string, item string) bool {\n\tfor _, d := range list {\n\t\tif d == item {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "devops/develop/crawlab-master.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: crawlab\n  namespace: crawlab-develop\nspec:\n  ports:\n  - port: 8080\n    targetPort: 8080\n    nodePort: 30108\n  selector:\n    app: crawlab-master\n  type: NodePort\n---\napiVersion: apps/v1\nkind: StatefulSet\nmetadata:\n  name: crawlab-master\n  namespace: crawlab-develop\nspec:\n  serviceName: crawlab-master\n  selector:\n    matchLabels:\n      app: crawlab-master\n  template:\n    metadata:\n      labels:\n        app: crawlab-master\n    spec:\n      containers:\n      - image: tikazyq/crawlab:develop\n        imagePullPolicy: Always\n        name: crawlab\n        env:\n        - name: CRAWLAB_SERVER_MASTER\n          value: \"Y\"\n        - name: CRAWLAB_MONGO_HOST\n          value: \"mongo\"\n        - name: CRAWLAB_REDIS_ADDRESS\n          value: \"redis\"\n        - name: CRAWLAB_SETTING_ALLOWREGISTER\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_LANG_NODE\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_JAVA\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_DOTNET\n          value: \"N\"\n        - name: CRAWLAB_SERVER_REGISTER_TYPE\n          value: \"hostname\"\n        ports:\n        - containerPort: 8080\n          name: crawlab"
  },
  {
    "path": "devops/develop/crawlab-worker.yaml",
    "content": "apiVersion: apps/v1\nkind: StatefulSet\nmetadata:\n  name: crawlab-worker\n  namespace: crawlab-develop\nspec:\n  serviceName: crawlab-worker\n  replicas: 2\n  selector:\n    matchLabels:\n      app: crawlab-worker\n  template:\n    metadata:\n      labels:\n        app: crawlab-worker\n    spec:\n      containers:\n      - image: tikazyq/crawlab:develop\n        imagePullPolicy: Always\n        name: crawlab\n        env:\n        - name: CRAWLAB_SERVER_MASTER\n          value: \"N\"\n        - name: CRAWLAB_MONGO_HOST\n          value: \"mongo\"\n        - name: CRAWLAB_REDIS_ADDRESS\n          value: \"redis\"\n        - name: CRAWLAB_SERVER_LANG_NODE\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_JAVA\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_DOTNET\n          value: \"N\"\n        - name: CRAWLAB_SERVER_REGISTER_TYPE\n          value: \"hostname\"\n"
  },
  {
    "path": "devops/develop/mongo-pv.yaml",
    "content": "apiVersion: v1\nkind: PersistentVolume\nmetadata:\n  name: mongo-pv-volume-develop\n  namespace: crawlab-develop\n  labels:\n    type: local\nspec:\n  storageClassName: manual\n  capacity:\n    storage: 2Gi\n  accessModes:\n    - ReadWriteOnce\n  hostPath:\n    path: \"/data/crawlab-develop/mongodb/data\"\n---\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: mongo-pv-claim-develop\n  namespace: crawlab-develop\nspec:\n  storageClassName: manual\n  accessModes:\n    - ReadWriteOnce\n  resources:\n    requests:\n      storage: 2Gi"
  },
  {
    "path": "devops/develop/mongo.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: mongo\n  namespace: crawlab-develop\nspec:\n  ports:\n  - port: 27017\n  selector:\n    app: mongo\n  clusterIP: None\n---\napiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2\nkind: Deployment\nmetadata:\n  name: mongo\n  namespace: crawlab-develop\nspec:\n  selector:\n    matchLabels:\n      app: mongo\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app: mongo\n    spec:\n      containers:\n      - image: mongo:4\n        name: mongo\n        ports:\n        - containerPort: 27017\n          name: mongo\n        volumeMounts:\n        - name: mongo-persistent-storage\n          mountPath: /data/db\n      volumes:\n      - name: mongo-persistent-storage\n        persistentVolumeClaim:\n          claimName: mongo-pv-claim-develop"
  },
  {
    "path": "devops/develop/ns.yaml",
    "content": "apiVersion: v1\nkind: Namespace\nmetadata:\n  name: crawlab-develop"
  },
  {
    "path": "devops/develop/redis.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: redis\n  namespace: crawlab-develop\nspec:\n  ports:\n  - port: 6379\n  selector:\n    app: redis\n  clusterIP: None\n---\napiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2\nkind: Deployment\nmetadata:\n  name: redis\n  namespace: crawlab-develop\nspec:\n  selector:\n    matchLabels:\n      app: redis\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app: redis\n    spec:\n      containers:\n      - image: redis\n        name: redis\n        ports:\n        - containerPort: 6379\n          name: redis"
  },
  {
    "path": "devops/master/crawlab-master.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: crawlab\n  namespace: crawlab\nspec:\n  ports:\n  - port: 8080\n    targetPort: 8080\n    nodePort: 30088\n  selector:\n    app: crawlab-master\n  type: NodePort\n---\napiVersion: apps/v1\nkind: StatefulSet\nmetadata:\n  name: crawlab-master\n  namespace: crawlab\nspec:\n  serviceName: crawlab-master\n  selector:\n    matchLabels:\n      app: crawlab-master\n  template:\n    metadata:\n      labels:\n        app: crawlab-master\n    spec:\n      containers:\n      - image: tikazyq/crawlab:latest\n        imagePullPolicy: Always\n        name: crawlab\n        env:\n        - name: CRAWLAB_SERVER_MASTER\n          value: \"Y\"\n        - name: CRAWLAB_MONGO_HOST\n          value: \"mongo\"\n        - name: CRAWLAB_REDIS_ADDRESS\n          value: \"redis\"\n        - name: CRAWLAB_SERVER_LANG_NODE\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_JAVA\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_DOTNET\n          value: \"N\"\n        - name: CRAWLAB_SERVER_REGISTER_TYPE\n          value: \"hostname\"\n        - name: CRAWLAB_SETTING_ALLOWREGISTER\n          value: \"Y\"\n        - name: CRAWLAB_SETTING_ENABLETUTORIAL\n          value: \"Y\"\n        - name: CRAWLAB_SETTING_DEMOSPIDERS\n          value: \"Y\"\n        ports:\n        - containerPort: 8080\n          name: crawlab"
  },
  {
    "path": "devops/master/crawlab-worker.yaml",
    "content": "apiVersion: apps/v1\nkind: StatefulSet\nmetadata:\n  name: crawlab-worker\n  namespace: crawlab\nspec:\n  serviceName: crawlab-worker\n  replicas: 2\n  selector:\n    matchLabels:\n      app: crawlab-worker\n  template:\n    metadata:\n      labels:\n        app: crawlab-worker\n    spec:\n      containers:\n      - image: tikazyq/crawlab:latest\n        imagePullPolicy: Always\n        name: crawlab\n        env:\n        - name: CRAWLAB_SERVER_MASTER\n          value: \"N\"\n        - name: CRAWLAB_MONGO_HOST\n          value: \"mongo\"\n        - name: CRAWLAB_REDIS_ADDRESS\n          value: \"redis\"\n        - name: CRAWLAB_SERVER_LANG_NODE\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_LANG_JAVA\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_LANG_DOTNET\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_REGISTER_TYPE\n          value: \"hostname\"\n"
  },
  {
    "path": "devops/master/mongo-pv.yaml",
    "content": "apiVersion: v1\nkind: PersistentVolume\nmetadata:\n  name: mongo-pv-volume\n  namespace: crawlab\n  labels:\n    type: local\nspec:\n  storageClassName: manual\n  capacity:\n    storage: 3Gi\n  accessModes:\n    - ReadWriteOnce\n  hostPath:\n    path: \"/data/k8s/mongodb/data\"\n---\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: mongo-pv-claim\n  namespace: crawlab\nspec:\n  storageClassName: manual\n  accessModes:\n    - ReadWriteOnce\n  resources:\n    requests:\n      storage: 3Gi"
  },
  {
    "path": "devops/master/mongo.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: mongo\n  namespace: crawlab\nspec:\n  ports:\n  - port: 27017\n  selector:\n    app: mongo\n  clusterIP: None\n---\napiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2\nkind: Deployment\nmetadata:\n  name: mongo\n  namespace: crawlab\nspec:\n  selector:\n    matchLabels:\n      app: mongo\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app: mongo\n    spec:\n      containers:\n      - image: mongo:4\n        name: mongo\n        ports:\n        - containerPort: 27017\n          name: mongo\n        volumeMounts:\n        - name: mongo-persistent-storage\n          mountPath: /data/db\n      volumes:\n      - name: mongo-persistent-storage\n        persistentVolumeClaim:\n          claimName: mongo-pv-claim"
  },
  {
    "path": "devops/master/ns.yaml",
    "content": "apiVersion: v1\nkind: Namespace\nmetadata:\n  name: crawlab"
  },
  {
    "path": "devops/master/redis.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: redis\n  namespace: crawlab\nspec:\n  ports:\n  - port: 6379\n  selector:\n    app: redis\n  clusterIP: None\n---\napiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2\nkind: Deployment\nmetadata:\n  name: redis\n  namespace: crawlab\nspec:\n  selector:\n    matchLabels:\n      app: redis\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app: redis\n    spec:\n      containers:\n      - image: redis\n        name: redis\n        ports:\n        - containerPort: 6379\n          name: redis"
  },
  {
    "path": "devops/release/crawlab-master.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: crawlab\n  namespace: crawlab-release\nspec:\n  ports:\n  - port: 8080\n    targetPort: 8080\n    nodePort: 30098\n  selector:\n    app: crawlab-master\n  type: NodePort\n---\napiVersion: apps/v1\nkind: StatefulSet\nmetadata:\n  name: crawlab-master\n  namespace: crawlab-release\nspec:\n  serviceName: crawlab-master\n  selector:\n    matchLabels:\n      app: crawlab-master\n  template:\n    metadata:\n      labels:\n        app: crawlab-master\n    spec:\n      containers:\n      - image: tikazyq/crawlab:release\n        imagePullPolicy: Always\n        name: crawlab\n        env:\n        - name: CRAWLAB_SERVER_MASTER\n          value: \"Y\"\n        - name: CRAWLAB_MONGO_HOST\n          value: \"mongo\"\n        - name: CRAWLAB_REDIS_ADDRESS\n          value: \"redis\"\n        - name: CRAWLAB_SETTING_ALLOWREGISTER\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_LANG_NODE\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_JAVA\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_DOTNET\n          value: \"N\"\n        - name: CRAWLAB_SERVER_REGISTER_TYPE\n          value: \"hostname\"\n        ports:\n        - containerPort: 8080\n          name: crawlab"
  },
  {
    "path": "devops/release/crawlab-worker.yaml",
    "content": "apiVersion: apps/v1\nkind: StatefulSet\nmetadata:\n  name: crawlab-worker\n  namespace: crawlab-release\nspec:\n  serviceName: crawlab-worker\n  replicas: 2\n  selector:\n    matchLabels:\n      app: crawlab-worker\n  template:\n    metadata:\n      labels:\n        app: crawlab-worker\n    spec:\n      containers:\n      - image: tikazyq/crawlab:release\n        imagePullPolicy: Always\n        name: crawlab\n        env:\n        - name: CRAWLAB_SERVER_MASTER\n          value: \"N\"\n        - name: CRAWLAB_MONGO_HOST\n          value: \"mongo\"\n        - name: CRAWLAB_REDIS_ADDRESS\n          value: \"redis\"\n        - name: CRAWLAB_SERVER_LANG_NODE\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_JAVA\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_DOTNET\n          value: \"N\"\n        - name: CRAWLAB_SERVER_REGISTER_TYPE\n          value: \"hostname\"\n"
  },
  {
    "path": "devops/release/mongo-pv.yaml",
    "content": "apiVersion: v1\nkind: PersistentVolume\nmetadata:\n  name: mongo-pv-volume-release\n  namespace: crawlab-release\n  labels:\n    type: local\nspec:\n  storageClassName: manual\n  capacity:\n    storage: 5Gi\n  accessModes:\n    - ReadWriteOnce\n  hostPath:\n    path: \"/data/crawlab-release/mongodb/data\"\n---\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: mongo-pv-claim-release\n  namespace: crawlab-release\nspec:\n  storageClassName: manual\n  accessModes:\n    - ReadWriteOnce\n  resources:\n    requests:\n      storage: 5Gi"
  },
  {
    "path": "devops/release/mongo.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: mongo\n  namespace: crawlab-release\nspec:\n  ports:\n  - port: 27017\n  selector:\n    app: mongo\n  clusterIP: None\n---\napiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2\nkind: Deployment\nmetadata:\n  name: mongo\n  namespace: crawlab-release\nspec:\n  selector:\n    matchLabels:\n      app: mongo\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app: mongo\n    spec:\n      containers:\n      - image: mongo:4\n        name: mongo\n        ports:\n        - containerPort: 27017\n          name: mongo\n        volumeMounts:\n        - name: mongo-persistent-storage\n          mountPath: /data/db\n      volumes:\n      - name: mongo-persistent-storage\n        persistentVolumeClaim:\n          claimName: mongo-pv-claim-release"
  },
  {
    "path": "devops/release/ns.yaml",
    "content": "apiVersion: v1\nkind: Namespace\nmetadata:\n  name: crawlab-release"
  },
  {
    "path": "devops/release/redis.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: redis\n  namespace: crawlab-release\nspec:\n  ports:\n  - port: 6379\n  selector:\n    app: redis\n  clusterIP: None\n---\napiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2\nkind: Deployment\nmetadata:\n  name: redis\n  namespace: crawlab-release\nspec:\n  selector:\n    matchLabels:\n      app: redis\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app: redis\n    spec:\n      containers:\n      - image: redis\n        name: redis\n        ports:\n        - containerPort: 6379\n          name: redis"
  },
  {
    "path": "docker-compose.yml",
    "content": "version: '3.3'\nservices:\n  master:\n    image: crawlabteam/crawlab\n    container_name: crawlab_master\n    environment:\n      CRAWLAB_NODE_MASTER: \"Y\"\n      CRAWLAB_MONGO_HOST: \"mongo\"\n    ports:\n      - \"8080:8080\"\n    depends_on:\n      - mongo\n  mongo:\n    image: mongo:4.2\n"
  },
  {
    "path": "docs/config.md",
    "content": "# Config\n\n#### Environment Variable List\n\nName | Description | Example | Default\n---|--- | --- | ---\nCRAWLAB_GRPC_ADDRESS| Target gRPC address the nodes are connecting to | 192.168.0.1:9666 | localhost:9666\nCRAWLAB_GRPC_SERVER_ADDRESS| Address that the gRPC server is listening to (master node only) | 0.0.0.0:9666 | 0.0.0.0:9666\nCRAWLAB_GRPC_AUTHKEY| The token that gRPC clients and server use for authentication | youcanneverguess | Crawlab2021!\nCRAWLAB_NODE_MASTER | Whether the current node is a master or worker node (Y: master; N: worker) | Y | Y\nCRAWLAB_SERVER_HOST | IP host that the API listens to (master node only) | 0.0.0.0 | 0.0.0.0\nCRAWLAB_SERVER_PORT | IP port that the API listens to (master node only) | 8000 | 8000\nCRAWLAB_TASK_HANDLER_MAXRUNNERS | Max number of task runners (concurrent spider tasks) that a node can run | 16 | 8\nCRAWLAB_FS_FILER_PROXY |Filer API endpoint that Crawlab's filer proxy links to |http://filer-server:8888 | http://localhost:8888\nCRAWLAB_FS_FILER_URL |Crawlab's Filer API endpoint |http://crawlab-web-api:8000/filer | http://localhost:8000/filer\nCRAWLAB_FS_FILER_AUTHKEY |Crawlab's Filer API auth key token | youcanneverguess | Crawlab2021!\n\n"
  },
  {
    "path": "frontend/.editorconfig",
    "content": "root = true\n\n[*]\ntab_width = 2\n# charset = utf-8\n# end_of_line = lf\n# indent_size = 4\n# indent_style = space\n# insert_final_newline = true\n# max_line_length = 120\n# tab_width = 4\n# trim_trailing_whitespace = true\n\n[*.ts]\nindent_size = 2\n\n[*.scss]\nindent_size = 2\n\n[{*.ats, *.ts}]\n# indent_size = 2\n# tab_width = 2\n\n[{*.js, *.cjs}]\n# indent_size = 2\n# tab_width = 2\n\n[{*.sht, *.html, *.shtm, *.shtml, *.htm, *.ng}]\n# indent_size = 2\n# tab_width = 2\n\n[{.analysis_options, *.yml, *.yaml}]\n# indent_size = 2\n\n[{.babelrc, .prettierrc, .stylelintrc, .eslintrc, jest.config, *.json, *.jsb3, *.jsb2, *.bowerrc}]\n# indent_size = 2\n\n[vue.config.js]\nindent_size = 2\ntab_width = 2\n"
  },
  {
    "path": "frontend/.eslintignore",
    "content": "./src/i18n/**/*.ts\n*/**/*.js\n*.js\n"
  },
  {
    "path": "frontend/.eslintrc.js",
    "content": "module.exports = {\n  root: true,\n  env: {\n    node: true\n  },\n  'extends': [\n    'plugin:vue/vue3-essential',\n    'eslint:recommended',\n    '@vue/typescript/recommended'\n  ],\n  parserOptions: {\n    ecmaVersion: 2020\n  },\n  rules: {\n    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    '@typescript-eslint/no-explicit-any': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n    '@typescript-eslint/camelcase': process.env.NODE_ENV === 'production' ? 'warn' : 'off',\n  }\n}\n"
  },
  {
    "path": "frontend/.gitignore",
    "content": ".DS_Store\nnode_modules\n/dist\n\n\n# local env files\n.env.local\n.env.*.local\n\n# Log files\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\n\n# Editor directories and files\n.idea\n.vscode\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n\ntmp/\nlib/\n**/.DS_Store\n**/.idea\n**/dist\n**/node_modules\n**/package-lock.json\n\nstats.html"
  },
  {
    "path": "frontend/.npmrc",
    "content": "registry=https://registry.npmjs.org\n"
  },
  {
    "path": "frontend/Dockerfile",
    "content": "FROM node:14 AS build\n\nADD . /app\nWORKDIR /app\nRUN rm /app/.npmrc\n\n# install frontend\nRUN npm i -g pnpm@7\nRUN pnpm install\nRUN pnpm run build\n\nFROM alpine:3.14\n\n# copy files\nCOPY --from=build /app/dist /app/dist\n"
  },
  {
    "path": "frontend/babel.config.js",
    "content": "module.exports = {\n  presets: [\n    '@vue/cli-plugin-babel/preset',\n    '@babel/preset-typescript'\n  ]\n}\n"
  },
  {
    "path": "frontend/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta content=\"IE=edge\" http-equiv=\"X-UA-Compatible\">\n    <meta content=\"width=device-width,initial-scale=1.0\" name=\"viewport\">\n    <link href=\"favicon.ico\" rel=\"icon\">\n    <title>Crawlab</title>\n\n    <!--externals-->\n    <link href=\"https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.css\" rel=\"stylesheet\">\n\n    <script src=\"js/vue3-sfc-loader.js\"></script>\n    <script src=\"js/login-canvas.js\"></script>\n    <style>\n        #loading-placeholder {\n            position: fixed;\n            background: white;\n            z-index: -1;\n            top: 0;\n            left: 0;\n            width: 100vw;\n            height: 100vh;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n        }\n\n        #loading-placeholder .title-wrapper {\n            height: 54px;\n        }\n\n        #loading-placeholder .title {\n            font-family: \"Verdana\", serif;\n            font-weight: 600;\n            font-size: 48px;\n            color: #409EFF;\n            text-align: center;\n            cursor: default;\n            letter-spacing: -5px;\n            margin: 0;\n        }\n\n        #loading-placeholder .title > span {\n            display: inline-block;\n            animation: change-shape 1s infinite;\n        }\n\n        #loading-placeholder .title > span:nth-child(1) {\n            animation-delay: calc(1s / 7 * 0 / 2);\n        }\n\n        #loading-placeholder .title > span:nth-child(2) {\n            animation-delay: calc(1s / 7 * 1 / 2);\n        }\n\n        #loading-placeholder .title > span:nth-child(3) {\n            animation-delay: calc(1s / 7 * 2 / 2);\n        }\n\n        #loading-placeholder .title > span:nth-child(4) {\n            animation-delay: calc(1s / 7 * 3 / 2);\n        }\n\n        #loading-placeholder .title > span:nth-child(5) {\n            animation-delay: calc(1s / 7 * 4 / 2);\n        }\n\n        #loading-placeholder .title > span:nth-child(6) {\n            animation-delay: calc(1s / 7 * 5 / 2);\n        }\n\n        #loading-placeholder .title > span:nth-child(7) {\n            animation-delay: calc(1s / 7 * 6 / 2);\n        }\n\n        #loading-placeholder .sub-title-wrapper {\n            position: relative;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            margin-bottom: 10px;\n            height: 28px;\n        }\n\n        #loading-placeholder .sub-title-wrapper .sub-title {\n            position: absolute;\n            font-size: 18px;\n            font-weight: 300;\n            font-family: \"Verdana\", serif;\n            font-style: italic;\n            color: #67C23A;\n            transform: rotate3d(1, 0, 0, 90deg);\n            animation: flip 20s infinite;\n            /*color: #E6A23C;*/\n            /*color: #F56C6C;*/\n        }\n\n        #loading-placeholder .sub-title-wrapper > .sub-title:nth-child(1) {\n            animation-delay: calc(20s / 4 * 0);\n        }\n\n        #loading-placeholder .sub-title-wrapper > .sub-title:nth-child(2) {\n            animation-delay: calc(20s / 4 * 1);\n        }\n\n        #loading-placeholder .sub-title-wrapper > .sub-title:nth-child(3) {\n            animation-delay: calc(20s / 4 * 2);\n        }\n\n        #loading-placeholder .sub-title-wrapper > .sub-title:nth-child(4) {\n            animation-delay: calc(20s / 4 * 3);\n        }\n\n        #loading-placeholder .loading-text {\n            text-align: center;\n            font-weight: bolder;\n            font-family: \"Verdana\", serif;\n            font-style: italic;\n            color: #889aa4;\n            font-size: 14px;\n            animation: blink-loading 2s ease-in infinite;\n        }\n\n        @keyframes blink-loading {\n            0% {\n                opacity: 100%;\n            }\n\n            50% {\n                opacity: 50%;\n            }\n\n            100% {\n                opacity: 100%;\n            }\n        }\n\n        @keyframes change-shape {\n            0% {\n                transform: scale(1);\n            }\n\n            25% {\n                transform: scale(1.2);\n            }\n\n            50% {\n                transform: scale(1);\n            }\n\n            100% {\n                transform: scale(1);\n            }\n        }\n\n        @keyframes flip {\n            0% {\n                transform: rotate3d(1, 0, 0, 90deg);\n            }\n\n            2% {\n                transform: rotate3d(1, 0, 0, 90deg);\n            }\n\n            7% {\n                transform: rotate3d(1, 0, 0, 0);\n            }\n\n            23% {\n                transform: rotate3d(1, 0, 0, 0);\n            }\n\n            27% {\n                transform: rotate3d(1, 0, 0, 90deg);\n            }\n\n            50% {\n                transform: rotate3d(1, 0, 0, 90deg);\n            }\n\n            100% {\n                transform: rotate3d(1, 0, 0, 90deg);\n            }\n        }\n    </style>\n</head>\n<body>\n<noscript>\n    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.\n        Please enable it to continue.</strong>\n</noscript>\n<div id=\"loading-placeholder\">\n    <div style=\"margin-bottom: 150px\">\n        <div class=\"title-wrapper\">\n            <h3 class=\"title\">\n                <span>C</span>\n                <span>R</span>\n                <span>A</span>\n                <span>W</span>\n                <span>L</span>\n                <span>A</span>\n                <span>B</span>\n            </h3>\n        </div>\n        <div class=\"sub-title-wrapper\">\n            <span class=\"sub-title\"><i class=\"fa fa-cloud-download\"></i> Easy Crawling</span>\n            <span class=\"sub-title\"><i class=\"fa fa-diamond\"></i> Better Management</span>\n            <span class=\"sub-title\"><i class=\"fa fa-dollar\"></i> Gain Data Value</span>\n            <span class=\"sub-title\"><i class=\"fa fa-server\"></i> Good Scalability</span>\n        </div>\n        <div class=\"loading-text\">\n            Loading...\n        </div>\n    </div>\n</div>\n<div id=\"app\"></div>\n<script type=\"module\" src=\"/src/main.ts\"></script>\n<!-- built files will be auto injected -->\n</body>\n</html>\n"
  },
  {
    "path": "frontend/jest.config.ts",
    "content": "/*\n * For a detailed explanation regarding each configuration property and type check, visit:\n * https://jestjs.io/docs/en/configuration.html\n */\n\nexport default {\n  // All imported modules in your tests should be mocked automatically\n  // automock: false,\n\n  // Stop running tests after `n` failures\n  // bail: 0,\n\n  // The directory where Jest should store its cached dependency information\n  // cacheDirectory: \"/private/var/folders/r0/jl9gx1m97tb2qpggj961z3n40000gn/T/jest_dx\",\n\n  // Automatically clear mock calls and instances between every test\n  clearMocks: true,\n\n  // Indicates whether the coverage information should be collected while executing the test\n  // collectCoverage: false,\n\n  // An array of glob patterns indicating a set of files for which coverage information should be collected\n  // collectCoverageFrom: undefined,\n\n  // The directory where Jest should output its coverage files\n  coverageDirectory: 'coverage',\n\n  // An array of regexp pattern strings used to skip coverage collection\n  // coveragePathIgnorePatterns: [\n  //   \"/node_modules/\"\n  // ],\n\n  // Indicates which provider should be used to instrument code for coverage\n  coverageProvider: 'v8',\n\n  // A list of reporter names that Jest uses when writing coverage reports\n  // coverageReporters: [\n  //   \"json\",\n  //   \"text\",\n  //   \"lcov\",\n  //   \"clover\"\n  // ],\n\n  // An object that configures minimum threshold enforcement for coverage results\n  // coverageThreshold: undefined,\n\n  // A path to a custom dependency extractor\n  // dependencyExtractor: undefined,\n\n  // Make calling deprecated APIs throw helpful error messages\n  // errorOnDeprecated: false,\n\n  // Force coverage collection from ignored files using an array of glob patterns\n  // forceCoverageMatch: [],\n\n  // A path to a module which exports an async function that is triggered once before all test suites\n  // globalSetup: undefined,\n\n  // A path to a module which exports an async function that is triggered once after all test suites\n  // globalTeardown: undefined,\n\n  // A set of global variables that need to be available in all test environments\n  // globals: {},\n\n  // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.\n  // maxWorkers: \"50%\",\n\n  // An array of directory names to be searched recursively up from the requiring module's location\n  // moduleDirectories: [\n  //   \"node_modules\"\n  // ],\n\n  // An array of file extensions your modules use\n  // moduleFileExtensions: [\n  //   \"js\",\n  //   \"json\",\n  //   \"jsx\",\n  //   \"ts\",\n  //   \"tsx\",\n  //   \"node\"\n  // ],\n\n  // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module\n  // moduleNameMapper: {},\n\n  // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader\n  // modulePathIgnorePatterns: [],\n\n  // Activates notifications for test results\n  // notify: false,\n\n  // An enum that specifies notification mode. Requires { notify: true }\n  // notifyMode: \"failure-change\",\n\n  // A preset that is used as a base for Jest's configuration\n  // preset: undefined,\n\n  // Run tests from one or more projects\n  // projects: undefined,\n\n  // Use this configuration option to add custom reporters to Jest\n  // reporters: undefined,\n\n  // Automatically reset mock state between every test\n  // resetMocks: false,\n\n  // Reset the module registry before running each individual test\n  // resetModules: false,\n\n  // A path to a custom resolver\n  // resolver: undefined,\n\n  // Automatically restore mock state between every test\n  // restoreMocks: false,\n\n  // The root directory that Jest should scan for tests and modules within\n  // rootDir: undefined,\n\n  // A list of paths to directories that Jest should use to search for files in\n  // roots: [\n  //   \"<rootDir>\"\n  // ],\n\n  // Allows you to use a custom runner instead of Jest's default test runner\n  // runner: \"jest-runner\",\n\n  // The paths to modules that run some code to configure or set up the testing environment before each test\n  // setupFiles: [],\n\n  // A list of paths to modules that run some code to configure or set up the testing framework before each test\n  // setupFilesAfterEnv: [],\n\n  // The number of seconds after which a test is considered as slow and reported as such in the results.\n  // slowTestThreshold: 5,\n\n  // A list of paths to snapshot serializer modules Jest should use for snapshot testing\n  // snapshotSerializers: [],\n\n  // The test environment that will be used for testing\n  testEnvironment: 'node',\n\n  // Options that will be passed to the testEnvironment\n  // testEnvironmentOptions: {},\n\n  // Adds a location field to test results\n  // testLocationInResults: false,\n\n  // The glob patterns Jest uses to detect test files\n  // testMatch: [\n  //   \"**/__tests__/**/*.[jt]s?(x)\",\n  //   \"**/?(*.)+(spec|test).[tj]s?(x)\"\n  // ],\n\n  // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped\n  // testPathIgnorePatterns: [\n  //   \"/node_modules/\"\n  // ],\n\n  // The regexp pattern or array of patterns that Jest uses to detect test files\n  // testRegex: [],\n\n  // This option allows the use of a custom results processor\n  // testResultsProcessor: undefined,\n\n  // This option allows use of a custom test runner\n  // testRunner: \"jasmine2\",\n\n  // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href\n  // testURL: \"http://localhost\",\n\n  // Setting this value to \"fake\" allows the use of fake timers for functions such as \"setTimeout\"\n  // timers: \"real\",\n\n  // A map from regular expressions to paths to transformers\n  // transform: undefined,\n\n  // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation\n  // transformIgnorePatterns: [\n  //   \"/node_modules/\",\n  //   \"\\\\.pnp\\\\.[^\\\\/]+$\"\n  // ],\n\n  // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them\n  // unmockedModulePathPatterns: undefined,\n\n  // Indicates whether each individual test should be reported during the run\n  // verbose: undefined,\n\n  // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode\n  // watchPathIgnorePatterns: [],\n\n  // Whether to use watchman for file crawling\n  // watchman: true,\n};\n"
  },
  {
    "path": "frontend/package.json",
    "content": "{\n  \"name\": \"@crawlab/app\",\n  \"version\": \"0.6.3\",\n  \"scripts\": {\n    \"serve\": \"vite\",\n    \"serve:dist\": \"serve dist\",\n    \"build\": \"vite build\",\n    \"build:docker\": \"vite build --mode docker\"\n  },\n  \"author\": {\n    \"name\": \"Marvin Zhang\",\n    \"email\": \"tikazyq@163.com\"\n  },\n  \"license\": \"BSD-3-Clause\",\n  \"dependencies\": {\n    \"@element-plus/icons\": \"^0.0.11\",\n    \"@fortawesome/fontawesome-svg-core\": \"^1.3.0\",\n    \"@fortawesome/free-brands-svg-icons\": \"^6.0.0\",\n    \"@fortawesome/free-regular-svg-icons\": \"^6.0.0\",\n    \"@fortawesome/free-solid-svg-icons\": \"^6.0.0\",\n    \"@fortawesome/vue-fontawesome\": \"^3.0.0-5\",\n    \"atom-material-icons\": \"^3.0.0\",\n    \"codemirror\": \"^5.59.1\",\n    \"crawlab-ui\": \"0.6.3\",\n    \"echarts\": \"^5.1.2\",\n    \"element-plus\": \"^1.3.0-beta.10\",\n    \"vue\": \"^3.2\",\n    \"vue-router\": \"^4.0.11\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^18.11.10\",\n    \"@vitejs/plugin-vue\": \"^3.2.0\",\n    \"@vue/compiler-sfc\": \"^3.2.45\",\n    \"rollup-plugin-external-globals\": \"^0.8.0\",\n    \"rollup-plugin-visualizer\": \"^5.9.2\",\n    \"typescript\": \"^4.6.4\",\n    \"vite\": \"^3.2.4\",\n    \"vite-aliases\": \"^0.9.7\",\n    \"vite-plugin-dynamic-import\": \"^1.2.4\",\n    \"vite-plugin-externalize-deps\": \"^0.7.0\",\n    \"vue-tsc\": \"^1.0.9\"\n  }\n}"
  },
  {
    "path": "frontend/public/js/login-canvas.js",
    "content": "function initCanvas() {\n  let canvas, ctx, circ, nodes, mouse, SENSITIVITY, SIBLINGS_LIMIT, DENSITY, NODES_QTY, ANCHOR_LENGTH, MOUSE_RADIUS,\n    TURBULENCE, MOUSE_MOVING_TURBULENCE, MOUSE_ANGLE_TURBULENCE, MOUSE_MOVING_RADIUS, BASE_BRIGHTNESS, RADIUS_DEGRADE,\n    SAMPLE_SIZE\n\n  let handle\n\n  // how close next node must be to activate connection (in px)\n  // shorter distance == better connection (line width)\n  SENSITIVITY = 200\n  // note that siblings limit is not 'accurate' as the node can actually have more connections than this value that's because the node accepts sibling nodes with no regard to their current connections this is acceptable because potential fix would not result in significant visual difference\n  // more siblings == bigger node\n  SIBLINGS_LIMIT = 10\n  // default node margin\n  DENSITY = 100\n  // total number of nodes used (incremented after creation)\n  NODES_QTY = 0\n  // avoid nodes spreading\n  ANCHOR_LENGTH = 100\n  // highlight radius\n  MOUSE_RADIUS = 200\n  // turbulence of randomness\n  TURBULENCE = 3\n  // turbulence of mouse moving\n  MOUSE_MOVING_TURBULENCE = 50\n  // turbulence of mouse moving angle\n  MOUSE_ANGLE_TURBULENCE = 0.002\n  // moving radius of mouse\n  MOUSE_MOVING_RADIUS = 600\n  // base brightness\n  BASE_BRIGHTNESS = 0.12\n  // radius degrade\n  RADIUS_DEGRADE = 0.4\n  // sample size\n  SAMPLE_SIZE = 0.5\n\n  circ = 2 * Math.PI\n  nodes = []\n\n  canvas = document.querySelector('#canvas')\n  if (!canvas) return;\n  resizeWindow()\n  ctx = canvas.getContext('2d')\n  if (!ctx) {\n    alert('Ooops! Your browser does not support canvas :\\'(')\n  }\n\n  function Mouse(x, y) {\n    this.anchorX = x\n    this.anchorY = y\n    this.x = x\n    this.y = y - MOUSE_RADIUS / 2\n    this.angle = 0\n  }\n\n  Mouse.prototype.computePosition = function () {\n    // this.x = this.anchorX + MOUSE_MOVING_RADIUS / 2 * Math.sin(this.angle)\n    // this.y = this.anchorY - MOUSE_MOVING_RADIUS / 2 * Math.cos(this.angle)\n  }\n\n  Mouse.prototype.move = function () {\n    let vx = Math.random() * MOUSE_MOVING_TURBULENCE\n    let vy = Math.random() * MOUSE_MOVING_TURBULENCE\n    if (this.x + vx + MOUSE_RADIUS / 2 > window.innerWidth || this.x + vx - MOUSE_RADIUS / 2 < 0) {\n      vx = -vx\n    }\n    if (this.y + vy + MOUSE_RADIUS / 2 > window.innerHeight || this.y + vy - MOUSE_RADIUS / 2 < 0) {\n      vy = -vy\n    }\n    this.x += vx\n    this.y += vy\n    // this.angle += Math.random() * MOUSE_ANGLE_TURBULENCE * 2 * Math.PI\n    // this.angle -= Math.floor(this.angle / (2 * Math.PI)) * 2 * Math.PI\n    // this.computePosition()\n  }\n\n  function Node(x, y) {\n    this.anchorX = x\n    this.anchorY = y\n    this.x = Math.random() * (x - (x - ANCHOR_LENGTH)) + (x - ANCHOR_LENGTH)\n    this.y = Math.random() * (y - (y - ANCHOR_LENGTH)) + (y - ANCHOR_LENGTH)\n    this.vx = Math.random() * TURBULENCE - 1\n    this.vy = Math.random() * TURBULENCE - 1\n    this.energy = Math.random() * 100\n    this.radius = Math.random()\n    this.siblings = []\n    this.brightness = 0\n  }\n\n  Node.prototype.drawNode = function () {\n    let color = 'rgba(64, 156, 255, ' + this.brightness + ')'\n    ctx.beginPath()\n    ctx.arc(this.x, this.y, 2 * this.radius + 2 * this.siblings.length / SIBLINGS_LIMIT / 1.5, 0, circ)\n    ctx.fillStyle = color\n    ctx.fill()\n  }\n\n  Node.prototype.drawConnections = function () {\n    for (let i = 0; i < this.siblings.length; i++) {\n      let color = 'rgba(64, 156, 255, ' + this.brightness + ')'\n      ctx.beginPath()\n      ctx.moveTo(this.x, this.y)\n      ctx.lineTo(this.siblings[i].x, this.siblings[i].y)\n      ctx.lineWidth = 1 - calcDistance(this, this.siblings[i]) / SENSITIVITY\n      ctx.strokeStyle = color\n      ctx.stroke()\n    }\n  }\n\n  Node.prototype.moveNode = function () {\n    this.energy -= 2\n    if (this.energy < 1) {\n      this.energy = Math.random() * 100\n      if (this.x - this.anchorX < -ANCHOR_LENGTH) {\n        this.vx = Math.random() * TURBULENCE\n      } else if (this.x - this.anchorX > ANCHOR_LENGTH) {\n        this.vx = Math.random() * -TURBULENCE\n      } else {\n        this.vx = Math.random() * 2 * TURBULENCE - TURBULENCE\n      }\n      if (this.y - this.anchorY < -ANCHOR_LENGTH) {\n        this.vy = Math.random() * TURBULENCE\n      } else if (this.y - this.anchorY > ANCHOR_LENGTH) {\n        this.vy = Math.random() * -TURBULENCE\n      } else {\n        this.vy = Math.random() * 2 * TURBULENCE - TURBULENCE\n      }\n    }\n    this.x += this.vx * this.energy / 100\n    this.y += this.vy * this.energy / 100\n  }\n\n  function Handle() {\n    this.isStopped = false\n  }\n\n  Handle.prototype.stop = function () {\n    this.isStopped = true\n  }\n\n  function initNodes() {\n    ctx.clearRect(0, 0, canvas.width, canvas.height)\n    nodes = []\n    for (let i = DENSITY; i < canvas.width; i += DENSITY) {\n      for (let j = DENSITY; j < canvas.height; j += DENSITY) {\n        nodes.push(new Node(i, j))\n        NODES_QTY++\n      }\n    }\n  }\n\n  function initMouse() {\n    mouse = new Mouse(canvas.width / 2, canvas.height / 2)\n  }\n\n  function initHandle() {\n    handle = new Handle()\n  }\n\n  function calcDistance(node1, node2) {\n    return Math.sqrt(Math.pow(node1.x - node2.x, 2) + (Math.pow(node1.y - node2.y, 2)))\n  }\n\n  function findSiblings() {\n    let node1, node2, distance\n    for (let i = 0; i < NODES_QTY; i++) {\n      node1 = nodes[i]\n      node1.siblings = []\n      for (let j = 0; j < NODES_QTY; j++) {\n        node2 = nodes[j]\n        if (node1 !== node2) {\n          distance = calcDistance(node1, node2)\n          if (distance < SENSITIVITY) {\n            if (node1.siblings.length < SIBLINGS_LIMIT) {\n              node1.siblings.push(node2)\n            } else {\n              let node_sibling_distance = 0\n              let max_distance = 0\n              let s\n              for (let k = 0; k < SIBLINGS_LIMIT; k++) {\n                node_sibling_distance = calcDistance(node1, node1.siblings[k])\n                if (node_sibling_distance > max_distance) {\n                  max_distance = node_sibling_distance\n                  s = k\n                }\n              }\n              if (distance < max_distance) {\n                node1.siblings.splice(s, 1)\n                node1.siblings.push(node2)\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n\n  function redrawScene() {\n    if (handle && handle.isStopped) {\n      return\n    }\n    resizeWindow()\n    ctx.clearRect(0, 0, canvas.width, canvas.height)\n    findSiblings()\n    let i, node, distance\n    for (i = 0; i < NODES_QTY; i++) {\n      node = nodes[i]\n      distance = calcDistance({\n        x: mouse.x,\n        y: mouse.y\n      }, node)\n      node.brightness = (1 - Math.log(distance / MOUSE_RADIUS * RADIUS_DEGRADE)) * BASE_BRIGHTNESS\n    }\n    for (i = 0; i < NODES_QTY; i++) {\n      node = nodes[i]\n      if (node.brightness) {\n        node.drawNode()\n        node.drawConnections()\n      }\n      node.moveNode()\n    }\n    // mouse.move()\n    setTimeout(() => {\n      requestAnimationFrame(redrawScene)\n    }, 50)\n  }\n\n  function initHandlers() {\n    document.addEventListener('resize', resizeWindow, {passive: true})\n    // canvas.addEventListener('mousemove', mousemoveHandler, false)\n  }\n\n  function resizeWindow() {\n    canvas.width = window.innerWidth\n    canvas.height = window.innerHeight\n  }\n\n  function mousemoveHandler(e) {\n    mouse.x = e.clientX\n    mouse.y = e.clientY\n  }\n\n  function init() {\n    initHandlers()\n    initNodes()\n    initMouse()\n    initHandle()\n    redrawScene()\n  }\n\n  function reset() {\n    handle.isStopped = true\n  }\n\n  init()\n\n  window.resetCanvas = reset\n}\n"
  },
  {
    "path": "frontend/public/js/vue3-sfc-loader.js",
    "content": "/*!\n * vue3-sfc-loader v0.8.4 for vue3\n *\n * @description Vue3 Single File Component loader.\n * @author      Franck FREIBURGER <franck.freiburger@gmail.com>\n * @license     MIT\n * @sources     https://github.com/FranckFreiburger/vue3-sfc-loader\n */\n!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports[\"vue3-sfc-loader\"]=t():e[\"vue3-sfc-loader\"]=t()}(self,(function(){return(()=>{var e=[(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toSequenceExpression:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0};Object.defineProperty(t,\"assertNode\",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,\"createTypeAnnotationBasedOnTypeof\",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,\"createUnionTypeAnnotation\",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,\"createFlowUnionType\",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,\"createTSUnionType\",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,\"cloneNode\",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,\"clone\",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,\"cloneDeep\",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,\"cloneDeepWithoutLoc\",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,\"cloneWithoutLoc\",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,\"addComment\",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,\"addComments\",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,\"inheritInnerComments\",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,\"inheritLeadingComments\",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,\"inheritsComments\",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,\"inheritTrailingComments\",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,\"removeComments\",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,\"ensureBlock\",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,\"toBindingIdentifierName\",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,\"toBlock\",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,\"toComputedKey\",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,\"toExpression\",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,\"toIdentifier\",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,\"toKeyAlias\",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,\"toSequenceExpression\",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,\"toStatement\",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,\"valueToNode\",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,\"appendToMemberExpression\",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,\"inherits\",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(t,\"prependToMemberExpression\",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(t,\"removeProperties\",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(t,\"removePropertiesDeep\",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(t,\"removeTypeDuplicates\",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(t,\"getBindingIdentifiers\",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(t,\"getOuterBindingIdentifiers\",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(t,\"traverse\",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(t,\"traverseFast\",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(t,\"shallowEqual\",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(t,\"is\",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(t,\"isBinding\",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(t,\"isBlockScoped\",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(t,\"isImmutable\",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(t,\"isLet\",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(t,\"isNode\",{enumerable:!0,get:function(){return te.default}}),Object.defineProperty(t,\"isNodesEquivalent\",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(t,\"isPlaceholderType\",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(t,\"isReferenced\",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(t,\"isScope\",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(t,\"isSpecifierDefault\",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(t,\"isType\",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(t,\"isValidES3Identifier\",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(t,\"isValidIdentifier\",{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(t,\"isVar\",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(t,\"matchesPattern\",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(t,\"validate\",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(t,\"buildMatchMemberExpression\",{enumerable:!0,get:function(){return de.default}}),t.react=void 0;var s=r(363),i=r(364),o=r(365),a=r(375),l=r(376);Object.keys(l).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var c=r(377),u=r(378),p=r(379),f=r(6);Object.keys(f).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=r(381);Object.keys(d).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var h=r(26),m=r(382),y=r(383),g=r(384),b=r(385),v=r(386),E=r(220),x=r(221),S=r(222),T=r(223),w=r(224),P=r(387),A=r(388);Object.keys(A).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var O=r(25);Object.keys(O).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===O[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return O[e]}}))}));var C=r(389),I=r(390),k=r(225),N=r(391),_=r(392),j=r(226),D=r(393),L=r(394),M=r(396),B=r(397),R=r(11);Object.keys(R).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===R[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return R[e]}}))}));var F=r(398),U=r(399),$=r(400),q=r(229),V=r(227),W=r(219),K=r(64),G=r(401),H=r(402);Object.keys(H).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===H[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return H[e]}}))}));var J=r(228),Y=r(127),X=r(62),z=r(403),Q=r(404),Z=r(405),ee=r(230),te=r(218),re=r(406),ne=r(216),se=r(407),ie=r(408),oe=r(409),ae=r(129),le=r(410),ce=r(38),ue=r(411),pe=r(214),fe=r(130),de=r(213),he=r(1);Object.keys(he).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===he[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return he[e]}}))}));var me=r(412);Object.keys(me).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===me[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return me[e]}}))}));const ye={isReactComponent:s.default,isCompatTag:i.default,buildChildren:o.default};t.react=ye},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.isArrayExpression=function(e,t){return!!e&&(\"ArrayExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isAssignmentExpression=function(e,t){return!!e&&(\"AssignmentExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isBinaryExpression=function(e,t){return!!e&&(\"BinaryExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isInterpreterDirective=function(e,t){return!!e&&(\"InterpreterDirective\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDirective=function(e,t){return!!e&&(\"Directive\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDirectiveLiteral=function(e,t){return!!e&&(\"DirectiveLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isBlockStatement=function(e,t){return!!e&&(\"BlockStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isBreakStatement=function(e,t){return!!e&&(\"BreakStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isCallExpression=function(e,t){return!!e&&(\"CallExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isCatchClause=function(e,t){return!!e&&(\"CatchClause\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isConditionalExpression=function(e,t){return!!e&&(\"ConditionalExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isContinueStatement=function(e,t){return!!e&&(\"ContinueStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDebuggerStatement=function(e,t){return!!e&&(\"DebuggerStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDoWhileStatement=function(e,t){return!!e&&(\"DoWhileStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEmptyStatement=function(e,t){return!!e&&(\"EmptyStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExpressionStatement=function(e,t){return!!e&&(\"ExpressionStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isFile=function(e,t){return!!e&&(\"File\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isForInStatement=function(e,t){return!!e&&(\"ForInStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isForStatement=function(e,t){return!!e&&(\"ForStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isFunctionDeclaration=function(e,t){return!!e&&(\"FunctionDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isFunctionExpression=function(e,t){return!!e&&(\"FunctionExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isIdentifier=function(e,t){return!!e&&(\"Identifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isIfStatement=function(e,t){return!!e&&(\"IfStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isLabeledStatement=function(e,t){return!!e&&(\"LabeledStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isStringLiteral=function(e,t){return!!e&&(\"StringLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isNumericLiteral=function(e,t){return!!e&&(\"NumericLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isNullLiteral=function(e,t){return!!e&&(\"NullLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isBooleanLiteral=function(e,t){return!!e&&(\"BooleanLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isRegExpLiteral=function(e,t){return!!e&&(\"RegExpLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isLogicalExpression=function(e,t){return!!e&&(\"LogicalExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isMemberExpression=function(e,t){return!!e&&(\"MemberExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isNewExpression=function(e,t){return!!e&&(\"NewExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isProgram=function(e,t){return!!e&&(\"Program\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectExpression=function(e,t){return!!e&&(\"ObjectExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectMethod=function(e,t){return!!e&&(\"ObjectMethod\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectProperty=function(e,t){return!!e&&(\"ObjectProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isRestElement=function(e,t){return!!e&&(\"RestElement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isReturnStatement=function(e,t){return!!e&&(\"ReturnStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isSequenceExpression=function(e,t){return!!e&&(\"SequenceExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isParenthesizedExpression=function(e,t){return!!e&&(\"ParenthesizedExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isSwitchCase=function(e,t){return!!e&&(\"SwitchCase\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isSwitchStatement=function(e,t){return!!e&&(\"SwitchStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isThisExpression=function(e,t){return!!e&&(\"ThisExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isThrowStatement=function(e,t){return!!e&&(\"ThrowStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTryStatement=function(e,t){return!!e&&(\"TryStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isUnaryExpression=function(e,t){return!!e&&(\"UnaryExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isUpdateExpression=function(e,t){return!!e&&(\"UpdateExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isVariableDeclaration=function(e,t){return!!e&&(\"VariableDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isVariableDeclarator=function(e,t){return!!e&&(\"VariableDeclarator\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isWhileStatement=function(e,t){return!!e&&(\"WhileStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isWithStatement=function(e,t){return!!e&&(\"WithStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isAssignmentPattern=function(e,t){return!!e&&(\"AssignmentPattern\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isArrayPattern=function(e,t){return!!e&&(\"ArrayPattern\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isArrowFunctionExpression=function(e,t){return!!e&&(\"ArrowFunctionExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isClassBody=function(e,t){return!!e&&(\"ClassBody\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isClassExpression=function(e,t){return!!e&&(\"ClassExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isClassDeclaration=function(e,t){return!!e&&(\"ClassDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExportAllDeclaration=function(e,t){return!!e&&(\"ExportAllDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExportDefaultDeclaration=function(e,t){return!!e&&(\"ExportDefaultDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExportNamedDeclaration=function(e,t){return!!e&&(\"ExportNamedDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExportSpecifier=function(e,t){return!!e&&(\"ExportSpecifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isForOfStatement=function(e,t){return!!e&&(\"ForOfStatement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isImportDeclaration=function(e,t){return!!e&&(\"ImportDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isImportDefaultSpecifier=function(e,t){return!!e&&(\"ImportDefaultSpecifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isImportNamespaceSpecifier=function(e,t){return!!e&&(\"ImportNamespaceSpecifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isImportSpecifier=function(e,t){return!!e&&(\"ImportSpecifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isMetaProperty=function(e,t){return!!e&&(\"MetaProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isClassMethod=function(e,t){return!!e&&(\"ClassMethod\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectPattern=function(e,t){return!!e&&(\"ObjectPattern\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isSpreadElement=function(e,t){return!!e&&(\"SpreadElement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isSuper=function(e,t){return!!e&&(\"Super\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTaggedTemplateExpression=function(e,t){return!!e&&(\"TaggedTemplateExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTemplateElement=function(e,t){return!!e&&(\"TemplateElement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTemplateLiteral=function(e,t){return!!e&&(\"TemplateLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isYieldExpression=function(e,t){return!!e&&(\"YieldExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isAwaitExpression=function(e,t){return!!e&&(\"AwaitExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isImport=function(e,t){return!!e&&(\"Import\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isBigIntLiteral=function(e,t){return!!e&&(\"BigIntLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExportNamespaceSpecifier=function(e,t){return!!e&&(\"ExportNamespaceSpecifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isOptionalMemberExpression=function(e,t){return!!e&&(\"OptionalMemberExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isOptionalCallExpression=function(e,t){return!!e&&(\"OptionalCallExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isAnyTypeAnnotation=function(e,t){return!!e&&(\"AnyTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isArrayTypeAnnotation=function(e,t){return!!e&&(\"ArrayTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isBooleanTypeAnnotation=function(e,t){return!!e&&(\"BooleanTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isBooleanLiteralTypeAnnotation=function(e,t){return!!e&&(\"BooleanLiteralTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isNullLiteralTypeAnnotation=function(e,t){return!!e&&(\"NullLiteralTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isClassImplements=function(e,t){return!!e&&(\"ClassImplements\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareClass=function(e,t){return!!e&&(\"DeclareClass\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareFunction=function(e,t){return!!e&&(\"DeclareFunction\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareInterface=function(e,t){return!!e&&(\"DeclareInterface\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareModule=function(e,t){return!!e&&(\"DeclareModule\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareModuleExports=function(e,t){return!!e&&(\"DeclareModuleExports\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareTypeAlias=function(e,t){return!!e&&(\"DeclareTypeAlias\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareOpaqueType=function(e,t){return!!e&&(\"DeclareOpaqueType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareVariable=function(e,t){return!!e&&(\"DeclareVariable\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareExportDeclaration=function(e,t){return!!e&&(\"DeclareExportDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclareExportAllDeclaration=function(e,t){return!!e&&(\"DeclareExportAllDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDeclaredPredicate=function(e,t){return!!e&&(\"DeclaredPredicate\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExistsTypeAnnotation=function(e,t){return!!e&&(\"ExistsTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isFunctionTypeAnnotation=function(e,t){return!!e&&(\"FunctionTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isFunctionTypeParam=function(e,t){return!!e&&(\"FunctionTypeParam\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isGenericTypeAnnotation=function(e,t){return!!e&&(\"GenericTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isInferredPredicate=function(e,t){return!!e&&(\"InferredPredicate\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isInterfaceExtends=function(e,t){return!!e&&(\"InterfaceExtends\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isInterfaceDeclaration=function(e,t){return!!e&&(\"InterfaceDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isInterfaceTypeAnnotation=function(e,t){return!!e&&(\"InterfaceTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isIntersectionTypeAnnotation=function(e,t){return!!e&&(\"IntersectionTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isMixedTypeAnnotation=function(e,t){return!!e&&(\"MixedTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEmptyTypeAnnotation=function(e,t){return!!e&&(\"EmptyTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isNullableTypeAnnotation=function(e,t){return!!e&&(\"NullableTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isNumberLiteralTypeAnnotation=function(e,t){return!!e&&(\"NumberLiteralTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isNumberTypeAnnotation=function(e,t){return!!e&&(\"NumberTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectTypeAnnotation=function(e,t){return!!e&&(\"ObjectTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectTypeInternalSlot=function(e,t){return!!e&&(\"ObjectTypeInternalSlot\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectTypeCallProperty=function(e,t){return!!e&&(\"ObjectTypeCallProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectTypeIndexer=function(e,t){return!!e&&(\"ObjectTypeIndexer\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectTypeProperty=function(e,t){return!!e&&(\"ObjectTypeProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isObjectTypeSpreadProperty=function(e,t){return!!e&&(\"ObjectTypeSpreadProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isOpaqueType=function(e,t){return!!e&&(\"OpaqueType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isQualifiedTypeIdentifier=function(e,t){return!!e&&(\"QualifiedTypeIdentifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isStringLiteralTypeAnnotation=function(e,t){return!!e&&(\"StringLiteralTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isStringTypeAnnotation=function(e,t){return!!e&&(\"StringTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isSymbolTypeAnnotation=function(e,t){return!!e&&(\"SymbolTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isThisTypeAnnotation=function(e,t){return!!e&&(\"ThisTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTupleTypeAnnotation=function(e,t){return!!e&&(\"TupleTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTypeofTypeAnnotation=function(e,t){return!!e&&(\"TypeofTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTypeAlias=function(e,t){return!!e&&(\"TypeAlias\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTypeAnnotation=function(e,t){return!!e&&(\"TypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTypeCastExpression=function(e,t){return!!e&&(\"TypeCastExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTypeParameter=function(e,t){return!!e&&(\"TypeParameter\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTypeParameterDeclaration=function(e,t){return!!e&&(\"TypeParameterDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTypeParameterInstantiation=function(e,t){return!!e&&(\"TypeParameterInstantiation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isUnionTypeAnnotation=function(e,t){return!!e&&(\"UnionTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isVariance=function(e,t){return!!e&&(\"Variance\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isVoidTypeAnnotation=function(e,t){return!!e&&(\"VoidTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumDeclaration=function(e,t){return!!e&&(\"EnumDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumBooleanBody=function(e,t){return!!e&&(\"EnumBooleanBody\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumNumberBody=function(e,t){return!!e&&(\"EnumNumberBody\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumStringBody=function(e,t){return!!e&&(\"EnumStringBody\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumSymbolBody=function(e,t){return!!e&&(\"EnumSymbolBody\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumBooleanMember=function(e,t){return!!e&&(\"EnumBooleanMember\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumNumberMember=function(e,t){return!!e&&(\"EnumNumberMember\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumStringMember=function(e,t){return!!e&&(\"EnumStringMember\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isEnumDefaultedMember=function(e,t){return!!e&&(\"EnumDefaultedMember\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isIndexedAccessType=function(e,t){return!!e&&(\"IndexedAccessType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isOptionalIndexedAccessType=function(e,t){return!!e&&(\"OptionalIndexedAccessType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXAttribute=function(e,t){return!!e&&(\"JSXAttribute\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXClosingElement=function(e,t){return!!e&&(\"JSXClosingElement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXElement=function(e,t){return!!e&&(\"JSXElement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXEmptyExpression=function(e,t){return!!e&&(\"JSXEmptyExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXExpressionContainer=function(e,t){return!!e&&(\"JSXExpressionContainer\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXSpreadChild=function(e,t){return!!e&&(\"JSXSpreadChild\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXIdentifier=function(e,t){return!!e&&(\"JSXIdentifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXMemberExpression=function(e,t){return!!e&&(\"JSXMemberExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXNamespacedName=function(e,t){return!!e&&(\"JSXNamespacedName\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXOpeningElement=function(e,t){return!!e&&(\"JSXOpeningElement\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXSpreadAttribute=function(e,t){return!!e&&(\"JSXSpreadAttribute\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXText=function(e,t){return!!e&&(\"JSXText\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXFragment=function(e,t){return!!e&&(\"JSXFragment\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXOpeningFragment=function(e,t){return!!e&&(\"JSXOpeningFragment\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isJSXClosingFragment=function(e,t){return!!e&&(\"JSXClosingFragment\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isNoop=function(e,t){return!!e&&(\"Noop\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isPlaceholder=function(e,t){return!!e&&(\"Placeholder\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isV8IntrinsicIdentifier=function(e,t){return!!e&&(\"V8IntrinsicIdentifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isArgumentPlaceholder=function(e,t){return!!e&&(\"ArgumentPlaceholder\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isBindExpression=function(e,t){return!!e&&(\"BindExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isClassProperty=function(e,t){return!!e&&(\"ClassProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isPipelineTopicExpression=function(e,t){return!!e&&(\"PipelineTopicExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isPipelineBareFunction=function(e,t){return!!e&&(\"PipelineBareFunction\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isPipelinePrimaryTopicReference=function(e,t){return!!e&&(\"PipelinePrimaryTopicReference\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isClassPrivateProperty=function(e,t){return!!e&&(\"ClassPrivateProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isClassPrivateMethod=function(e,t){return!!e&&(\"ClassPrivateMethod\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isImportAttribute=function(e,t){return!!e&&(\"ImportAttribute\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDecorator=function(e,t){return!!e&&(\"Decorator\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDoExpression=function(e,t){return!!e&&(\"DoExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExportDefaultSpecifier=function(e,t){return!!e&&(\"ExportDefaultSpecifier\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isPrivateName=function(e,t){return!!e&&(\"PrivateName\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isRecordExpression=function(e,t){return!!e&&(\"RecordExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTupleExpression=function(e,t){return!!e&&(\"TupleExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isDecimalLiteral=function(e,t){return!!e&&(\"DecimalLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isStaticBlock=function(e,t){return!!e&&(\"StaticBlock\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isModuleExpression=function(e,t){return!!e&&(\"ModuleExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSParameterProperty=function(e,t){return!!e&&(\"TSParameterProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSDeclareFunction=function(e,t){return!!e&&(\"TSDeclareFunction\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSDeclareMethod=function(e,t){return!!e&&(\"TSDeclareMethod\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSQualifiedName=function(e,t){return!!e&&(\"TSQualifiedName\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSCallSignatureDeclaration=function(e,t){return!!e&&(\"TSCallSignatureDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSConstructSignatureDeclaration=function(e,t){return!!e&&(\"TSConstructSignatureDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSPropertySignature=function(e,t){return!!e&&(\"TSPropertySignature\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSMethodSignature=function(e,t){return!!e&&(\"TSMethodSignature\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSIndexSignature=function(e,t){return!!e&&(\"TSIndexSignature\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSAnyKeyword=function(e,t){return!!e&&(\"TSAnyKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSBooleanKeyword=function(e,t){return!!e&&(\"TSBooleanKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSBigIntKeyword=function(e,t){return!!e&&(\"TSBigIntKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSIntrinsicKeyword=function(e,t){return!!e&&(\"TSIntrinsicKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSNeverKeyword=function(e,t){return!!e&&(\"TSNeverKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSNullKeyword=function(e,t){return!!e&&(\"TSNullKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSNumberKeyword=function(e,t){return!!e&&(\"TSNumberKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSObjectKeyword=function(e,t){return!!e&&(\"TSObjectKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSStringKeyword=function(e,t){return!!e&&(\"TSStringKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSSymbolKeyword=function(e,t){return!!e&&(\"TSSymbolKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSUndefinedKeyword=function(e,t){return!!e&&(\"TSUndefinedKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSUnknownKeyword=function(e,t){return!!e&&(\"TSUnknownKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSVoidKeyword=function(e,t){return!!e&&(\"TSVoidKeyword\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSThisType=function(e,t){return!!e&&(\"TSThisType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSFunctionType=function(e,t){return!!e&&(\"TSFunctionType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSConstructorType=function(e,t){return!!e&&(\"TSConstructorType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeReference=function(e,t){return!!e&&(\"TSTypeReference\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypePredicate=function(e,t){return!!e&&(\"TSTypePredicate\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeQuery=function(e,t){return!!e&&(\"TSTypeQuery\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeLiteral=function(e,t){return!!e&&(\"TSTypeLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSArrayType=function(e,t){return!!e&&(\"TSArrayType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTupleType=function(e,t){return!!e&&(\"TSTupleType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSOptionalType=function(e,t){return!!e&&(\"TSOptionalType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSRestType=function(e,t){return!!e&&(\"TSRestType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSNamedTupleMember=function(e,t){return!!e&&(\"TSNamedTupleMember\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSUnionType=function(e,t){return!!e&&(\"TSUnionType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSIntersectionType=function(e,t){return!!e&&(\"TSIntersectionType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSConditionalType=function(e,t){return!!e&&(\"TSConditionalType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSInferType=function(e,t){return!!e&&(\"TSInferType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSParenthesizedType=function(e,t){return!!e&&(\"TSParenthesizedType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeOperator=function(e,t){return!!e&&(\"TSTypeOperator\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSIndexedAccessType=function(e,t){return!!e&&(\"TSIndexedAccessType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSMappedType=function(e,t){return!!e&&(\"TSMappedType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSLiteralType=function(e,t){return!!e&&(\"TSLiteralType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSExpressionWithTypeArguments=function(e,t){return!!e&&(\"TSExpressionWithTypeArguments\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSInterfaceDeclaration=function(e,t){return!!e&&(\"TSInterfaceDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSInterfaceBody=function(e,t){return!!e&&(\"TSInterfaceBody\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeAliasDeclaration=function(e,t){return!!e&&(\"TSTypeAliasDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSAsExpression=function(e,t){return!!e&&(\"TSAsExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeAssertion=function(e,t){return!!e&&(\"TSTypeAssertion\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSEnumDeclaration=function(e,t){return!!e&&(\"TSEnumDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSEnumMember=function(e,t){return!!e&&(\"TSEnumMember\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSModuleDeclaration=function(e,t){return!!e&&(\"TSModuleDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSModuleBlock=function(e,t){return!!e&&(\"TSModuleBlock\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSImportType=function(e,t){return!!e&&(\"TSImportType\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSImportEqualsDeclaration=function(e,t){return!!e&&(\"TSImportEqualsDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSExternalModuleReference=function(e,t){return!!e&&(\"TSExternalModuleReference\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSNonNullExpression=function(e,t){return!!e&&(\"TSNonNullExpression\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSExportAssignment=function(e,t){return!!e&&(\"TSExportAssignment\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSNamespaceExportDeclaration=function(e,t){return!!e&&(\"TSNamespaceExportDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeAnnotation=function(e,t){return!!e&&(\"TSTypeAnnotation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeParameterInstantiation=function(e,t){return!!e&&(\"TSTypeParameterInstantiation\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeParameterDeclaration=function(e,t){return!!e&&(\"TSTypeParameterDeclaration\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isTSTypeParameter=function(e,t){return!!e&&(\"TSTypeParameter\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isExpression=function(e,t){if(!e)return!1;const r=e.type;return(\"ArrayExpression\"===r||\"AssignmentExpression\"===r||\"BinaryExpression\"===r||\"CallExpression\"===r||\"ConditionalExpression\"===r||\"FunctionExpression\"===r||\"Identifier\"===r||\"StringLiteral\"===r||\"NumericLiteral\"===r||\"NullLiteral\"===r||\"BooleanLiteral\"===r||\"RegExpLiteral\"===r||\"LogicalExpression\"===r||\"MemberExpression\"===r||\"NewExpression\"===r||\"ObjectExpression\"===r||\"SequenceExpression\"===r||\"ParenthesizedExpression\"===r||\"ThisExpression\"===r||\"UnaryExpression\"===r||\"UpdateExpression\"===r||\"ArrowFunctionExpression\"===r||\"ClassExpression\"===r||\"MetaProperty\"===r||\"Super\"===r||\"TaggedTemplateExpression\"===r||\"TemplateLiteral\"===r||\"YieldExpression\"===r||\"AwaitExpression\"===r||\"Import\"===r||\"BigIntLiteral\"===r||\"OptionalMemberExpression\"===r||\"OptionalCallExpression\"===r||\"TypeCastExpression\"===r||\"JSXElement\"===r||\"JSXFragment\"===r||\"BindExpression\"===r||\"PipelinePrimaryTopicReference\"===r||\"DoExpression\"===r||\"RecordExpression\"===r||\"TupleExpression\"===r||\"DecimalLiteral\"===r||\"ModuleExpression\"===r||\"TSAsExpression\"===r||\"TSTypeAssertion\"===r||\"TSNonNullExpression\"===r||\"Placeholder\"===r&&(\"Expression\"===e.expectedNode||\"Identifier\"===e.expectedNode||\"StringLiteral\"===e.expectedNode))&&(void 0===t||(0,n.default)(e,t))},t.isBinary=function(e,t){if(!e)return!1;const r=e.type;return(\"BinaryExpression\"===r||\"LogicalExpression\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isScopable=function(e,t){if(!e)return!1;const r=e.type;return(\"BlockStatement\"===r||\"CatchClause\"===r||\"DoWhileStatement\"===r||\"ForInStatement\"===r||\"ForStatement\"===r||\"FunctionDeclaration\"===r||\"FunctionExpression\"===r||\"Program\"===r||\"ObjectMethod\"===r||\"SwitchStatement\"===r||\"WhileStatement\"===r||\"ArrowFunctionExpression\"===r||\"ClassExpression\"===r||\"ClassDeclaration\"===r||\"ForOfStatement\"===r||\"ClassMethod\"===r||\"ClassPrivateMethod\"===r||\"StaticBlock\"===r||\"TSModuleBlock\"===r||\"Placeholder\"===r&&\"BlockStatement\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isBlockParent=function(e,t){if(!e)return!1;const r=e.type;return(\"BlockStatement\"===r||\"CatchClause\"===r||\"DoWhileStatement\"===r||\"ForInStatement\"===r||\"ForStatement\"===r||\"FunctionDeclaration\"===r||\"FunctionExpression\"===r||\"Program\"===r||\"ObjectMethod\"===r||\"SwitchStatement\"===r||\"WhileStatement\"===r||\"ArrowFunctionExpression\"===r||\"ForOfStatement\"===r||\"ClassMethod\"===r||\"ClassPrivateMethod\"===r||\"StaticBlock\"===r||\"TSModuleBlock\"===r||\"Placeholder\"===r&&\"BlockStatement\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isBlock=function(e,t){if(!e)return!1;const r=e.type;return(\"BlockStatement\"===r||\"Program\"===r||\"TSModuleBlock\"===r||\"Placeholder\"===r&&\"BlockStatement\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isStatement=function(e,t){if(!e)return!1;const r=e.type;return(\"BlockStatement\"===r||\"BreakStatement\"===r||\"ContinueStatement\"===r||\"DebuggerStatement\"===r||\"DoWhileStatement\"===r||\"EmptyStatement\"===r||\"ExpressionStatement\"===r||\"ForInStatement\"===r||\"ForStatement\"===r||\"FunctionDeclaration\"===r||\"IfStatement\"===r||\"LabeledStatement\"===r||\"ReturnStatement\"===r||\"SwitchStatement\"===r||\"ThrowStatement\"===r||\"TryStatement\"===r||\"VariableDeclaration\"===r||\"WhileStatement\"===r||\"WithStatement\"===r||\"ClassDeclaration\"===r||\"ExportAllDeclaration\"===r||\"ExportDefaultDeclaration\"===r||\"ExportNamedDeclaration\"===r||\"ForOfStatement\"===r||\"ImportDeclaration\"===r||\"DeclareClass\"===r||\"DeclareFunction\"===r||\"DeclareInterface\"===r||\"DeclareModule\"===r||\"DeclareModuleExports\"===r||\"DeclareTypeAlias\"===r||\"DeclareOpaqueType\"===r||\"DeclareVariable\"===r||\"DeclareExportDeclaration\"===r||\"DeclareExportAllDeclaration\"===r||\"InterfaceDeclaration\"===r||\"OpaqueType\"===r||\"TypeAlias\"===r||\"EnumDeclaration\"===r||\"TSDeclareFunction\"===r||\"TSInterfaceDeclaration\"===r||\"TSTypeAliasDeclaration\"===r||\"TSEnumDeclaration\"===r||\"TSModuleDeclaration\"===r||\"TSImportEqualsDeclaration\"===r||\"TSExportAssignment\"===r||\"TSNamespaceExportDeclaration\"===r||\"Placeholder\"===r&&(\"Statement\"===e.expectedNode||\"Declaration\"===e.expectedNode||\"BlockStatement\"===e.expectedNode))&&(void 0===t||(0,n.default)(e,t))},t.isTerminatorless=function(e,t){if(!e)return!1;const r=e.type;return(\"BreakStatement\"===r||\"ContinueStatement\"===r||\"ReturnStatement\"===r||\"ThrowStatement\"===r||\"YieldExpression\"===r||\"AwaitExpression\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isCompletionStatement=function(e,t){if(!e)return!1;const r=e.type;return(\"BreakStatement\"===r||\"ContinueStatement\"===r||\"ReturnStatement\"===r||\"ThrowStatement\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isConditional=function(e,t){if(!e)return!1;const r=e.type;return(\"ConditionalExpression\"===r||\"IfStatement\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isLoop=function(e,t){if(!e)return!1;const r=e.type;return(\"DoWhileStatement\"===r||\"ForInStatement\"===r||\"ForStatement\"===r||\"WhileStatement\"===r||\"ForOfStatement\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isWhile=function(e,t){if(!e)return!1;const r=e.type;return(\"DoWhileStatement\"===r||\"WhileStatement\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isExpressionWrapper=function(e,t){if(!e)return!1;const r=e.type;return(\"ExpressionStatement\"===r||\"ParenthesizedExpression\"===r||\"TypeCastExpression\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isFor=function(e,t){if(!e)return!1;const r=e.type;return(\"ForInStatement\"===r||\"ForStatement\"===r||\"ForOfStatement\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isForXStatement=function(e,t){if(!e)return!1;const r=e.type;return(\"ForInStatement\"===r||\"ForOfStatement\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isFunction=function(e,t){if(!e)return!1;const r=e.type;return(\"FunctionDeclaration\"===r||\"FunctionExpression\"===r||\"ObjectMethod\"===r||\"ArrowFunctionExpression\"===r||\"ClassMethod\"===r||\"ClassPrivateMethod\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isFunctionParent=function(e,t){if(!e)return!1;const r=e.type;return(\"FunctionDeclaration\"===r||\"FunctionExpression\"===r||\"ObjectMethod\"===r||\"ArrowFunctionExpression\"===r||\"ClassMethod\"===r||\"ClassPrivateMethod\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isPureish=function(e,t){if(!e)return!1;const r=e.type;return(\"FunctionDeclaration\"===r||\"FunctionExpression\"===r||\"StringLiteral\"===r||\"NumericLiteral\"===r||\"NullLiteral\"===r||\"BooleanLiteral\"===r||\"RegExpLiteral\"===r||\"ArrowFunctionExpression\"===r||\"BigIntLiteral\"===r||\"DecimalLiteral\"===r||\"Placeholder\"===r&&\"StringLiteral\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isDeclaration=function(e,t){if(!e)return!1;const r=e.type;return(\"FunctionDeclaration\"===r||\"VariableDeclaration\"===r||\"ClassDeclaration\"===r||\"ExportAllDeclaration\"===r||\"ExportDefaultDeclaration\"===r||\"ExportNamedDeclaration\"===r||\"ImportDeclaration\"===r||\"DeclareClass\"===r||\"DeclareFunction\"===r||\"DeclareInterface\"===r||\"DeclareModule\"===r||\"DeclareModuleExports\"===r||\"DeclareTypeAlias\"===r||\"DeclareOpaqueType\"===r||\"DeclareVariable\"===r||\"DeclareExportDeclaration\"===r||\"DeclareExportAllDeclaration\"===r||\"InterfaceDeclaration\"===r||\"OpaqueType\"===r||\"TypeAlias\"===r||\"EnumDeclaration\"===r||\"TSDeclareFunction\"===r||\"TSInterfaceDeclaration\"===r||\"TSTypeAliasDeclaration\"===r||\"TSEnumDeclaration\"===r||\"TSModuleDeclaration\"===r||\"Placeholder\"===r&&\"Declaration\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isPatternLike=function(e,t){if(!e)return!1;const r=e.type;return(\"Identifier\"===r||\"RestElement\"===r||\"AssignmentPattern\"===r||\"ArrayPattern\"===r||\"ObjectPattern\"===r||\"Placeholder\"===r&&(\"Pattern\"===e.expectedNode||\"Identifier\"===e.expectedNode))&&(void 0===t||(0,n.default)(e,t))},t.isLVal=function(e,t){if(!e)return!1;const r=e.type;return(\"Identifier\"===r||\"MemberExpression\"===r||\"RestElement\"===r||\"AssignmentPattern\"===r||\"ArrayPattern\"===r||\"ObjectPattern\"===r||\"TSParameterProperty\"===r||\"Placeholder\"===r&&(\"Pattern\"===e.expectedNode||\"Identifier\"===e.expectedNode))&&(void 0===t||(0,n.default)(e,t))},t.isTSEntityName=function(e,t){if(!e)return!1;const r=e.type;return(\"Identifier\"===r||\"TSQualifiedName\"===r||\"Placeholder\"===r&&\"Identifier\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isLiteral=function(e,t){if(!e)return!1;const r=e.type;return(\"StringLiteral\"===r||\"NumericLiteral\"===r||\"NullLiteral\"===r||\"BooleanLiteral\"===r||\"RegExpLiteral\"===r||\"TemplateLiteral\"===r||\"BigIntLiteral\"===r||\"DecimalLiteral\"===r||\"Placeholder\"===r&&\"StringLiteral\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isImmutable=function(e,t){if(!e)return!1;const r=e.type;return(\"StringLiteral\"===r||\"NumericLiteral\"===r||\"NullLiteral\"===r||\"BooleanLiteral\"===r||\"BigIntLiteral\"===r||\"JSXAttribute\"===r||\"JSXClosingElement\"===r||\"JSXElement\"===r||\"JSXExpressionContainer\"===r||\"JSXSpreadChild\"===r||\"JSXOpeningElement\"===r||\"JSXText\"===r||\"JSXFragment\"===r||\"JSXOpeningFragment\"===r||\"JSXClosingFragment\"===r||\"DecimalLiteral\"===r||\"Placeholder\"===r&&\"StringLiteral\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isUserWhitespacable=function(e,t){if(!e)return!1;const r=e.type;return(\"ObjectMethod\"===r||\"ObjectProperty\"===r||\"ObjectTypeInternalSlot\"===r||\"ObjectTypeCallProperty\"===r||\"ObjectTypeIndexer\"===r||\"ObjectTypeProperty\"===r||\"ObjectTypeSpreadProperty\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isMethod=function(e,t){if(!e)return!1;const r=e.type;return(\"ObjectMethod\"===r||\"ClassMethod\"===r||\"ClassPrivateMethod\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isObjectMember=function(e,t){if(!e)return!1;const r=e.type;return(\"ObjectMethod\"===r||\"ObjectProperty\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isProperty=function(e,t){if(!e)return!1;const r=e.type;return(\"ObjectProperty\"===r||\"ClassProperty\"===r||\"ClassPrivateProperty\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isUnaryLike=function(e,t){if(!e)return!1;const r=e.type;return(\"UnaryExpression\"===r||\"SpreadElement\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isPattern=function(e,t){if(!e)return!1;const r=e.type;return(\"AssignmentPattern\"===r||\"ArrayPattern\"===r||\"ObjectPattern\"===r||\"Placeholder\"===r&&\"Pattern\"===e.expectedNode)&&(void 0===t||(0,n.default)(e,t))},t.isClass=function(e,t){if(!e)return!1;const r=e.type;return(\"ClassExpression\"===r||\"ClassDeclaration\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isModuleDeclaration=function(e,t){if(!e)return!1;const r=e.type;return(\"ExportAllDeclaration\"===r||\"ExportDefaultDeclaration\"===r||\"ExportNamedDeclaration\"===r||\"ImportDeclaration\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isExportDeclaration=function(e,t){if(!e)return!1;const r=e.type;return(\"ExportAllDeclaration\"===r||\"ExportDefaultDeclaration\"===r||\"ExportNamedDeclaration\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isModuleSpecifier=function(e,t){if(!e)return!1;const r=e.type;return(\"ExportSpecifier\"===r||\"ImportDefaultSpecifier\"===r||\"ImportNamespaceSpecifier\"===r||\"ImportSpecifier\"===r||\"ExportNamespaceSpecifier\"===r||\"ExportDefaultSpecifier\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isFlow=function(e,t){if(!e)return!1;const r=e.type;return(\"AnyTypeAnnotation\"===r||\"ArrayTypeAnnotation\"===r||\"BooleanTypeAnnotation\"===r||\"BooleanLiteralTypeAnnotation\"===r||\"NullLiteralTypeAnnotation\"===r||\"ClassImplements\"===r||\"DeclareClass\"===r||\"DeclareFunction\"===r||\"DeclareInterface\"===r||\"DeclareModule\"===r||\"DeclareModuleExports\"===r||\"DeclareTypeAlias\"===r||\"DeclareOpaqueType\"===r||\"DeclareVariable\"===r||\"DeclareExportDeclaration\"===r||\"DeclareExportAllDeclaration\"===r||\"DeclaredPredicate\"===r||\"ExistsTypeAnnotation\"===r||\"FunctionTypeAnnotation\"===r||\"FunctionTypeParam\"===r||\"GenericTypeAnnotation\"===r||\"InferredPredicate\"===r||\"InterfaceExtends\"===r||\"InterfaceDeclaration\"===r||\"InterfaceTypeAnnotation\"===r||\"IntersectionTypeAnnotation\"===r||\"MixedTypeAnnotation\"===r||\"EmptyTypeAnnotation\"===r||\"NullableTypeAnnotation\"===r||\"NumberLiteralTypeAnnotation\"===r||\"NumberTypeAnnotation\"===r||\"ObjectTypeAnnotation\"===r||\"ObjectTypeInternalSlot\"===r||\"ObjectTypeCallProperty\"===r||\"ObjectTypeIndexer\"===r||\"ObjectTypeProperty\"===r||\"ObjectTypeSpreadProperty\"===r||\"OpaqueType\"===r||\"QualifiedTypeIdentifier\"===r||\"StringLiteralTypeAnnotation\"===r||\"StringTypeAnnotation\"===r||\"SymbolTypeAnnotation\"===r||\"ThisTypeAnnotation\"===r||\"TupleTypeAnnotation\"===r||\"TypeofTypeAnnotation\"===r||\"TypeAlias\"===r||\"TypeAnnotation\"===r||\"TypeCastExpression\"===r||\"TypeParameter\"===r||\"TypeParameterDeclaration\"===r||\"TypeParameterInstantiation\"===r||\"UnionTypeAnnotation\"===r||\"Variance\"===r||\"VoidTypeAnnotation\"===r||\"IndexedAccessType\"===r||\"OptionalIndexedAccessType\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isFlowType=function(e,t){if(!e)return!1;const r=e.type;return(\"AnyTypeAnnotation\"===r||\"ArrayTypeAnnotation\"===r||\"BooleanTypeAnnotation\"===r||\"BooleanLiteralTypeAnnotation\"===r||\"NullLiteralTypeAnnotation\"===r||\"ExistsTypeAnnotation\"===r||\"FunctionTypeAnnotation\"===r||\"GenericTypeAnnotation\"===r||\"InterfaceTypeAnnotation\"===r||\"IntersectionTypeAnnotation\"===r||\"MixedTypeAnnotation\"===r||\"EmptyTypeAnnotation\"===r||\"NullableTypeAnnotation\"===r||\"NumberLiteralTypeAnnotation\"===r||\"NumberTypeAnnotation\"===r||\"ObjectTypeAnnotation\"===r||\"StringLiteralTypeAnnotation\"===r||\"StringTypeAnnotation\"===r||\"SymbolTypeAnnotation\"===r||\"ThisTypeAnnotation\"===r||\"TupleTypeAnnotation\"===r||\"TypeofTypeAnnotation\"===r||\"UnionTypeAnnotation\"===r||\"VoidTypeAnnotation\"===r||\"IndexedAccessType\"===r||\"OptionalIndexedAccessType\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isFlowBaseAnnotation=function(e,t){if(!e)return!1;const r=e.type;return(\"AnyTypeAnnotation\"===r||\"BooleanTypeAnnotation\"===r||\"NullLiteralTypeAnnotation\"===r||\"MixedTypeAnnotation\"===r||\"EmptyTypeAnnotation\"===r||\"NumberTypeAnnotation\"===r||\"StringTypeAnnotation\"===r||\"SymbolTypeAnnotation\"===r||\"ThisTypeAnnotation\"===r||\"VoidTypeAnnotation\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isFlowDeclaration=function(e,t){if(!e)return!1;const r=e.type;return(\"DeclareClass\"===r||\"DeclareFunction\"===r||\"DeclareInterface\"===r||\"DeclareModule\"===r||\"DeclareModuleExports\"===r||\"DeclareTypeAlias\"===r||\"DeclareOpaqueType\"===r||\"DeclareVariable\"===r||\"DeclareExportDeclaration\"===r||\"DeclareExportAllDeclaration\"===r||\"InterfaceDeclaration\"===r||\"OpaqueType\"===r||\"TypeAlias\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isFlowPredicate=function(e,t){if(!e)return!1;const r=e.type;return(\"DeclaredPredicate\"===r||\"InferredPredicate\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isEnumBody=function(e,t){if(!e)return!1;const r=e.type;return(\"EnumBooleanBody\"===r||\"EnumNumberBody\"===r||\"EnumStringBody\"===r||\"EnumSymbolBody\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isEnumMember=function(e,t){if(!e)return!1;const r=e.type;return(\"EnumBooleanMember\"===r||\"EnumNumberMember\"===r||\"EnumStringMember\"===r||\"EnumDefaultedMember\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isJSX=function(e,t){if(!e)return!1;const r=e.type;return(\"JSXAttribute\"===r||\"JSXClosingElement\"===r||\"JSXElement\"===r||\"JSXEmptyExpression\"===r||\"JSXExpressionContainer\"===r||\"JSXSpreadChild\"===r||\"JSXIdentifier\"===r||\"JSXMemberExpression\"===r||\"JSXNamespacedName\"===r||\"JSXOpeningElement\"===r||\"JSXSpreadAttribute\"===r||\"JSXText\"===r||\"JSXFragment\"===r||\"JSXOpeningFragment\"===r||\"JSXClosingFragment\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isPrivate=function(e,t){if(!e)return!1;const r=e.type;return(\"ClassPrivateProperty\"===r||\"ClassPrivateMethod\"===r||\"PrivateName\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isTSTypeElement=function(e,t){if(!e)return!1;const r=e.type;return(\"TSCallSignatureDeclaration\"===r||\"TSConstructSignatureDeclaration\"===r||\"TSPropertySignature\"===r||\"TSMethodSignature\"===r||\"TSIndexSignature\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isTSType=function(e,t){if(!e)return!1;const r=e.type;return(\"TSAnyKeyword\"===r||\"TSBooleanKeyword\"===r||\"TSBigIntKeyword\"===r||\"TSIntrinsicKeyword\"===r||\"TSNeverKeyword\"===r||\"TSNullKeyword\"===r||\"TSNumberKeyword\"===r||\"TSObjectKeyword\"===r||\"TSStringKeyword\"===r||\"TSSymbolKeyword\"===r||\"TSUndefinedKeyword\"===r||\"TSUnknownKeyword\"===r||\"TSVoidKeyword\"===r||\"TSThisType\"===r||\"TSFunctionType\"===r||\"TSConstructorType\"===r||\"TSTypeReference\"===r||\"TSTypePredicate\"===r||\"TSTypeQuery\"===r||\"TSTypeLiteral\"===r||\"TSArrayType\"===r||\"TSTupleType\"===r||\"TSOptionalType\"===r||\"TSRestType\"===r||\"TSUnionType\"===r||\"TSIntersectionType\"===r||\"TSConditionalType\"===r||\"TSInferType\"===r||\"TSParenthesizedType\"===r||\"TSTypeOperator\"===r||\"TSIndexedAccessType\"===r||\"TSMappedType\"===r||\"TSLiteralType\"===r||\"TSExpressionWithTypeArguments\"===r||\"TSImportType\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isTSBaseType=function(e,t){if(!e)return!1;const r=e.type;return(\"TSAnyKeyword\"===r||\"TSBooleanKeyword\"===r||\"TSBigIntKeyword\"===r||\"TSIntrinsicKeyword\"===r||\"TSNeverKeyword\"===r||\"TSNullKeyword\"===r||\"TSNumberKeyword\"===r||\"TSObjectKeyword\"===r||\"TSStringKeyword\"===r||\"TSSymbolKeyword\"===r||\"TSUndefinedKeyword\"===r||\"TSUnknownKeyword\"===r||\"TSVoidKeyword\"===r||\"TSThisType\"===r||\"TSLiteralType\"===r)&&(void 0===t||(0,n.default)(e,t))},t.isNumberLiteral=function(e,t){return!!e&&(\"NumberLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isRegexLiteral=function(e,t){return!!e&&(\"RegexLiteral\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isRestProperty=function(e,t){return!!e&&(\"RestProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))},t.isSpreadProperty=function(e,t){return!!e&&(\"SpreadProperty\"===e.type&&(void 0===t||(0,n.default)(e,t)))};var n=r(127)},(e,t,r)=>{var n=function(e){return e&&e.Math==Math&&e};e.exports=n(\"object\"==typeof globalThis&&globalThis)||n(\"object\"==typeof window&&window)||n(\"object\"==typeof self&&self)||n(\"object\"==typeof r.g&&r.g)||function(){return this}()||Function(\"return this\")()},(e,t,r)=>{const n=r(42),{MAX_LENGTH:s,MAX_SAFE_INTEGER:i}=r(41),{re:o,t:a}=r(23),l=r(43),{compareIdentifiers:c}=r(94);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(\"string\"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>s)throw new TypeError(`version is longer than ${s} characters`);n(\"SemVer\",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError(\"Invalid major version\");if(this.minor>i||this.minor<0)throw new TypeError(\"Invalid minor version\");if(this.patch>i||this.patch<0)throw new TypeError(\"Invalid patch version\");r[4]?this.prerelease=r[4].split(\".\").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split(\".\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\".\")}`),this.version}toString(){return this.version}compare(e){if(n(\"SemVer.compare\",this.version,this.options,e),!(e instanceof u)){if(\"string\"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(n(\"prerelease compare\",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return c(r,s)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(n(\"prerelease compare\",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return c(r,s)}while(++t)}inc(e,t){switch(e){case\"premajor\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\"pre\",t);break;case\"preminor\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\"pre\",t);break;case\"prepatch\":this.prerelease.length=0,this.inc(\"patch\",t),this.inc(\"pre\",t);break;case\"prerelease\":0===this.prerelease.length&&this.inc(\"patch\",t),this.inc(\"pre\",t);break;case\"major\":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\"minor\":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case\"patch\":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case\"pre\":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)\"number\"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.declare=function(e){return(t,s,i)=>{var o;let a;for(const e of Object.keys(r)){var l;t[e]||(a=null!=(l=a)?l:n(t),a[e]=r[e](a))}return e(null!=(o=a)?o:t,s||{},i)}};const r={assertVersion:e=>t=>{!function(e,t){if(\"number\"==typeof e){if(!Number.isInteger(e))throw new Error(\"Expected string or integer value.\");e=`^${e}.0.0-0`}if(\"string\"!=typeof e)throw new Error(\"Expected string or integer value.\");const r=Error.stackTraceLimit;let n;throw\"number\"==typeof r&&r<25&&(Error.stackTraceLimit=25),n=\"7.\"===t.slice(0,2)?new Error(`Requires Babel \"^7.0.0-beta.41\", but was loaded with \"${t}\". You'll need to update your @babel/core version.`):new Error(`Requires Babel \"${e}\", but was loaded with \"${t}\". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention \"@babel/core\" or \"babel-core\" to see what is calling Babel.`),\"number\"==typeof r&&(Error.stackTraceLimit=r),Object.assign(n,{code:\"BABEL_VERSION_UNSUPPORTED\",version:t,range:e})}(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function n(e){let t=null;return\"string\"==typeof e.version&&/^7\\./.test(e.version)&&(t=Object.getPrototypeOf(e),!t||s(t,\"version\")&&s(t,\"transform\")&&s(t,\"template\")&&s(t,\"types\")||(t=null)),Object.assign({},t,e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},(e,t)=>{\"use strict\";t.__esModule=!0,t.UNIVERSAL=t.ATTRIBUTE=t.CLASS=t.COMBINATOR=t.COMMENT=t.ID=t.NESTING=t.PSEUDO=t.ROOT=t.SELECTOR=t.STRING=t.TAG=void 0,t.TAG=\"tag\",t.STRING=\"string\",t.SELECTOR=\"selector\",t.ROOT=\"root\",t.PSEUDO=\"pseudo\",t.NESTING=\"nesting\",t.ID=\"id\",t.COMMENT=\"comment\",t.COMBINATOR=\"combinator\",t.CLASS=\"class\",t.ATTRIBUTE=\"attribute\",t.UNIVERSAL=\"universal\"},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.arrayExpression=function(e){return(0,n.default)(\"ArrayExpression\",...arguments)},t.assignmentExpression=function(e,t,r){return(0,n.default)(\"AssignmentExpression\",...arguments)},t.binaryExpression=function(e,t,r){return(0,n.default)(\"BinaryExpression\",...arguments)},t.interpreterDirective=function(e){return(0,n.default)(\"InterpreterDirective\",...arguments)},t.directive=function(e){return(0,n.default)(\"Directive\",...arguments)},t.directiveLiteral=function(e){return(0,n.default)(\"DirectiveLiteral\",...arguments)},t.blockStatement=function(e,t){return(0,n.default)(\"BlockStatement\",...arguments)},t.breakStatement=function(e){return(0,n.default)(\"BreakStatement\",...arguments)},t.callExpression=function(e,t){return(0,n.default)(\"CallExpression\",...arguments)},t.catchClause=function(e,t){return(0,n.default)(\"CatchClause\",...arguments)},t.conditionalExpression=function(e,t,r){return(0,n.default)(\"ConditionalExpression\",...arguments)},t.continueStatement=function(e){return(0,n.default)(\"ContinueStatement\",...arguments)},t.debuggerStatement=function(){return(0,n.default)(\"DebuggerStatement\",...arguments)},t.doWhileStatement=function(e,t){return(0,n.default)(\"DoWhileStatement\",...arguments)},t.emptyStatement=function(){return(0,n.default)(\"EmptyStatement\",...arguments)},t.expressionStatement=function(e){return(0,n.default)(\"ExpressionStatement\",...arguments)},t.file=function(e,t,r){return(0,n.default)(\"File\",...arguments)},t.forInStatement=function(e,t,r){return(0,n.default)(\"ForInStatement\",...arguments)},t.forStatement=function(e,t,r,s){return(0,n.default)(\"ForStatement\",...arguments)},t.functionDeclaration=function(e,t,r,s,i){return(0,n.default)(\"FunctionDeclaration\",...arguments)},t.functionExpression=function(e,t,r,s,i){return(0,n.default)(\"FunctionExpression\",...arguments)},t.identifier=function(e){return(0,n.default)(\"Identifier\",...arguments)},t.ifStatement=function(e,t,r){return(0,n.default)(\"IfStatement\",...arguments)},t.labeledStatement=function(e,t){return(0,n.default)(\"LabeledStatement\",...arguments)},t.stringLiteral=function(e){return(0,n.default)(\"StringLiteral\",...arguments)},t.numericLiteral=function(e){return(0,n.default)(\"NumericLiteral\",...arguments)},t.nullLiteral=function(){return(0,n.default)(\"NullLiteral\",...arguments)},t.booleanLiteral=function(e){return(0,n.default)(\"BooleanLiteral\",...arguments)},t.regExpLiteral=function(e,t){return(0,n.default)(\"RegExpLiteral\",...arguments)},t.logicalExpression=function(e,t,r){return(0,n.default)(\"LogicalExpression\",...arguments)},t.memberExpression=function(e,t,r,s){return(0,n.default)(\"MemberExpression\",...arguments)},t.newExpression=function(e,t){return(0,n.default)(\"NewExpression\",...arguments)},t.program=function(e,t,r,s){return(0,n.default)(\"Program\",...arguments)},t.objectExpression=function(e){return(0,n.default)(\"ObjectExpression\",...arguments)},t.objectMethod=function(e,t,r,s,i,o,a){return(0,n.default)(\"ObjectMethod\",...arguments)},t.objectProperty=function(e,t,r,s,i){return(0,n.default)(\"ObjectProperty\",...arguments)},t.restElement=function(e){return(0,n.default)(\"RestElement\",...arguments)},t.returnStatement=function(e){return(0,n.default)(\"ReturnStatement\",...arguments)},t.sequenceExpression=function(e){return(0,n.default)(\"SequenceExpression\",...arguments)},t.parenthesizedExpression=function(e){return(0,n.default)(\"ParenthesizedExpression\",...arguments)},t.switchCase=function(e,t){return(0,n.default)(\"SwitchCase\",...arguments)},t.switchStatement=function(e,t){return(0,n.default)(\"SwitchStatement\",...arguments)},t.thisExpression=function(){return(0,n.default)(\"ThisExpression\",...arguments)},t.throwStatement=function(e){return(0,n.default)(\"ThrowStatement\",...arguments)},t.tryStatement=function(e,t,r){return(0,n.default)(\"TryStatement\",...arguments)},t.unaryExpression=function(e,t,r){return(0,n.default)(\"UnaryExpression\",...arguments)},t.updateExpression=function(e,t,r){return(0,n.default)(\"UpdateExpression\",...arguments)},t.variableDeclaration=function(e,t){return(0,n.default)(\"VariableDeclaration\",...arguments)},t.variableDeclarator=function(e,t){return(0,n.default)(\"VariableDeclarator\",...arguments)},t.whileStatement=function(e,t){return(0,n.default)(\"WhileStatement\",...arguments)},t.withStatement=function(e,t){return(0,n.default)(\"WithStatement\",...arguments)},t.assignmentPattern=function(e,t){return(0,n.default)(\"AssignmentPattern\",...arguments)},t.arrayPattern=function(e){return(0,n.default)(\"ArrayPattern\",...arguments)},t.arrowFunctionExpression=function(e,t,r){return(0,n.default)(\"ArrowFunctionExpression\",...arguments)},t.classBody=function(e){return(0,n.default)(\"ClassBody\",...arguments)},t.classExpression=function(e,t,r,s){return(0,n.default)(\"ClassExpression\",...arguments)},t.classDeclaration=function(e,t,r,s){return(0,n.default)(\"ClassDeclaration\",...arguments)},t.exportAllDeclaration=function(e){return(0,n.default)(\"ExportAllDeclaration\",...arguments)},t.exportDefaultDeclaration=function(e){return(0,n.default)(\"ExportDefaultDeclaration\",...arguments)},t.exportNamedDeclaration=function(e,t,r){return(0,n.default)(\"ExportNamedDeclaration\",...arguments)},t.exportSpecifier=function(e,t){return(0,n.default)(\"ExportSpecifier\",...arguments)},t.forOfStatement=function(e,t,r,s){return(0,n.default)(\"ForOfStatement\",...arguments)},t.importDeclaration=function(e,t){return(0,n.default)(\"ImportDeclaration\",...arguments)},t.importDefaultSpecifier=function(e){return(0,n.default)(\"ImportDefaultSpecifier\",...arguments)},t.importNamespaceSpecifier=function(e){return(0,n.default)(\"ImportNamespaceSpecifier\",...arguments)},t.importSpecifier=function(e,t){return(0,n.default)(\"ImportSpecifier\",...arguments)},t.metaProperty=function(e,t){return(0,n.default)(\"MetaProperty\",...arguments)},t.classMethod=function(e,t,r,s,i,o,a,l){return(0,n.default)(\"ClassMethod\",...arguments)},t.objectPattern=function(e){return(0,n.default)(\"ObjectPattern\",...arguments)},t.spreadElement=function(e){return(0,n.default)(\"SpreadElement\",...arguments)},t.super=function(){return(0,n.default)(\"Super\",...arguments)},t.taggedTemplateExpression=function(e,t){return(0,n.default)(\"TaggedTemplateExpression\",...arguments)},t.templateElement=function(e,t){return(0,n.default)(\"TemplateElement\",...arguments)},t.templateLiteral=function(e,t){return(0,n.default)(\"TemplateLiteral\",...arguments)},t.yieldExpression=function(e,t){return(0,n.default)(\"YieldExpression\",...arguments)},t.awaitExpression=function(e){return(0,n.default)(\"AwaitExpression\",...arguments)},t.import=function(){return(0,n.default)(\"Import\",...arguments)},t.bigIntLiteral=function(e){return(0,n.default)(\"BigIntLiteral\",...arguments)},t.exportNamespaceSpecifier=function(e){return(0,n.default)(\"ExportNamespaceSpecifier\",...arguments)},t.optionalMemberExpression=function(e,t,r,s){return(0,n.default)(\"OptionalMemberExpression\",...arguments)},t.optionalCallExpression=function(e,t,r){return(0,n.default)(\"OptionalCallExpression\",...arguments)},t.anyTypeAnnotation=function(){return(0,n.default)(\"AnyTypeAnnotation\",...arguments)},t.arrayTypeAnnotation=function(e){return(0,n.default)(\"ArrayTypeAnnotation\",...arguments)},t.booleanTypeAnnotation=function(){return(0,n.default)(\"BooleanTypeAnnotation\",...arguments)},t.booleanLiteralTypeAnnotation=function(e){return(0,n.default)(\"BooleanLiteralTypeAnnotation\",...arguments)},t.nullLiteralTypeAnnotation=function(){return(0,n.default)(\"NullLiteralTypeAnnotation\",...arguments)},t.classImplements=function(e,t){return(0,n.default)(\"ClassImplements\",...arguments)},t.declareClass=function(e,t,r,s){return(0,n.default)(\"DeclareClass\",...arguments)},t.declareFunction=function(e){return(0,n.default)(\"DeclareFunction\",...arguments)},t.declareInterface=function(e,t,r,s){return(0,n.default)(\"DeclareInterface\",...arguments)},t.declareModule=function(e,t,r){return(0,n.default)(\"DeclareModule\",...arguments)},t.declareModuleExports=function(e){return(0,n.default)(\"DeclareModuleExports\",...arguments)},t.declareTypeAlias=function(e,t,r){return(0,n.default)(\"DeclareTypeAlias\",...arguments)},t.declareOpaqueType=function(e,t,r){return(0,n.default)(\"DeclareOpaqueType\",...arguments)},t.declareVariable=function(e){return(0,n.default)(\"DeclareVariable\",...arguments)},t.declareExportDeclaration=function(e,t,r){return(0,n.default)(\"DeclareExportDeclaration\",...arguments)},t.declareExportAllDeclaration=function(e){return(0,n.default)(\"DeclareExportAllDeclaration\",...arguments)},t.declaredPredicate=function(e){return(0,n.default)(\"DeclaredPredicate\",...arguments)},t.existsTypeAnnotation=function(){return(0,n.default)(\"ExistsTypeAnnotation\",...arguments)},t.functionTypeAnnotation=function(e,t,r,s){return(0,n.default)(\"FunctionTypeAnnotation\",...arguments)},t.functionTypeParam=function(e,t){return(0,n.default)(\"FunctionTypeParam\",...arguments)},t.genericTypeAnnotation=function(e,t){return(0,n.default)(\"GenericTypeAnnotation\",...arguments)},t.inferredPredicate=function(){return(0,n.default)(\"InferredPredicate\",...arguments)},t.interfaceExtends=function(e,t){return(0,n.default)(\"InterfaceExtends\",...arguments)},t.interfaceDeclaration=function(e,t,r,s){return(0,n.default)(\"InterfaceDeclaration\",...arguments)},t.interfaceTypeAnnotation=function(e,t){return(0,n.default)(\"InterfaceTypeAnnotation\",...arguments)},t.intersectionTypeAnnotation=function(e){return(0,n.default)(\"IntersectionTypeAnnotation\",...arguments)},t.mixedTypeAnnotation=function(){return(0,n.default)(\"MixedTypeAnnotation\",...arguments)},t.emptyTypeAnnotation=function(){return(0,n.default)(\"EmptyTypeAnnotation\",...arguments)},t.nullableTypeAnnotation=function(e){return(0,n.default)(\"NullableTypeAnnotation\",...arguments)},t.numberLiteralTypeAnnotation=function(e){return(0,n.default)(\"NumberLiteralTypeAnnotation\",...arguments)},t.numberTypeAnnotation=function(){return(0,n.default)(\"NumberTypeAnnotation\",...arguments)},t.objectTypeAnnotation=function(e,t,r,s,i){return(0,n.default)(\"ObjectTypeAnnotation\",...arguments)},t.objectTypeInternalSlot=function(e,t,r,s,i){return(0,n.default)(\"ObjectTypeInternalSlot\",...arguments)},t.objectTypeCallProperty=function(e){return(0,n.default)(\"ObjectTypeCallProperty\",...arguments)},t.objectTypeIndexer=function(e,t,r,s){return(0,n.default)(\"ObjectTypeIndexer\",...arguments)},t.objectTypeProperty=function(e,t,r){return(0,n.default)(\"ObjectTypeProperty\",...arguments)},t.objectTypeSpreadProperty=function(e){return(0,n.default)(\"ObjectTypeSpreadProperty\",...arguments)},t.opaqueType=function(e,t,r,s){return(0,n.default)(\"OpaqueType\",...arguments)},t.qualifiedTypeIdentifier=function(e,t){return(0,n.default)(\"QualifiedTypeIdentifier\",...arguments)},t.stringLiteralTypeAnnotation=function(e){return(0,n.default)(\"StringLiteralTypeAnnotation\",...arguments)},t.stringTypeAnnotation=function(){return(0,n.default)(\"StringTypeAnnotation\",...arguments)},t.symbolTypeAnnotation=function(){return(0,n.default)(\"SymbolTypeAnnotation\",...arguments)},t.thisTypeAnnotation=function(){return(0,n.default)(\"ThisTypeAnnotation\",...arguments)},t.tupleTypeAnnotation=function(e){return(0,n.default)(\"TupleTypeAnnotation\",...arguments)},t.typeofTypeAnnotation=function(e){return(0,n.default)(\"TypeofTypeAnnotation\",...arguments)},t.typeAlias=function(e,t,r){return(0,n.default)(\"TypeAlias\",...arguments)},t.typeAnnotation=function(e){return(0,n.default)(\"TypeAnnotation\",...arguments)},t.typeCastExpression=function(e,t){return(0,n.default)(\"TypeCastExpression\",...arguments)},t.typeParameter=function(e,t,r){return(0,n.default)(\"TypeParameter\",...arguments)},t.typeParameterDeclaration=function(e){return(0,n.default)(\"TypeParameterDeclaration\",...arguments)},t.typeParameterInstantiation=function(e){return(0,n.default)(\"TypeParameterInstantiation\",...arguments)},t.unionTypeAnnotation=function(e){return(0,n.default)(\"UnionTypeAnnotation\",...arguments)},t.variance=function(e){return(0,n.default)(\"Variance\",...arguments)},t.voidTypeAnnotation=function(){return(0,n.default)(\"VoidTypeAnnotation\",...arguments)},t.enumDeclaration=function(e,t){return(0,n.default)(\"EnumDeclaration\",...arguments)},t.enumBooleanBody=function(e){return(0,n.default)(\"EnumBooleanBody\",...arguments)},t.enumNumberBody=function(e){return(0,n.default)(\"EnumNumberBody\",...arguments)},t.enumStringBody=function(e){return(0,n.default)(\"EnumStringBody\",...arguments)},t.enumSymbolBody=function(e){return(0,n.default)(\"EnumSymbolBody\",...arguments)},t.enumBooleanMember=function(e){return(0,n.default)(\"EnumBooleanMember\",...arguments)},t.enumNumberMember=function(e,t){return(0,n.default)(\"EnumNumberMember\",...arguments)},t.enumStringMember=function(e,t){return(0,n.default)(\"EnumStringMember\",...arguments)},t.enumDefaultedMember=function(e){return(0,n.default)(\"EnumDefaultedMember\",...arguments)},t.indexedAccessType=function(e,t){return(0,n.default)(\"IndexedAccessType\",...arguments)},t.optionalIndexedAccessType=function(e,t){return(0,n.default)(\"OptionalIndexedAccessType\",...arguments)},t.jSXAttribute=t.jsxAttribute=function(e,t){return(0,n.default)(\"JSXAttribute\",...arguments)},t.jSXClosingElement=t.jsxClosingElement=function(e){return(0,n.default)(\"JSXClosingElement\",...arguments)},t.jSXElement=t.jsxElement=function(e,t,r,s){return(0,n.default)(\"JSXElement\",...arguments)},t.jSXEmptyExpression=t.jsxEmptyExpression=function(){return(0,n.default)(\"JSXEmptyExpression\",...arguments)},t.jSXExpressionContainer=t.jsxExpressionContainer=function(e){return(0,n.default)(\"JSXExpressionContainer\",...arguments)},t.jSXSpreadChild=t.jsxSpreadChild=function(e){return(0,n.default)(\"JSXSpreadChild\",...arguments)},t.jSXIdentifier=t.jsxIdentifier=function(e){return(0,n.default)(\"JSXIdentifier\",...arguments)},t.jSXMemberExpression=t.jsxMemberExpression=function(e,t){return(0,n.default)(\"JSXMemberExpression\",...arguments)},t.jSXNamespacedName=t.jsxNamespacedName=function(e,t){return(0,n.default)(\"JSXNamespacedName\",...arguments)},t.jSXOpeningElement=t.jsxOpeningElement=function(e,t,r){return(0,n.default)(\"JSXOpeningElement\",...arguments)},t.jSXSpreadAttribute=t.jsxSpreadAttribute=function(e){return(0,n.default)(\"JSXSpreadAttribute\",...arguments)},t.jSXText=t.jsxText=function(e){return(0,n.default)(\"JSXText\",...arguments)},t.jSXFragment=t.jsxFragment=function(e,t,r){return(0,n.default)(\"JSXFragment\",...arguments)},t.jSXOpeningFragment=t.jsxOpeningFragment=function(){return(0,n.default)(\"JSXOpeningFragment\",...arguments)},t.jSXClosingFragment=t.jsxClosingFragment=function(){return(0,n.default)(\"JSXClosingFragment\",...arguments)},t.noop=function(){return(0,n.default)(\"Noop\",...arguments)},t.placeholder=function(e,t){return(0,n.default)(\"Placeholder\",...arguments)},t.v8IntrinsicIdentifier=function(e){return(0,n.default)(\"V8IntrinsicIdentifier\",...arguments)},t.argumentPlaceholder=function(){return(0,n.default)(\"ArgumentPlaceholder\",...arguments)},t.bindExpression=function(e,t){return(0,n.default)(\"BindExpression\",...arguments)},t.classProperty=function(e,t,r,s,i,o){return(0,n.default)(\"ClassProperty\",...arguments)},t.pipelineTopicExpression=function(e){return(0,n.default)(\"PipelineTopicExpression\",...arguments)},t.pipelineBareFunction=function(e){return(0,n.default)(\"PipelineBareFunction\",...arguments)},t.pipelinePrimaryTopicReference=function(){return(0,n.default)(\"PipelinePrimaryTopicReference\",...arguments)},t.classPrivateProperty=function(e,t,r,s){return(0,n.default)(\"ClassPrivateProperty\",...arguments)},t.classPrivateMethod=function(e,t,r,s,i){return(0,n.default)(\"ClassPrivateMethod\",...arguments)},t.importAttribute=function(e,t){return(0,n.default)(\"ImportAttribute\",...arguments)},t.decorator=function(e){return(0,n.default)(\"Decorator\",...arguments)},t.doExpression=function(e,t){return(0,n.default)(\"DoExpression\",...arguments)},t.exportDefaultSpecifier=function(e){return(0,n.default)(\"ExportDefaultSpecifier\",...arguments)},t.privateName=function(e){return(0,n.default)(\"PrivateName\",...arguments)},t.recordExpression=function(e){return(0,n.default)(\"RecordExpression\",...arguments)},t.tupleExpression=function(e){return(0,n.default)(\"TupleExpression\",...arguments)},t.decimalLiteral=function(e){return(0,n.default)(\"DecimalLiteral\",...arguments)},t.staticBlock=function(e){return(0,n.default)(\"StaticBlock\",...arguments)},t.moduleExpression=function(e){return(0,n.default)(\"ModuleExpression\",...arguments)},t.tSParameterProperty=t.tsParameterProperty=function(e){return(0,n.default)(\"TSParameterProperty\",...arguments)},t.tSDeclareFunction=t.tsDeclareFunction=function(e,t,r,s){return(0,n.default)(\"TSDeclareFunction\",...arguments)},t.tSDeclareMethod=t.tsDeclareMethod=function(e,t,r,s,i){return(0,n.default)(\"TSDeclareMethod\",...arguments)},t.tSQualifiedName=t.tsQualifiedName=function(e,t){return(0,n.default)(\"TSQualifiedName\",...arguments)},t.tSCallSignatureDeclaration=t.tsCallSignatureDeclaration=function(e,t,r){return(0,n.default)(\"TSCallSignatureDeclaration\",...arguments)},t.tSConstructSignatureDeclaration=t.tsConstructSignatureDeclaration=function(e,t,r){return(0,n.default)(\"TSConstructSignatureDeclaration\",...arguments)},t.tSPropertySignature=t.tsPropertySignature=function(e,t,r){return(0,n.default)(\"TSPropertySignature\",...arguments)},t.tSMethodSignature=t.tsMethodSignature=function(e,t,r,s){return(0,n.default)(\"TSMethodSignature\",...arguments)},t.tSIndexSignature=t.tsIndexSignature=function(e,t){return(0,n.default)(\"TSIndexSignature\",...arguments)},t.tSAnyKeyword=t.tsAnyKeyword=function(){return(0,n.default)(\"TSAnyKeyword\",...arguments)},t.tSBooleanKeyword=t.tsBooleanKeyword=function(){return(0,n.default)(\"TSBooleanKeyword\",...arguments)},t.tSBigIntKeyword=t.tsBigIntKeyword=function(){return(0,n.default)(\"TSBigIntKeyword\",...arguments)},t.tSIntrinsicKeyword=t.tsIntrinsicKeyword=function(){return(0,n.default)(\"TSIntrinsicKeyword\",...arguments)},t.tSNeverKeyword=t.tsNeverKeyword=function(){return(0,n.default)(\"TSNeverKeyword\",...arguments)},t.tSNullKeyword=t.tsNullKeyword=function(){return(0,n.default)(\"TSNullKeyword\",...arguments)},t.tSNumberKeyword=t.tsNumberKeyword=function(){return(0,n.default)(\"TSNumberKeyword\",...arguments)},t.tSObjectKeyword=t.tsObjectKeyword=function(){return(0,n.default)(\"TSObjectKeyword\",...arguments)},t.tSStringKeyword=t.tsStringKeyword=function(){return(0,n.default)(\"TSStringKeyword\",...arguments)},t.tSSymbolKeyword=t.tsSymbolKeyword=function(){return(0,n.default)(\"TSSymbolKeyword\",...arguments)},t.tSUndefinedKeyword=t.tsUndefinedKeyword=function(){return(0,n.default)(\"TSUndefinedKeyword\",...arguments)},t.tSUnknownKeyword=t.tsUnknownKeyword=function(){return(0,n.default)(\"TSUnknownKeyword\",...arguments)},t.tSVoidKeyword=t.tsVoidKeyword=function(){return(0,n.default)(\"TSVoidKeyword\",...arguments)},t.tSThisType=t.tsThisType=function(){return(0,n.default)(\"TSThisType\",...arguments)},t.tSFunctionType=t.tsFunctionType=function(e,t,r){return(0,n.default)(\"TSFunctionType\",...arguments)},t.tSConstructorType=t.tsConstructorType=function(e,t,r){return(0,n.default)(\"TSConstructorType\",...arguments)},t.tSTypeReference=t.tsTypeReference=function(e,t){return(0,n.default)(\"TSTypeReference\",...arguments)},t.tSTypePredicate=t.tsTypePredicate=function(e,t,r){return(0,n.default)(\"TSTypePredicate\",...arguments)},t.tSTypeQuery=t.tsTypeQuery=function(e){return(0,n.default)(\"TSTypeQuery\",...arguments)},t.tSTypeLiteral=t.tsTypeLiteral=function(e){return(0,n.default)(\"TSTypeLiteral\",...arguments)},t.tSArrayType=t.tsArrayType=function(e){return(0,n.default)(\"TSArrayType\",...arguments)},t.tSTupleType=t.tsTupleType=function(e){return(0,n.default)(\"TSTupleType\",...arguments)},t.tSOptionalType=t.tsOptionalType=function(e){return(0,n.default)(\"TSOptionalType\",...arguments)},t.tSRestType=t.tsRestType=function(e){return(0,n.default)(\"TSRestType\",...arguments)},t.tSNamedTupleMember=t.tsNamedTupleMember=function(e,t,r){return(0,n.default)(\"TSNamedTupleMember\",...arguments)},t.tSUnionType=t.tsUnionType=function(e){return(0,n.default)(\"TSUnionType\",...arguments)},t.tSIntersectionType=t.tsIntersectionType=function(e){return(0,n.default)(\"TSIntersectionType\",...arguments)},t.tSConditionalType=t.tsConditionalType=function(e,t,r,s){return(0,n.default)(\"TSConditionalType\",...arguments)},t.tSInferType=t.tsInferType=function(e){return(0,n.default)(\"TSInferType\",...arguments)},t.tSParenthesizedType=t.tsParenthesizedType=function(e){return(0,n.default)(\"TSParenthesizedType\",...arguments)},t.tSTypeOperator=t.tsTypeOperator=function(e){return(0,n.default)(\"TSTypeOperator\",...arguments)},t.tSIndexedAccessType=t.tsIndexedAccessType=function(e,t){return(0,n.default)(\"TSIndexedAccessType\",...arguments)},t.tSMappedType=t.tsMappedType=function(e,t,r){return(0,n.default)(\"TSMappedType\",...arguments)},t.tSLiteralType=t.tsLiteralType=function(e){return(0,n.default)(\"TSLiteralType\",...arguments)},t.tSExpressionWithTypeArguments=t.tsExpressionWithTypeArguments=function(e,t){return(0,n.default)(\"TSExpressionWithTypeArguments\",...arguments)},t.tSInterfaceDeclaration=t.tsInterfaceDeclaration=function(e,t,r,s){return(0,n.default)(\"TSInterfaceDeclaration\",...arguments)},t.tSInterfaceBody=t.tsInterfaceBody=function(e){return(0,n.default)(\"TSInterfaceBody\",...arguments)},t.tSTypeAliasDeclaration=t.tsTypeAliasDeclaration=function(e,t,r){return(0,n.default)(\"TSTypeAliasDeclaration\",...arguments)},t.tSAsExpression=t.tsAsExpression=function(e,t){return(0,n.default)(\"TSAsExpression\",...arguments)},t.tSTypeAssertion=t.tsTypeAssertion=function(e,t){return(0,n.default)(\"TSTypeAssertion\",...arguments)},t.tSEnumDeclaration=t.tsEnumDeclaration=function(e,t){return(0,n.default)(\"TSEnumDeclaration\",...arguments)},t.tSEnumMember=t.tsEnumMember=function(e,t){return(0,n.default)(\"TSEnumMember\",...arguments)},t.tSModuleDeclaration=t.tsModuleDeclaration=function(e,t){return(0,n.default)(\"TSModuleDeclaration\",...arguments)},t.tSModuleBlock=t.tsModuleBlock=function(e){return(0,n.default)(\"TSModuleBlock\",...arguments)},t.tSImportType=t.tsImportType=function(e,t,r){return(0,n.default)(\"TSImportType\",...arguments)},t.tSImportEqualsDeclaration=t.tsImportEqualsDeclaration=function(e,t){return(0,n.default)(\"TSImportEqualsDeclaration\",...arguments)},t.tSExternalModuleReference=t.tsExternalModuleReference=function(e){return(0,n.default)(\"TSExternalModuleReference\",...arguments)},t.tSNonNullExpression=t.tsNonNullExpression=function(e){return(0,n.default)(\"TSNonNullExpression\",...arguments)},t.tSExportAssignment=t.tsExportAssignment=function(e){return(0,n.default)(\"TSExportAssignment\",...arguments)},t.tSNamespaceExportDeclaration=t.tsNamespaceExportDeclaration=function(e){return(0,n.default)(\"TSNamespaceExportDeclaration\",...arguments)},t.tSTypeAnnotation=t.tsTypeAnnotation=function(e){return(0,n.default)(\"TSTypeAnnotation\",...arguments)},t.tSTypeParameterInstantiation=t.tsTypeParameterInstantiation=function(e){return(0,n.default)(\"TSTypeParameterInstantiation\",...arguments)},t.tSTypeParameterDeclaration=t.tsTypeParameterDeclaration=function(e){return(0,n.default)(\"TSTypeParameterDeclaration\",...arguments)},t.tSTypeParameter=t.tsTypeParameter=function(e,t,r){return(0,n.default)(\"TSTypeParameter\",...arguments)},t.numberLiteral=function(...e){return(0,n.default)(\"NumberLiteral\",...e)},t.regexLiteral=function(...e){return(0,n.default)(\"RegexLiteral\",...e)},t.restProperty=function(...e){return(0,n.default)(\"RestProperty\",...e)},t.spreadProperty=function(...e){return(0,n.default)(\"SpreadProperty\",...e)};var n=r(367)},e=>{var t,r,n=e.exports={};function s(){throw new Error(\"setTimeout has not been defined\")}function i(){throw new Error(\"clearTimeout has not been defined\")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t=\"function\"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r=\"function\"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,l=[],c=!1,u=-1;function p(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=o(p);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u<t;)a&&a[u].run();u=-1,t=l.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function h(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new d(e,t)),1!==l.length||c||o(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title=\"browser\",n.browser=!0,n.env={},n.argv=[],n.version=\"\",n.versions={},n.on=h,n.addListener=h,n.once=h,n.off=h,n.removeListener=h,n.removeAllListeners=h,n.emit=h,n.prependListener=h,n.prependOnceListener=h,n.listeners=function(e){return[]},n.binding=function(e){throw new Error(\"process.binding is not supported\")},n.cwd=function(){return\"/\"},n.chdir=function(e){throw new Error(\"process.chdir is not supported\")},n.umask=function(){return 0}},(e,t,r)=>{\"use strict\";var n=r(7);function s(e){if(\"string\"!=typeof e)throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(e))}function i(e,t){for(var r,n=\"\",s=0,i=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(i===a-1||1===o);else if(i!==a-1&&2===o){if(n.length<2||2!==s||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf(\"/\");if(l!==n.length-1){-1===l?(n=\"\",s=0):s=(n=n.slice(0,l)).length-1-n.lastIndexOf(\"/\"),i=a,o=0;continue}}else if(2===n.length||1===n.length){n=\"\",s=0,i=a,o=0;continue}t&&(n.length>0?n+=\"/..\":n=\"..\",s=2)}else n.length>0?n+=\"/\"+e.slice(i+1,a):n=e.slice(i+1,a),s=a-i-1;i=a,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var o={resolve:function(){for(var e,t=\"\",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=n.cwd()),a=e),s(a),0!==a.length&&(t=a+\"/\"+t,r=47===a.charCodeAt(0))}return t=i(t,!r),r?t.length>0?\"/\"+t:\"/\":t.length>0?t:\".\"},normalize:function(e){if(s(e),0===e.length)return\".\";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e=\".\"),e.length>0&&r&&(e+=\"/\"),t?\"/\"+e:e},isAbsolute:function(e){return s(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return\".\";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];s(r),r.length>0&&(void 0===e?e=r:e+=\"/\"+r)}return void 0===e?\".\":o.normalize(e)},relative:function(e,t){if(s(e),s(t),e===t)return\"\";if((e=o.resolve(e))===(t=o.resolve(t)))return\"\";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,i=n-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var l=t.length-a,c=i<l?i:l,u=-1,p=0;p<=c;++p){if(p===c){if(l>c){if(47===t.charCodeAt(a+p))return t.slice(a+p+1);if(0===p)return t.slice(a+p)}else i>c&&(47===e.charCodeAt(r+p)?u=p:0===p&&(u=0));break}var f=e.charCodeAt(r+p);if(f!==t.charCodeAt(a+p))break;47===f&&(u=p)}var d=\"\";for(p=r+u+1;p<=n;++p)p!==n&&47!==e.charCodeAt(p)||(0===d.length?d+=\"..\":d+=\"/..\");return d.length>0?d+t.slice(a+u):(a+=u,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(s(e),0===e.length)return\".\";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?\"/\":\".\":r&&1===n?\"//\":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&\"string\"!=typeof t)throw new TypeError('\"ext\" argument must be a string');s(e);var r,n=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return\"\";var a=t.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!o){n=r+1;break}}else-1===l&&(o=!1,l=r+1),a>=0&&(c===t.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=l))}return n===i?i=l:-1===i&&(i=e.length),e.slice(n,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){n=r+1;break}}else-1===i&&(o=!1,i=r+1);return-1===i?\"\":e.slice(n,i)},extname:function(e){s(e);for(var t=-1,r=0,n=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===n&&(i=!1,n=a+1),46===l?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){r=a+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===r+1?\"\":e.slice(t,n)},format:function(e){if(null===e||\"object\"!=typeof e)throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||\"\")+(t.ext||\"\");return r?r===t.root?r+n:r+\"/\"+n:n}(0,e)},parse:function(e){s(e);var t={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(0===e.length)return t;var r,n=e.charCodeAt(0),i=47===n;i?(t.root=\"/\",r=1):r=0;for(var o=-1,a=0,l=-1,c=!0,u=e.length-1,p=0;u>=r;--u)if(47!==(n=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===n?-1===o?o=u:1!==p&&(p=1):-1!==o&&(p=-1);else if(!c){a=u+1;break}return-1===o||-1===l||0===p||1===p&&o===l-1&&o===a+1?-1!==l&&(t.base=t.name=0===a&&i?e.slice(1,l):e.slice(a,l)):(0===a&&i?(t.name=e.slice(1,o),t.base=e.slice(1,l)):(t.name=e.slice(a,o),t.base=e.slice(a,l)),t.ext=e.slice(o,l)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir=\"/\"),t},sep:\"/\",delimiter:\":\",win32:null,posix:null};o.posix=o,e.exports=o},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.Plugin=function(e){throw new Error(`The (${e}) Babel 5 plugin is being run with an unsupported Babel version.`)},Object.defineProperty(t,\"File\",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,\"buildExternalHelpers\",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,\"resolvePlugin\",{enumerable:!0,get:function(){return i.resolvePlugin}}),Object.defineProperty(t,\"resolvePreset\",{enumerable:!0,get:function(){return i.resolvePreset}}),Object.defineProperty(t,\"getEnv\",{enumerable:!0,get:function(){return o.getEnv}}),Object.defineProperty(t,\"tokTypes\",{enumerable:!0,get:function(){return l().tokTypes}}),Object.defineProperty(t,\"traverse\",{enumerable:!0,get:function(){return c().default}}),Object.defineProperty(t,\"template\",{enumerable:!0,get:function(){return u().default}}),Object.defineProperty(t,\"createConfigItem\",{enumerable:!0,get:function(){return p.createConfigItem}}),Object.defineProperty(t,\"createConfigItemSync\",{enumerable:!0,get:function(){return p.createConfigItemSync}}),Object.defineProperty(t,\"createConfigItemAsync\",{enumerable:!0,get:function(){return p.createConfigItemAsync}}),Object.defineProperty(t,\"loadPartialConfig\",{enumerable:!0,get:function(){return p.loadPartialConfig}}),Object.defineProperty(t,\"loadPartialConfigSync\",{enumerable:!0,get:function(){return p.loadPartialConfigSync}}),Object.defineProperty(t,\"loadPartialConfigAsync\",{enumerable:!0,get:function(){return p.loadPartialConfigAsync}}),Object.defineProperty(t,\"loadOptions\",{enumerable:!0,get:function(){return p.loadOptions}}),Object.defineProperty(t,\"loadOptionsSync\",{enumerable:!0,get:function(){return p.loadOptionsSync}}),Object.defineProperty(t,\"loadOptionsAsync\",{enumerable:!0,get:function(){return p.loadOptionsAsync}}),Object.defineProperty(t,\"transform\",{enumerable:!0,get:function(){return f.transform}}),Object.defineProperty(t,\"transformSync\",{enumerable:!0,get:function(){return f.transformSync}}),Object.defineProperty(t,\"transformAsync\",{enumerable:!0,get:function(){return f.transformAsync}}),Object.defineProperty(t,\"transformFile\",{enumerable:!0,get:function(){return d.transformFile}}),Object.defineProperty(t,\"transformFileSync\",{enumerable:!0,get:function(){return d.transformFileSync}}),Object.defineProperty(t,\"transformFileAsync\",{enumerable:!0,get:function(){return d.transformFileAsync}}),Object.defineProperty(t,\"transformFromAst\",{enumerable:!0,get:function(){return h.transformFromAst}}),Object.defineProperty(t,\"transformFromAstSync\",{enumerable:!0,get:function(){return h.transformFromAstSync}}),Object.defineProperty(t,\"transformFromAstAsync\",{enumerable:!0,get:function(){return h.transformFromAstAsync}}),Object.defineProperty(t,\"parse\",{enumerable:!0,get:function(){return m.parse}}),Object.defineProperty(t,\"parseSync\",{enumerable:!0,get:function(){return m.parseSync}}),Object.defineProperty(t,\"parseAsync\",{enumerable:!0,get:function(){return m.parseAsync}}),t.types=t.OptionManager=t.DEFAULT_EXTENSIONS=t.version=void 0;var n=r(126),s=r(465),i=r(77),o=r(286);function a(){const e=r(0);return a=function(){return e},e}function l(){const e=r(27);return l=function(){return e},e}function c(){const e=r(10);return c=function(){return e},e}function u(){const e=r(21);return u=function(){return e},e}Object.defineProperty(t,\"types\",{enumerable:!0,get:function(){return a()}});var p=r(78),f=r(486),d=r(498),h=r(499),m=r(500);t.version=\"7.14.6\";const y=Object.freeze([\".js\",\".jsx\",\".es6\",\".es\",\".mjs\",\".cjs\"]);t.DEFAULT_EXTENSIONS=y,t.OptionManager=class{init(e){return(0,p.loadOptions)(e)}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),Object.defineProperty(t,\"NodePath\",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,\"Scope\",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,\"Hub\",{enumerable:!0,get:function(){return c.default}}),t.visitors=t.default=void 0;var n=r(362),s=r(455);t.visitors=s;var i=r(0),o=r(34),a=r(19),l=r(231),c=r(456);function u(e,t={},r,n,o){if(e){if(!t.noScope&&!r&&\"Program\"!==e.type&&\"File\"!==e.type)throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.type} node without passing scope and parentPath.`);i.VISITOR_KEYS[e.type]&&(s.explode(t),u.node(e,t,r,n,o))}}var p=u;function f(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.default=p,u.visitors=s,u.verify=s.verify,u.explode=s.explode,u.cheap=function(e,t){return i.traverseFast(e,t)},u.node=function(e,t,r,s,o,a){const l=i.VISITOR_KEYS[e.type];if(!l)return;const c=new n.default(r,t,s,o);for(const t of l)if((!a||!a[t])&&c.visit(e,t))return},u.clearNode=function(e,t){i.removeProperties(e,t),o.path.delete(e)},u.removeProperties=function(e,t){return i.traverseFast(e,u.clearNode,t),e},u.hasType=function(e,t,r){if(null!=r&&r.includes(e.type))return!1;if(e.type===t)return!0;const n={has:!1,type:t};return u(e,{noScope:!0,denylist:r,enter:f},null,n),n.has},u.cache=o},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),Object.defineProperty(t,\"VISITOR_KEYS\",{enumerable:!0,get:function(){return s.VISITOR_KEYS}}),Object.defineProperty(t,\"ALIAS_KEYS\",{enumerable:!0,get:function(){return s.ALIAS_KEYS}}),Object.defineProperty(t,\"FLIPPED_ALIAS_KEYS\",{enumerable:!0,get:function(){return s.FLIPPED_ALIAS_KEYS}}),Object.defineProperty(t,\"NODE_FIELDS\",{enumerable:!0,get:function(){return s.NODE_FIELDS}}),Object.defineProperty(t,\"BUILDER_KEYS\",{enumerable:!0,get:function(){return s.BUILDER_KEYS}}),Object.defineProperty(t,\"DEPRECATED_KEYS\",{enumerable:!0,get:function(){return s.DEPRECATED_KEYS}}),Object.defineProperty(t,\"NODE_PARENT_VALIDATIONS\",{enumerable:!0,get:function(){return s.NODE_PARENT_VALIDATIONS}}),Object.defineProperty(t,\"PLACEHOLDERS\",{enumerable:!0,get:function(){return i.PLACEHOLDERS}}),Object.defineProperty(t,\"PLACEHOLDERS_ALIAS\",{enumerable:!0,get:function(){return i.PLACEHOLDERS_ALIAS}}),Object.defineProperty(t,\"PLACEHOLDERS_FLIPPED_ALIAS\",{enumerable:!0,get:function(){return i.PLACEHOLDERS_FLIPPED_ALIAS}}),t.TYPES=void 0;var n=r(215);r(128),r(370),r(371),r(372),r(373),r(374);var s=r(20),i=r(217);n(s.VISITOR_KEYS),n(s.ALIAS_KEYS),n(s.FLIPPED_ALIAS_KEYS),n(s.NODE_FIELDS),n(s.BUILDER_KEYS),n(s.DEPRECATED_KEYS),n(i.PLACEHOLDERS_ALIAS),n(i.PLACEHOLDERS_FLIPPED_ALIAS);const o=Object.keys(s.VISITOR_KEYS).concat(Object.keys(s.FLIPPED_ALIAS_KEYS)).concat(Object.keys(s.DEPRECATED_KEYS));t.TYPES=o},(e,t,r)=>{const n=r(3);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},(e,t,r)=>{class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\\s*\\|\\|\\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(\" \").trim())).join(\"||\").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(\",\")}:${e}`,r=s.get(t);if(r)return r;const n=this.options.loose,i=n?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(i,O(this.options.includePrerelease)),a(\"hyphen replace\",e),e=e.replace(c[u.COMPARATORTRIM],p),a(\"comparator trim\",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],f)).replace(c[u.CARETTRIM],d)).split(/\\s+/).join(\" \");const l=n?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],m=e.split(\" \").map((e=>g(e,this.options))).join(\" \").split(/\\s+/).map((e=>A(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new o(e,this.options))),y=(m.length,new Map);for(const e of m){if(h(e))return[e];y.set(e.value,e)}y.size>1&&y.has(\"\")&&y.delete(\"\");const b=[...y.values()];return s.set(t,b),b}intersects(e,t){if(!(e instanceof n))throw new TypeError(\"a Range is required\");return this.set.some((r=>y(r,t)&&e.set.some((e=>y(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if(\"string\"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(C(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const s=new(r(149))({max:1e3}),i=r(43),o=r(45),a=r(42),l=r(3),{re:c,t:u,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:d}=r(23),h=e=>\"<0.0.0-0\"===e.value,m=e=>\"\"===e.value,y=(e,t)=>{let r=!0;const n=e.slice();let s=n.pop();for(;r&&n.length;)r=n.every((e=>s.intersects(e,t))),s=n.pop();return r},g=(e,t)=>(a(\"comp\",e,t),e=x(e,t),a(\"caret\",e),e=v(e,t),a(\"tildes\",e),e=T(e,t),a(\"xrange\",e),e=P(e,t),a(\"stars\",e),e),b=e=>!e||\"x\"===e.toLowerCase()||\"*\"===e,v=(e,t)=>e.trim().split(/\\s+/).map((e=>E(e,t))).join(\" \"),E=(e,t)=>{const r=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(r,((t,r,n,s,i)=>{let o;return a(\"tilde\",e,t,r,n,s,i),b(r)?o=\"\":b(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:b(s)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a(\"replaceTilde pr\",i),o=`>=${r}.${n}.${s}-${i} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${s} <${r}.${+n+1}.0-0`,a(\"tilde return\",o),o}))},x=(e,t)=>e.trim().split(/\\s+/).map((e=>S(e,t))).join(\" \"),S=(e,t)=>{a(\"caret\",e,t);const r=t.loose?c[u.CARETLOOSE]:c[u.CARET],n=t.includePrerelease?\"-0\":\"\";return e.replace(r,((t,r,s,i,o)=>{let l;return a(\"caret\",e,t,r,s,i,o),b(r)?l=\"\":b(s)?l=`>=${r}.0.0${n} <${+r+1}.0.0-0`:b(i)?l=\"0\"===r?`>=${r}.${s}.0${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${n} <${+r+1}.0.0-0`:o?(a(\"replaceCaret pr\",o),l=\"0\"===r?\"0\"===s?`>=${r}.${s}.${i}-${o} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}-${o} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i}-${o} <${+r+1}.0.0-0`):(a(\"no pr\"),l=\"0\"===r?\"0\"===s?`>=${r}.${s}.${i}${n} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i} <${+r+1}.0.0-0`),a(\"caret return\",l),l}))},T=(e,t)=>(a(\"replaceXRanges\",e,t),e.split(/\\s+/).map((e=>w(e,t))).join(\" \")),w=(e,t)=>{e=e.trim();const r=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(r,((r,n,s,i,o,l)=>{a(\"xRange\",e,r,n,s,i,o,l);const c=b(s),u=c||b(i),p=u||b(o),f=p;return\"=\"===n&&f&&(n=\"\"),l=t.includePrerelease?\"-0\":\"\",c?r=\">\"===n||\"<\"===n?\"<0.0.0-0\":\"*\":n&&f?(u&&(i=0),o=0,\">\"===n?(n=\">=\",u?(s=+s+1,i=0,o=0):(i=+i+1,o=0)):\"<=\"===n&&(n=\"<\",u?s=+s+1:i=+i+1),\"<\"===n&&(l=\"-0\"),r=`${n+s}.${i}.${o}${l}`):u?r=`>=${s}.0.0${l} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${i}.0${l} <${s}.${+i+1}.0-0`),a(\"xRange return\",r),r}))},P=(e,t)=>(a(\"replaceStars\",e,t),e.trim().replace(c[u.STAR],\"\")),A=(e,t)=>(a(\"replaceGTE0\",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],\"\")),O=e=>(t,r,n,s,i,o,a,l,c,u,p,f,d)=>`${r=b(n)?\"\":b(s)?`>=${n}.0.0${e?\"-0\":\"\"}`:b(i)?`>=${n}.${s}.0${e?\"-0\":\"\"}`:o?`>=${r}`:`>=${r}${e?\"-0\":\"\"}`} ${l=b(c)?\"\":b(u)?`<${+c+1}.0.0-0`:b(p)?`<${c}.${+u+1}.0-0`:f?`<=${c}.${u}.${p}-${f}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),C=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},e=>{\"use strict\";const t=Symbol.for(\"gensync:v1:start\"),r=Symbol.for(\"gensync:v1:suspend\"),n=\"GENSYNC_OPTIONS_ERROR\",s=\"GENSYNC_RACE_NONEMPTY\";function i(e,t,r,s){if(typeof r===e||s&&void 0===r)return;let i;throw i=s?`Expected opts.${t} to be either a ${e}, or undefined.`:`Expected opts.${t} to be a ${e}.`,o(i,n)}function o(e,t){return Object.assign(new Error(e),{code:t})}function a({name:e,arity:n,sync:s,async:i}){return d(e,n,(function*(...e){const n=yield t;if(!n)return s.call(this,e);let o;try{i.call(this,e,(e=>{o||(o={value:e},n())}),(e=>{o||(o={err:e},n())}))}catch(e){o={err:e},n()}if(yield r,o.hasOwnProperty(\"err\"))throw o.err;return o.value}))}function l(e){let t;for(;!({value:t}=e.next()).done;)u(t,e);return t}function c(e,t,r){!function n(){try{let r;for(;!({value:r}=e.next()).done;){u(r,e);let t=!0,s=!1;const i=e.next((()=>{t?s=!0:n()}));if(t=!1,p(i,e),!s)return}return t(r)}catch(e){return r(e)}}()}function u(e,r){e!==t&&f(r,o(`Got unexpected yielded value in gensync generator: ${JSON.stringify(e)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,\"GENSYNC_EXPECTED_START\"))}function p({value:e,done:t},n){(t||e!==r)&&f(n,o(t?\"Unexpected generator completion. If you get this, it is probably a gensync bug.\":`Expected GENSYNC_SUSPEND, got ${JSON.stringify(e)}. If you get this, it is probably a gensync bug.`,\"GENSYNC_EXPECTED_SUSPEND\"))}function f(e,t){throw e.throw&&e.throw(t),t}function d(e,t,r){if(\"string\"==typeof e){const t=Object.getOwnPropertyDescriptor(r,\"name\");t&&!t.configurable||Object.defineProperty(r,\"name\",Object.assign(t||{},{configurable:!0,value:e}))}if(\"number\"==typeof t){const e=Object.getOwnPropertyDescriptor(r,\"length\");e&&!e.configurable||Object.defineProperty(r,\"length\",Object.assign(e||{},{configurable:!0,value:t}))}return r}e.exports=Object.assign((function(e){let t=e;return t=\"function\"!=typeof e?function({name:e,arity:t,sync:r,async:s,errback:l}){if(i(\"string\",\"name\",e,!0),i(\"number\",\"arity\",t,!0),i(\"function\",\"sync\",r),i(\"function\",\"async\",s,!0),i(\"function\",\"errback\",l,!0),s&&l)throw o(\"Expected one of either opts.async or opts.errback, but got _both_.\",n);if(\"string\"!=typeof e){let t;l&&l.name&&\"errback\"!==l.name&&(t=l.name),s&&s.name&&\"async\"!==s.name&&(t=s.name.replace(/Async$/,\"\")),r&&r.name&&\"sync\"!==r.name&&(t=r.name.replace(/Sync$/,\"\")),\"string\"==typeof t&&(e=t)}return\"number\"!=typeof t&&(t=r.length),a({name:e,arity:t,sync:function(e){return r.apply(this,e)},async:function(e,t,n){s?s.apply(this,e).then(t,n):l?l.call(this,...e,((e,r)=>{null==e?t(r):n(e)})):t(r.apply(this,e))}})}(e):function(e){return d(e.name,e.length,(function(...t){return e.apply(this,t)}))}(e),Object.assign(t,function(e){return{sync:function(...t){return l(e.apply(this,t))},async:function(...t){return new Promise(((r,n)=>{c(e.apply(this,t),r,n)}))},errback:function(...t){const r=t.pop();if(\"function\"!=typeof r)throw o(\"Asynchronous function called without callback\",\"GENSYNC_ERRBACK_NO_CALLBACK\");let n;try{n=e.apply(this,t)}catch(e){return void r(e)}c(n,(e=>r(void 0,e)),(e=>r(e)))}}}(t))}),{all:a({name:\"all\",arity:1,sync:function(e){return Array.from(e[0]).map((e=>l(e)))},async:function(e,t,r){const n=Array.from(e[0]);if(0===n.length)return void Promise.resolve().then((()=>t([])));let s=0;const i=n.map((()=>{}));n.forEach(((e,n)=>{c(e,(e=>{i[n]=e,s+=1,s===i.length&&t(i)}),r)}))}}),race:a({name:\"race\",arity:1,sync:function(e){const t=Array.from(e[0]);if(0===t.length)throw o(\"Must race at least 1 item\",s);return l(t[0])},async:function(e,t,r){const n=Array.from(e[0]);if(0===n.length)throw o(\"Must race at least 1 item\",s);for(const e of n)c(e,t,r)}})})},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=r(91);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function e(t,r){if(\"object\"!=typeof t||null===t)return t;var n=new t.constructor;for(var s in t)if(t.hasOwnProperty(s)){var i=t[s];\"parent\"===s&&\"object\"==typeof i?r&&(n[s]=r):n[s]=i instanceof Array?i.map((function(t){return e(t,n)})):e(i,n)}return n},o=function(){function e(e){void 0===e&&(e={}),Object.assign(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||\"\",this.spaces.after=this.spaces.after||\"\"}var t,r,o=e.prototype;return o.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},o.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},o.next=function(){return this.parent.at(this.parent.index(this)+1)},o.prev=function(){return this.parent.at(this.parent.index(this)-1)},o.clone=function(e){void 0===e&&(e={});var t=i(this);for(var r in e)t[r]=e[r];return t},o.appendToPropertyAndEscape=function(e,t,r){this.raws||(this.raws={});var n=this[e],s=this.raws[e];this[e]=n+t,s||r!==t?this.raws[e]=(s||n)+r:delete this.raws[e]},o.setPropertyAndEscape=function(e,t,r){this.raws||(this.raws={}),this[e]=t,this.raws[e]=r},o.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},o.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e||this.source.end.line<e||this.source.start.line===e&&this.source.start.column>t||this.source.end.line===e&&this.source.end.column<t)},o.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},o.valueToString=function(){return String(this.stringifyProperty(\"value\"))},o.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join(\"\")},t=e,(r=[{key:\"rawSpaceBefore\",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return void 0===e&&(e=this.spaces&&this.spaces.before),e||\"\"},set:function(e){(0,n.ensureObject)(this,\"raws\",\"spaces\"),this.raws.spaces.before=e}},{key:\"rawSpaceAfter\",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return void 0===e&&(e=this.spaces.after),e||\"\"},set:function(e){(0,n.ensureObject)(this,\"raws\",\"spaces\"),this.raws.spaces.after=e}}])&&s(t.prototype,r),e}();t.default=o,e.exports=t.default},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,r)=>{var n=r(109),s={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return s.call(n(e),t)}},function(e,t,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return s(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0});const a=i(r(0)),l=o(r(21)),c=o(r(531)),u=r(146),p=o(r(167)),f=o(r(170)),d=/\\*?\\s*@jsx\\s+([^\\s]+)/;t.default=({types:e})=>({name:\"babel-plugin-jsx\",inherits:c.default,visitor:Object.assign(Object.assign(Object.assign({},p.default),f.default),{Program:{enter(t,r){if((e=>{let t=!1;return e.traverse({JSXElement(e){t=!0,e.stop()},JSXFragment(e){t=!0,e.stop()}}),t})(t)){const n=[\"createVNode\",\"Fragment\",\"resolveComponent\",\"withDirectives\",\"vShow\",\"vModelSelect\",\"vModelText\",\"vModelCheckbox\",\"vModelRadio\",\"vModelText\",\"vModelDynamic\",\"resolveDirective\",\"mergeProps\",\"createTextVNode\",\"isVNode\"];if(u.isModule(t)){const s={};n.forEach((n=>{r.set(n,(()=>{if(s[n])return e.cloneNode(s[n]);const r=u.addNamed(t,n,\"vue\",{ensureLiveReference:!0});return s[n]=r,r}))}));const{enableObjectSlots:i=!0}=r.opts;i&&r.set(\"@vue/babel-plugin-jsx/runtimeIsSlot\",(()=>{if(s.runtimeIsSlot)return s.runtimeIsSlot;const{name:e}=r.get(\"isVNode\")(),n=t.scope.generateUidIdentifier(\"isSlot\"),i=l.default.ast`\n                  function ${n.name}(s) {\n                    return typeof s === 'function' || (Object.prototype.toString.call(s) === '[object Object]' && !${e}(s));\n                  }\n                `,o=t.get(\"body\").filter((e=>e.isImportDeclaration())).pop();return o&&o.insertAfter(i),s.runtimeIsSlot=n,n}))}else{let e=\"\";n.forEach((n=>{r.set(n,(()=>(e||(e=u.addNamespace(t,\"vue\",{ensureLiveReference:!0}).name),a.memberExpression(a.identifier(e),a.identifier(n)))))}))}const{opts:{pragma:s=\"\"},file:i}=r;if(s&&r.set(\"createVNode\",(()=>a.identifier(s))),i.ast.comments)for(const e of i.ast.comments){const t=d.exec(e.value);t&&r.set(\"createVNode\",(()=>a.identifier(t[1])))}}},exit(e){const t=e.get(\"body\"),r=new Map;t.filter((e=>a.isImportDeclaration(e.node)&&\"vue\"===e.node.source.value)).forEach((e=>{const{specifiers:t}=e.node;let n=!1;t.forEach((e=>{!e.loc&&a.isImportSpecifier(e)&&a.isIdentifier(e.imported)&&(r.set(e.imported.name,e),n=!0)})),n&&e.remove()}));const n=[...r.keys()].map((e=>r.get(e)));n.length&&e.unshiftContainer(\"body\",a.importDeclaration(n,a.stringLiteral(\"vue\")))}}})})},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=t.SHOULD_SKIP=t.SHOULD_STOP=t.REMOVED=void 0;var n=r(212),s=r(65),i=r(10),o=r(231),a=r(0),l=r(34),c=r(133),u=r(433),p=r(434),f=r(437),d=r(440),h=r(441),m=r(447),y=r(448),g=r(449),b=r(451),v=r(453),E=r(454);const x=s(\"babel\");t.REMOVED=1,t.SHOULD_STOP=2,t.SHOULD_SKIP=4;class S{constructor(e,t){this.contexts=[],this.state=null,this.opts=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this.parent=t,this.hub=e,this.data=null,this.context=null,this.scope=null}static get({hub:e,parentPath:t,parent:r,container:n,listKey:s,key:i}){if(!e&&t&&(e=t.hub),!r)throw new Error(\"To get a node path the parent needs to exist\");const o=n[i];let a=l.path.get(r);a||(a=new Map,l.path.set(r,a));let c=a.get(o);return c||(c=new S(e,r),o&&a.set(o,c)),c.setup(t,n,s,i),c}getScope(e){return this.isScope()?new o.default(this):e}setData(e,t){return null==this.data&&(this.data=Object.create(null)),this.data[e]=t}getData(e,t){null==this.data&&(this.data=Object.create(null));let r=this.data[e];return void 0===r&&void 0!==t&&(r=this.data[e]=t),r}buildCodeFrameError(e,t=SyntaxError){return this.hub.buildError(this.node,e,t)}traverse(e,t){(0,i.default)(this.node,e,this.scope,t,this)}set(e,t){a.validate(this.node,e,t),this.node[e]=t}getPathLocation(){const e=[];let t=this;do{let r=t.key;t.inList&&(r=`${t.listKey}[${r}]`),e.unshift(r)}while(t=t.parentPath);return e.join(\".\")}debug(e){x.enabled&&x(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,c.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){e||(this.listKey=null)}get parentKey(){return this.listKey||this.key}get shouldSkip(){return!!(4&this._traverseFlags)}set shouldSkip(e){e?this._traverseFlags|=4:this._traverseFlags&=-5}get shouldStop(){return!!(2&this._traverseFlags)}set shouldStop(e){e?this._traverseFlags|=2:this._traverseFlags&=-3}get removed(){return!!(1&this._traverseFlags)}set removed(e){e?this._traverseFlags|=1:this._traverseFlags&=-2}}Object.assign(S.prototype,u,p,f,d,h,m,y,g,b,v,E);for(const e of a.TYPES){const t=`is${e}`,r=a[t];S.prototype[t]=function(e){return r(this.node,e)},S.prototype[`assert${e}`]=function(t){if(!r(this.node,t))throw new TypeError(`Expected node path of type ${e}`)}}for(const e of Object.keys(n)){if(\"_\"===e[0])continue;a.TYPES.indexOf(e)<0&&a.TYPES.push(e);const t=n[e];S.prototype[`is${e}`]=function(e){return t.checkPath(this,e)}}var T=S;t.default=T},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.validate=d,t.typeIs=h,t.validateType=function(e){return d(h(e))},t.validateOptional=function(e){return{validate:e,optional:!0}},t.validateOptionalType=function(e){return{validate:h(e),optional:!0}},t.arrayOf=m,t.arrayOfType=y,t.validateArrayOfType=function(e){return d(y(e))},t.assertEach=g,t.assertOneOf=function(...e){function t(t,r,n){if(e.indexOf(n)<0)throw new TypeError(`Property ${r} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(n)}`)}return t.oneOf=e,t},t.assertNodeType=b,t.assertNodeOrValueType=function(...e){function t(t,r,i){for(const o of e)if(f(i)===o||(0,n.default)(o,i))return void(0,s.validateChild)(t,r,i);throw new TypeError(`Property ${r} of ${t.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(null==i?void 0:i.type)}`)}return t.oneOfNodeOrValueTypes=e,t},t.assertValueType=v,t.assertShape=function(e){function t(t,r,n){const i=[];for(const r of Object.keys(e))try{(0,s.validateField)(t,r,n[r],e[r])}catch(e){if(e instanceof TypeError){i.push(e.message);continue}throw e}if(i.length)throw new TypeError(`Property ${r} of ${t.type} expected to have the following:\\n${i.join(\"\\n\")}`)}return t.shapeOf=e,t},t.assertOptionalChainStart=function(){return function(e){var t;let r=e;for(;e;){const{type:e}=r;if(\"OptionalCallExpression\"!==e){if(\"OptionalMemberExpression\"!==e)break;if(r.optional)return;r=r.object}else{if(r.optional)return;r=r.callee}}throw new TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${null==(t=r)?void 0:t.type}`)}},t.chain=E,t.default=function(e,t={}){const r=t.inherits&&T[t.inherits]||{};let n=t.fields;if(!n&&(n={},r.fields)){const e=Object.getOwnPropertyNames(r.fields);for(const t of e){const e=r.fields[t],s=e.default;if(Array.isArray(s)?s.length>0:s&&\"object\"==typeof s)throw new Error(\"field defaults can only be primitives or empty arrays currently\");n[t]={default:Array.isArray(s)?[]:s,optional:e.optional,validate:e.validate}}}const s=t.visitor||r.visitor||[],d=t.aliases||r.aliases||[],h=t.builder||r.builder||t.visitor||[];for(const r of Object.keys(t))if(-1===x.indexOf(r))throw new Error(`Unknown type option \"${r}\" on ${e}`);t.deprecatedAlias&&(u[t.deprecatedAlias]=e);for(const e of s.concat(h))n[e]=n[e]||{};for(const t of Object.keys(n)){const r=n[t];void 0!==r.default&&-1===h.indexOf(t)&&(r.optional=!0),void 0===r.default?r.default=null:r.validate||null==r.default||(r.validate=v(f(r.default)));for(const n of Object.keys(r))if(-1===S.indexOf(n))throw new Error(`Unknown field key \"${n}\" on ${e}.${t}`)}i[e]=t.visitor=s,c[e]=t.builder=h,l[e]=t.fields=n,o[e]=t.aliases=d,d.forEach((t=>{a[t]=a[t]||[],a[t].push(e)})),t.validate&&(p[e]=t.validate),T[e]=t},t.NODE_PARENT_VALIDATIONS=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var n=r(62),s=r(130);const i={};t.VISITOR_KEYS=i;const o={};t.ALIAS_KEYS=o;const a={};t.FLIPPED_ALIAS_KEYS=a;const l={};t.NODE_FIELDS=l;const c={};t.BUILDER_KEYS=c;const u={};t.DEPRECATED_KEYS=u;const p={};function f(e){return Array.isArray(e)?\"array\":null===e?\"null\":typeof e}function d(e){return{validate:e}}function h(e){return\"string\"==typeof e?b(e):b(...e)}function m(e){return E(v(\"array\"),g(e))}function y(e){return m(h(e))}function g(e){function t(t,r,n){if(Array.isArray(n))for(let s=0;s<n.length;s++){const i=`${r}[${s}]`,o=n[s];e(t,i,o)}}return t.each=e,t}function b(...e){function t(t,r,i){for(const o of e)if((0,n.default)(o,i))return void(0,s.validateChild)(t,r,i);throw new TypeError(`Property ${r} of ${t.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(null==i?void 0:i.type)}`)}return t.oneOfNodeTypes=e,t}function v(e){function t(t,r,n){if(f(n)!==e)throw new TypeError(`Property ${r} expected type of ${e} but got ${f(n)}`)}return t.type=e,t}function E(...e){function t(...t){for(const r of e)r(...t)}if(t.chainOf=e,e.length>=2&&\"type\"in e[0]&&\"array\"===e[0].type&&!(\"each\"in e[1]))throw new Error('An assertValueType(\"array\") validator can only be followed by an assertEach(...) validator.');return t}t.NODE_PARENT_VALIDATIONS=p;const x=[\"aliases\",\"builder\",\"deprecatedAlias\",\"fields\",\"inherits\",\"visitor\",\"validate\"],S=[\"default\",\"optional\",\"validate\"],T={}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=t.program=t.expression=t.statements=t.statement=t.smart=void 0;var n=r(443),s=r(444);const i=(0,s.default)(n.smart);t.smart=i;const o=(0,s.default)(n.statement);t.statement=o;const a=(0,s.default)(n.statements);t.statements=a;const l=(0,s.default)(n.expression);t.expression=l;const c=(0,s.default)(n.program);t.program=c;var u=Object.assign(i.bind(void 0),{smart:i,statement:o,statements:a,expression:l,program:c,ast:i.ast});t.default=u},(e,t,r)=>{\"use strict\";let n,s,i,{isClean:o,my:a}=r(154),l=r(47),c=r(49),u=r(48);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function f(e){if(e[o]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)f(t)}class d extends u{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}walk(e){return this.each(((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if(\"decl\"===r.type&&e.test(r.prop))return t(r,n)})):this.walk(((r,n)=>{if(\"decl\"===r.type&&r.prop===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if(\"decl\"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if(\"rule\"===r.type&&e.test(r.selector))return t(r,n)})):this.walk(((r,n)=>{if(\"rule\"===r.type&&r.selector===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if(\"rule\"===e.type)return t(e,r)})))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if(\"atrule\"===r.type&&e.test(r.name))return t(r,n)})):this.walk(((r,n)=>{if(\"atrule\"===r.type&&r.name===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if(\"atrule\"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if(\"comment\"===t.type)return e(t,r)}))}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,\"prepend\").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertBefore(e,t){let r,n=0===(e=this.index(e))&&\"prepend\",s=this.normalize(t,this.proxyOf.nodes[e],n).reverse();for(let t of s)this.proxyOf.nodes.splice(e,0,t);for(let t in this.indexes)r=this.indexes[t],e<=r&&(this.indexes[t]=r+s.length);return this.markDirty(),this}insertAfter(e,t){e=this.index(e);let r,n=this.normalize(t,this.proxyOf.nodes[e]).reverse();for(let t of n)this.proxyOf.nodes.splice(e+1,0,t);for(let t in this.indexes)r=this.indexes[t],e<r&&(this.indexes[t]=r+n.length);return this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))})),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return\"number\"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if(\"string\"==typeof e)e=p(n(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,\"ignore\")}else if(\"root\"===e.type&&\"document\"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,\"ignore\")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error(\"Value field is missed in node creation\");\"string\"!=typeof e.value&&(e.value=String(e.value)),e=[new l(e)]}else if(e.selector)e=[new s(e)];else if(e.name)e=[new i(e)];else{if(!e.text)throw new Error(\"Unknown node type in node creation\");e=[new c(e)]}return e.map((e=>(e[a]||d.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&f(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\\S/g,\"\")),e.parent=this,e)))}getProxyProcessor(){return{set:(e,t,r)=>(e[t]===r||(e[t]=r,\"name\"!==t&&\"params\"!==t&&\"selector\"!==t||e.markDirty()),!0),get:(e,t)=>\"proxyOf\"===t?e:e[t]?\"each\"===t||\"string\"==typeof t&&t.startsWith(\"walk\")?(...r)=>e[t](...r.map((e=>\"function\"==typeof e?(t,r)=>e(t.toProxy(),r):e))):\"every\"===t||\"some\"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):\"root\"===t?()=>e.root().toProxy():\"nodes\"===t?e.nodes.map((e=>e.toProxy())):\"first\"===t||\"last\"===t?e[t].toProxy():e[t]:e[t]}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}}d.registerParse=e=>{n=e},d.registerRule=e=>{s=e},d.registerAtRule=e=>{i=e},e.exports=d,d.default=d,d.rebuild=e=>{\"atrule\"===e.type?Object.setPrototypeOf(e,i.prototype):\"rule\"===e.type?Object.setPrototypeOf(e,s.prototype):\"decl\"===e.type?Object.setPrototypeOf(e,l.prototype):\"comment\"===e.type&&Object.setPrototypeOf(e,c.prototype),e[a]=!0,e.nodes&&e.nodes.forEach((e=>{d.rebuild(e)}))}},(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(41),s=r(42),i=(t=e.exports={}).re=[],o=t.src=[],a=t.t={};let l=0;const c=(e,t,r)=>{const n=l++;s(n,t),a[e]=n,o[n]=t,i[n]=new RegExp(t,r?\"g\":void 0)};c(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\"),c(\"NUMERICIDENTIFIERLOOSE\",\"[0-9]+\"),c(\"NONNUMERICIDENTIFIER\",\"\\\\d*[a-zA-Z-][a-zA-Z0-9-]*\"),c(\"MAINVERSION\",`(${o[a.NUMERICIDENTIFIER]})\\\\.(${o[a.NUMERICIDENTIFIER]})\\\\.(${o[a.NUMERICIDENTIFIER]})`),c(\"MAINVERSIONLOOSE\",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\\\.(${o[a.NUMERICIDENTIFIERLOOSE]})\\\\.(${o[a.NUMERICIDENTIFIERLOOSE]})`),c(\"PRERELEASEIDENTIFIER\",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`),c(\"PRERELEASEIDENTIFIERLOOSE\",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`),c(\"PRERELEASE\",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\\\.${o[a.PRERELEASEIDENTIFIER]})*))`),c(\"PRERELEASELOOSE\",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c(\"BUILDIDENTIFIER\",\"[0-9A-Za-z-]+\"),c(\"BUILD\",`(?:\\\\+(${o[a.BUILDIDENTIFIER]}(?:\\\\.${o[a.BUILDIDENTIFIER]})*))`),c(\"FULLPLAIN\",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`),c(\"FULL\",`^${o[a.FULLPLAIN]}$`),c(\"LOOSEPLAIN\",`[v=\\\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`),c(\"LOOSE\",`^${o[a.LOOSEPLAIN]}$`),c(\"GTLT\",\"((?:<|>)?=?)\"),c(\"XRANGEIDENTIFIERLOOSE\",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`),c(\"XRANGEIDENTIFIER\",`${o[a.NUMERICIDENTIFIER]}|x|X|\\\\*`),c(\"XRANGEPLAIN\",`[v=\\\\s]*(${o[a.XRANGEIDENTIFIER]})(?:\\\\.(${o[a.XRANGEIDENTIFIER]})(?:\\\\.(${o[a.XRANGEIDENTIFIER]})(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?)?)?`),c(\"XRANGEPLAINLOOSE\",`[v=\\\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?)?)?`),c(\"XRANGE\",`^${o[a.GTLT]}\\\\s*${o[a.XRANGEPLAIN]}$`),c(\"XRANGELOOSE\",`^${o[a.GTLT]}\\\\s*${o[a.XRANGEPLAINLOOSE]}$`),c(\"COERCE\",`(^|[^\\\\d])(\\\\d{1,${n}})(?:\\\\.(\\\\d{1,${n}}))?(?:\\\\.(\\\\d{1,${n}}))?(?:$|[^\\\\d])`),c(\"COERCERTL\",o[a.COERCE],!0),c(\"LONETILDE\",\"(?:~>?)\"),c(\"TILDETRIM\",`(\\\\s*)${o[a.LONETILDE]}\\\\s+`,!0),t.tildeTrimReplace=\"$1~\",c(\"TILDE\",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`),c(\"TILDELOOSE\",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`),c(\"LONECARET\",\"(?:\\\\^)\"),c(\"CARETTRIM\",`(\\\\s*)${o[a.LONECARET]}\\\\s+`,!0),t.caretTrimReplace=\"$1^\",c(\"CARET\",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`),c(\"CARETLOOSE\",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`),c(\"COMPARATORLOOSE\",`^${o[a.GTLT]}\\\\s*(${o[a.LOOSEPLAIN]})$|^$`),c(\"COMPARATOR\",`^${o[a.GTLT]}\\\\s*(${o[a.FULLPLAIN]})$|^$`),c(\"COMPARATORTRIM\",`(\\\\s*)${o[a.GTLT]}\\\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=\"$1$2$3\",c(\"HYPHENRANGE\",`^\\\\s*(${o[a.XRANGEPLAIN]})\\\\s+-\\\\s+(${o[a.XRANGEPLAIN]})\\\\s*$`),c(\"HYPHENRANGELOOSE\",`^\\\\s*(${o[a.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${o[a.XRANGEPLAINLOOSE]})\\\\s*$`),c(\"STAR\",\"(<|>)?=?\\\\s*\\\\*\"),c(\"GTE0\",\"^\\\\s*>=\\\\s*0.0.0\\\\s*$\"),c(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0.0.0-0\\\\s*$\")},e=>{e.exports=function(e){return\"object\"==typeof e?null!==e:\"function\"==typeof e}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.ASSIGNMENT_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0,t.STATEMENT_OR_BLOCK_KEYS=[\"consequent\",\"body\",\"alternate\"],t.FLATTENABLE_KEYS=[\"body\",\"expressions\"],t.FOR_INIT_KEYS=[\"left\",\"init\"],t.COMMENT_KEYS=[\"leadingComments\",\"trailingComments\",\"innerComments\"];const r=[\"||\",\"&&\",\"??\"];t.LOGICAL_OPERATORS=r,t.UPDATE_OPERATORS=[\"++\",\"--\"];const n=[\">\",\"<\",\">=\",\"<=\"];t.BOOLEAN_NUMBER_BINARY_OPERATORS=n;const s=[\"==\",\"===\",\"!=\",\"!==\"];t.EQUALITY_BINARY_OPERATORS=s;const i=[...s,\"in\",\"instanceof\"];t.COMPARISON_BINARY_OPERATORS=i;const o=[...i,...n];t.BOOLEAN_BINARY_OPERATORS=o;const a=[\"-\",\"/\",\"%\",\"*\",\"**\",\"&\",\"|\",\">>\",\">>>\",\"<<\",\"^\"];t.NUMBER_BINARY_OPERATORS=a;const l=[\"+\",...a,...o];t.BINARY_OPERATORS=l;const c=[\"=\",\"+=\",...a.map((e=>e+\"=\")),...r.map((e=>e+\"=\"))];t.ASSIGNMENT_OPERATORS=c;const u=[\"delete\",\"!\"];t.BOOLEAN_UNARY_OPERATORS=u;const p=[\"+\",\"-\",\"~\"];t.NUMBER_UNARY_OPERATORS=p;const f=[\"typeof\"];t.STRING_UNARY_OPERATORS=f;const d=[\"void\",\"throw\",...u,...p,...f];t.UNARY_OPERATORS=d,t.INHERIT_KEYS={optional:[\"typeAnnotation\",\"typeParameters\",\"returnType\"],force:[\"start\",\"loc\",\"end\"]};const h=Symbol.for(\"var used to be block scoped\");t.BLOCK_SCOPED_SYMBOL=h;const m=Symbol.for(\"should not be considered a local binding\");t.NOT_LOCAL_BINDING=m},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=l;var n=r(11),s=r(1);const i=Function.call.bind(Object.prototype.hasOwnProperty);function o(e,t,r){return e&&\"string\"==typeof e.type?l(e,t,r):e}function a(e,t,r){return Array.isArray(e)?e.map((e=>o(e,t,r))):o(e,t,r)}function l(e,t=!0,r=!1){if(!e)return e;const{type:o}=e,l={type:e.type};if((0,s.isIdentifier)(e))l.name=e.name,i(e,\"optional\")&&\"boolean\"==typeof e.optional&&(l.optional=e.optional),i(e,\"typeAnnotation\")&&(l.typeAnnotation=t?a(e.typeAnnotation,!0,r):e.typeAnnotation);else{if(!i(n.NODE_FIELDS,o))throw new Error(`Unknown node type: \"${o}\"`);for(const u of Object.keys(n.NODE_FIELDS[o]))i(e,u)&&(l[u]=t?(0,s.isFile)(e)&&\"comments\"===u?c(e.comments,t,r):a(e[u],!0,r):e[u])}return i(e,\"loc\")&&(l.loc=r?null:e.loc),i(e,\"leadingComments\")&&(l.leadingComments=c(e.leadingComments,t,r)),i(e,\"innerComments\")&&(l.innerComments=c(e.innerComments,t,r)),i(e,\"trailingComments\")&&(l.trailingComments=c(e.trailingComments,t,r)),i(e,\"extra\")&&(l.extra=Object.assign({},e.extra)),l}function c(e,t,r){return e&&t?e.map((({type:e,value:t,loc:n})=>r?{type:e,value:t,loc:null}:{type:e,value:t,loc:n})):e}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});const r=!0,n=!0,s=!0,i=!0,o=!0;class a{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.updateContext=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}}const l=new Map;function c(e,t={}){t.keyword=e;const r=new a(e,t);return l.set(e,r),r}function u(e,t){return new a(e,{beforeExpr:r,binop:t})}const p={num:new a(\"num\",{startsExpr:n}),bigint:new a(\"bigint\",{startsExpr:n}),decimal:new a(\"decimal\",{startsExpr:n}),regexp:new a(\"regexp\",{startsExpr:n}),string:new a(\"string\",{startsExpr:n}),name:new a(\"name\",{startsExpr:n}),privateName:new a(\"#name\",{startsExpr:n}),eof:new a(\"eof\"),bracketL:new a(\"[\",{beforeExpr:r,startsExpr:n}),bracketHashL:new a(\"#[\",{beforeExpr:r,startsExpr:n}),bracketBarL:new a(\"[|\",{beforeExpr:r,startsExpr:n}),bracketR:new a(\"]\"),bracketBarR:new a(\"|]\"),braceL:new a(\"{\",{beforeExpr:r,startsExpr:n}),braceBarL:new a(\"{|\",{beforeExpr:r,startsExpr:n}),braceHashL:new a(\"#{\",{beforeExpr:r,startsExpr:n}),braceR:new a(\"}\",{beforeExpr:r}),braceBarR:new a(\"|}\"),parenL:new a(\"(\",{beforeExpr:r,startsExpr:n}),parenR:new a(\")\"),comma:new a(\",\",{beforeExpr:r}),semi:new a(\";\",{beforeExpr:r}),colon:new a(\":\",{beforeExpr:r}),doubleColon:new a(\"::\",{beforeExpr:r}),dot:new a(\".\"),question:new a(\"?\",{beforeExpr:r}),questionDot:new a(\"?.\"),arrow:new a(\"=>\",{beforeExpr:r}),template:new a(\"template\"),ellipsis:new a(\"...\",{beforeExpr:r}),backQuote:new a(\"`\",{startsExpr:n}),dollarBraceL:new a(\"${\",{beforeExpr:r,startsExpr:n}),at:new a(\"@\"),hash:new a(\"#\",{startsExpr:n}),interpreterDirective:new a(\"#!...\"),eq:new a(\"=\",{beforeExpr:r,isAssign:i}),assign:new a(\"_=\",{beforeExpr:r,isAssign:i}),slashAssign:new a(\"_=\",{beforeExpr:r,isAssign:i}),incDec:new a(\"++/--\",{prefix:o,postfix:!0,startsExpr:n}),bang:new a(\"!\",{beforeExpr:r,prefix:o,startsExpr:n}),tilde:new a(\"~\",{beforeExpr:r,prefix:o,startsExpr:n}),pipeline:u(\"|>\",0),nullishCoalescing:u(\"??\",1),logicalOR:u(\"||\",1),logicalAND:u(\"&&\",2),bitwiseOR:u(\"|\",3),bitwiseXOR:u(\"^\",4),bitwiseAND:u(\"&\",5),equality:u(\"==/!=/===/!==\",6),relational:u(\"</>/<=/>=\",7),bitShift:u(\"<</>>/>>>\",8),plusMin:new a(\"+/-\",{beforeExpr:r,binop:9,prefix:o,startsExpr:n}),modulo:new a(\"%\",{beforeExpr:r,binop:10,startsExpr:n}),star:new a(\"*\",{binop:10}),slash:u(\"/\",10),exponent:new a(\"**\",{beforeExpr:r,binop:11,rightAssociative:!0}),_break:c(\"break\"),_case:c(\"case\",{beforeExpr:r}),_catch:c(\"catch\"),_continue:c(\"continue\"),_debugger:c(\"debugger\"),_default:c(\"default\",{beforeExpr:r}),_do:c(\"do\",{isLoop:s,beforeExpr:r}),_else:c(\"else\",{beforeExpr:r}),_finally:c(\"finally\"),_for:c(\"for\",{isLoop:s}),_function:c(\"function\",{startsExpr:n}),_if:c(\"if\"),_return:c(\"return\",{beforeExpr:r}),_switch:c(\"switch\"),_throw:c(\"throw\",{beforeExpr:r,prefix:o,startsExpr:n}),_try:c(\"try\"),_var:c(\"var\"),_const:c(\"const\"),_while:c(\"while\",{isLoop:s}),_with:c(\"with\"),_new:c(\"new\",{beforeExpr:r,startsExpr:n}),_this:c(\"this\",{startsExpr:n}),_super:c(\"super\",{startsExpr:n}),_class:c(\"class\",{startsExpr:n}),_extends:c(\"extends\",{beforeExpr:r}),_export:c(\"export\"),_import:c(\"import\",{startsExpr:n}),_null:c(\"null\",{startsExpr:n}),_true:c(\"true\",{startsExpr:n}),_false:c(\"false\",{startsExpr:n}),_in:c(\"in\",{beforeExpr:r,binop:7}),_instanceof:c(\"instanceof\",{beforeExpr:r,binop:7}),_typeof:c(\"typeof\",{beforeExpr:r,prefix:o,startsExpr:n}),_void:c(\"void\",{beforeExpr:r,prefix:o,startsExpr:n}),_delete:c(\"delete\",{beforeExpr:r,prefix:o,startsExpr:n})},f=/\\r\\n?|[\\n\\u2028\\u2029]/,d=new RegExp(f.source,\"g\");function h(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const m=/(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;function y(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}class g{constructor(e,t){this.line=void 0,this.column=void 0,this.line=e,this.column=t}}class b{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}}function v(e){return e[e.length-1]}const E=Object.freeze({SyntaxError:\"BABEL_PARSER_SYNTAX_ERROR\",SourceTypeModuleError:\"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\"}),x=T({AccessorIsGenerator:\"A %0ter cannot be a generator.\",ArgumentsInClass:\"'arguments' is only allowed in functions and class methods.\",AsyncFunctionInSingleStatementContext:\"Async functions can only be declared at the top level or inside a block.\",AwaitBindingIdentifier:\"Can not use 'await' as identifier inside an async function.\",AwaitBindingIdentifierInStaticBlock:\"Can not use 'await' as identifier inside a static block.\",AwaitExpressionFormalParameter:\"'await' is not allowed in async function parameters.\",AwaitNotInAsyncContext:\"'await' is only allowed within async functions and at the top levels of modules.\",AwaitNotInAsyncFunction:\"'await' is only allowed within async functions.\",BadGetterArity:\"A 'get' accesor must not have any formal parameters.\",BadSetterArity:\"A 'set' accesor must have exactly one formal parameter.\",BadSetterRestParameter:\"A 'set' accesor function argument must not be a rest parameter.\",ConstructorClassField:\"Classes may not have a field named 'constructor'.\",ConstructorClassPrivateField:\"Classes may not have a private field named '#constructor'.\",ConstructorIsAccessor:\"Class constructor may not be an accessor.\",ConstructorIsAsync:\"Constructor can't be an async function.\",ConstructorIsGenerator:\"Constructor can't be a generator.\",DeclarationMissingInitializer:\"'%0' require an initialization value.\",DecoratorBeforeExport:\"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.\",DecoratorConstructor:\"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",DecoratorExportClass:\"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.\",DecoratorSemicolon:\"Decorators must not be followed by a semicolon.\",DecoratorStaticBlock:\"Decorators can't be used with a static block.\",DeletePrivateField:\"Deleting a private field is not allowed.\",DestructureNamedImport:\"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",DuplicateConstructor:\"Duplicate constructor in the same class.\",DuplicateDefaultExport:\"Only one default export allowed per module.\",DuplicateExport:\"`%0` has already been exported. Exported identifiers must be unique.\",DuplicateProto:\"Redefinition of __proto__ property.\",DuplicateRegExpFlags:\"Duplicate regular expression flag.\",ElementAfterRest:\"Rest element must be last element.\",EscapedCharNotAnIdentifier:\"Invalid Unicode escape.\",ExportBindingIsString:\"A string literal cannot be used as an exported binding without `from`.\\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?\",ExportDefaultFromAsIdentifier:\"'from' is not allowed as an identifier after 'export default'.\",ForInOfLoopInitializer:\"'%0' loop variable declaration may not have an initializer.\",ForOfAsync:\"The left-hand side of a for-of loop may not be 'async'.\",ForOfLet:\"The left-hand side of a for-of loop may not start with 'let'.\",GeneratorInSingleStatementContext:\"Generators can only be declared at the top level or inside a block.\",IllegalBreakContinue:\"Unsyntactic %0.\",IllegalLanguageModeDirective:\"Illegal 'use strict' directive in function with non-simple parameter list.\",IllegalReturn:\"'return' outside of function.\",ImportBindingIsString:'A string literal cannot be used as an imported binding.\\n- Did you mean `import { \"%0\" as foo }`?',ImportCallArgumentTrailingComma:\"Trailing comma is disallowed inside import(...) arguments.\",ImportCallArity:\"`import()` requires exactly %0.\",ImportCallNotNewExpression:\"Cannot use new with import(...).\",ImportCallSpreadArgument:\"`...` is not allowed in `import()`.\",InvalidBigIntLiteral:\"Invalid BigIntLiteral.\",InvalidCodePoint:\"Code point out of bounds.\",InvalidDecimal:\"Invalid decimal.\",InvalidDigit:\"Expected number in radix %0.\",InvalidEscapeSequence:\"Bad character escape sequence.\",InvalidEscapeSequenceTemplate:\"Invalid escape sequence in template.\",InvalidEscapedReservedWord:\"Escape sequence in keyword %0.\",InvalidIdentifier:\"Invalid identifier %0.\",InvalidLhs:\"Invalid left-hand side in %0.\",InvalidLhsBinding:\"Binding invalid left-hand side in %0.\",InvalidNumber:\"Invalid number.\",InvalidOrMissingExponent:\"Floating-point numbers require a valid exponent after the 'e'.\",InvalidOrUnexpectedToken:\"Unexpected character '%0'.\",InvalidParenthesizedAssignment:\"Invalid parenthesized assignment pattern.\",InvalidPrivateFieldResolution:\"Private name #%0 is not defined.\",InvalidPropertyBindingPattern:\"Binding member expression.\",InvalidRecordProperty:\"Only properties and spread elements are allowed in record definitions.\",InvalidRestAssignmentPattern:\"Invalid rest operator's argument.\",LabelRedeclaration:\"Label '%0' is already declared.\",LetInLexicalBinding:\"'let' is not allowed to be used as a name in 'let' or 'const' declarations.\",LineTerminatorBeforeArrow:\"No line break is allowed before '=>'.\",MalformedRegExpFlags:\"Invalid regular expression flag.\",MissingClassName:\"A class name is required.\",MissingEqInAssignment:\"Only '=' operator can be used for specifying default value.\",MissingSemicolon:\"Missing semicolon.\",MissingUnicodeEscape:\"Expecting Unicode escape sequence \\\\uXXXX.\",MixingCoalesceWithLogical:\"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",ModuleAttributeDifferentFromType:\"The only accepted module attribute is `type`.\",ModuleAttributeInvalidValue:\"Only string literals are allowed as module attribute values.\",ModuleAttributesWithDuplicateKeys:'Duplicate key \"%0\" is not allowed in module attributes.',ModuleExportNameHasLoneSurrogate:\"An export name cannot include a lone surrogate, found '\\\\u%0'.\",ModuleExportUndefined:\"Export '%0' is not defined.\",MultipleDefaultsInSwitch:\"Multiple default clauses.\",NewlineAfterThrow:\"Illegal newline after throw.\",NoCatchOrFinally:\"Missing catch or finally clause.\",NumberIdentifier:\"Identifier directly after number.\",NumericSeparatorInEscapeSequence:\"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",ObsoleteAwaitStar:\"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",OptionalChainingNoNew:\"Constructors in/after an Optional Chain are not allowed.\",OptionalChainingNoTemplate:\"Tagged Template Literals are not allowed in optionalChain.\",OverrideOnConstructor:\"'override' modifier cannot appear on a constructor declaration.\",ParamDupe:\"Argument name clash.\",PatternHasAccessor:\"Object pattern can't contain getter or setter.\",PatternHasMethod:\"Object pattern can't contain methods.\",PipelineBodyNoArrow:'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:\"Pipeline body may not be a comma-separated sequence expression.\",PipelineHeadSequenceExpression:\"Pipeline head should not be a comma-separated sequence expression.\",PipelineTopicUnused:\"Pipeline is in topic style but does not use topic reference.\",PrimaryTopicNotAllowed:\"Topic reference was used in a lexical context without topic binding.\",PrimaryTopicRequiresSmartPipeline:\"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.\",PrivateInExpectedIn:\"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).\",PrivateNameRedeclaration:\"Duplicate private name #%0.\",RecordExpressionBarIncorrectEndSyntaxType:\"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",RecordExpressionBarIncorrectStartSyntaxType:\"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",RecordExpressionHashIncorrectStartSyntaxType:\"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",RecordNoProto:\"'__proto__' is not allowed in Record expressions.\",RestTrailingComma:\"Unexpected trailing comma after rest element.\",SloppyFunction:\"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",StaticPrototype:\"Classes may not have static property named prototype.\",StrictDelete:\"Deleting local variable in strict mode.\",StrictEvalArguments:\"Assigning to '%0' in strict mode.\",StrictEvalArgumentsBinding:\"Binding '%0' in strict mode.\",StrictFunction:\"In strict mode code, functions can only be declared at top level or inside a block.\",StrictNumericEscape:\"The only valid numeric escape in strict mode is '\\\\0'.\",StrictOctalLiteral:\"Legacy octal literals are not allowed in strict mode.\",StrictWith:\"'with' in strict mode.\",SuperNotAllowed:\"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",SuperPrivateField:\"Private fields can't be accessed on super.\",TrailingDecorator:\"Decorators must be attached to a class element.\",TupleExpressionBarIncorrectEndSyntaxType:\"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",TupleExpressionBarIncorrectStartSyntaxType:\"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",TupleExpressionHashIncorrectStartSyntaxType:\"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",UnexpectedArgumentPlaceholder:\"Unexpected argument placeholder.\",UnexpectedAwaitAfterPipelineBody:'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:\"Unexpected digit after hash token.\",UnexpectedImportExport:\"'import' and 'export' may only appear at the top level.\",UnexpectedKeyword:\"Unexpected keyword '%0'.\",UnexpectedLeadingDecorator:\"Leading decorators must be attached to a class declaration.\",UnexpectedLexicalDeclaration:\"Lexical declaration cannot appear in a single-statement context.\",UnexpectedNewTarget:\"`new.target` can only be used in functions or class properties.\",UnexpectedNumericSeparator:\"A numeric separator is only allowed between two digits.\",UnexpectedPrivateField:\"Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\\n or a property of member expression (i.e. this.#p).\",UnexpectedReservedWord:\"Unexpected reserved word '%0'.\",UnexpectedSuper:\"'super' is only allowed in object methods and classes.\",UnexpectedToken:\"Unexpected token '%0'.\",UnexpectedTokenUnaryExponentiation:\"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",UnsupportedBind:\"Binding should be performed on object property.\",UnsupportedDecoratorExport:\"A decorated export must export a class declaration.\",UnsupportedDefaultExport:\"Only expressions, functions or classes are allowed as the `default` export.\",UnsupportedImport:\"`import` can only be used in `import()` or `import.meta`.\",UnsupportedMetaProperty:\"The only valid meta property for %0 is %0.%1.\",UnsupportedParameterDecorator:\"Decorators cannot be used to decorate parameters.\",UnsupportedPropertyDecorator:\"Decorators cannot be used to decorate object literal properties.\",UnsupportedSuper:\"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",UnterminatedComment:\"Unterminated comment.\",UnterminatedRegExp:\"Unterminated regular expression.\",UnterminatedString:\"Unterminated string constant.\",UnterminatedTemplate:\"Unterminated template.\",VarRedeclaration:\"Identifier '%0' has already been declared.\",YieldBindingIdentifier:\"Can not use 'yield' as identifier inside a generator.\",YieldInParameter:\"Yield expression is not allowed in formal parameters.\",ZeroDigitNumericSeparator:\"Numeric separator can not be used after leading 0.\"},E.SyntaxError),S=T({ImportMetaOutsideModule:\"import.meta may appear only with 'sourceType: \\\"module\\\"'\",ImportOutsideModule:\"'import' and 'export' may appear only with 'sourceType: \\\"module\\\"'\"},E.SourceTypeModuleError);function T(e,t){const r={};return Object.keys(e).forEach((n=>{r[n]=Object.freeze({code:t,reasonCode:n,template:e[n]})})),Object.freeze(r)}class w{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}}const P={brace:new w(\"{\"),template:new w(\"`\",!0)};p.braceR.updateContext=e=>{e.pop()},p.braceL.updateContext=p.braceHashL.updateContext=p.dollarBraceL.updateContext=e=>{e.push(P.brace)},p.backQuote.updateContext=e=>{e[e.length-1]===P.template?e.pop():e.push(P.template)};let A=\"ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ\",O=\"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏０-９＿\";const C=new RegExp(\"[\"+A+\"]\"),I=new RegExp(\"[\"+A+O+\"]\");A=O=null;const k=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],N=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function _(e,t){let r=65536;for(let n=0,s=t.length;n<s;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function j(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&C.test(String.fromCharCode(e)):_(e,k)))}function D(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&I.test(String.fromCharCode(e)):_(e,k)||_(e,N))))}const L=new Set([\"break\",\"case\",\"catch\",\"continue\",\"debugger\",\"default\",\"do\",\"else\",\"finally\",\"for\",\"function\",\"if\",\"return\",\"switch\",\"throw\",\"try\",\"var\",\"const\",\"while\",\"with\",\"new\",\"this\",\"super\",\"class\",\"extends\",\"export\",\"import\",\"null\",\"true\",\"false\",\"in\",\"instanceof\",\"typeof\",\"void\",\"delete\"]),M=new Set([\"implements\",\"interface\",\"let\",\"package\",\"private\",\"protected\",\"public\",\"static\",\"yield\"]),B=new Set([\"eval\",\"arguments\"]);function R(e,t){return t&&\"await\"===e||\"enum\"===e}function F(e,t){return R(e,t)||M.has(e)}function U(e){return B.has(e)}function $(e,t){return F(e,t)||U(e)}function q(e){return L.has(e)}const V=new Set([\"break\",\"case\",\"catch\",\"continue\",\"debugger\",\"default\",\"do\",\"else\",\"finally\",\"for\",\"function\",\"if\",\"return\",\"switch\",\"throw\",\"try\",\"var\",\"const\",\"while\",\"with\",\"new\",\"this\",\"super\",\"class\",\"extends\",\"export\",\"import\",\"null\",\"true\",\"false\",\"in\",\"instanceof\",\"typeof\",\"void\",\"delete\",\"implements\",\"interface\",\"let\",\"package\",\"private\",\"protected\",\"public\",\"static\",\"yield\",\"eval\",\"arguments\",\"enum\",\"await\"]);class W{constructor(e){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=e}}class K{constructor(e,t){this.scopeStack=[],this.undefinedExports=new Map,this.undefinedPrivateNames=new Map,this.raise=e,this.inModule=t}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(64&e)>0&&0==(2&e)}get inStaticBlock(){return(128&this.currentThisScopeFlags())>0}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new W(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(e){return!!(2&e.flags||!this.inModule&&1&e.flags)}declareName(e,t,r){let n=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(n,e,t,r),16&t?n.functions.add(e):n.lexical.add(e),8&t&&this.maybeExportDefined(n,e);else if(4&t)for(let s=this.scopeStack.length-1;s>=0&&(n=this.scopeStack[s],this.checkRedeclarationInScope(n,e,t,r),n.var.add(e),this.maybeExportDefined(n,e),!(259&n.flags));--s);this.inModule&&1&n.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,n){this.isRedeclaredInScope(e,t,r)&&this.raise(n,x.VarRedeclaration,t)}isRedeclaredInScope(e,t,r){return!!(1&r)&&(8&r?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):16&r?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(8&e.flags&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t))}checkLocalExport(e){const{name:t}=e,r=this.scopeStack[0];r.lexical.has(t)||r.var.has(t)||r.functions.has(t)||this.undefinedExports.set(t,e.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(259&t)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(323&t&&!(4&t))return t}}}class G extends W{constructor(...e){super(...e),this.declareFunctions=new Set}}class H extends K{createScope(e){return new G(e)}declareName(e,t,r){const n=this.currentScope();if(2048&t)return this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e),void n.declareFunctions.add(e);super.declareName(...arguments)}isRedeclaredInScope(e,t,r){return!!super.isRedeclaredInScope(...arguments)||!!(2048&r)&&!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t))}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}const J=new Set([\"_\",\"any\",\"bool\",\"boolean\",\"empty\",\"extends\",\"false\",\"interface\",\"mixed\",\"null\",\"number\",\"static\",\"string\",\"true\",\"typeof\",\"void\"]),Y=T({AmbiguousConditionalArrow:\"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.\",AmbiguousDeclareModuleKind:\"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.\",AssignReservedType:\"Cannot overwrite reserved type %0.\",DeclareClassElement:\"The `declare` modifier can only appear on class fields.\",DeclareClassFieldInitializer:\"Initializers are not allowed in fields with the `declare` modifier.\",DuplicateDeclareModuleExports:\"Duplicate `declare module.exports` statement.\",EnumBooleanMemberNotInitialized:\"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.\",EnumDuplicateMemberName:\"Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.\",EnumInconsistentMemberValues:\"Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.\",EnumInvalidExplicitType:\"Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.\",EnumInvalidExplicitTypeUnknownSupplied:\"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.\",EnumInvalidMemberInitializerPrimaryType:\"Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.\",EnumInvalidMemberInitializerSymbolType:\"Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.\",EnumInvalidMemberInitializerUnknownType:\"The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.\",EnumInvalidMemberName:\"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.\",EnumNumberMemberNotInitialized:\"Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.\",EnumStringMemberInconsistentlyInitailized:\"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.\",GetterMayNotHaveThisParam:\"A getter cannot have a `this` parameter.\",ImportTypeShorthandOnlyInPureImport:\"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.\",InexactInsideExact:\"Explicit inexact syntax cannot appear inside an explicit exact object type.\",InexactInsideNonObject:\"Explicit inexact syntax cannot appear in class or interface definitions.\",InexactVariance:\"Explicit inexact syntax cannot have variance.\",InvalidNonTypeImportInDeclareModule:\"Imports within a `declare module` body must always be `import type` or `import typeof`.\",MissingTypeParamDefault:\"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.\",NestedDeclareModule:\"`declare module` cannot be used inside another `declare module`.\",NestedFlowComment:\"Cannot have a flow comment inside another flow comment.\",OptionalBindingPattern:\"A binding pattern parameter cannot be optional in an implementation signature.\",SetterMayNotHaveThisParam:\"A setter cannot have a `this` parameter.\",SpreadVariance:\"Spread properties cannot have variance.\",ThisParamAnnotationRequired:\"A type annotation is required for the `this` parameter.\",ThisParamBannedInConstructor:\"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.\",ThisParamMayNotBeOptional:\"The `this` parameter cannot be optional.\",ThisParamMustBeFirst:\"The `this` parameter must be the first function parameter.\",ThisParamNoDefault:\"The `this` parameter may not have a default value.\",TypeBeforeInitializer:\"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",TypeCastInPattern:\"The type cast expression is expected to be wrapped with parenthesis.\",UnexpectedExplicitInexactInObject:\"Explicit inexact syntax must appear at the end of an inexact object.\",UnexpectedReservedType:\"Unexpected reserved type %0.\",UnexpectedReservedUnderscore:\"`_` is only allowed as a type argument to call or new.\",UnexpectedSpaceBetweenModuloChecks:\"Spaces between `%` and `checks` are not allowed here.\",UnexpectedSpreadType:\"Spread operator cannot appear in class or interface definitions.\",UnexpectedSubtractionOperand:'Unexpected token, expected \"number\" or \"bigint\".',UnexpectedTokenAfterTypeParameter:\"Expected an arrow function after this type parameter declaration.\",UnexpectedTypeParameterBeforeAsyncArrowFunction:\"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.\",UnsupportedDeclareExportKind:\"`declare export %0` is not supported. Use `%1` instead.\",UnsupportedStatementInDeclareModule:\"Only declares and type imports are allowed inside declare module.\",UnterminatedFlowComment:\"Unterminated flow-comment.\"},E.SyntaxError);function X(e){return\"type\"===e.importKind||\"typeof\"===e.importKind}function z(e){return(e.type===p.name||!!e.type.keyword)&&\"from\"!==e.value}const Q={const:\"declare export var\",let:\"declare export var\",type:\"export type\",interface:\"export interface\"},Z=/\\*?\\s*@((?:no)?flow)\\b/,ee={quot:'\"',amp:\"&\",apos:\"'\",lt:\"<\",gt:\">\",nbsp:\" \",iexcl:\"¡\",cent:\"¢\",pound:\"£\",curren:\"¤\",yen:\"¥\",brvbar:\"¦\",sect:\"§\",uml:\"¨\",copy:\"©\",ordf:\"ª\",laquo:\"«\",not:\"¬\",shy:\"­\",reg:\"®\",macr:\"¯\",deg:\"°\",plusmn:\"±\",sup2:\"²\",sup3:\"³\",acute:\"´\",micro:\"µ\",para:\"¶\",middot:\"·\",cedil:\"¸\",sup1:\"¹\",ordm:\"º\",raquo:\"»\",frac14:\"¼\",frac12:\"½\",frac34:\"¾\",iquest:\"¿\",Agrave:\"À\",Aacute:\"Á\",Acirc:\"Â\",Atilde:\"Ã\",Auml:\"Ä\",Aring:\"Å\",AElig:\"Æ\",Ccedil:\"Ç\",Egrave:\"È\",Eacute:\"É\",Ecirc:\"Ê\",Euml:\"Ë\",Igrave:\"Ì\",Iacute:\"Í\",Icirc:\"Î\",Iuml:\"Ï\",ETH:\"Ð\",Ntilde:\"Ñ\",Ograve:\"Ò\",Oacute:\"Ó\",Ocirc:\"Ô\",Otilde:\"Õ\",Ouml:\"Ö\",times:\"×\",Oslash:\"Ø\",Ugrave:\"Ù\",Uacute:\"Ú\",Ucirc:\"Û\",Uuml:\"Ü\",Yacute:\"Ý\",THORN:\"Þ\",szlig:\"ß\",agrave:\"à\",aacute:\"á\",acirc:\"â\",atilde:\"ã\",auml:\"ä\",aring:\"å\",aelig:\"æ\",ccedil:\"ç\",egrave:\"è\",eacute:\"é\",ecirc:\"ê\",euml:\"ë\",igrave:\"ì\",iacute:\"í\",icirc:\"î\",iuml:\"ï\",eth:\"ð\",ntilde:\"ñ\",ograve:\"ò\",oacute:\"ó\",ocirc:\"ô\",otilde:\"õ\",ouml:\"ö\",divide:\"÷\",oslash:\"ø\",ugrave:\"ù\",uacute:\"ú\",ucirc:\"û\",uuml:\"ü\",yacute:\"ý\",thorn:\"þ\",yuml:\"ÿ\",OElig:\"Œ\",oelig:\"œ\",Scaron:\"Š\",scaron:\"š\",Yuml:\"Ÿ\",fnof:\"ƒ\",circ:\"ˆ\",tilde:\"˜\",Alpha:\"Α\",Beta:\"Β\",Gamma:\"Γ\",Delta:\"Δ\",Epsilon:\"Ε\",Zeta:\"Ζ\",Eta:\"Η\",Theta:\"Θ\",Iota:\"Ι\",Kappa:\"Κ\",Lambda:\"Λ\",Mu:\"Μ\",Nu:\"Ν\",Xi:\"Ξ\",Omicron:\"Ο\",Pi:\"Π\",Rho:\"Ρ\",Sigma:\"Σ\",Tau:\"Τ\",Upsilon:\"Υ\",Phi:\"Φ\",Chi:\"Χ\",Psi:\"Ψ\",Omega:\"Ω\",alpha:\"α\",beta:\"β\",gamma:\"γ\",delta:\"δ\",epsilon:\"ε\",zeta:\"ζ\",eta:\"η\",theta:\"θ\",iota:\"ι\",kappa:\"κ\",lambda:\"λ\",mu:\"μ\",nu:\"ν\",xi:\"ξ\",omicron:\"ο\",pi:\"π\",rho:\"ρ\",sigmaf:\"ς\",sigma:\"σ\",tau:\"τ\",upsilon:\"υ\",phi:\"φ\",chi:\"χ\",psi:\"ψ\",omega:\"ω\",thetasym:\"ϑ\",upsih:\"ϒ\",piv:\"ϖ\",ensp:\" \",emsp:\" \",thinsp:\" \",zwnj:\"‌\",zwj:\"‍\",lrm:\"‎\",rlm:\"‏\",ndash:\"–\",mdash:\"—\",lsquo:\"‘\",rsquo:\"’\",sbquo:\"‚\",ldquo:\"“\",rdquo:\"”\",bdquo:\"„\",dagger:\"†\",Dagger:\"‡\",bull:\"•\",hellip:\"…\",permil:\"‰\",prime:\"′\",Prime:\"″\",lsaquo:\"‹\",rsaquo:\"›\",oline:\"‾\",frasl:\"⁄\",euro:\"€\",image:\"ℑ\",weierp:\"℘\",real:\"ℜ\",trade:\"™\",alefsym:\"ℵ\",larr:\"←\",uarr:\"↑\",rarr:\"→\",darr:\"↓\",harr:\"↔\",crarr:\"↵\",lArr:\"⇐\",uArr:\"⇑\",rArr:\"⇒\",dArr:\"⇓\",hArr:\"⇔\",forall:\"∀\",part:\"∂\",exist:\"∃\",empty:\"∅\",nabla:\"∇\",isin:\"∈\",notin:\"∉\",ni:\"∋\",prod:\"∏\",sum:\"∑\",minus:\"−\",lowast:\"∗\",radic:\"√\",prop:\"∝\",infin:\"∞\",ang:\"∠\",and:\"∧\",or:\"∨\",cap:\"∩\",cup:\"∪\",int:\"∫\",there4:\"∴\",sim:\"∼\",cong:\"≅\",asymp:\"≈\",ne:\"≠\",equiv:\"≡\",le:\"≤\",ge:\"≥\",sub:\"⊂\",sup:\"⊃\",nsub:\"⊄\",sube:\"⊆\",supe:\"⊇\",oplus:\"⊕\",otimes:\"⊗\",perp:\"⊥\",sdot:\"⋅\",lceil:\"⌈\",rceil:\"⌉\",lfloor:\"⌊\",rfloor:\"⌋\",lang:\"〈\",rang:\"〉\",loz:\"◊\",spades:\"♠\",clubs:\"♣\",hearts:\"♥\",diams:\"♦\"};class te{constructor(){this.strict=void 0,this.curLine=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.decoratorStack=[[]],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=p.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[P.brace],this.exprAllowed=!0,this.containsEsc=!1,this.strictErrors=new Map,this.tokensLength=0}init(e){this.strict=!1!==e.strictMode&&\"module\"===e.sourceType,this.curLine=e.startLine,this.startLoc=this.endLoc=this.curPosition()}curPosition(){return new g(this.curLine,this.pos-this.lineStart)}clone(e){const t=new te,r=Object.keys(this);for(let n=0,s=r.length;n<s;n++){const s=r[n];let i=this[s];!e&&Array.isArray(i)&&(i=i.slice()),t[s]=i}return t}}const re=/^[\\da-fA-F]+$/,ne=/^\\d+$/,se=T({AttributeIsEmpty:\"JSX attributes must only be assigned a non-empty expression.\",MissingClosingTagElement:\"Expected corresponding JSX closing tag for <%0>.\",MissingClosingTagFragment:\"Expected corresponding JSX closing tag for <>.\",UnexpectedSequenceExpression:\"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?\",UnsupportedJsxValue:\"JSX value should be either an expression or a quoted JSX text.\",UnterminatedJsxContent:\"Unterminated JSX contents.\",UnwrappedAdjacentJSXElements:\"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?\"},E.SyntaxError);function ie(e){return!!e&&(\"JSXOpeningFragment\"===e.type||\"JSXClosingFragment\"===e.type)}function oe(e){if(\"JSXIdentifier\"===e.type)return e.name;if(\"JSXNamespacedName\"===e.type)return e.namespace.name+\":\"+e.name.name;if(\"JSXMemberExpression\"===e.type)return oe(e.object)+\".\"+oe(e.property);throw new Error(\"Node had unexpected type: \"+e.type)}P.j_oTag=new w(\"<tag\"),P.j_cTag=new w(\"</tag\"),P.j_expr=new w(\"<tag>...</tag>\",!0),p.jsxName=new a(\"jsxName\"),p.jsxText=new a(\"jsxText\",{beforeExpr:!0}),p.jsxTagStart=new a(\"jsxTagStart\",{startsExpr:!0}),p.jsxTagEnd=new a(\"jsxTagEnd\"),p.jsxTagStart.updateContext=e=>{e.push(P.j_expr,P.j_oTag)};class ae extends W{constructor(...e){super(...e),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}}class le extends K{createScope(e){return new ae(e)}declareName(e,t,r){const n=this.currentScope();if(1024&t)return this.maybeExportDefined(n,e),void n.exportOnlyBindings.add(e);super.declareName(...arguments),2&t&&(1&t||(this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e)),n.types.add(e)),256&t&&n.enums.add(e),512&t&&n.constEnums.add(e),128&t&&n.classes.add(e)}isRedeclaredInScope(e,t,r){return e.enums.has(t)?!(256&r)||!!(512&r)!==e.constEnums.has(t):128&r&&e.classes.has(t)?!!e.lexical.has(t)&&!!(1&r):!!(2&r&&e.types.has(t))||super.isRedeclaredInScope(...arguments)}checkLocalExport(e){const t=this.scopeStack[0],{name:r}=e;t.types.has(r)||t.exportOnlyBindings.has(r)||super.checkLocalExport(e)}}class ce{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function ue(e,t){return(e?2:0)|(t?1:0)}function pe(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}function fe(e){if(!e)throw new Error(\"Assert fail\")}const de=T({AbstractMethodHasImplementation:\"Method '%0' cannot have an implementation because it is marked abstract.\",AccesorCannotDeclareThisParameter:\"'get' and 'set' accessors cannot declare 'this' parameters.\",AccesorCannotHaveTypeParameters:\"An accessor cannot have type parameters.\",ClassMethodHasDeclare:\"Class methods cannot have the 'declare' modifier.\",ClassMethodHasReadonly:\"Class methods cannot have the 'readonly' modifier.\",ConstructorHasTypeParameters:\"Type parameters cannot appear on a constructor declaration.\",DeclareAccessor:\"'declare' is not allowed in %0ters.\",DeclareClassFieldHasInitializer:\"Initializers are not allowed in ambient contexts.\",DeclareFunctionHasImplementation:\"An implementation cannot be declared in ambient contexts.\",DuplicateAccessibilityModifier:\"Accessibility modifier already seen.\",DuplicateModifier:\"Duplicate modifier: '%0'.\",EmptyHeritageClauseType:\"'%0' list cannot be empty.\",EmptyTypeArguments:\"Type argument list cannot be empty.\",EmptyTypeParameters:\"Type parameter list cannot be empty.\",ExpectedAmbientAfterExportDeclare:\"'export declare' must be followed by an ambient declaration.\",ImportAliasHasImportType:\"An import alias can not use 'import type'.\",IncompatibleModifiers:\"'%0' modifier cannot be used with '%1' modifier.\",IndexSignatureHasAbstract:\"Index signatures cannot have the 'abstract' modifier.\",IndexSignatureHasAccessibility:\"Index signatures cannot have an accessibility modifier ('%0').\",IndexSignatureHasDeclare:\"Index signatures cannot have the 'declare' modifier.\",IndexSignatureHasOverride:\"'override' modifier cannot appear on an index signature.\",IndexSignatureHasStatic:\"Index signatures cannot have the 'static' modifier.\",InvalidModifierOnTypeMember:\"'%0' modifier cannot appear on a type member.\",InvalidModifiersOrder:\"'%0' modifier must precede '%1' modifier.\",InvalidTupleMemberLabel:\"Tuple members must be labeled with a simple identifier.\",MixedLabeledAndUnlabeledElements:\"Tuple members must all have names or all not have names.\",NonAbstractClassHasAbstractMethod:\"Abstract methods can only appear within an abstract class.\",NonClassMethodPropertyHasAbstractModifer:\"'abstract' modifier can only appear on a class, method, or property declaration.\",OptionalTypeBeforeRequired:\"A required element cannot follow an optional element.\",OverrideNotInSubClass:\"This member cannot have an 'override' modifier because its containing class does not extend another class.\",PatternIsOptional:\"A binding pattern parameter cannot be optional in an implementation signature.\",PrivateElementHasAbstract:\"Private elements cannot have the 'abstract' modifier.\",PrivateElementHasAccessibility:\"Private elements cannot have an accessibility modifier ('%0').\",ReadonlyForMethodSignature:\"'readonly' modifier can only appear on a property declaration or index signature.\",SetAccesorCannotHaveOptionalParameter:\"A 'set' accessor cannot have an optional parameter.\",SetAccesorCannotHaveRestParameter:\"A 'set' accessor cannot have rest parameter.\",SetAccesorCannotHaveReturnType:\"A 'set' accessor cannot have a return type annotation.\",StaticBlockCannotHaveModifier:\"Static class blocks cannot have any modifier.\",TypeAnnotationAfterAssign:\"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",TypeImportCannotSpecifyDefaultAndNamed:\"A type-only import can specify a default import or named bindings, but not both.\",UnexpectedParameterModifier:\"A parameter property is only allowed in a constructor implementation.\",UnexpectedReadonly:\"'readonly' type modifier is only permitted on array and tuple literal types.\",UnexpectedTypeAnnotation:\"Did not expect a type annotation here.\",UnexpectedTypeCastInParameter:\"Unexpected type cast in parameter position.\",UnsupportedImportTypeArgument:\"Argument in a type import must be a string literal.\",UnsupportedParameterPropertyKind:\"A parameter property may not be declared using a binding pattern.\",UnsupportedSignatureParameterKind:\"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0.\"},E.SyntaxError);function he(e){return\"private\"===e||\"public\"===e||\"protected\"===e}p.placeholder=new a(\"%%\",{startsExpr:!0});const me=T({ClassNameIsRequired:\"A class name is required.\"},E.SyntaxError);function ye(e,t){return e.some((e=>Array.isArray(e)?e[0]===t:e===t))}function ge(e,t,r){const n=e.find((e=>Array.isArray(e)?e[0]===t:e===t));return n&&Array.isArray(n)?n[1][r]:null}const be=[\"minimal\",\"smart\",\"fsharp\"],ve=[\"hash\",\"bar\"],Ee={estree:e=>class extends e{parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch(e){}const n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch(e){t=null}const r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){const t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,\"Literal\")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){const t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.extra.expressionValue,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,\"Literal\",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,\"ExpressionStatement\",e.end,e.loc.end)}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return\"ExpressionStatement\"===e.type&&\"Literal\"===e.expression.type&&\"string\"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}stmtToDirective(e){const t=super.stmtToDirective(e),r=e.expression.value;return this.addExtra(t.value,\"expressionValue\",r),t}parseBlockBody(e,...t){super.parseBlockBody(e,...t);const r=e.directives.map((e=>this.directiveToStmt(e)));e.body=r.concat(e.body),delete e.directives}pushClassMethod(e,t,r,n,s,i){this.parseMethod(t,r,n,s,i,\"ClassMethod\",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parseMaybePrivateName(...e){const t=super.parseMaybePrivateName(...e);return\"PrivateName\"===t.type&&this.getPluginOption(\"estree\",\"classFeatures\")?this.convertPrivateNameToPrivateIdentifier(t):t}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);return delete(e=e).id,e.name=t,e.type=\"PrivateIdentifier\",e}isPrivateName(e){return this.getPluginOption(\"estree\",\"classFeatures\")?\"PrivateIdentifier\"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption(\"estree\",\"classFeatures\")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){const r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression=\"BlockStatement\"!==e.body.type}parseMethod(e,t,r,n,s,i,o=!1){let a=this.startNode();return a.kind=e.kind,a=super.parseMethod(a,t,r,n,s,i,o),a.type=\"FunctionExpression\",delete a.kind,e.value=a,\"ClassPrivateMethod\"===i&&(e.computed=!1),i=\"MethodDefinition\",this.finishNode(e,i)}parseClassProperty(...e){const t=super.parseClassProperty(...e);return this.getPluginOption(\"estree\",\"classFeatures\")&&(t.type=\"PropertyDefinition\"),t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);return this.getPluginOption(\"estree\",\"classFeatures\")&&(t.type=\"PropertyDefinition\",t.computed=!1),t}parseObjectMethod(e,t,r,n,s){const i=super.parseObjectMethod(e,t,r,n,s);return i&&(i.type=\"Property\",\"method\"===i.kind&&(i.kind=\"init\"),i.shorthand=!1),i}parseObjectProperty(e,t,r,n,s){const i=super.parseObjectProperty(e,t,r,n,s);return i&&(i.kind=\"init\",i.type=\"Property\"),i}toAssignable(e,t=!1){return null!=e&&this.isObjectProperty(e)?(this.toAssignable(e.value,t),e):super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,...t){\"get\"===e.kind||\"set\"===e.kind?this.raise(e.key.start,x.PatternHasAccessor):e.method?this.raise(e.key.start,x.PatternHasMethod):super.toAssignableObjectExpressionProp(e,...t)}finishCallExpression(e,t){var r;(super.finishCallExpression(e,t),\"Import\"===e.callee.type)&&(e.type=\"ImportExpression\",e.source=e.arguments[0],this.hasPlugin(\"importAssertions\")&&(e.attributes=null!=(r=e.arguments[1])?r:null),delete e.arguments,delete e.callee);return e}toReferencedArguments(e){\"ImportExpression\"!==e.type&&super.toReferencedArguments(e)}parseExport(e){switch(super.parseExport(e),e.type){case\"ExportAllDeclaration\":e.exported=null;break;case\"ExportNamedDeclaration\":1===e.specifiers.length&&\"ExportNamespaceSpecifier\"===e.specifiers[0].type&&(e.type=\"ExportAllDeclaration\",e.exported=e.specifiers[0].exported,delete e.specifiers)}return e}parseSubscript(e,t,r,n,s){const i=super.parseSubscript(e,t,r,n,s);if(s.optionalChainMember){if(\"OptionalMemberExpression\"!==i.type&&\"OptionalCallExpression\"!==i.type||(i.type=i.type.substring(8)),s.stop){const e=this.startNodeAtNode(i);return e.expression=i,this.finishNode(e,\"ChainExpression\")}}else\"MemberExpression\"!==i.type&&\"CallExpression\"!==i.type||(i.optional=!1);return i}hasPropertyAsPrivateName(e){return\"ChainExpression\"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isOptionalChain(e){return\"ChainExpression\"===e.type}isObjectProperty(e){return\"Property\"===e.type&&\"init\"===e.kind&&!e.method}isObjectMethod(e){return e.method||\"get\"===e.kind||\"set\"===e.kind}},jsx:e=>class extends e{jsxReadToken(){let e=\"\",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,se.UnterminatedJsxContent);const r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(p.jsxTagStart)):super.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(p.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:default:h(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let r;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?\"\\n\":\"\\r\\n\"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let t=\"\",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,x.UnterminatedString);const n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):h(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(p.string,t)}jsxReadEntity(){let e,t=\"\",r=0,n=this.input[this.state.pos];const s=++this.state.pos;for(;this.state.pos<this.length&&r++<10;){if(n=this.input[this.state.pos++],\";\"===n){\"#\"===t[0]?\"x\"===t[1]?(t=t.substr(2),re.test(t)&&(e=String.fromCodePoint(parseInt(t,16)))):(t=t.substr(1),ne.test(t)&&(e=String.fromCodePoint(parseInt(t,10)))):e=ee[t];break}t+=n}return e||(this.state.pos=s,\"&\")}jsxReadWord(){let e;const t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(D(e)||45===e);return this.finishToken(p.jsxName,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){const e=this.startNode();return this.match(p.jsxName)?e.name=this.state.value:this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(e,\"JSXIdentifier\")}jsxParseNamespacedName(){const e=this.state.start,t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(p.colon))return r;const n=this.startNodeAt(e,t);return n.namespace=r,n.name=this.jsxParseIdentifier(),this.finishNode(n,\"JSXNamespacedName\")}jsxParseElementName(){const e=this.state.start,t=this.state.startLoc;let r=this.jsxParseNamespacedName();if(\"JSXNamespacedName\"===r.type)return r;for(;this.eat(p.dot);){const n=this.startNodeAt(e,t);n.object=r,n.property=this.jsxParseIdentifier(),r=this.finishNode(n,\"JSXMemberExpression\")}return r}jsxParseAttributeValue(){let e;switch(this.state.type){case p.braceL:return e=this.startNode(),this.next(),e=this.jsxParseExpressionContainer(e),\"JSXEmptyExpression\"===e.expression.type&&this.raise(e.start,se.AttributeIsEmpty),e;case p.jsxTagStart:case p.string:return this.parseExprAtom();default:throw this.raise(this.state.start,se.UnsupportedJsxValue)}}jsxParseEmptyExpression(){const e=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(e,\"JSXEmptyExpression\",this.state.start,this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.expect(p.braceR),this.finishNode(e,\"JSXSpreadChild\")}jsxParseExpressionContainer(e){if(this.match(p.braceR))e.expression=this.jsxParseEmptyExpression();else{const t=this.parseExpression();e.expression=t}return this.expect(p.braceR),this.finishNode(e,\"JSXExpressionContainer\")}jsxParseAttribute(){const e=this.startNode();return this.eat(p.braceL)?(this.expect(p.ellipsis),e.argument=this.parseMaybeAssignAllowIn(),this.expect(p.braceR),this.finishNode(e,\"JSXSpreadAttribute\")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(p.eq)?this.jsxParseAttributeValue():null,this.finishNode(e,\"JSXAttribute\"))}jsxParseOpeningElementAt(e,t){const r=this.startNodeAt(e,t);return this.match(p.jsxTagEnd)?(this.expect(p.jsxTagEnd),this.finishNode(r,\"JSXOpeningFragment\")):(r.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(r))}jsxParseOpeningElementAfterName(e){const t=[];for(;!this.match(p.slash)&&!this.match(p.jsxTagEnd);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(p.slash),this.expect(p.jsxTagEnd),this.finishNode(e,\"JSXOpeningElement\")}jsxParseClosingElementAt(e,t){const r=this.startNodeAt(e,t);return this.match(p.jsxTagEnd)?(this.expect(p.jsxTagEnd),this.finishNode(r,\"JSXClosingFragment\")):(r.name=this.jsxParseElementName(),this.expect(p.jsxTagEnd),this.finishNode(r,\"JSXClosingElement\"))}jsxParseElementAt(e,t){const r=this.startNodeAt(e,t),n=[],s=this.jsxParseOpeningElementAt(e,t);let i=null;if(!s.selfClosing){e:for(;;)switch(this.state.type){case p.jsxTagStart:if(e=this.state.start,t=this.state.startLoc,this.next(),this.eat(p.slash)){i=this.jsxParseClosingElementAt(e,t);break e}n.push(this.jsxParseElementAt(e,t));break;case p.jsxText:n.push(this.parseExprAtom());break;case p.braceL:{const e=this.startNode();this.next(),this.match(p.ellipsis)?n.push(this.jsxParseSpreadChild(e)):n.push(this.jsxParseExpressionContainer(e));break}default:throw this.unexpected()}ie(s)&&!ie(i)?this.raise(i.start,se.MissingClosingTagFragment):!ie(s)&&ie(i)?this.raise(i.start,se.MissingClosingTagElement,oe(s.name)):ie(s)||ie(i)||oe(i.name)!==oe(s.name)&&this.raise(i.start,se.MissingClosingTagElement,oe(s.name))}if(ie(s)?(r.openingFragment=s,r.closingFragment=i):(r.openingElement=s,r.closingElement=i),r.children=n,this.isRelational(\"<\"))throw this.raise(this.state.start,se.UnwrappedAdjacentJSXElements);return ie(s)?this.finishNode(r,\"JSXFragment\"):this.finishNode(r,\"JSXElement\")}jsxParseElement(){const e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)}parseExprAtom(e){return this.match(p.jsxText)?this.parseLiteral(this.state.value,\"JSXText\"):this.match(p.jsxTagStart)?this.jsxParseElement():this.isRelational(\"<\")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(p.jsxTagStart),this.jsxParseElement()):super.parseExprAtom(e)}createLookaheadState(e){const t=super.createLookaheadState(e);return t.inPropertyName=e.inPropertyName,t}getTokenFromCode(e){if(this.state.inPropertyName)return super.getTokenFromCode(e);const t=this.curContext();if(t===P.j_expr)return this.jsxReadToken();if(t===P.j_oTag||t===P.j_cTag){if(j(e))return this.jsxReadWord();if(62===e)return++this.state.pos,this.finishToken(p.jsxTagEnd);if((34===e||39===e)&&t===P.j_oTag)return this.jsxReadString(e)}return 60===e&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(p.jsxTagStart)):super.getTokenFromCode(e)}updateContext(e){super.updateContext(e);const{context:t,type:r}=this.state;if(r===p.slash&&e===p.jsxTagStart)t.splice(-2,2,P.j_cTag),this.state.exprAllowed=!1;else if(r===p.jsxTagEnd){const r=t.pop();r===P.j_oTag&&e===p.slash||r===P.j_cTag?(t.pop(),this.state.exprAllowed=t[t.length-1]===P.j_expr):this.state.exprAllowed=!0}else!r.keyword||e!==p.dot&&e!==p.questionDot?this.state.exprAllowed=r.beforeExpr:this.state.exprAllowed=!1}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return H}shouldParseTypes(){return this.getPluginOption(\"flow\",\"all\")||\"flow\"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption(\"flow\",\"enums\")}finishToken(e,t){return e!==p.string&&e!==p.semi&&e!==p.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=Z.exec(e.value);if(t)if(\"flow\"===t[1])this.flowPragma=\"flow\";else{if(\"noflow\"!==t[1])throw new Error(\"Unexpected flow pragma\");this.flowPragma=\"noflow\"}}return super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||p.colon);const r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){const e=this.startNode(),t=this.state.start;return this.next(),this.expectContextual(\"checks\"),this.state.lastTokStart>t+1&&this.raise(t,Y.UnexpectedSpaceBetweenModuloChecks),this.eat(p.parenL)?(e.value=this.parseExpression(),this.expect(p.parenR),this.finishNode(e,\"DeclaredPredicate\")):this.finishNode(e,\"InferredPredicate\")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(p.colon);let t=null,r=null;return this.match(p.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(p.modulo)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,\"DeclareClass\")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational(\"<\")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(p.parenL);const s=this.flowParseFunctionTypeParams();return r.params=s.params,r.rest=s.rest,r.this=s._this,this.expect(p.parenR),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,\"FunctionTypeAnnotation\"),t.typeAnnotation=this.finishNode(n,\"TypeAnnotation\"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.start),this.finishNode(e,\"DeclareFunction\")}flowParseDeclare(e,t){if(this.match(p._class))return this.flowParseDeclareClass(e);if(this.match(p._function))return this.flowParseDeclareFunction(e);if(this.match(p._var))return this.flowParseDeclareVariable(e);if(this.eatContextual(\"module\"))return this.match(p.dot)?this.flowParseDeclareModuleExports(e):(t&&this.raise(this.state.lastTokStart,Y.NestedDeclareModule),this.flowParseDeclareModule(e));if(this.isContextual(\"type\"))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(\"opaque\"))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(\"interface\"))return this.flowParseDeclareInterface(e);if(this.match(p._export))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.start),this.semicolon(),this.finishNode(e,\"DeclareVariable\")}flowParseDeclareModule(e){this.scope.enter(0),this.match(p.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();const t=e.body=this.startNode(),r=t.body=[];for(this.expect(p.braceL);!this.match(p.braceR);){let e=this.startNode();this.match(p._import)?(this.next(),this.isContextual(\"type\")||this.match(p._typeof)||this.raise(this.state.lastTokStart,Y.InvalidNonTypeImportInDeclareModule),this.parseImport(e)):(this.expectContextual(\"declare\",Y.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),r.push(e)}this.scope.exit(),this.expect(p.braceR),this.finishNode(t,\"BlockStatement\");let n=null,s=!1;return r.forEach((e=>{!function(e){return\"DeclareExportAllDeclaration\"===e.type||\"DeclareExportDeclaration\"===e.type&&(!e.declaration||\"TypeAlias\"!==e.declaration.type&&\"InterfaceDeclaration\"!==e.declaration.type)}(e)?\"DeclareModuleExports\"===e.type&&(s&&this.raise(e.start,Y.DuplicateDeclareModuleExports),\"ES\"===n&&this.raise(e.start,Y.AmbiguousDeclareModuleKind),n=\"CommonJS\",s=!0):(\"CommonJS\"===n&&this.raise(e.start,Y.AmbiguousDeclareModuleKind),n=\"ES\")})),e.kind=n||\"CommonJS\",this.finishNode(e,\"DeclareModule\")}flowParseDeclareExportDeclaration(e,t){if(this.expect(p._export),this.eat(p._default))return this.match(p._function)||this.match(p._class)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,\"DeclareExportDeclaration\");if(this.match(p._const)||this.isLet()||(this.isContextual(\"type\")||this.isContextual(\"interface\"))&&!t){const e=this.state.value,t=Q[e];throw this.raise(this.state.start,Y.UnsupportedDeclareExportKind,e,t)}if(this.match(p._var)||this.match(p._function)||this.match(p._class)||this.isContextual(\"opaque\"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,\"DeclareExportDeclaration\");if(this.match(p.star)||this.match(p.braceL)||this.isContextual(\"interface\")||this.isContextual(\"type\")||this.isContextual(\"opaque\"))return\"ExportNamedDeclaration\"===(e=this.parseExport(e)).type&&(e.type=\"ExportDeclaration\",e.default=!1,delete e.exportKind),e.type=\"Declare\"+e.type,e;throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(\"exports\"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,\"DeclareModuleExports\")}flowParseDeclareTypeAlias(e){return this.next(),this.flowParseTypeAlias(e),e.type=\"DeclareTypeAlias\",e}flowParseDeclareOpaqueType(e){return this.next(),this.flowParseOpaqueType(e,!0),e.type=\"DeclareOpaqueType\",e}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,\"DeclareInterface\")}flowParseInterfaceish(e,t=!1){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:9,e.id.start),this.isRelational(\"<\")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.implements=[],e.mixins=[],this.eat(p._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(p.comma));if(this.isContextual(\"mixins\")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(p.comma))}if(this.isContextual(\"implements\")){this.next();do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(p.comma))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational(\"<\")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,\"InterfaceExtends\")}flowParseInterface(e){return this.flowParseInterfaceish(e),this.finishNode(e,\"InterfaceDeclaration\")}checkNotUnderscore(e){\"_\"===e&&this.raise(this.state.start,Y.UnexpectedReservedUnderscore)}checkReservedType(e,t,r){J.has(e)&&this.raise(t,r?Y.AssignReservedType:Y.UnexpectedReservedType,e)}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.start,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational(\"<\")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(p.eq),this.semicolon(),this.finishNode(e,\"TypeAlias\")}flowParseOpaqueType(e,t){return this.expectContextual(\"type\"),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational(\"<\")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(p.colon)&&(e.supertype=this.flowParseTypeInitialiser(p.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(p.eq)),this.semicolon(),this.finishNode(e,\"OpaqueType\")}flowParseTypeParameter(e=!1){const t=this.state.start,r=this.startNode(),n=this.flowParseVariance(),s=this.flowParseTypeAnnotatableIdentifier();return r.name=s.name,r.variance=n,r.bound=s.typeAnnotation,this.match(p.eq)?(this.eat(p.eq),r.default=this.flowParseType()):e&&this.raise(t,Y.MissingTypeParamDefault),this.finishNode(r,\"TypeParameter\")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational(\"<\")||this.match(p.jsxTagStart)?this.next():this.unexpected();let r=!1;do{const e=this.flowParseTypeParameter(r);t.params.push(e),e.default&&(r=!0),this.isRelational(\">\")||this.expect(p.comma)}while(!this.isRelational(\">\"));return this.expectRelational(\">\"),this.state.inType=e,this.finishNode(t,\"TypeParameterDeclaration\")}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expectRelational(\"<\");const r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(\">\");)e.params.push(this.flowParseType()),this.isRelational(\">\")||this.expect(p.comma);return this.state.noAnonFunctionType=r,this.expectRelational(\">\"),this.state.inType=t,this.finishNode(e,\"TypeParameterInstantiation\")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational(\"<\");!this.isRelational(\">\");)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(\">\")||this.expect(p.comma);return this.expectRelational(\">\"),this.state.inType=t,this.finishNode(e,\"TypeParameterInstantiation\")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(\"interface\"),e.extends=[],this.eat(p._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(p.comma));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,\"InterfaceTypeAnnotation\")}flowParseObjectPropertyKey(){return this.match(p.num)||this.match(p.string)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,r){return e.static=t,this.lookahead().type===p.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(p.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,\"ObjectTypeIndexer\")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(p.bracketR),this.expect(p.bracketR),this.isRelational(\"<\")||this.match(p.parenL)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start))):(e.method=!1,this.eat(p.question)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,\"ObjectTypeInternalSlot\")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.isRelational(\"<\")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(p.parenL),this.match(p._this)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(p.parenR)||this.expect(p.comma));!this.match(p.parenR)&&!this.match(p.ellipsis);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(p.parenR)||this.expect(p.comma);return this.eat(p.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(p.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,\"FunctionTypeAnnotation\")}flowParseObjectTypeCallProperty(e,t){const r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,\"ObjectTypeCallProperty\")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:s}){const i=this.state.inType;this.state.inType=!0;const o=this.startNode();let a,l;o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let c=!1;for(t&&this.match(p.braceBarL)?(this.expect(p.braceBarL),a=p.braceBarR,l=!0):(this.expect(p.braceL),a=p.braceR,l=!1),o.exact=l;!this.match(a);){let t=!1,i=null,a=null;const u=this.startNode();if(n&&this.isContextual(\"proto\")){const t=this.lookahead();t.type!==p.colon&&t.type!==p.question&&(this.next(),i=this.state.start,e=!1)}if(e&&this.isContextual(\"static\")){const e=this.lookahead();e.type!==p.colon&&e.type!==p.question&&(this.next(),t=!0)}const f=this.flowParseVariance();if(this.eat(p.bracketL))null!=i&&this.unexpected(i),this.eat(p.bracketL)?(f&&this.unexpected(f.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))):o.indexers.push(this.flowParseObjectTypeIndexer(u,t,f));else if(this.match(p.parenL)||this.isRelational(\"<\"))null!=i&&this.unexpected(i),f&&this.unexpected(f.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e=\"init\";if(this.isContextual(\"get\")||this.isContextual(\"set\")){const t=this.lookahead();t.type!==p.name&&t.type!==p.string&&t.type!==p.num||(e=this.state.value,this.next())}const n=this.flowParseObjectTypeProperty(u,t,i,f,e,r,null!=s?s:!l);null===n?(c=!0,a=this.state.lastTokStart):o.properties.push(n)}this.flowObjectTypeSemicolon(),!a||this.match(p.braceR)||this.match(p.braceBarR)||this.raise(a,Y.UnexpectedExplicitInexactInObject)}this.expect(a),r&&(o.inexact=c);const u=this.finishNode(o,\"ObjectTypeAnnotation\");return this.state.inType=i,u}flowParseObjectTypeProperty(e,t,r,n,s,i,o){if(this.eat(p.ellipsis))return this.match(p.comma)||this.match(p.semi)||this.match(p.braceR)||this.match(p.braceBarR)?(i?o||this.raise(this.state.lastTokStart,Y.InexactInsideExact):this.raise(this.state.lastTokStart,Y.InexactInsideNonObject),n&&this.raise(n.start,Y.InexactVariance),null):(i||this.raise(this.state.lastTokStart,Y.UnexpectedSpreadType),null!=r&&this.unexpected(r),n&&this.raise(n.start,Y.SpreadVariance),e.argument=this.flowParseType(),this.finishNode(e,\"ObjectTypeSpreadProperty\"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=r,e.kind=s;let o=!1;return this.isRelational(\"<\")||this.match(p.parenL)?(e.method=!0,null!=r&&this.unexpected(r),n&&this.unexpected(n.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start)),\"get\"!==s&&\"set\"!==s||this.flowCheckGetterSetterParams(e),!i&&\"constructor\"===e.key.name&&e.value.this&&this.raise(e.value.this.start,Y.ThisParamBannedInConstructor)):(\"init\"!==s&&this.unexpected(),e.method=!1,this.eat(p.question)&&(o=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=o,this.finishNode(e,\"ObjectTypeProperty\")}}flowCheckGetterSetterParams(e){const t=\"get\"===e.kind?0:1,r=e.start,n=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.value.this.start,\"get\"===e.kind?Y.GetterMayNotHaveThisParam:Y.SetterMayNotHaveThisParam),n!==t&&(\"get\"===e.kind?this.raise(r,x.BadGetterArity):this.raise(r,x.BadSetterArity)),\"set\"===e.kind&&e.value.rest&&this.raise(r,x.BadSetterRestParameter)}flowObjectTypeSemicolon(){this.eat(p.semi)||this.eat(p.comma)||this.match(p.braceR)||this.match(p.braceBarR)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;let n=r||this.flowParseRestrictedIdentifier(!0);for(;this.eat(p.dot);){const r=this.startNodeAt(e,t);r.qualification=n,r.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(r,\"QualifiedTypeIdentifier\")}return n}flowParseGenericType(e,t,r){const n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational(\"<\")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,\"GenericTypeAnnotation\")}flowParseTypeofType(){const e=this.startNode();return this.expect(p._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,\"TypeofTypeAnnotation\")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(p.bracketL);this.state.pos<this.length&&!this.match(p.bracketR)&&(e.types.push(this.flowParseType()),!this.match(p.bracketR));)this.expect(p.comma);return this.expect(p.bracketR),this.finishNode(e,\"TupleTypeAnnotation\")}flowParseFunctionTypeParam(e){let t=null,r=!1,n=null;const s=this.startNode(),i=this.lookahead(),o=this.state.type===p._this;return i.type===p.colon||i.type===p.question?(o&&!e&&this.raise(s.start,Y.ThisParamMustBeFirst),t=this.parseIdentifier(o),this.eat(p.question)&&(r=!0,o&&this.raise(s.start,Y.ThisParamMayNotBeOptional)),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),s.name=t,s.optional=r,s.typeAnnotation=n,this.finishNode(s,\"FunctionTypeParam\")}reinterpretTypeAsFunctionTypeParam(e){const t=this.startNodeAt(e.start,e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,\"FunctionTypeParam\")}flowParseFunctionTypeParams(e=[]){let t=null,r=null;for(this.match(p._this)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(p.parenR)||this.expect(p.comma));!this.match(p.parenR)&&!this.match(p.ellipsis);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(p.parenR)||this.expect(p.comma);return this.eat(p.ellipsis)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:r}}flowIdentToTypeAnnotation(e,t,r,n){switch(n.name){case\"any\":return this.finishNode(r,\"AnyTypeAnnotation\");case\"bool\":case\"boolean\":return this.finishNode(r,\"BooleanTypeAnnotation\");case\"mixed\":return this.finishNode(r,\"MixedTypeAnnotation\");case\"empty\":return this.finishNode(r,\"EmptyTypeAnnotation\");case\"number\":return this.finishNode(r,\"NumberTypeAnnotation\");case\"string\":return this.finishNode(r,\"StringTypeAnnotation\");case\"symbol\":return this.finishNode(r,\"SymbolTypeAnnotation\");default:return this.checkNotUnderscore(n.name),this.flowParseGenericType(e,t,n)}}flowParsePrimaryType(){const e=this.state.start,t=this.state.startLoc,r=this.startNode();let n,s,i=!1;const o=this.state.noAnonFunctionType;switch(this.state.type){case p.name:return this.isContextual(\"interface\")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case p.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case p.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case p.bracketL:return this.state.noAnonFunctionType=!1,s=this.flowParseTupleType(),this.state.noAnonFunctionType=o,s;case p.relational:if(\"<\"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(p.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,r.this=n._this,this.expect(p.parenR),this.expect(p.arrow),r.returnType=this.flowParseType(),this.finishNode(r,\"FunctionTypeAnnotation\");break;case p.parenL:if(this.next(),!this.match(p.parenR)&&!this.match(p.ellipsis))if(this.match(p.name)||this.match(p._this)){const e=this.lookahead().type;i=e!==p.question&&e!==p.colon}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,s=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(p.comma)||this.match(p.parenR)&&this.lookahead().type===p.arrow))return this.expect(p.parenR),s;this.eat(p.comma)}return n=s?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(s)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,r.this=n._this,this.expect(p.parenR),this.expect(p.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,\"FunctionTypeAnnotation\");case p.string:return this.parseLiteral(this.state.value,\"StringLiteralTypeAnnotation\");case p._true:case p._false:return r.value=this.match(p._true),this.next(),this.finishNode(r,\"BooleanLiteralTypeAnnotation\");case p.plusMin:if(\"-\"===this.state.value){if(this.next(),this.match(p.num))return this.parseLiteralAtNode(-this.state.value,\"NumberLiteralTypeAnnotation\",r);if(this.match(p.bigint))return this.parseLiteralAtNode(-this.state.value,\"BigIntLiteralTypeAnnotation\",r);throw this.raise(this.state.start,Y.UnexpectedSubtractionOperand)}throw this.unexpected();case p.num:return this.parseLiteral(this.state.value,\"NumberLiteralTypeAnnotation\");case p.bigint:return this.parseLiteral(this.state.value,\"BigIntLiteralTypeAnnotation\");case p._void:return this.next(),this.finishNode(r,\"VoidTypeAnnotation\");case p._null:return this.next(),this.finishNode(r,\"NullLiteralTypeAnnotation\");case p._this:return this.next(),this.finishNode(r,\"ThisTypeAnnotation\");case p.star:return this.next(),this.finishNode(r,\"ExistsTypeAnnotation\");default:if(\"typeof\"===this.state.type.keyword)return this.flowParseTypeofType();if(this.state.type.keyword){const e=this.state.type.label;return this.next(),super.createIdentifier(r,e)}}throw this.unexpected()}flowParsePostfixType(){const e=this.state.start,t=this.state.startLoc;let r=this.flowParsePrimaryType(),n=!1;for(;(this.match(p.bracketL)||this.match(p.questionDot))&&!this.canInsertSemicolon();){const s=this.startNodeAt(e,t),i=this.eat(p.questionDot);n=n||i,this.expect(p.bracketL),!i&&this.match(p.bracketR)?(s.elementType=r,this.next(),r=this.finishNode(s,\"ArrayTypeAnnotation\")):(s.objectType=r,s.indexType=this.flowParseType(),this.expect(p.bracketR),n?(s.optional=i,r=this.finishNode(s,\"OptionalIndexedAccessType\")):r=this.finishNode(s,\"IndexedAccessType\"))}return r}flowParsePrefixType(){const e=this.startNode();return this.eat(p.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,\"NullableTypeAnnotation\")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(p.arrow)){const t=this.startNodeAt(e.start,e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,\"FunctionTypeAnnotation\")}return e}flowParseIntersectionType(){const e=this.startNode();this.eat(p.bitwiseAND);const t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(p.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,\"IntersectionTypeAnnotation\")}flowParseUnionType(){const e=this.startNode();this.eat(p.bitwiseOR);const t=this.flowParseIntersectionType();for(e.types=[t];this.eat(p.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,\"UnionTypeAnnotation\")}flowParseType(){const e=this.state.inType;this.state.inType=!0;const t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(this.state.type===p.name&&\"_\"===this.state.value){const e=this.state.start,t=this.state.startLoc,r=this.parseIdentifier();return this.flowParseGenericType(e,t,r)}return this.flowParseType()}flowParseTypeAnnotation(){const e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,\"TypeAnnotation\")}flowParseTypeAnnotatableIdentifier(e){const t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(p.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.end,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(p.plusMin)&&(e=this.startNode(),\"+\"===this.state.value?e.kind=\"plus\":e.kind=\"minus\",this.next(),this.finishNode(e,\"Variance\")),e}parseFunctionBody(e,t,r=!1){return t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,r))):super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!1){if(this.match(p.colon)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,\"TypeAnnotation\"):null}super.parseFunctionBodyAndFinish(e,t,r)}parseStatement(e,t){if(this.state.strict&&this.match(p.name)&&\"interface\"===this.state.value){const e=this.lookahead();if(e.type===p.name||q(e.value)){const e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual(\"enum\")){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}const r=super.parseStatement(e,t);return void 0!==this.flowPragma||this.isValidDirective(r)||(this.flowPragma=null),r}parseExpressionStatement(e,t){if(\"Identifier\"===t.type)if(\"declare\"===t.name){if(this.match(p._class)||this.match(p.name)||this.match(p._function)||this.match(p._var)||this.match(p._export))return this.flowParseDeclare(e)}else if(this.match(p.name)){if(\"interface\"===t.name)return this.flowParseInterface(e);if(\"type\"===t.name)return this.flowParseTypeAlias(e);if(\"opaque\"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){return this.isContextual(\"type\")||this.isContextual(\"interface\")||this.isContextual(\"opaque\")||this.shouldParseEnums()&&this.isContextual(\"enum\")||super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){return(!this.match(p.name)||!(\"type\"===this.state.value||\"interface\"===this.state.value||\"opaque\"===this.state.value||this.shouldParseEnums()&&\"enum\"===this.state.value))&&super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(\"enum\")){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r,n){if(!this.match(p.question))return e;if(this.state.maybeInArrowParameters){const s=this.tryParse((()=>super.parseConditional(e,t,r)));return s.node?(s.error&&(this.state=s.failState),s.node):(s.error&&super.setOptionalParametersError(n,s.error),e)}this.expect(p.question);const s=this.state.clone(),i=this.state.noArrowAt,o=this.startNodeAt(t,r);let{consequent:a,failed:l}=this.tryParseConditionalConsequent(),[c,u]=this.getArrowLikeExpressions(a);if(l||u.length>0){const e=[...i];if(u.length>0){this.state=s,this.state.noArrowAt=e;for(let t=0;t<u.length;t++)e.push(u[t].start);({consequent:a,failed:l}=this.tryParseConditionalConsequent()),[c,u]=this.getArrowLikeExpressions(a)}l&&c.length>1&&this.raise(s.start,Y.AmbiguousConditionalArrow),l&&1===c.length&&(this.state=s,this.state.noArrowAt=e.concat(c[0].start),({consequent:a,failed:l}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=i,this.expect(p.colon),o.test=e,o.consequent=a,o.alternate=this.forwardNoArrowParamsConversionAt(o,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(o,\"ConditionalExpression\")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),t=!this.match(p.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const r=[e],n=[];for(;0!==r.length;){const e=r.pop();\"ArrowFunctionExpression\"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):n.push(e),r.push(e.body)):\"ConditionalExpression\"===e.type&&(r.push(e.consequent),r.push(e.alternate))}return t?(n.forEach((e=>this.finishArrowValidation(e))),[n,[]]):function(e,t){const r=[],n=[];for(let s=0;s<e.length;s++)(t(e[s])?r:n).push(e[s]);return[r,n]}(n,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingComma,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t,r){if(e=super.parseParenItem(e,t,r),this.eat(p.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(p.colon)){const n=this.startNodeAt(t,r);return n.expression=e,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,\"TypeCastExpression\")}return e}assertModuleNodeAllowed(e){\"ImportDeclaration\"===e.type&&(\"type\"===e.importKind||\"typeof\"===e.importKind)||\"ExportNamedDeclaration\"===e.type&&\"type\"===e.exportKind||\"ExportAllDeclaration\"===e.type&&\"type\"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExport(e){const t=super.parseExport(e);return\"ExportNamedDeclaration\"!==t.type&&\"ExportAllDeclaration\"!==t.type||(t.exportKind=t.exportKind||\"value\"),t}parseExportDeclaration(e){if(this.isContextual(\"type\")){e.exportKind=\"type\";const t=this.startNode();return this.next(),this.match(p.braceL)?(e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(\"opaque\")){e.exportKind=\"type\";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(\"interface\")){e.exportKind=\"type\";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual(\"enum\")){e.exportKind=\"value\";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(...arguments)||!(!this.isContextual(\"type\")||this.lookahead().type!==p.star)&&(e.exportKind=\"type\",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const t=this.state.start,r=super.maybeParseExportNamespaceSpecifier(e);return r&&\"type\"===e.exportKind&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.isRelational(\"<\")&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){const n=this.state.start;if(this.isContextual(\"declare\")){if(this.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&(\"ClassProperty\"!==t.type&&\"ClassPrivateProperty\"!==t.type&&\"PropertyDefinition\"!==t.type?this.raise(n,Y.DeclareClassElement):t.value&&this.raise(t.value.start,Y.DeclareClassFieldInitializer))}isIterator(e){return\"iterator\"===e||\"asyncIterator\"===e}readIterator(){const e=super.readWord1(),t=\"@@\"+e;this.isIterator(e)&&this.state.inType||this.raise(this.state.pos,x.InvalidIdentifier,t),this.finishToken(p.name,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);return 123===e&&124===t?this.finishOp(p.braceBarL,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(p.questionDot,2):this.finishOp(p.question,1):function(e,t){return 64===e&&64===t}(e,t)?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(p.relational,1)}isAssignable(e,t){switch(e.type){case\"Identifier\":case\"ObjectPattern\":case\"ArrayPattern\":case\"AssignmentPattern\":return!0;case\"ObjectExpression\":{const t=e.properties.length-1;return e.properties.every(((e,r)=>\"ObjectMethod\"!==e.type&&(r===t||\"SpreadElement\"===e.type)&&this.isAssignable(e)))}case\"ObjectProperty\":return this.isAssignable(e.value);case\"SpreadElement\":return this.isAssignable(e.argument);case\"ArrayExpression\":return e.elements.every((e=>this.isAssignable(e)));case\"AssignmentExpression\":return\"=\"===e.operator;case\"ParenthesizedExpression\":case\"TypeCastExpression\":return this.isAssignable(e.expression);case\"MemberExpression\":case\"OptionalMemberExpression\":return!t;default:return!1}}toAssignable(e,t=!1){return\"TypeCastExpression\"===e.type?super.toAssignable(this.typeCastToParameter(e),t):super.toAssignable(e,t)}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){const r=e[t];\"TypeCastExpression\"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}return super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let n=0;n<e.length;n++){var r;const s=e[n];!s||\"TypeCastExpression\"!==s.type||null!=(r=s.extra)&&r.parenthesized||!(e.length>1)&&t||this.raise(s.typeAnnotation.start,Y.TypeCastInPattern)}return e}parseArrayLike(e,t,r,n){const s=super.parseArrayLike(e,t,r,n);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(s.elements),s}checkLVal(e,...t){if(\"TypeCastExpression\"!==e.type)return super.checkLVal(e,...t)}parseClassProperty(e){return this.match(p.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(p.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.isRelational(\"<\")||super.isClassMethod()}isClassProperty(){return this.match(p.colon)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(p.colon)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,n,s,i){if(t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational(\"<\")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,n,s,i),t.params&&s){const e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(t.start,Y.ThisParamBannedInConstructor)}else if(\"MethodDefinition\"===t.type&&s&&t.value.params){const e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(t.start,Y.ThisParamBannedInConstructor)}}pushClassPrivateMethod(e,t,r,n){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational(\"<\")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.isRelational(\"<\")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(\"implements\")){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.isRelational(\"<\")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,\"ClassImplements\"))}while(this.eat(p.comma))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const t=this.getObjectOrClassMethodParams(e);if(t.length>0){const r=t[0];this.isThisParam(r)&&\"get\"===e.kind?this.raise(r.start,Y.GetterMayNotHaveThisParam):this.isThisParam(r)&&this.raise(r.start,Y.SetterMayNotHaveThisParam)}}parsePropertyName(e,t){const r=this.flowParseVariance(),n=super.parsePropertyName(e,t);return e.variance=r,n}parseObjPropValue(e,t,r,n,s,i,o,a){let l;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational(\"<\")&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(p.parenL)||this.unexpected()),super.parseObjPropValue(e,t,r,n,s,i,o,a),l&&((e.value||e).typeParameters=l)}parseAssignableListItemTypes(e){return this.eat(p.question)&&(\"Identifier\"!==e.type&&this.raise(e.start,Y.OptionalBindingPattern),this.isThisParam(e)&&this.raise(e.start,Y.ThisParamMayNotBeOptional),e.optional=!0),this.match(p.colon)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(e.start,Y.ThisParamAnnotationRequired),this.match(p.eq)&&this.isThisParam(e)&&this.raise(e.start,Y.ThisParamNoDefault),this.resetEndLocation(e),e}parseMaybeDefault(e,t,r){const n=super.parseMaybeDefault(e,t,r);return\"AssignmentPattern\"===n.type&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(n.typeAnnotation.start,Y.TypeBeforeInitializer),n}shouldParseDefaultImport(e){return X(e)?z(this.state):super.shouldParseDefaultImport(e)}parseImportSpecifierLocal(e,t,r,n){t.local=X(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),this.checkLVal(t.local,n,9),e.specifiers.push(this.finishNode(t,r))}maybeParseDefaultImportSpecifier(e){e.importKind=\"value\";let t=null;if(this.match(p._typeof)?t=\"typeof\":this.isContextual(\"type\")&&(t=\"type\"),t){const r=this.lookahead();\"type\"===t&&r.type===p.star&&this.unexpected(r.start),(z(r)||r.type===p.braceL||r.type===p.star)&&(this.next(),e.importKind=t)}return super.maybeParseDefaultImportSpecifier(e)}parseImportSpecifier(e){const t=this.startNode(),r=this.match(p.string),n=this.parseModuleExportName();let s=null;\"Identifier\"===n.type&&(\"type\"===n.name?s=\"type\":\"typeof\"===n.name&&(s=\"typeof\"));let i=!1;if(this.isContextual(\"as\")&&!this.isLookaheadContextual(\"as\")){const e=this.parseIdentifier(!0);null===s||this.match(p.name)||this.state.type.keyword?(t.imported=n,t.importKind=null,t.local=this.parseIdentifier()):(t.imported=e,t.importKind=s,t.local=e.__clone())}else if(null!==s&&(this.match(p.name)||this.state.type.keyword))t.imported=this.parseIdentifier(!0),t.importKind=s,this.eatContextual(\"as\")?t.local=this.parseIdentifier():(i=!0,t.local=t.imported.__clone());else{if(r)throw this.raise(t.start,x.ImportBindingIsString,n.value);i=!0,t.imported=n,t.importKind=null,t.local=t.imported.__clone()}const o=X(e),a=X(t);o&&a&&this.raise(t.start,Y.ImportTypeShorthandOnlyInPureImport),(o||a)&&this.checkReservedType(t.local.name,t.local.start,!0),!i||o||a||this.checkReservedWord(t.local.name,t.start,!0,!0),this.checkLVal(t.local,\"import specifier\",9),e.specifiers.push(this.finishNode(t,\"ImportSpecifier\"))}parseBindingAtom(){switch(this.state.type){case p._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){const r=e.kind;\"get\"!==r&&\"set\"!==r&&this.isRelational(\"<\")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(p.colon)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(p.colon)){const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(p.colon)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let n,s=null;if(this.hasPlugin(\"jsx\")&&(this.match(p.jsxTagStart)||this.isRelational(\"<\"))){if(s=this.state.clone(),n=this.tryParse((()=>super.parseMaybeAssign(e,t)),s),!n.error)return n.node;const{context:r}=this.state,i=r[r.length-1];i===P.j_oTag?r.length-=2:i===P.j_expr&&(r.length-=1)}if(null!=(r=n)&&r.error||this.isRelational(\"<\")){var i,o;let r;s=s||this.state.clone();const a=this.tryParse((n=>{var s;r=this.flowParseTypeParameterDeclaration();const i=this.forwardNoArrowParamsConversionAt(r,(()=>{const n=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(n,r),n}));\"ArrowFunctionExpression\"!==i.type&&null!=(s=i.extra)&&s.parenthesized&&n();const o=this.maybeUnwrapTypeCastExpression(i);return o.typeParameters=r,this.resetStartLocationFromNode(o,r),i}),s);let l=null;if(a.node&&\"ArrowFunctionExpression\"===this.maybeUnwrapTypeCastExpression(a.node).type){if(!a.error&&!a.aborted)return a.node.async&&this.raise(r.start,Y.UnexpectedTypeParameterBeforeAsyncArrowFunction),a.node;l=a.node}if(null!=(i=n)&&i.node)return this.state=n.failState,n.node;if(l)return this.state=a.failState,l;if(null!=(o=n)&&o.thrown)throw n.error;if(a.thrown)throw a.error;throw this.raise(r.start,Y.UnexpectedTokenAfterTypeParameter)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(p.colon)){const t=this.tryParse((()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(p.arrow)||this.unexpected(),r}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,\"TypeAnnotation\"):null}return super.parseArrow(e)}shouldParseArrow(){return this.match(p.colon)||super.shouldParseArrow()}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,r){if(!r||-1===this.state.noArrowParamsConversionAt.indexOf(e.start)){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(e.params[t].start,Y.ThisParamMustBeFirst);return super.checkParams(...arguments)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,r,n){if(\"Identifier\"===e.type&&\"async\"===e.name&&-1!==this.state.noArrowAt.indexOf(t)){this.next();const n=this.startNodeAt(t,r);n.callee=e,n.arguments=this.parseCallExpressionArguments(p.parenR,!1),e=this.finishNode(n,\"CallExpression\")}else if(\"Identifier\"===e.type&&\"async\"===e.name&&this.isRelational(\"<\")){const s=this.state.clone(),i=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t,r)||e()),s);if(!i.error&&!i.aborted)return i.node;const o=this.tryParse((()=>super.parseSubscripts(e,t,r,n)),s);if(o.node&&!o.error)return o.node;if(i.node)return this.state=i.failState,i.node;if(o.node)return this.state=o.failState,o.node;throw i.error||o.error}return super.parseSubscripts(e,t,r,n)}parseSubscript(e,t,r,n,s){if(this.match(p.questionDot)&&this.isLookaheadToken_lt()){if(s.optionalChainMember=!0,n)return s.stop=!0,e;this.next();const i=this.startNodeAt(t,r);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(p.parenL),i.arguments=this.parseCallExpressionArguments(p.parenR,!1),i.optional=!0,this.finishCallExpression(i,!0)}if(!n&&this.shouldParseTypes()&&this.isRelational(\"<\")){const n=this.startNodeAt(t,r);n.callee=e;const i=this.tryParse((()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(p.parenL),n.arguments=this.parseCallExpressionArguments(p.parenR,!1),s.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,s.optionalChainMember))));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,r,n,s)}parseNewArguments(e){let t=null;this.shouldParseTypes()&&this.isRelational(\"<\")&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t,super.parseNewArguments(e)}parseAsyncArrowWithTypeParameters(e,t){const r=this.startNodeAt(e,t);if(this.parseFunctionParams(r),this.parseArrow(r))return this.parseArrowExpression(r,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(p.braceBarR,2)}parseTopLevel(e,t){const r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(this.state.pos,Y.UnterminatedFlowComment),r}skipBlockComment(){if(this.hasPlugin(\"flowComments\")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,Y.NestedFlowComment),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(this.state.hasFlowComment){const e=this.input.indexOf(\"*-/\",this.state.pos+=2);if(-1===e)throw this.raise(this.state.pos-2,x.UnterminatedComment);this.state.pos=e+3}else super.skipBlockComment()}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const r=this.input.charCodeAt(t+e),n=this.input.charCodeAt(t+e+1);return 58===r&&58===n?t+2:\"flow-include\"===this.input.slice(t+e,t+e+12)?t+12:58===r&&58!==n&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf(\"*/\",this.state.pos))throw this.raise(this.state.pos,x.UnterminatedComment)}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(e,Y.EnumBooleanMemberNotInitialized,r,t)}flowEnumErrorInvalidMemberName(e,{enumName:t,memberName:r}){const n=r[0].toUpperCase()+r.slice(1);this.raise(e,Y.EnumInvalidMemberName,r,n,t)}flowEnumErrorDuplicateMemberName(e,{enumName:t,memberName:r}){this.raise(e,Y.EnumDuplicateMemberName,r,t)}flowEnumErrorInconsistentMemberValues(e,{enumName:t}){this.raise(e,Y.EnumInconsistentMemberValues,t)}flowEnumErrorInvalidExplicitType(e,{enumName:t,suppliedType:r}){return this.raise(e,null===r?Y.EnumInvalidExplicitTypeUnknownSupplied:Y.EnumInvalidExplicitType,t,r)}flowEnumErrorInvalidMemberInitializer(e,{enumName:t,explicitType:r,memberName:n}){let s=null;switch(r){case\"boolean\":case\"number\":case\"string\":s=Y.EnumInvalidMemberInitializerPrimaryType;break;case\"symbol\":s=Y.EnumInvalidMemberInitializerSymbolType;break;default:s=Y.EnumInvalidMemberInitializerUnknownType}return this.raise(e,s,t,n,r)}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(e,Y.EnumNumberMemberNotInitialized,t,r)}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(e,Y.EnumStringMemberInconsistentlyInitailized,t)}flowEnumMemberInit(){const e=this.state.start,t=()=>this.match(p.comma)||this.match(p.braceR);switch(this.state.type){case p.num:{const r=this.parseNumericLiteral(this.state.value);return t()?{type:\"number\",pos:r.start,value:r}:{type:\"invalid\",pos:e}}case p.string:{const r=this.parseStringLiteral(this.state.value);return t()?{type:\"string\",pos:r.start,value:r}:{type:\"invalid\",pos:e}}case p._true:case p._false:{const r=this.parseBooleanLiteral(this.match(p._true));return t()?{type:\"boolean\",pos:r.start,value:r}:{type:\"invalid\",pos:e}}default:return{type:\"invalid\",pos:e}}}flowEnumMemberRaw(){const e=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(p.eq)?this.flowEnumMemberInit():{type:\"none\",pos:e}}}flowEnumCheckExplicitTypeMismatch(e,t,r){const{explicitType:n}=t;null!==n&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let s=!1;for(;!this.match(p.braceR);){if(this.eat(p.ellipsis)){s=!0;break}const i=this.startNode(),{id:o,init:a}=this.flowEnumMemberRaw(),l=o.name;if(\"\"===l)continue;/^[a-z]/.test(l)&&this.flowEnumErrorInvalidMemberName(o.start,{enumName:e,memberName:l}),r.has(l)&&this.flowEnumErrorDuplicateMemberName(o.start,{enumName:e,memberName:l}),r.add(l);const c={enumName:e,explicitType:t,memberName:l};switch(i.id=o,a.type){case\"boolean\":this.flowEnumCheckExplicitTypeMismatch(a.pos,c,\"boolean\"),i.init=a.value,n.booleanMembers.push(this.finishNode(i,\"EnumBooleanMember\"));break;case\"number\":this.flowEnumCheckExplicitTypeMismatch(a.pos,c,\"number\"),i.init=a.value,n.numberMembers.push(this.finishNode(i,\"EnumNumberMember\"));break;case\"string\":this.flowEnumCheckExplicitTypeMismatch(a.pos,c,\"string\"),i.init=a.value,n.stringMembers.push(this.finishNode(i,\"EnumStringMember\"));break;case\"invalid\":throw this.flowEnumErrorInvalidMemberInitializer(a.pos,c);case\"none\":switch(t){case\"boolean\":this.flowEnumErrorBooleanMemberNotInitialized(a.pos,c);break;case\"number\":this.flowEnumErrorNumberMemberNotInitialized(a.pos,c);break;default:n.defaultedMembers.push(this.finishNode(i,\"EnumDefaultedMember\"))}}this.match(p.braceR)||this.expect(p.comma)}return{members:n,hasUnknownMembers:s}}flowEnumStringMembers(e,t,{enumName:r}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t.start,{enumName:r});return t}for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e.start,{enumName:r});return e}flowEnumParseExplicitType({enumName:e}){if(this.eatContextual(\"of\")){if(!this.match(p.name))throw this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:e,suppliedType:null});const{value:t}=this.state;return this.next(),\"boolean\"!==t&&\"number\"!==t&&\"string\"!==t&&\"symbol\"!==t&&this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:e,suppliedType:t}),t}return null}flowEnumBody(e,{enumName:t,nameLoc:r}){const n=this.flowEnumParseExplicitType({enumName:t});this.expect(p.braceL);const{members:s,hasUnknownMembers:i}=this.flowEnumMembers({enumName:t,explicitType:n});switch(e.hasUnknownMembers=i,n){case\"boolean\":return e.explicitType=!0,e.members=s.booleanMembers,this.expect(p.braceR),this.finishNode(e,\"EnumBooleanBody\");case\"number\":return e.explicitType=!0,e.members=s.numberMembers,this.expect(p.braceR),this.finishNode(e,\"EnumNumberBody\");case\"string\":return e.explicitType=!0,e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:t}),this.expect(p.braceR),this.finishNode(e,\"EnumStringBody\");case\"symbol\":return e.members=s.defaultedMembers,this.expect(p.braceR),this.finishNode(e,\"EnumSymbolBody\");default:{const n=()=>(e.members=[],this.expect(p.braceR),this.finishNode(e,\"EnumStringBody\"));e.explicitType=!1;const i=s.booleanMembers.length,o=s.numberMembers.length,a=s.stringMembers.length,l=s.defaultedMembers.length;if(i||o||a||l){if(i||o){if(!o&&!a&&i>=l){for(const e of s.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.start,{enumName:t,memberName:e.id.name});return e.members=s.booleanMembers,this.expect(p.braceR),this.finishNode(e,\"EnumBooleanBody\")}if(!i&&!a&&o>=l){for(const e of s.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.start,{enumName:t,memberName:e.id.name});return e.members=s.numberMembers,this.expect(p.braceR),this.finishNode(e,\"EnumNumberBody\")}return this.flowEnumErrorInconsistentMemberValues(r,{enumName:t}),n()}return e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:t}),this.expect(p.braceR),this.finishNode(e,\"EnumStringBody\")}return n()}}}flowParseEnumDeclaration(e){const t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),{enumName:t.name,nameLoc:t.start}),this.finishNode(e,\"EnumDeclaration\")}isLookaheadToken_lt(){const e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){const t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}maybeUnwrapTypeCastExpression(e){return\"TypeCastExpression\"===e.type?e.expression:e}},typescript:e=>class extends e{getScopeHandler(){return le}tsIsIdentifier(){return this.match(p.name)}tsTokenCanFollowModifier(){return(this.match(p.bracketL)||this.match(p.braceL)||this.match(p.star)||this.match(p.ellipsis)||this.match(p.privateName)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e){if(!this.match(p.name))return;const t=this.state.value;return-1!==e.indexOf(t)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?t:void 0}tsParseModifiers(e,t,r,n){const s=(t,r,n,s)=>{r===n&&e[s]&&this.raise(t,de.InvalidModifiersOrder,n,s)},i=(t,r,n,s)=>{(e[n]&&r===s||e[s]&&r===n)&&this.raise(t,de.IncompatibleModifiers,n,s)};for(;;){const o=this.state.start,a=this.tsParseModifier(t.concat(null!=r?r:[]));if(!a)break;he(a)?e.accessibility?this.raise(o,de.DuplicateAccessibilityModifier):(s(o,a,a,\"override\"),s(o,a,a,\"static\"),s(o,a,a,\"readonly\"),e.accessibility=a):(Object.hasOwnProperty.call(e,a)?this.raise(o,de.DuplicateModifier,a):(s(o,a,\"static\",\"readonly\"),s(o,a,\"static\",\"override\"),s(o,a,\"override\",\"readonly\"),s(o,a,\"abstract\",\"override\"),i(o,a,\"declare\",\"override\"),i(o,a,\"static\",\"abstract\")),e[a]=!0),null!=r&&r.includes(a)&&this.raise(o,n,a)}}tsIsListTerminator(e){switch(e){case\"EnumMembers\":case\"TypeMembers\":return this.match(p.braceR);case\"HeritageClauseElement\":return this.match(p.braceL);case\"TupleElementTypes\":return this.match(p.bracketR);case\"TypeParametersOrArguments\":return this.isRelational(\">\")}throw new Error(\"Unreachable\")}tsParseList(e,t){const r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t){return pe(this.tsParseDelimitedListWorker(e,t,!0))}tsParseDelimitedListWorker(e,t,r){const n=[];for(;!this.tsIsListTerminator(e);){const s=t();if(null==s)return;if(n.push(s),!this.eat(p.comma)){if(this.tsIsListTerminator(e))break;return void(r&&this.expect(p.comma))}}return n}tsParseBracketedList(e,t,r,n){n||(r?this.expect(p.bracketL):this.expectRelational(\"<\"));const s=this.tsParseDelimitedList(e,t);return r?this.expect(p.bracketR):this.expectRelational(\">\"),s}tsParseImportType(){const e=this.startNode();return this.expect(p._import),this.expect(p.parenL),this.match(p.string)||this.raise(this.state.start,de.UnsupportedImportTypeArgument),e.argument=this.parseExprAtom(),this.expect(p.parenR),this.eat(p.dot)&&(e.qualifier=this.tsParseEntityName(!0)),this.isRelational(\"<\")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,\"TSImportType\")}tsParseEntityName(e){let t=this.parseIdentifier();for(;this.eat(p.dot);){const r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(e),t=this.finishNode(r,\"TSQualifiedName\")}return t}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational(\"<\")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,\"TSTypeReference\")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,\"TSTypePredicate\")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,\"TSThisType\")}tsParseTypeQuery(){const e=this.startNode();return this.expect(p._typeof),this.match(p._import)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(!0),this.finishNode(e,\"TSTypeQuery\")}tsParseTypeParameter(){const e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsEatThenParseType(p._extends),e.default=this.tsEatThenParseType(p.eq),this.finishNode(e,\"TSTypeParameter\")}tsTryParseTypeParameters(){if(this.isRelational(\"<\"))return this.tsParseTypeParameters()}tsParseTypeParameters(){const e=this.startNode();return this.isRelational(\"<\")||this.match(p.jsxTagStart)?this.next():this.unexpected(),e.params=this.tsParseBracketedList(\"TypeParametersOrArguments\",this.tsParseTypeParameter.bind(this),!1,!0),0===e.params.length&&this.raise(e.start,de.EmptyTypeParameters),this.finishNode(e,\"TSTypeParameterDeclaration\")}tsTryNextParseConstantContext(){return this.lookahead().type===p._const?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(e,t){const r=e===p.arrow;t.typeParameters=this.tsTryParseTypeParameters(),this.expect(p.parenL),t.parameters=this.tsParseBindingListForSignature(),(r||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){return this.parseBindingList(p.parenR,41).map((e=>(\"Identifier\"!==e.type&&\"RestElement\"!==e.type&&\"ObjectPattern\"!==e.type&&\"ArrayPattern\"!==e.type&&this.raise(e.start,de.UnsupportedSignatureParameterKind,e.type),e)))}tsParseTypeMemberSemicolon(){this.eat(p.comma)||this.isLineTerminator()||this.expect(p.semi)}tsParseSignatureMember(e,t){return this.tsFillSignature(p.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),this.eat(p.name)&&this.match(p.colon)}tsTryParseIndexSignature(e){if(!this.match(p.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(p.bracketL);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(p.bracketR),e.parameters=[t];const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,\"TSIndexSignature\")}tsParsePropertyOrMethodSignature(e,t){this.eat(p.question)&&(e.optional=!0);const r=e;if(this.match(p.parenL)||this.isRelational(\"<\")){t&&this.raise(e.start,de.ReadonlyForMethodSignature);const n=r;if(n.kind&&this.isRelational(\"<\")&&this.raise(this.state.pos,de.AccesorCannotHaveTypeParameters),this.tsFillSignature(p.colon,n),this.tsParseTypeMemberSemicolon(),\"get\"===n.kind)n.parameters.length>0&&(this.raise(this.state.pos,x.BadGetterArity),this.isThisParam(n.parameters[0])&&this.raise(this.state.pos,de.AccesorCannotDeclareThisParameter));else if(\"set\"===n.kind){if(1!==n.parameters.length)this.raise(this.state.pos,x.BadSetterArity);else{const e=n.parameters[0];this.isThisParam(e)&&this.raise(this.state.pos,de.AccesorCannotDeclareThisParameter),\"Identifier\"===e.type&&e.optional&&this.raise(this.state.pos,de.SetAccesorCannotHaveOptionalParameter),\"RestElement\"===e.type&&this.raise(this.state.pos,de.SetAccesorCannotHaveRestParameter)}n.typeAnnotation&&this.raise(n.typeAnnotation.start,de.SetAccesorCannotHaveReturnType)}else n.kind=\"method\";return this.finishNode(n,\"TSMethodSignature\")}{const e=r;t&&(e.readonly=!0);const n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,\"TSPropertySignature\")}}tsParseTypeMember(){const e=this.startNode();if(this.match(p.parenL)||this.isRelational(\"<\"))return this.tsParseSignatureMember(\"TSCallSignatureDeclaration\",e);if(this.match(p._new)){const t=this.startNode();return this.next(),this.match(p.parenL)||this.isRelational(\"<\")?this.tsParseSignatureMember(\"TSConstructSignatureDeclaration\",e):(e.key=this.createIdentifier(t,\"new\"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers(e,[\"readonly\"],[\"declare\",\"abstract\",\"private\",\"protected\",\"public\",\"static\",\"override\"],de.InvalidModifierOnTypeMember);return this.tsTryParseIndexSignature(e)||(this.parsePropertyName(e,!1),e.computed||\"Identifier\"!==e.key.type||\"get\"!==e.key.name&&\"set\"!==e.key.name||!this.tsTokenCanFollowModifier()||(e.kind=e.key.name,this.parsePropertyName(e,!1)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,\"TSTypeLiteral\")}tsParseObjectTypeMembers(){this.expect(p.braceL);const e=this.tsParseList(\"TypeMembers\",this.tsParseTypeMember.bind(this));return this.expect(p.braceR),e}tsIsStartOfMappedType(){return this.next(),this.eat(p.plusMin)?this.isContextual(\"readonly\"):(this.isContextual(\"readonly\")&&this.next(),!!this.match(p.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(p._in))))}tsParseMappedTypeParameter(){const e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsExpectThenParseType(p._in),this.finishNode(e,\"TSTypeParameter\")}tsParseMappedType(){const e=this.startNode();return this.expect(p.braceL),this.match(p.plusMin)?(e.readonly=this.state.value,this.next(),this.expectContextual(\"readonly\")):this.eatContextual(\"readonly\")&&(e.readonly=!0),this.expect(p.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(\"as\")?this.tsParseType():null,this.expect(p.bracketR),this.match(p.plusMin)?(e.optional=this.state.value,this.next(),this.expect(p.question)):this.eat(p.question)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(p.braceR),this.finishNode(e,\"TSMappedType\")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList(\"TupleElementTypes\",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1,r=null;return e.elementTypes.forEach((e=>{var n;let{type:s}=e;!t||\"TSRestType\"===s||\"TSOptionalType\"===s||\"TSNamedTupleMember\"===s&&e.optional||this.raise(e.start,de.OptionalTypeBeforeRequired),t=t||\"TSNamedTupleMember\"===s&&e.optional||\"TSOptionalType\"===s,\"TSRestType\"===s&&(s=(e=e.typeAnnotation).type);const i=\"TSNamedTupleMember\"===s;r=null!=(n=r)?n:i,r!==i&&this.raise(e.start,de.MixedLabeledAndUnlabeledElements)})),this.finishNode(e,\"TSTupleType\")}tsParseTupleElementType(){const{start:e,startLoc:t}=this.state,r=this.eat(p.ellipsis);let n=this.tsParseType();const s=this.eat(p.question);if(this.eat(p.colon)){const e=this.startNodeAtNode(n);e.optional=s,\"TSTypeReference\"!==n.type||n.typeParameters||\"Identifier\"!==n.typeName.type?(this.raise(n.start,de.InvalidTupleMemberLabel),e.label=n):e.label=n.typeName,e.elementType=this.tsParseType(),n=this.finishNode(e,\"TSNamedTupleMember\")}else if(s){const e=this.startNodeAtNode(n);e.typeAnnotation=n,n=this.finishNode(e,\"TSOptionalType\")}if(r){const r=this.startNodeAt(e,t);r.typeAnnotation=n,n=this.finishNode(r,\"TSRestType\")}return n}tsParseParenthesizedType(){const e=this.startNode();return this.expect(p.parenL),e.typeAnnotation=this.tsParseType(),this.expect(p.parenR),this.finishNode(e,\"TSParenthesizedType\")}tsParseFunctionOrConstructorType(e,t){const r=this.startNode();return\"TSConstructorType\"===e&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsFillSignature(p.arrow,r),this.finishNode(r,e)}tsParseLiteralTypeNode(){const e=this.startNode();return e.literal=(()=>{switch(this.state.type){case p.num:case p.bigint:case p.string:case p._true:case p._false:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(e,\"TSLiteralType\")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=this.parseTemplate(!1),this.finishNode(e,\"TSLiteralType\")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(\"is\")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case p.name:case p._void:case p._null:{const e=this.match(p._void)?\"TSVoidKeyword\":this.match(p._null)?\"TSNullKeyword\":function(e){switch(e){case\"any\":return\"TSAnyKeyword\";case\"boolean\":return\"TSBooleanKeyword\";case\"bigint\":return\"TSBigIntKeyword\";case\"never\":return\"TSNeverKeyword\";case\"number\":return\"TSNumberKeyword\";case\"object\":return\"TSObjectKeyword\";case\"string\":return\"TSStringKeyword\";case\"symbol\":return\"TSSymbolKeyword\";case\"undefined\":return\"TSUndefinedKeyword\";case\"unknown\":return\"TSUnknownKeyword\";default:return}}(this.state.value);if(void 0!==e&&46!==this.lookaheadCharCode()){const t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference()}case p.string:case p.num:case p.bigint:case p._true:case p._false:return this.tsParseLiteralTypeNode();case p.plusMin:if(\"-\"===this.state.value){const e=this.startNode(),t=this.lookahead();if(t.type!==p.num&&t.type!==p.bigint)throw this.unexpected();return e.literal=this.parseMaybeUnary(),this.finishNode(e,\"TSLiteralType\")}break;case p._this:return this.tsParseThisTypeOrThisTypePredicate();case p._typeof:return this.tsParseTypeQuery();case p._import:return this.tsParseImportType();case p.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case p.bracketL:return this.tsParseTupleType();case p.parenL:return this.tsParseParenthesizedType();case p.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(p.bracketL);)if(this.match(p.bracketR)){const t=this.startNodeAtNode(e);t.elementType=e,this.expect(p.bracketR),e=this.finishNode(t,\"TSArrayType\")}else{const t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(p.bracketR),e=this.finishNode(t,\"TSIndexedAccessType\")}return e}tsParseTypeOperator(e){const t=this.startNode();return this.expectContextual(e),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),\"readonly\"===e&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,\"TSTypeOperator\")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case\"TSTupleType\":case\"TSArrayType\":return;default:this.raise(e.start,de.UnexpectedReadonly)}}tsParseInferType(){const e=this.startNode();this.expectContextual(\"infer\");const t=this.startNode();return t.name=this.parseIdentifierName(t.start),e.typeParameter=this.finishNode(t,\"TSTypeParameter\"),this.finishNode(e,\"TSInferType\")}tsParseTypeOperatorOrHigher(){const e=[\"keyof\",\"unique\",\"readonly\"].find((e=>this.isContextual(e)));return e?this.tsParseTypeOperator(e):this.isContextual(\"infer\")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(e,t,r){const n=this.startNode(),s=this.eat(r),i=[];do{i.push(t())}while(this.eat(r));return 1!==i.length||s?(n.types=i,this.finishNode(n,e)):i[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType(\"TSIntersectionType\",this.tsParseTypeOperatorOrHigher.bind(this),p.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType(\"TSUnionType\",this.tsParseIntersectionTypeOrHigher.bind(this),p.bitwiseOR)}tsIsStartOfFunctionType(){return!!this.isRelational(\"<\")||this.match(p.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(this.match(p.name)||this.match(p._this))return this.next(),!0;if(this.match(p.braceL)){let e=1;for(this.next();e>0;)this.match(p.braceL)?++e:this.match(p.braceR)&&--e,this.next();return!0}if(this.match(p.bracketL)){let e=1;for(this.next();e>0;)this.match(p.bracketL)?++e:this.match(p.bracketR)&&--e,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(p.parenR)||this.match(p.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(p.colon)||this.match(p.comma)||this.match(p.question)||this.match(p.eq))return!0;if(this.match(p.parenR)&&(this.next(),this.match(p.arrow)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{const t=this.startNode();this.expect(e);const r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(p._this)){let e=this.tsParseThisTypeOrThisTypePredicate();return\"TSThisType\"===e.type?(r.parameterName=e,r.asserts=!0,r.typeAnnotation=null,e=this.finishNode(r,\"TSTypePredicate\")):(this.resetStartLocationFromNode(e,r),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,\"TSTypeAnnotation\")}const s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,\"TSTypePredicate\"),this.finishNode(t,\"TSTypeAnnotation\")):this.tsParseTypeAnnotation(!1,t);const i=this.tsParseTypeAnnotation(!1);return r.parameterName=s,r.typeAnnotation=i,r.asserts=n,t.typeAnnotation=this.finishNode(r,\"TSTypePredicate\"),this.finishNode(t,\"TSTypeAnnotation\")}))}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(p.colon)?this.tsParseTypeOrTypePredicateAnnotation(p.colon):void 0}tsTryParseTypeAnnotation(){return this.match(p.colon)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(p.colon)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual(\"is\")&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(!this.match(p.name)||\"asserts\"!==this.state.value||this.hasPrecedingLineBreak())return!1;const e=this.state.containsEsc;return this.next(),!(!this.match(p.name)&&!this.match(p._this)||(e&&this.raise(this.state.lastTokStart,x.InvalidEscapedReservedWord,\"asserts\"),0))}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(p.colon),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,\"TSTypeAnnotation\")}tsParseType(){fe(this.state.inType);const e=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(p._extends))return e;const t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsParseNonConditionalType(),this.expect(p.question),t.trueType=this.tsParseType(),this.expect(p.colon),t.falseType=this.tsParseType(),this.finishNode(t,\"TSConditionalType\")}isAbstractConstructorSignature(){return this.isContextual(\"abstract\")&&this.lookahead().type===p._new}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType(\"TSFunctionType\"):this.match(p._new)?this.tsParseFunctionOrConstructorType(\"TSConstructorType\"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType(\"TSConstructorType\",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){const e=this.startNode(),t=this.tsTryNextParseConstantContext();return e.typeAnnotation=t||this.tsNextThenParseType(),this.expectRelational(\">\"),e.expression=this.parseMaybeUnary(),this.finishNode(e,\"TSTypeAssertion\")}tsParseHeritageClause(e){const t=this.state.start,r=this.tsParseDelimitedList(\"HeritageClauseElement\",this.tsParseExpressionWithTypeArguments.bind(this));return r.length||this.raise(t,de.EmptyHeritageClauseType,e),r}tsParseExpressionWithTypeArguments(){const e=this.startNode();return e.expression=this.tsParseEntityName(!1),this.isRelational(\"<\")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,\"TSExpressionWithTypeArguments\")}tsParseInterfaceDeclaration(e){e.id=this.parseIdentifier(),this.checkLVal(e.id,\"typescript interface declaration\",130),e.typeParameters=this.tsTryParseTypeParameters(),this.eat(p._extends)&&(e.extends=this.tsParseHeritageClause(\"extends\"));const t=this.startNode();return t.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(t,\"TSInterfaceBody\"),this.finishNode(e,\"TSInterfaceDeclaration\")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkLVal(e.id,\"typescript type alias\",2),e.typeParameters=this.tsTryParseTypeParameters(),e.typeAnnotation=this.tsInType((()=>{if(this.expect(p.eq),this.isContextual(\"intrinsic\")&&this.lookahead().type!==p.dot){const e=this.startNode();return this.next(),this.finishNode(e,\"TSIntrinsicKeyword\")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,\"TSTypeAliasDeclaration\")}tsInNoContext(e){const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsEatThenParseType(e){return this.match(e)?this.tsNextThenParseType():void 0}tsExpectThenParseType(e){return this.tsDoThenParseType((()=>this.expect(e)))}tsNextThenParseType(){return this.tsDoThenParseType((()=>this.next()))}tsDoThenParseType(e){return this.tsInType((()=>(e(),this.tsParseType())))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(p.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(p.eq)&&(e.initializer=this.parseMaybeAssignAllowIn()),this.finishNode(e,\"TSEnumMember\")}tsParseEnumDeclaration(e,t){return t&&(e.const=!0),e.id=this.parseIdentifier(),this.checkLVal(e.id,\"typescript enum declaration\",t?779:267),this.expect(p.braceL),e.members=this.tsParseDelimitedList(\"EnumMembers\",this.tsParseEnumMember.bind(this)),this.expect(p.braceR),this.finishNode(e,\"TSEnumDeclaration\")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(p.braceL),this.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,p.braceR),this.scope.exit(),this.finishNode(e,\"TSModuleBlock\")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkLVal(e.id,\"module or namespace declaration\",1024),this.eat(p.dot)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,\"TSModuleDeclaration\")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(\"global\")?(e.global=!0,e.id=this.parseIdentifier()):this.match(p.string)?e.id=this.parseExprAtom():this.unexpected(),this.match(p.braceL)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,\"TSModuleDeclaration\")}tsParseImportEqualsDeclaration(e,t){e.isExport=t||!1,e.id=this.parseIdentifier(),this.checkLVal(e.id,\"import equals declaration\",9),this.expect(p.eq);const r=this.tsParseModuleReference();return\"type\"===e.importKind&&\"TSExternalModuleReference\"!==r.type&&this.raise(r.start,de.ImportAliasHasImportType),e.moduleReference=r,this.semicolon(),this.finishNode(e,\"TSImportEqualsDeclaration\")}tsIsExternalModuleReference(){return this.isContextual(\"require\")&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();if(this.expectContextual(\"require\"),this.expect(p.parenL),!this.match(p.string))throw this.unexpected();return e.expression=this.parseExprAtom(),this.expect(p.parenR),this.finishNode(e,\"TSExternalModuleReference\")}tsLookAhead(e){const t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){const t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),r=e();return void 0!==r&&!1!==r?r:void(this.state=t)}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,r=this.state.type;return this.isContextual(\"let\")&&(r=p._var,t=\"let\"),this.tsInAmbientContext((()=>{switch(r){case p._function:return e.declare=!0,this.parseFunctionStatement(e,!1,!0);case p._class:return e.declare=!0,this.parseClass(e,!0,!1);case p._const:if(this.match(p._const)&&this.isLookaheadContextual(\"enum\"))return this.expect(p._const),this.expectContextual(\"enum\"),this.tsParseEnumDeclaration(e,!0);case p._var:return t=t||this.state.value,this.parseVarStatement(e,t);case p.name:{const t=this.state.value;return\"global\"===t?this.tsParseAmbientExternalModuleDeclaration(e):this.tsParseDeclaration(e,t,!0)}}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}tsParseExpressionStatement(e,t){switch(t.name){case\"declare\":{const t=this.tsTryParseDeclare(e);if(t)return t.declare=!0,t;break}case\"global\":if(this.match(p.braceL)){this.scope.enter(256),this.prodParam.enter(0);const r=e;return r.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,\"TSModuleDeclaration\")}break;default:return this.tsParseDeclaration(e,t.name,!1)}}tsParseDeclaration(e,t,r){switch(t){case\"abstract\":if(this.tsCheckLineTerminator(r)&&(this.match(p._class)||this.match(p.name)))return this.tsParseAbstractDeclaration(e);break;case\"enum\":if(r||this.match(p.name))return r&&this.next(),this.tsParseEnumDeclaration(e,!1);break;case\"interface\":if(this.tsCheckLineTerminator(r)&&this.match(p.name))return this.tsParseInterfaceDeclaration(e);break;case\"module\":if(this.tsCheckLineTerminator(r)){if(this.match(p.string))return this.tsParseAmbientExternalModuleDeclaration(e);if(this.match(p.name))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case\"namespace\":if(this.tsCheckLineTerminator(r)&&this.match(p.name))return this.tsParseModuleOrNamespaceDeclaration(e);break;case\"type\":if(this.tsCheckLineTerminator(r)&&this.match(p.name))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e,t){if(!this.isRelational(\"<\"))return;const r=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const n=this.tsTryParseAndCatch((()=>{const r=this.startNodeAt(e,t);return r.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(r),r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(p.arrow),r}));return this.state.maybeInArrowParameters=r,n?this.parseArrowExpression(n,null,!0):void 0}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expectRelational(\"<\"),this.tsParseDelimitedList(\"TypeParametersOrArguments\",this.tsParseType.bind(this))))))),0===e.params.length&&this.raise(e.start,de.EmptyTypeArguments),this.expectRelational(\">\"),this.finishNode(e,\"TSTypeParameterInstantiation\")}tsIsDeclarationStart(){if(this.match(p.name))switch(this.state.value){case\"abstract\":case\"declare\":case\"enum\":case\"interface\":case\"module\":case\"namespace\":case\"type\":return!0}return!1}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){const r=this.state.start,n=this.state.startLoc;let s,i=!1,o=!1;if(void 0!==e){const t={};this.tsParseModifiers(t,[\"public\",\"private\",\"protected\",\"override\",\"readonly\"]),s=t.accessibility,o=t.override,i=t.readonly,!1===e&&(s||i||o)&&this.raise(r,de.UnexpectedParameterModifier)}const a=this.parseMaybeDefault();this.parseAssignableListItemTypes(a);const l=this.parseMaybeDefault(a.start,a.loc.start,a);if(s||i||o){const e=this.startNodeAt(r,n);return t.length&&(e.decorators=t),s&&(e.accessibility=s),i&&(e.readonly=i),o&&(e.override=o),\"Identifier\"!==l.type&&\"AssignmentPattern\"!==l.type&&this.raise(e.start,de.UnsupportedParameterPropertyKind),e.parameter=l,this.finishNode(e,\"TSParameterProperty\")}return t.length&&(a.decorators=t),l}parseFunctionBodyAndFinish(e,t,r=!1){this.match(p.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(p.colon));const n=\"FunctionDeclaration\"===t?\"TSDeclareFunction\":\"ClassMethod\"===t?\"TSDeclareMethod\":void 0;n&&!this.match(p.braceL)&&this.isLineTerminator()?this.finishNode(e,n):\"TSDeclareFunction\"===n&&this.state.isAmbientContext&&(this.raise(e.start,de.DeclareFunctionHasImplementation),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):super.parseFunctionBodyAndFinish(e,t,r)}registerFunctionStatementId(e){!e.body&&e.id?this.checkLVal(e.id,\"function name\",1024):super.registerFunctionStatementId(...arguments)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{\"TSTypeCastExpression\"===(null==e?void 0:e.type)&&this.raise(e.typeAnnotation.start,de.UnexpectedTypeAnnotation)}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(...e){const t=super.parseArrayLike(...e);return\"ArrayExpression\"===t.type&&this.tsCheckForInvalidTypeCasts(t.elements),t}parseSubscript(e,t,r,n,s){if(!this.hasPrecedingLineBreak()&&this.match(p.bang)){this.state.exprAllowed=!1,this.next();const n=this.startNodeAt(t,r);return n.expression=e,this.finishNode(n,\"TSNonNullExpression\")}if(this.isRelational(\"<\")){const i=this.tsTryParseAndCatch((()=>{if(!n&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t,r);if(e)return e}const i=this.startNodeAt(t,r);i.callee=e;const o=this.tsParseTypeArguments();if(o){if(!n&&this.eat(p.parenL))return i.arguments=this.parseCallExpressionArguments(p.parenR,!1),this.tsCheckForInvalidTypeCasts(i.arguments),i.typeParameters=o,s.optionalChainMember&&(i.optional=!1),this.finishCallExpression(i,s.optionalChainMember);if(this.match(p.backQuote)){const n=this.parseTaggedTemplateExpression(e,t,r,s);return n.typeParameters=o,n}}this.unexpected()}));if(i)return i}return super.parseSubscript(e,t,r,n,s)}parseNewArguments(e){if(this.isRelational(\"<\")){const t=this.tsTryParseAndCatch((()=>{const e=this.tsParseTypeArguments();return this.match(p.parenL)||this.unexpected(),e}));t&&(e.typeParameters=t)}super.parseNewArguments(e)}parseExprOp(e,t,r,n){if(pe(p._in.binop)>n&&!this.hasPrecedingLineBreak()&&this.isContextual(\"as\")){const s=this.startNodeAt(t,r);s.expression=e;const i=this.tsTryNextParseConstantContext();return s.typeAnnotation=i||this.tsNextThenParseType(),this.finishNode(s,\"TSAsExpression\"),this.reScan_lt_gt(),this.parseExprOp(s,t,r,n)}return super.parseExprOp(e,t,r,n)}checkReservedWord(e,t,r,n){}checkDuplicateExports(){}parseImport(e){if(e.importKind=\"value\",this.match(p.name)||this.match(p.star)||this.match(p.braceL)){let t=this.lookahead();if(!this.isContextual(\"type\")||t.type===p.comma||t.type===p.name&&\"from\"===t.value||t.type===p.eq||(e.importKind=\"type\",this.next(),t=this.lookahead()),this.match(p.name)&&t.type===p.eq)return this.tsParseImportEqualsDeclaration(e)}const t=super.parseImport(e);return\"type\"===t.importKind&&t.specifiers.length>1&&\"ImportDefaultSpecifier\"===t.specifiers[0].type&&this.raise(t.start,de.TypeImportCannotSpecifyDefaultAndNamed),t}parseExport(e){if(this.match(p._import))return this.next(),this.isContextual(\"type\")&&61!==this.lookaheadCharCode()?(e.importKind=\"type\",this.next()):e.importKind=\"value\",this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(p.eq)){const t=e;return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,\"TSExportAssignment\")}if(this.eatContextual(\"as\")){const t=e;return this.expectContextual(\"namespace\"),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,\"TSNamespaceExportDeclaration\")}return this.isContextual(\"type\")&&this.lookahead().type===p.braceL?(this.next(),e.exportKind=\"type\"):e.exportKind=\"value\",super.parseExport(e)}isAbstractClass(){return this.isContextual(\"abstract\")&&this.lookahead().type===p._class}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0),e}if(\"interface\"===this.state.value){const e=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(e)return e}return super.parseExportDefaultExpression()}parseStatementContent(e,t){if(this.state.type===p._const){const e=this.lookahead();if(e.type===p.name&&\"enum\"===e.value){const e=this.startNode();return this.expect(p._const),this.expectContextual(\"enum\"),this.tsParseEnumDeclaration(e,!0)}}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier([\"public\",\"protected\",\"private\"])}tsHasSomeModifiers(e,t){return t.some((t=>he(t)?e.accessibility===t:!!e[t]))}parseClassMember(e,t,r){const n=[\"declare\",\"private\",\"public\",\"protected\",\"override\",\"abstract\",\"readonly\"];this.tsParseModifiers(t,n.concat([\"static\"]));const s=()=>{const s=!!t.static;s&&this.eat(p.braceL)?(this.tsHasSomeModifiers(t,n)&&this.raise(this.state.pos,de.StaticBlockCannotHaveModifier),this.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,s)};t.declare?this.tsInAmbientContext(s):s()}parseClassMemberWithIsStatic(e,t,r,n){const s=this.tsTryParseIndexSignature(t);if(s)return e.body.push(s),t.abstract&&this.raise(t.start,de.IndexSignatureHasAbstract),t.accessibility&&this.raise(t.start,de.IndexSignatureHasAccessibility,t.accessibility),t.declare&&this.raise(t.start,de.IndexSignatureHasDeclare),void(t.override&&this.raise(t.start,de.IndexSignatureHasOverride));!this.state.inAbstractClass&&t.abstract&&this.raise(t.start,de.NonAbstractClassHasAbstractMethod),t.override&&(r.hadSuperClass||this.raise(t.start,de.OverrideNotInSubClass)),super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){this.eat(p.question)&&(e.optional=!0),e.readonly&&this.match(p.parenL)&&this.raise(e.start,de.ClassMethodHasReadonly),e.declare&&this.match(p.parenL)&&this.raise(e.start,de.ClassMethodHasDeclare)}parseExpressionStatement(e,t){return(\"Identifier\"===t.type?this.tsParseExpressionStatement(e,t):void 0)||super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,r,n){if(!this.state.maybeInArrowParameters||!this.match(p.question))return super.parseConditional(e,t,r,n);const s=this.tryParse((()=>super.parseConditional(e,t,r)));return s.node?(s.error&&(this.state=s.failState),s.node):(s.error&&super.setOptionalParametersError(n,s.error),e)}parseParenItem(e,t,r){if(e=super.parseParenItem(e,t,r),this.eat(p.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(p.colon)){const n=this.startNodeAt(t,r);return n.expression=e,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,\"TSTypeCastExpression\")}return e}parseExportDeclaration(e){const t=this.state.start,r=this.state.startLoc,n=this.eatContextual(\"declare\");if(n&&(this.isContextual(\"declare\")||!this.shouldParseExportDeclaration()))throw this.raise(this.state.start,de.ExpectedAmbientAfterExportDeclare);let s;return this.match(p.name)&&(s=this.tsTryParseExportDeclaration()),s||(s=super.parseExportDeclaration(e)),s&&(\"TSInterfaceDeclaration\"===s.type||\"TSTypeAliasDeclaration\"===s.type||n)&&(e.exportKind=\"type\"),s&&n&&(this.resetStartLocation(s,t,r),s.declare=!0),s}parseClassId(e,t,r){if((!t||r)&&this.isContextual(\"implements\"))return;super.parseClassId(e,t,r,e.declare?1024:139);const n=this.tsTryParseTypeParameters();n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){!e.optional&&this.eat(p.bang)&&(e.definite=!0);const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){return this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&this.match(p.eq)&&this.raise(this.state.start,de.DeclareClassFieldHasInitializer),super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(e.start,de.PrivateElementHasAbstract),e.accessibility&&this.raise(e.start,de.PrivateElementHasAccessibility,e.accessibility),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}pushClassMethod(e,t,r,n,s,i){const o=this.tsTryParseTypeParameters();o&&s&&this.raise(o.start,de.ConstructorHasTypeParameters),!t.declare||\"get\"!==t.kind&&\"set\"!==t.kind||this.raise(t.start,de.DeclareAccessor,t.kind),o&&(t.typeParameters=o),super.pushClassMethod(e,t,r,n,s,i)}pushClassPrivateMethod(e,t,r,n){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&this.isRelational(\"<\")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual(\"implements\")&&(e.implements=this.tsParseHeritageClause(\"implements\"))}parseObjPropValue(e,...t){const r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r),super.parseObjPropValue(e,...t)}parseFunctionParams(e,t){const r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),\"Identifier\"===e.id.type&&this.eat(p.bang)&&(e.definite=!0);const r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(p.colon)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(...e){var t,r,n,s,i,o,a;let l,c,u,f;if(this.hasPlugin(\"jsx\")&&(this.match(p.jsxTagStart)||this.isRelational(\"<\"))){if(l=this.state.clone(),c=this.tryParse((()=>super.parseMaybeAssign(...e)),l),!c.error)return c.node;const{context:t}=this.state;t[t.length-1]===P.j_oTag?t.length-=2:t[t.length-1]===P.j_expr&&(t.length-=1)}if(!(null!=(t=c)&&t.error||this.isRelational(\"<\")))return super.parseMaybeAssign(...e);l=l||this.state.clone();const d=this.tryParse((t=>{var r,n;f=this.tsParseTypeParameters();const s=super.parseMaybeAssign(...e);return(\"ArrowFunctionExpression\"!==s.type||null!=(r=s.extra)&&r.parenthesized)&&t(),0!==(null==(n=f)?void 0:n.params.length)&&this.resetStartLocationFromNode(s,f),s.typeParameters=f,s}),l);if(!d.error&&!d.aborted)return d.node;if(!c&&(fe(!this.hasPlugin(\"jsx\")),u=this.tryParse((()=>super.parseMaybeAssign(...e)),l),!u.error))return u.node;if(null!=(r=c)&&r.node)return this.state=c.failState,c.node;if(d.node)return this.state=d.failState,d.node;if(null!=(n=u)&&n.node)return this.state=u.failState,u.node;if(null!=(s=c)&&s.thrown)throw c.error;if(d.thrown)throw d.error;if(null!=(i=u)&&i.thrown)throw u.error;throw(null==(o=c)?void 0:o.error)||d.error||(null==(a=u)?void 0:a.error)}parseMaybeUnary(e){return!this.hasPlugin(\"jsx\")&&this.isRelational(\"<\")?this.tsParseTypeAssertion():super.parseMaybeUnary(e)}parseArrow(e){if(this.match(p.colon)){const t=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(p.colon);return!this.canInsertSemicolon()&&this.match(p.arrow)||e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e){this.eat(p.question)&&(\"Identifier\"===e.type||this.state.isAmbientContext||this.state.inType||this.raise(e.start,de.PatternIsOptional),e.optional=!0);const t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}toAssignable(e,t=!1){switch(e.type){case\"TSTypeCastExpression\":return super.toAssignable(this.typeCastToParameter(e),t);case\"TSParameterProperty\":return super.toAssignable(e,t);case\"ParenthesizedExpression\":return this.toAssignableParenthesizedExpression(e,t);case\"TSAsExpression\":case\"TSNonNullExpression\":case\"TSTypeAssertion\":return e.expression=this.toAssignable(e.expression,t),e;default:return super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case\"TSAsExpression\":case\"TSNonNullExpression\":case\"TSTypeAssertion\":case\"ParenthesizedExpression\":return e.expression=this.toAssignable(e.expression,t),e;default:return super.toAssignable(e,t)}}checkLVal(e,t,...r){var n;switch(e.type){case\"TSTypeCastExpression\":return;case\"TSParameterProperty\":return void this.checkLVal(e.parameter,\"parameter property\",...r);case\"TSAsExpression\":case\"TSTypeAssertion\":if(!(r[0]||\"parenthesized expression\"===t||null!=(n=e.extra)&&n.parenthesized)){this.raise(e.start,x.InvalidLhs,t);break}return void this.checkLVal(e.expression,\"parenthesized expression\",...r);case\"TSNonNullExpression\":return void this.checkLVal(e.expression,t,...r);default:return void super.checkLVal(e,t,...r)}}parseBindingAtom(){switch(this.state.type){case p._this:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(e){if(this.isRelational(\"<\")){const t=this.tsParseTypeArguments();if(this.match(p.parenL)){const r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=t,r}this.unexpected(this.state.start,p.parenL)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){this.state.isAmbientContext&&this.match(p.comma)&&this.lookaheadCharCode()===e?this.next():super.checkCommaAfterRest(e)}isClassMethod(){return this.isRelational(\"<\")||super.isClassMethod()}isClassProperty(){return this.match(p.bang)||this.match(p.colon)||super.isClassProperty()}parseMaybeDefault(...e){const t=super.parseMaybeDefault(...e);return\"AssignmentPattern\"===t.type&&t.typeAnnotation&&t.right.start<t.typeAnnotation.start&&this.raise(t.typeAnnotation.start,de.TypeAnnotationAfterAssign),t}getTokenFromCode(e){return!this.state.inType||62!==e&&60!==e?super.getTokenFromCode(e):this.finishOp(p.relational,1)}reScan_lt_gt(){if(this.match(p.relational)){const e=this.input.charCodeAt(this.state.start);60!==e&&62!==e||(this.state.pos-=1,this.readToken_lt_gt(e))}}toAssignableList(e){for(let t=0;t<e.length;t++){const r=e[t];if(r)switch(r.type){case\"TSTypeCastExpression\":e[t]=this.typeCastToParameter(r);break;case\"TSAsExpression\":case\"TSTypeAssertion\":this.state.maybeInArrowParameters?this.raise(r.start,de.UnexpectedTypeCastInParameter):e[t]=this.typeCastToParameter(r)}}return super.toAssignableList(...arguments)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.end,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(){return this.match(p.colon)||super.shouldParseArrow()}shouldParseAsyncArrow(){return this.match(p.colon)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.isRelational(\"<\")){const t=this.tsTryParseAndCatch((()=>this.tsParseTypeArguments()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){const t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,...t){const r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,...t)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e){if(this.match(p._class))return e.abstract=!0,this.parseClass(e,!0,!1);if(this.isContextual(\"interface\")){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(e.start,de.NonClassMethodPropertyHasAbstractModifer),this.next(),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,p._class)}parseMethod(...e){const t=super.parseMethod(...e);if(t.abstract&&(this.hasPlugin(\"estree\")?t.value.body:t.body)){const{key:e}=t;this.raise(t.start,de.AbstractMethodHasImplementation,\"Identifier\"===e.type?e.name:`[${this.input.slice(e.start,e.end)}]`)}return t}shouldParseAsAmbientContext(){return!!this.getPluginOption(\"typescript\",\"dts\")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(p.modulo)){const e=this.state.start,t=this.startNode();if(this.eat(p.modulo),this.match(p.name)){const e=this.parseIdentifierName(this.state.start),r=this.createIdentifier(t,e);if(r.type=\"V8IntrinsicIdentifier\",this.match(p.parenL))return r}this.unexpected(e)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(p.placeholder)){const t=this.startNode();return this.next(),this.assertNoSpace(\"Unexpected space in placeholder.\"),t.name=super.parseIdentifier(!0),this.assertNoSpace(\"Unexpected space in placeholder.\"),this.expect(p.placeholder),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){const r=!(!e.expectedNode||\"Placeholder\"!==e.type);return e.expectedNode=t,r?e:this.finishNode(e,\"Placeholder\")}getTokenFromCode(e){return 37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(p.placeholder,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder(\"Expression\")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder(\"Identifier\")||super.parseIdentifier(...arguments)}checkReservedWord(e){void 0!==e&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder(\"Pattern\")||super.parseBindingAtom(...arguments)}checkLVal(e){\"Placeholder\"!==e.type&&super.checkLVal(...arguments)}toAssignable(e){return e&&\"Placeholder\"===e.type&&\"Expression\"===e.expectedNode?(e.expectedNode=\"Pattern\",e):super.toAssignable(...arguments)}isLet(e){return!!super.isLet(e)||!!this.isContextual(\"let\")&&(!e&&this.lookahead().type===p.placeholder)}verifyBreakContinue(e){e.label&&\"Placeholder\"===e.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(e,t){if(\"Placeholder\"!==t.type||t.extra&&t.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(p.colon)){const r=e;return r.label=this.finishPlaceholder(t,\"Identifier\"),this.next(),r.body=this.parseStatement(\"label\"),this.finishNode(r,\"LabeledStatement\")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,\"Statement\")}parseBlock(){return this.parsePlaceholder(\"BlockStatement\")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder(\"Identifier\")||super.parseFunctionId(...arguments)}parseClass(e,t,r){const n=t?\"ClassDeclaration\":\"ClassExpression\";this.next(),this.takeDecorators(e);const s=this.state.strict,i=this.parsePlaceholder(\"Identifier\");if(i)if(this.match(p._extends)||this.match(p.placeholder)||this.match(p.braceL))e.id=i;else{if(r||!t)return e.id=null,e.body=this.finishPlaceholder(i,\"ClassBody\"),this.finishNode(e,n);this.unexpected(null,me.ClassNameIsRequired)}else this.parseClassId(e,t,r);return this.parseClassSuper(e),e.body=this.parsePlaceholder(\"ClassBody\")||this.parseClassBody(!!e.superClass,s),this.finishNode(e,n)}parseExport(e){const t=this.parsePlaceholder(\"Identifier\");if(!t)return super.parseExport(...arguments);if(!this.isContextual(\"from\")&&!this.match(p.comma))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(t,\"Declaration\"),this.finishNode(e,\"ExportNamedDeclaration\");this.expectPlugin(\"exportDefaultFrom\");const r=this.startNode();return r.exported=t,e.specifiers=[this.finishNode(r,\"ExportDefaultSpecifier\")],super.parseExport(e)}isExportDefaultSpecifier(){if(this.match(p._default)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,\"from\")&&this.input.startsWith(p.placeholder.label,this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e){return!!(e.specifiers&&e.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(e){const{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>\"Placeholder\"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){const t=this.parsePlaceholder(\"Identifier\");if(!t)return super.parseImport(...arguments);if(e.specifiers=[],!this.isContextual(\"from\")&&!this.match(p.comma))return e.source=this.finishPlaceholder(t,\"StringLiteral\"),this.semicolon(),this.finishNode(e,\"ImportDeclaration\");const r=this.startNodeAtNode(t);return r.local=t,this.finishNode(r,\"ImportDefaultSpecifier\"),e.specifiers.push(r),this.eat(p.comma)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(\"from\"),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,\"ImportDeclaration\")}parseImportSource(){return this.parsePlaceholder(\"StringLiteral\")||super.parseImportSource(...arguments)}}},xe=Object.keys(Ee),Se={sourceType:\"script\",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1};var Te=function(e){return e>=48&&e<=57};const we=new Set([103,109,115,105,121,117,100]),Pe={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},Ae={bin:[48,49]};Ae.oct=[...Ae.bin,50,51,52,53,54,55],Ae.dec=[...Ae.oct,56,57],Ae.hex=[...Ae.dec,65,66,67,68,69,70,97,98,99,100,101,102];class Oe{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new b(e.startLoc,e.endLoc)}}class Ce{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Ie{constructor(e){this.stack=[],this.undefinedPrivateNames=new Map,this.raise=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ce)}exit(){const e=this.stack.pop(),t=this.current();for(const[r,n]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,n):this.raise(n,x.InvalidPrivateFieldResolution,r)}declarePrivateName(e,t,r){const n=this.current();let s=n.privateNames.has(e);if(3&t){const r=s&&n.loneAccessors.get(e);if(r){const i=4&r,o=4&t;s=(3&r)==(3&t)||i!==o,s||n.loneAccessors.delete(e)}else s||n.loneAccessors.set(e,t)}s&&this.raise(r,x.PrivateNameRedeclaration,e),n.privateNames.add(e),n.undefinedPrivateNames.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.raise(t,x.InvalidPrivateFieldResolution,e)}}class ke{constructor(e=0){this.type=void 0,this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class Ne extends ke{constructor(e){super(e),this.errors=new Map}recordDeclarationError(e,t){this.errors.set(e,t)}clearDeclarationError(e){this.errors.delete(e)}iterateErrors(e){this.errors.forEach(e)}}class _e{constructor(e){this.stack=[new ke],this.raise=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){const{stack:r}=this;let n=r.length-1,s=r[n];for(;!s.isCertainlyParameterDeclaration();){if(!s.canBeArrowParameterDeclaration())return;s.recordDeclarationError(e,t),s=r[--n]}this.raise(e,t)}recordParenthesizedIdentifierError(e,t){const{stack:r}=this,n=r[r.length-1];if(n.isCertainlyParameterDeclaration())this.raise(e,t);else{if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,t)}}recordAsyncArrowParametersError(e,t){const{stack:r}=this;let n=r.length-1,s=r[n];for(;s.canBeArrowParameterDeclaration();)2===s.type&&s.recordDeclarationError(e,t),s=r[--n]}validateAsPattern(){const{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(((t,r)=>{this.raise(r,t);let n=e.length-2,s=e[n];for(;s.canBeArrowParameterDeclaration();)s.clearDeclarationError(r),s=e[--n]}))}}function je(){return new ke}class De{constructor(){this.shorthandAssign=-1,this.doubleProto=-1,this.optionalParameters=-1}}class Le{constructor(e,t,r){this.type=void 0,this.start=void 0,this.end=void 0,this.loc=void 0,this.range=void 0,this.leadingComments=void 0,this.trailingComments=void 0,this.innerComments=void 0,this.extra=void 0,this.type=\"\",this.start=t,this.end=0,this.loc=new b(r),null!=e&&e.options.ranges&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}__clone(){const e=new Le,t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){const n=t[r];\"leadingComments\"!==n&&\"trailingComments\"!==n&&\"innerComments\"!==n&&(e[n]=this[n])}return e}}const Me=e=>\"ParenthesizedExpression\"===e.type?Me(e.expression):e,Be={kind:\"loop\"},Re={kind:\"switch\"},Fe=/[\\uD800-\\uDFFF]/u,Ue=/in(?:stanceof)?/y;class $e extends class extends class extends class extends class extends class extends class extends class extends class extends class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){return this.plugins.has(e)}getPluginOption(e,t){if(this.hasPlugin(e))return this.plugins.get(e)[t]}}{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)}adjustCommentsAfterTrailingComma(e,t,r){if(0===this.state.leadingComments.length)return;let n=null,s=t.length;for(;null===n&&s>0;)n=t[--s];if(null===n)return;for(let e=0;e<this.state.leadingComments.length;e++)this.state.leadingComments[e].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(e,1),e--);const i=[];for(let t=0;t<this.state.leadingComments.length;t++){const n=this.state.leadingComments[t];n.end<e.end?(i.push(n),r||(this.state.leadingComments.splice(t,1),t--)):(void 0===e.trailingComments&&(e.trailingComments=[]),e.trailingComments.push(n))}r&&(this.state.leadingComments=[]),i.length>0?n.trailingComments=i:void 0!==n.trailingComments&&(n.trailingComments=[])}processComment(e){if(\"Program\"===e.type&&e.body.length>0)return;const t=this.state.commentStack;let r,n,s,i,o;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(s=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(t.length>0){const r=v(t);r.trailingComments&&r.trailingComments[0].start>=e.end&&(s=r.trailingComments,delete r.trailingComments)}for(t.length>0&&v(t).start>=e.start&&(r=t.pop());t.length>0&&v(t).start>=e.start;)n=t.pop();if(!n&&r&&(n=r),r)switch(e.type){case\"ObjectExpression\":this.adjustCommentsAfterTrailingComma(e,e.properties);break;case\"ObjectPattern\":this.adjustCommentsAfterTrailingComma(e,e.properties,!0);break;case\"CallExpression\":this.adjustCommentsAfterTrailingComma(e,e.arguments);break;case\"ArrayExpression\":this.adjustCommentsAfterTrailingComma(e,e.elements);break;case\"ArrayPattern\":this.adjustCommentsAfterTrailingComma(e,e.elements,!0)}else this.state.commentPreviousNode&&(\"ImportSpecifier\"===this.state.commentPreviousNode.type&&\"ImportSpecifier\"!==e.type||\"ExportSpecifier\"===this.state.commentPreviousNode.type&&\"ExportSpecifier\"!==e.type)&&this.adjustCommentsAfterTrailingComma(e,[this.state.commentPreviousNode]);if(n){if(n.leadingComments)if(n!==e&&n.leadingComments.length>0&&v(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,delete n.leadingComments;else for(i=n.leadingComments.length-2;i>=0;--i)if(n.leadingComments[i].end<=e.start){e.leadingComments=n.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(v(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(o=0;o<this.state.leadingComments.length;o++)this.state.leadingComments[o].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(o,1),o--);this.state.leadingComments.length>0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;i<this.state.leadingComments.length&&!(this.state.leadingComments[i].end>e.start);i++);const t=this.state.leadingComments.slice(0,i);t.length&&(e.leadingComments=t),s=this.state.leadingComments.slice(i),0===s.length&&(s=null)}if(this.state.commentPreviousNode=e,s)if(s.length&&s[0].start>=e.start&&v(s).end<=e.end)e.innerComments=s;else{const t=s.findIndex((t=>t.end>=e.end));t>0?(e.innerComments=s.slice(0,t),e.trailingComments=s.slice(t)):e.trailingComments=s}t.push(e)}}{getLocationForPosition(e){let t;return t=e===this.state.start?this.state.startLoc:e===this.state.lastTokStart?this.state.lastTokStartLoc:e===this.state.end?this.state.endLoc:e===this.state.lastTokEnd?this.state.lastTokEndLoc:function(e,t){let r,n=1,s=0;for(d.lastIndex=0;(r=d.exec(e))&&r.index<t;)n++,s=d.lastIndex;return new g(n,t-s)}(this.input,e),t}raise(e,{code:t,reasonCode:r,template:n},...s){return this.raiseWithData(e,{code:t,reasonCode:r},n,...s)}raiseOverwrite(e,{code:t,template:r},...n){const s=this.getLocationForPosition(e),i=r.replace(/%(\\d+)/g,((e,t)=>n[t]))+` (${s.line}:${s.column})`;if(this.options.errorRecovery){const t=this.state.errors;for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.pos===e)return Object.assign(n,{message:i});if(n.pos<e)break}}return this._raise({code:t,loc:s,pos:e},i)}raiseWithData(e,t,r,...n){const s=this.getLocationForPosition(e),i=r.replace(/%(\\d+)/g,((e,t)=>n[t]))+` (${s.line}:${s.column})`;return this._raise(Object.assign({loc:s,pos:e},t),i)}_raise(e,t){const r=new SyntaxError(t);if(Object.assign(r,e),this.options.errorRecovery)return this.isLookahead||this.state.errors.push(r),r;throw r}}{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.state=new te,this.state.init(e),this.input=t,this.length=t.length,this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Oe(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,lastTokEnd:e.end,context:[this.curContext()],inType:e.inType}}lookahead(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return m.lastIndex=e,e+m.exec(this.input)[0].length}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){const r=this.input.charCodeAt(e);56320==(64512&r)&&(t=65536+((1023&t)<<10)+(1023&r))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(((e,t)=>this.raise(t,e))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){const e=this.curContext();e.preserveSpace||this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(p.eof):e===P.template?this.readTmplToken():this.getTokenFromCode(this.codePointAtPos(this.state.pos))}pushComment(e,t,r,n,s,i){const o={type:e?\"CommentBlock\":\"CommentLine\",value:t,start:r,end:n,loc:new b(s,i)};this.options.tokens&&this.pushToken(o),this.state.comments.push(o),this.addComment(o)}skipBlockComment(){let e;this.isLookahead||(e=this.state.curPosition());const t=this.state.pos,r=this.input.indexOf(\"*/\",this.state.pos+2);if(-1===r)throw this.raise(t,x.UnterminatedComment);let n;for(this.state.pos=r+2,d.lastIndex=t;(n=d.exec(this.input))&&n.index<this.state.pos;)++this.state.curLine,this.state.lineStart=n.index+n[0].length;this.isLookahead||this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())}skipLineComment(e){const t=this.state.pos;let r;this.isLookahead||(r=this.state.curPosition());let n=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!h(n)&&++this.state.pos<this.length;)n=this.input.charCodeAt(this.state.pos);this.isLookahead||this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())}skipSpace(){e:for(;this.state.pos<this.length;){const e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!y(e))break e;++this.state.pos}}}finishToken(e,t){this.state.end=this.state.pos;const r=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||(this.state.endLoc=this.state.curPosition(),this.updateContext(r))}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(this.state.pos,x.UnexpectedDigitAfterHash);if(123===t||91===t&&this.hasPlugin(\"recordAndTuple\")){if(this.expectPlugin(\"recordAndTuple\"),\"hash\"!==this.getPluginOption(\"recordAndTuple\",\"syntaxType\"))throw this.raise(this.state.pos,123===t?x.RecordExpressionHashIncorrectStartSyntaxType:x.TupleExpressionHashIncorrectStartSyntaxType);this.state.pos+=2,123===t?this.finishToken(p.braceHashL):this.finishToken(p.bracketHashL)}else j(t)?(++this.state.pos,this.finishToken(p.privateName,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(p.privateName,this.readWord1())):this.finishOp(p.hash,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(p.ellipsis)):(++this.state.pos,this.finishToken(p.dot))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(p.slashAssign,2):this.finishOp(p.slash,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;const t=this.state.pos;for(this.state.pos+=1;!h(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const r=this.input.slice(t+2,this.state.pos);return this.finishToken(p.interpreterDirective,r),!0}readToken_mult_modulo(e){let t=42===e?p.star:p.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);42===e&&42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=p.exponent),61!==n||this.state.inType||(r++,t=p.assign),this.finishOp(t,r)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(p.pipeline,2);if(this.hasPlugin(\"recordAndTuple\")&&125===t){if(\"bar\"!==this.getPluginOption(\"recordAndTuple\",\"syntaxType\"))throw this.raise(this.state.pos,x.RecordExpressionBarIncorrectEndSyntaxType);return this.state.pos+=2,void this.finishToken(p.braceBarR)}if(this.hasPlugin(\"recordAndTuple\")&&93===t){if(\"bar\"!==this.getPluginOption(\"recordAndTuple\",\"syntaxType\"))throw this.raise(this.state.pos,x.TupleExpressionBarIncorrectEndSyntaxType);return this.state.pos+=2,void this.finishToken(p.bracketBarR)}}61!==t?this.finishOp(124===e?p.bitwiseOR:p.bitwiseAND,1):this.finishOp(p.assign,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(p.assign,3):this.finishOp(124===e?p.logicalOR:p.logicalAND,2)}readToken_caret(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(p.assign,2):this.finishOp(p.bitwiseXOR,1)}readToken_plus_min(e){const t=this.input.charCodeAt(this.state.pos+1);if(t===e)return 45!==t||this.inModule||62!==this.input.charCodeAt(this.state.pos+2)||0!==this.state.lastTokEnd&&!this.hasPrecedingLineBreak()?void this.finishOp(p.incDec,2):(this.skipLineComment(3),this.skipSpace(),void this.nextToken());61===t?this.finishOp(p.assign,2):this.finishOp(p.plusMin,1)}readToken_lt_gt(e){const t=this.input.charCodeAt(this.state.pos+1);let r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?void this.finishOp(p.assign,r+1):void this.finishOp(p.bitShift,r)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.state.pos+2)||45!==this.input.charCodeAt(this.state.pos+3)?(61===t&&(r=2),void this.finishOp(p.relational,r)):(this.skipLineComment(4),this.skipSpace(),void this.nextToken())}readToken_eq_excl(e){const t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(p.arrow)):void this.finishOp(61===e?p.eq:p.bang,1);this.finishOp(p.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(p.assign,3):this.finishOp(p.nullishCoalescing,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(p.question)):(this.state.pos+=2,this.finishToken(p.questionDot))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(p.parenL);case 41:return++this.state.pos,void this.finishToken(p.parenR);case 59:return++this.state.pos,void this.finishToken(p.semi);case 44:return++this.state.pos,void this.finishToken(p.comma);case 91:if(this.hasPlugin(\"recordAndTuple\")&&124===this.input.charCodeAt(this.state.pos+1)){if(\"bar\"!==this.getPluginOption(\"recordAndTuple\",\"syntaxType\"))throw this.raise(this.state.pos,x.TupleExpressionBarIncorrectStartSyntaxType);this.state.pos+=2,this.finishToken(p.bracketBarL)}else++this.state.pos,this.finishToken(p.bracketL);return;case 93:return++this.state.pos,void this.finishToken(p.bracketR);case 123:if(this.hasPlugin(\"recordAndTuple\")&&124===this.input.charCodeAt(this.state.pos+1)){if(\"bar\"!==this.getPluginOption(\"recordAndTuple\",\"syntaxType\"))throw this.raise(this.state.pos,x.RecordExpressionBarIncorrectStartSyntaxType);this.state.pos+=2,this.finishToken(p.braceBarL)}else++this.state.pos,this.finishToken(p.braceL);return;case 125:return++this.state.pos,void this.finishToken(p.braceR);case 58:return void(this.hasPlugin(\"functionBind\")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(p.doubleColon,2):(++this.state.pos,this.finishToken(p.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(p.backQuote);case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:case 62:return void this.readToken_lt_gt(e);case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(p.tilde,1);case 64:return++this.state.pos,void this.finishToken(p.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(j(e))return void this.readWord(e)}throw this.raise(this.state.pos,x.InvalidOrUnexpectedToken,String.fromCodePoint(e))}finishOp(e,t){const r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)}readRegexp(){const e=this.state.start+1;let t,r,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(e,x.UnterminatedRegExp);const s=this.input.charCodeAt(n);if(h(s))throw this.raise(e,x.UnterminatedRegExp);if(t)t=!1;else{if(91===s)r=!0;else if(93===s&&r)r=!1;else if(47===s&&!r)break;t=92===s}}const s=this.input.slice(e,n);++n;let i=\"\";for(;n<this.length;){const e=this.codePointAtPos(n),t=String.fromCharCode(e);if(we.has(e))i.includes(t)&&this.raise(n+1,x.DuplicateRegExpFlags);else{if(!D(e)&&92!==e)break;this.raise(n+1,x.MalformedRegExpFlags)}++n,i+=t}this.state.pos=n,this.finishToken(p.regexp,{pattern:s,flags:i})}readInt(e,t,r,n=!0){const s=this.state.pos,i=16===e?Pe.hex:Pe.decBinOct,o=16===e?Ae.hex:10===e?Ae.dec:8===e?Ae.oct:Ae.bin;let a=!1,l=0;for(let s=0,c=null==t?1/0:t;s<c;++s){const t=this.input.charCodeAt(this.state.pos);let c;if(95!==t){if(c=t>=97?t-97+10:t>=65?t-65+10:Te(t)?t-48:1/0,c>=e)if(this.options.errorRecovery&&c<=9)c=0,this.raise(this.state.start+s+2,x.InvalidDigit,e);else{if(!r)break;c=0,a=!0}++this.state.pos,l=l*e+c}else{const e=this.input.charCodeAt(this.state.pos-1),t=this.input.charCodeAt(this.state.pos+1);(-1===o.indexOf(t)||i.indexOf(e)>-1||i.indexOf(t)>-1||Number.isNaN(t))&&this.raise(this.state.pos,x.UnexpectedNumericSeparator),n||this.raise(this.state.pos,x.NumericSeparatorInEscapeSequence),++this.state.pos}}return this.state.pos===s||null!=t&&this.state.pos-s!==t||a?null:l}readRadixNumber(e){const t=this.state.pos;let r=!1;this.state.pos+=2;const n=this.readInt(e);null==n&&this.raise(this.state.start+2,x.InvalidDigit,e);const s=this.input.charCodeAt(this.state.pos);if(110===s)++this.state.pos,r=!0;else if(109===s)throw this.raise(t,x.InvalidDecimal);if(j(this.codePointAtPos(this.state.pos)))throw this.raise(this.state.pos,x.NumberIdentifier);if(r){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,\"\");this.finishToken(p.bigint,e)}else this.finishToken(p.num,n)}readNumber(e){const t=this.state.pos;let r=!1,n=!1,s=!1,i=!1,o=!1;e||null!==this.readInt(10)||this.raise(t,x.InvalidNumber);const a=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(a){const e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(t,x.StrictOctalLiteral),!this.state.strict){const r=e.indexOf(\"_\");r>0&&this.raise(r+t,x.ZeroDigitNumericSeparator)}o=a&&!/[89]/.test(e)}let l=this.input.charCodeAt(this.state.pos);if(46!==l||o||(++this.state.pos,this.readInt(10),r=!0,l=this.input.charCodeAt(this.state.pos)),69!==l&&101!==l||o||(l=this.input.charCodeAt(++this.state.pos),43!==l&&45!==l||++this.state.pos,null===this.readInt(10)&&this.raise(t,x.InvalidOrMissingExponent),r=!0,i=!0,l=this.input.charCodeAt(this.state.pos)),110===l&&((r||a)&&this.raise(t,x.InvalidBigIntLiteral),++this.state.pos,n=!0),109===l&&(this.expectPlugin(\"decimal\",this.state.pos),(i||a)&&this.raise(t,x.InvalidDecimal),++this.state.pos,s=!0),j(this.codePointAtPos(this.state.pos)))throw this.raise(this.state.pos,x.NumberIdentifier);const c=this.input.slice(t,this.state.pos).replace(/[_mn]/g,\"\");if(n)return void this.finishToken(p.bigint,c);if(s)return void this.finishToken(p.decimal,c);const u=o?parseInt(c,8):parseFloat(c);this.finishToken(p.num,u)}readCodePoint(e){let t;if(123===this.input.charCodeAt(this.state.pos)){const r=++this.state.pos;if(t=this.readHexChar(this.input.indexOf(\"}\",this.state.pos)-this.state.pos,!0,e),++this.state.pos,null!==t&&t>1114111){if(!e)return null;this.raise(r,x.InvalidCodePoint)}}else t=this.readHexChar(4,!1,e);return t}readString(e){let t=\"\",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,x.UnterminatedString);const n=this.input.charCodeAt(this.state.pos);if(n===e)break;if(92===n)t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos;else if(8232===n||8233===n)++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;else{if(h(n))throw this.raise(this.state.start,x.UnterminatedString);++this.state.pos}}t+=this.input.slice(r,this.state.pos++),this.finishToken(p.string,t)}readTmplToken(){let e=\"\",t=this.state.pos,r=!1;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,x.UnterminatedTemplate);const n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(p.template)?36===n?(this.state.pos+=2,void this.finishToken(p.dollarBraceL)):(++this.state.pos,void this.finishToken(p.backQuote)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(p.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);const n=this.readEscapedChar(!0);null===n?r=!0:e+=n,t=this.state.pos}else if(h(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+=\"\\n\";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}recordStrictModeErrors(e,t){this.state.strict&&!this.state.strictErrors.has(e)?this.raise(e,t):this.state.strictErrors.set(e,t)}readEscapedChar(e){const t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return\"\\n\";case 114:return\"\\r\";case 120:{const e=this.readHexChar(2,!1,t);return null===e?null:String.fromCharCode(e)}case 117:{const e=this.readCodePoint(t);return null===e?null:String.fromCodePoint(e)}case 116:return\"\\t\";case 98:return\"\\b\";case 118:return\"\\v\";case 102:return\"\\f\";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return\"\";case 56:case 57:if(e)return null;this.recordStrictModeErrors(this.state.pos-1,x.StrictNumericEscape);default:if(r>=48&&r<=55){const t=this.state.pos-1;let r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(r,8);n>255&&(r=r.slice(0,-1),n=parseInt(r,8)),this.state.pos+=r.length-1;const s=this.input.charCodeAt(this.state.pos);if(\"0\"!==r||56===s||57===s){if(e)return null;this.recordStrictModeErrors(t,x.StrictNumericEscape)}return String.fromCharCode(n)}return String.fromCharCode(r)}}readHexChar(e,t,r){const n=this.state.pos,s=this.readInt(16,e,t,!1);return null===s&&(r?this.raise(n,x.InvalidEscapeSequence):this.state.pos=n-1),s}readWord1(e){this.state.containsEsc=!1;let t=\"\";const r=this.state.pos;let n=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const e=this.codePointAtPos(this.state.pos);if(D(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(n,this.state.pos);const e=this.state.pos,s=this.state.pos===r?j:D;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(this.state.pos,x.MissingUnicodeEscape),n=this.state.pos-1;continue}++this.state.pos;const i=this.readCodePoint(!0);null!==i&&(s(i)||this.raise(e,x.EscapedCharNotAnIdentifier),t+=String.fromCodePoint(i)),n=this.state.pos}}}return t+this.input.slice(n,this.state.pos)}readWord(e){const t=this.readWord1(e),r=l.get(t)||p.name;this.finishToken(r,t)}checkKeywordEscapes(){const e=this.state.type.keyword;e&&this.state.containsEsc&&this.raise(this.state.start,x.InvalidEscapedReservedWord,e)}updateContext(e){var t,r;null==(t=(r=this.state.type).updateContext)||t.call(r,this.state.context)}}{addExtra(e,t,r){e&&((e.extra=e.extra||{})[t]=r)}isRelational(e){return this.match(p.relational)&&this.state.value===e}expectRelational(e){this.isRelational(e)?this.next():this.unexpected(null,p.relational)}isContextual(e){return this.match(p.name)&&this.state.value===e&&!this.state.containsEsc}isUnparsedContextual(e,t){const r=e+t.length;if(this.input.slice(e,r)===t){const e=this.input.charCodeAt(r);return!(D(e)||55296==(64512&e))}return!1}isLookaheadContextual(e){const t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)&&this.eat(p.name)}expectContextual(e,t){this.eatContextual(e)||this.unexpected(null,t)}canInsertSemicolon(){return this.match(p.eof)||this.match(p.braceR)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return f.test(this.input.slice(this.state.lastTokEnd,this.state.start))}hasFollowingLineBreak(){return f.test(this.input.slice(this.state.end,this.nextTokenStart()))}isLineTerminator(){return this.eat(p.semi)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(p.semi))||this.raise(this.state.lastTokEnd,x.MissingSemicolon)}expect(e,t){this.eat(e)||this.unexpected(t,e)}assertNoSpace(e=\"Unexpected space.\"){this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,{code:E.SyntaxError,reasonCode:\"UnexpectedSpace\",template:e})}unexpected(e,t={code:E.SyntaxError,reasonCode:\"UnexpectedToken\",template:\"Unexpected token\"}){throw t instanceof a&&(t={code:E.SyntaxError,reasonCode:\"UnexpectedToken\",template:`Unexpected token, expected \"${t.label}\"`}),this.raise(null!=e?e:this.state.start,t)}expectPlugin(e,t){if(!this.hasPlugin(e))throw this.raiseWithData(null!=t?t:this.state.start,{missingPlugin:[e]},`This experimental syntax requires enabling the parser plugin: '${e}'`);return!0}expectOnePlugin(e,t){if(!e.some((e=>this.hasPlugin(e))))throw this.raiseWithData(null!=t?t:this.state.start,{missingPlugin:e},`This experimental syntax requires enabling one of the following parser plugin(s): '${e.join(\", \")}'`)}tryParse(e,t=this.state.clone()){const r={node:null};try{const n=e(((e=null)=>{throw r.node=e,r}));if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:n,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const n=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:n};if(e===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:n};throw e}}checkExpressionErrors(e,t){if(!e)return!1;const{shorthandAssign:r,doubleProto:n,optionalParameters:s}=e;if(!t)return r>=0||n>=0||s>=0;r>=0&&this.unexpected(r),n>=0&&this.raise(n,x.DuplicateProto),s>=0&&this.unexpected(s)}isLiteralPropertyName(){return this.match(p.name)||!!this.state.type.keyword||this.match(p.string)||this.match(p.num)||this.match(p.bigint)||this.match(p.decimal)}isPrivateName(e){return\"PrivateName\"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(\"MemberExpression\"===e.type||\"OptionalMemberExpression\"===e.type)&&this.isPrivateName(e.property)}isOptionalChain(e){return\"OptionalMemberExpression\"===e.type||\"OptionalCallExpression\"===e.type}isObjectProperty(e){return\"ObjectProperty\"===e.type}isObjectMethod(e){return\"ObjectMethod\"===e.type}initializeScopes(e=\"module\"===this.options.sourceType){const t=this.state.labels;this.state.labels=[];const r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const n=this.inModule;this.inModule=e;const s=this.scope,i=this.getScopeHandler();this.scope=new i(this.raise.bind(this),this.inModule);const o=this.prodParam;this.prodParam=new ce;const a=this.classScope;this.classScope=new Ie(this.raise.bind(this));const l=this.expressionScope;return this.expressionScope=new _e(this.raise.bind(this)),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=n,this.scope=s,this.prodParam=o,this.classScope=a,this.expressionScope=l}}enterInitialScopes(){let e=0;this.hasPlugin(\"topLevelAwait\")&&this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}}{startNode(){return new Le(this,this.state.start,this.state.startLoc)}startNodeAt(e,t){return new Le(this,e,t)}startNodeAtNode(e){return this.startNodeAt(e.start,e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.options.ranges&&(e.range[1]=r),this.processComment(e),e}resetStartLocation(e,t,r){e.start=t,e.loc.start=r,this.options.ranges&&(e.range[0]=t)}resetEndLocation(e,t=this.state.lastTokEnd,r=this.state.lastTokEndLoc){e.end=t,e.loc.end=r,this.options.ranges&&(e.range[1]=t)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.start,t.loc.start)}}{toAssignable(e,t=!1){var r,n;let s;switch((\"ParenthesizedExpression\"===e.type||null!=(r=e.extra)&&r.parenthesized)&&(s=Me(e),t?\"Identifier\"===s.type?this.expressionScope.recordParenthesizedIdentifierError(e.start,x.InvalidParenthesizedAssignment):\"MemberExpression\"!==s.type&&this.raise(e.start,x.InvalidParenthesizedAssignment):this.raise(e.start,x.InvalidParenthesizedAssignment)),e.type){case\"Identifier\":case\"ObjectPattern\":case\"ArrayPattern\":case\"AssignmentPattern\":break;case\"ObjectExpression\":e.type=\"ObjectPattern\";for(let r=0,n=e.properties.length,s=n-1;r<n;r++){var i;const n=e.properties[r],o=r===s;this.toAssignableObjectExpressionProp(n,o,t),o&&\"RestElement\"===n.type&&null!=(i=e.extra)&&i.trailingComma&&this.raiseRestNotLast(e.extra.trailingComma)}break;case\"ObjectProperty\":this.toAssignable(e.value,t);break;case\"SpreadElement\":{this.checkToRestConversion(e),e.type=\"RestElement\";const r=e.argument;this.toAssignable(r,t);break}case\"ArrayExpression\":e.type=\"ArrayPattern\",this.toAssignableList(e.elements,null==(n=e.extra)?void 0:n.trailingComma,t);break;case\"AssignmentExpression\":\"=\"!==e.operator&&this.raise(e.left.end,x.MissingEqInAssignment),e.type=\"AssignmentPattern\",delete e.operator,this.toAssignable(e.left,t);break;case\"ParenthesizedExpression\":this.toAssignable(s,t)}return e}toAssignableObjectExpressionProp(e,t,r){if(\"ObjectMethod\"===e.type){const t=\"get\"===e.kind||\"set\"===e.kind?x.PatternHasAccessor:x.PatternHasMethod;this.raise(e.key.start,t)}else\"SpreadElement\"!==e.type||t?this.toAssignable(e,r):this.raiseRestNotLast(e.start)}toAssignableList(e,t,r){let n=e.length;if(n){const s=e[n-1];if(\"RestElement\"===(null==s?void 0:s.type))--n;else if(\"SpreadElement\"===(null==s?void 0:s.type)){s.type=\"RestElement\";let e=s.argument;this.toAssignable(e,r),e=Me(e),\"Identifier\"!==e.type&&\"MemberExpression\"!==e.type&&\"ArrayPattern\"!==e.type&&\"ObjectPattern\"!==e.type&&this.unexpected(e.start),t&&this.raiseTrailingCommaAfterRest(t),--n}}for(let t=0;t<n;t++){const n=e[t];n&&(this.toAssignable(n,r),\"RestElement\"===n.type&&this.raiseRestNotLast(n.start))}return e}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(const t of e)\"ArrayExpression\"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e,t){const r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(e,void 0,t),this.finishNode(r,\"SpreadElement\")}parseRestBinding(){const e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,\"RestElement\")}parseBindingAtom(){switch(this.state.type){case p.bracketL:{const e=this.startNode();return this.next(),e.elements=this.parseBindingList(p.bracketR,93,!0),this.finishNode(e,\"ArrayPattern\")}case p.braceL:return this.parseObjectLike(p.braceR,!0)}return this.parseIdentifier()}parseBindingList(e,t,r,n){const s=[];let i=!0;for(;!this.eat(e);)if(i?i=!1:this.expect(p.comma),r&&this.match(p.comma))s.push(null);else{if(this.eat(e))break;if(this.match(p.ellipsis)){s.push(this.parseAssignableListItemTypes(this.parseRestBinding())),this.checkCommaAfterRest(t),this.expect(e);break}{const e=[];for(this.match(p.at)&&this.hasPlugin(\"decorators\")&&this.raise(this.state.start,x.UnsupportedParameterDecorator);this.match(p.at);)e.push(this.parseDecorator());s.push(this.parseAssignableListItem(n,e))}}return s}parseAssignableListItem(e,t){const r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r);const n=this.parseMaybeDefault(r.start,r.loc.start,r);return t.length&&(r.decorators=t),n}parseAssignableListItemTypes(e){return e}parseMaybeDefault(e,t,r){var n,s,i;if(t=null!=(n=t)?n:this.state.startLoc,e=null!=(s=e)?s:this.state.start,r=null!=(i=r)?i:this.parseBindingAtom(),!this.eat(p.eq))return r;const o=this.startNodeAt(e,t);return o.left=r,o.right=this.parseMaybeAssignAllowIn(),this.finishNode(o,\"AssignmentPattern\")}checkLVal(e,t,r=64,n,s,i=!1){switch(e.type){case\"Identifier\":{const{name:t}=e;this.state.strict&&(i?$(t,this.inModule):U(t))&&this.raise(e.start,64===r?x.StrictEvalArguments:x.StrictEvalArgumentsBinding,t),n&&(n.has(t)?this.raise(e.start,x.ParamDupe):n.add(t)),s&&\"let\"===t&&this.raise(e.start,x.LetInLexicalBinding),64&r||this.scope.declareName(t,r,e.start);break}case\"MemberExpression\":64!==r&&this.raise(e.start,x.InvalidPropertyBindingPattern);break;case\"ObjectPattern\":for(let t of e.properties){if(this.isObjectProperty(t))t=t.value;else if(this.isObjectMethod(t))continue;this.checkLVal(t,\"object destructuring pattern\",r,n,s)}break;case\"ArrayPattern\":for(const t of e.elements)t&&this.checkLVal(t,\"array destructuring pattern\",r,n,s);break;case\"AssignmentPattern\":this.checkLVal(e.left,\"assignment pattern\",r,n);break;case\"RestElement\":this.checkLVal(e.argument,\"rest element\",r,n);break;case\"ParenthesizedExpression\":this.checkLVal(e.expression,\"parenthesized expression\",r,n);break;default:this.raise(e.start,64===r?x.InvalidLhs:x.InvalidLhsBinding,t)}}checkToRestConversion(e){\"Identifier\"!==e.argument.type&&\"MemberExpression\"!==e.argument.type&&this.raise(e.argument.start,x.InvalidRestAssignmentPattern)}checkCommaAfterRest(e){this.match(p.comma)&&(this.lookaheadCharCode()===e?this.raiseTrailingCommaAfterRest(this.state.start):this.raiseRestNotLast(this.state.start))}raiseRestNotLast(e){throw this.raise(e,x.ElementAfterRest)}raiseTrailingCommaAfterRest(e){this.raise(e,x.RestTrailingComma)}}{checkProto(e,t,r,n){if(\"SpreadElement\"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return;const s=e.key;if(\"__proto__\"===(\"Identifier\"===s.type?s.name:s.value)){if(t)return void this.raise(s.start,x.RecordNoProto);r.used&&(n?-1===n.doubleProto&&(n.doubleProto=s.start):this.raise(s.start,x.DuplicateProto)),r.used=!0}}shouldExitDescending(e,t){return\"ArrowFunctionExpression\"===e.type&&e.start===t}getExpression(){let e=0;this.hasPlugin(\"topLevelAwait\")&&this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e),this.nextToken();const t=this.parseExpression();return this.match(p.eof)||this.unexpected(),t.comments=this.state.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.start,r=this.state.startLoc,n=this.parseMaybeAssign(e);if(this.match(p.comma)){const s=this.startNodeAt(t,r);for(s.expressions=[n];this.eat(p.comma);)s.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(s.expressions),this.finishNode(s,\"SequenceExpression\")}return n}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e,t){var r;e.optionalParameters=null!=(r=null==t?void 0:t.pos)?r:this.state.start}parseMaybeAssign(e,t){const r=this.state.start,n=this.state.startLoc;if(this.isContextual(\"yield\")&&this.prodParam.hasYield){let e=this.parseYield();return t&&(e=t.call(this,e,r,n)),e}let s;e?s=!1:(e=new De,s=!0),(this.match(p.parenL)||this.match(p.name))&&(this.state.potentialArrowAt=this.state.start);let i=this.parseMaybeConditional(e);if(t&&(i=t.call(this,i,r,n)),this.state.type.isAssign){const t=this.startNodeAt(r,n),s=this.state.value;return t.operator=s,this.match(p.eq)?(t.left=this.toAssignable(i,!0),e.doubleProto=-1):t.left=i,e.shorthandAssign>=t.left.start&&(e.shorthandAssign=-1),this.checkLVal(i,\"assignment expression\"),this.next(),t.right=this.parseMaybeAssign(),this.finishNode(t,\"AssignmentExpression\")}return s&&this.checkExpressionErrors(e,!0),i}parseMaybeConditional(e){const t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,s=this.parseExprOps(e);return this.shouldExitDescending(s,n)?s:this.parseConditional(s,t,r,e)}parseConditional(e,t,r,n){if(this.eat(p.question)){const n=this.startNodeAt(t,r);return n.test=e,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(p.colon),n.alternate=this.parseMaybeAssign(),this.finishNode(n,\"ConditionalExpression\")}return e}parseExprOps(e){const t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,s=this.parseMaybeUnary(e);return this.shouldExitDescending(s,n)?s:this.parseExprOp(s,t,r,-1)}parseExprOp(e,t,r,n){let s=this.state.type.binop;if(null!=s&&(this.prodParam.hasIn||!this.match(p._in))&&s>n){const i=this.state.type;if(i===p.pipeline){if(this.expectPlugin(\"pipelineOperator\"),this.state.inFSharpPipelineDirectBody)return e;this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(e,t)}const o=this.startNodeAt(t,r);o.left=e,o.operator=this.state.value;const a=i===p.logicalOR||i===p.logicalAND,l=i===p.nullishCoalescing;if(l&&(s=p.logicalAND.binop),this.next(),i===p.pipeline&&\"minimal\"===this.getPluginOption(\"pipelineOperator\",\"proposal\")&&this.match(p.name)&&\"await\"===this.state.value&&this.prodParam.hasAwait)throw this.raise(this.state.start,x.UnexpectedAwaitAfterPipelineBody);o.right=this.parseExprOpRightExpr(i,s),this.finishNode(o,a||l?\"LogicalExpression\":\"BinaryExpression\");const c=this.state.type;if(l&&(c===p.logicalOR||c===p.logicalAND)||a&&c===p.nullishCoalescing)throw this.raise(this.state.start,x.MixingCoalesceWithLogical);return this.parseExprOp(o,t,r,n)}return e}parseExprOpRightExpr(e,t){const r=this.state.start,n=this.state.startLoc;switch(e){case p.pipeline:switch(this.getPluginOption(\"pipelineOperator\",\"proposal\")){case\"smart\":return this.withTopicPermittingContext((()=>this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(e,t),r,n)));case\"fsharp\":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){const r=this.state.start,n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),r,n,e.rightAssociative?t-1:t)}checkExponentialAfterUnary(e){this.match(p.exponent)&&this.raise(e.argument.start,x.UnexpectedTokenUnaryExponentiation)}parseMaybeUnary(e,t){const r=this.state.start,n=this.state.startLoc,s=this.isContextual(\"await\");if(s&&this.isAwaitAllowed()){this.next();const e=this.parseAwait(r,n);return t||this.checkExponentialAfterUnary(e),e}if(this.isContextual(\"module\")&&123===this.lookaheadCharCode()&&!this.hasFollowingLineBreak())return this.parseModuleExpression();const i=this.match(p.incDec),o=this.startNode();if(this.state.type.prefix){o.operator=this.state.value,o.prefix=!0,this.match(p._throw)&&this.expectPlugin(\"throwExpressions\");const r=this.match(p._delete);if(this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&r){const e=o.argument;\"Identifier\"===e.type?this.raise(o.start,x.StrictDelete):this.hasPropertyAsPrivateName(e)&&this.raise(o.start,x.DeletePrivateField)}if(!i)return t||this.checkExponentialAfterUnary(o),this.finishNode(o,\"UnaryExpression\")}const a=this.parseUpdate(o,i,e);return s&&(this.hasPlugin(\"v8intrinsic\")?this.state.type.startsExpr:this.state.type.startsExpr&&!this.match(p.modulo))&&!this.isAmbiguousAwait()?(this.raiseOverwrite(r,this.hasPlugin(\"topLevelAwait\")?x.AwaitNotInAsyncContext:x.AwaitNotInAsyncFunction),this.parseAwait(r,n)):a}parseUpdate(e,t,r){if(t)return this.checkLVal(e.argument,\"prefix operation\"),this.finishNode(e,\"UpdateExpression\");const n=this.state.start,s=this.state.startLoc;let i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return i;for(;this.state.type.postfix&&!this.canInsertSemicolon();){const e=this.startNodeAt(n,s);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.checkLVal(i,\"postfix operation\"),this.next(),i=this.finishNode(e,\"UpdateExpression\")}return i}parseExprSubscripts(e){const t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,s=this.parseExprAtom(e);return this.shouldExitDescending(s,n)?s:this.parseSubscripts(s,t,r)}parseSubscripts(e,t,r,n){const s={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,r,n,s),s.maybeAsyncArrow=!1}while(!s.stop);return e}parseSubscript(e,t,r,n,s){if(!n&&this.eat(p.doubleColon))return this.parseBind(e,t,r,n,s);if(this.match(p.backQuote))return this.parseTaggedTemplateExpression(e,t,r,s);let i=!1;if(this.match(p.questionDot)){if(n&&40===this.lookaheadCharCode())return s.stop=!0,e;s.optionalChainMember=i=!0,this.next()}return!n&&this.match(p.parenL)?this.parseCoverCallAndAsyncArrowHead(e,t,r,s,i):i||this.match(p.bracketL)||this.eat(p.dot)?this.parseMember(e,t,r,s,i):(s.stop=!0,e)}parseMember(e,t,r,n,s){const i=this.startNodeAt(t,r),o=this.eat(p.bracketL);i.object=e,i.computed=o;const a=!o&&this.match(p.privateName)&&this.state.value,l=o?this.parseExpression():a?this.parsePrivateName():this.parseIdentifier(!0);return!1!==a&&(\"Super\"===i.object.type&&this.raise(t,x.SuperPrivateField),this.classScope.usePrivateName(a,l.start)),i.property=l,o&&this.expect(p.bracketR),n.optionalChainMember?(i.optional=s,this.finishNode(i,\"OptionalMemberExpression\")):this.finishNode(i,\"MemberExpression\")}parseBind(e,t,r,n,s){const i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),s.stop=!0,this.parseSubscripts(this.finishNode(i,\"BindExpression\"),t,r,n)}parseCoverCallAndAsyncArrowHead(e,t,r,n,s){const i=this.state.maybeInArrowParameters;let o=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(t,r);return a.callee=e,n.maybeAsyncArrow&&(this.expressionScope.enter(new Ne(2)),o=new De),n.optionalChainMember&&(a.optional=s),a.arguments=s?this.parseCallExpressionArguments(p.parenR):this.parseCallExpressionArguments(p.parenR,\"Import\"===e.type,\"Super\"!==e.type,a,o),this.finishCallExpression(a,n.optionalChainMember),n.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!s?(n.stop=!0,this.expressionScope.validateAsPattern(),this.expressionScope.exit(),a=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),a)):(n.maybeAsyncArrow&&(this.checkExpressionErrors(o,!0),this.expressionScope.exit()),this.toReferencedArguments(a)),this.state.maybeInArrowParameters=i,a}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r,n){const s=this.startNodeAt(t,r);return s.tag=e,s.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(t,x.OptionalChainingNoTemplate),this.finishNode(s,\"TaggedTemplateExpression\")}atPossibleAsyncArrow(e){return\"Identifier\"===e.type&&\"async\"===e.name&&this.state.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.state.potentialArrowAt}finishCallExpression(e,t){if(\"Import\"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin(\"moduleAttributes\")||this.expectPlugin(\"importAssertions\")),0===e.arguments.length||e.arguments.length>2)this.raise(e.start,x.ImportCallArity,this.hasPlugin(\"importAssertions\")||this.hasPlugin(\"moduleAttributes\")?\"one or two arguments\":\"one argument\");else for(const t of e.arguments)\"SpreadElement\"===t.type&&this.raise(t.start,x.ImportCallSpreadArgument);return this.finishNode(e,t?\"OptionalCallExpression\":\"CallExpression\")}parseCallExpressionArguments(e,t,r,n,s){const i=[];let o=!0;const a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(o)o=!1;else if(this.expect(p.comma),this.match(e)){!t||this.hasPlugin(\"importAssertions\")||this.hasPlugin(\"moduleAttributes\")||this.raise(this.state.lastTokStart,x.ImportCallArgumentTrailingComma),n&&this.addExtra(n,\"trailingComma\",this.state.lastTokStart),this.next();break}i.push(this.parseExprListItem(!1,s,r))}return this.state.inFSharpPipelineDirectBody=a,i}shouldParseAsyncArrow(){return this.match(p.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;return this.expect(p.arrow),this.parseArrowExpression(e,t.arguments,!0,null==(r=t.extra)?void 0:r.trailingComma),e}parseNoCallExpr(){const e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)}parseExprAtom(e){let t;switch(this.state.type){case p._super:return this.parseSuper();case p._import:return t=this.startNode(),this.next(),this.match(p.dot)?this.parseImportMetaProperty(t):(this.match(p.parenL)||this.raise(this.state.lastTokStart,x.UnsupportedImport),this.finishNode(t,\"Import\"));case p._this:return t=this.startNode(),this.next(),this.finishNode(t,\"ThisExpression\");case p.name:{const e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&\"async\"===r.name&&!this.canInsertSemicolon()){if(this.match(p._function))return this.next(),this.parseFunction(this.startNodeAtNode(r),void 0,!0);if(this.match(p.name))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(r):r;if(this.match(p._do))return this.parseDo(!0)}return e&&this.match(p.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(r),[r],!1)):r}case p._do:return this.parseDo(!1);case p.slash:case p.slashAssign:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case p.num:return this.parseNumericLiteral(this.state.value);case p.bigint:return this.parseBigIntLiteral(this.state.value);case p.decimal:return this.parseDecimalLiteral(this.state.value);case p.string:return this.parseStringLiteral(this.state.value);case p._null:return this.parseNullLiteral();case p._true:return this.parseBooleanLiteral(!0);case p._false:return this.parseBooleanLiteral(!1);case p.parenL:{const e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case p.bracketBarL:case p.bracketHashL:return this.parseArrayLike(this.state.type===p.bracketBarL?p.bracketBarR:p.bracketR,!1,!0,e);case p.bracketL:return this.parseArrayLike(p.bracketR,!0,!1,e);case p.braceBarL:case p.braceHashL:return this.parseObjectLike(this.state.type===p.braceBarL?p.braceBarR:p.braceR,!1,!0,e);case p.braceL:return this.parseObjectLike(p.braceR,!1,!1,e);case p._function:return this.parseFunctionOrFunctionSent();case p.at:this.parseDecorators();case p._class:return t=this.startNode(),this.takeDecorators(t),this.parseClass(t,!1);case p._new:return this.parseNewOrNewTarget();case p.backQuote:return this.parseTemplate(!1);case p.doubleColon:{t=this.startNode(),this.next(),t.object=null;const e=t.callee=this.parseNoCallExpr();if(\"MemberExpression\"===e.type)return this.finishNode(t,\"BindExpression\");throw this.raise(e.start,x.UnsupportedBind)}case p.privateName:{const e=this.state.start,r=this.state.value;if(t=this.parsePrivateName(),this.match(p._in))this.expectPlugin(\"privateIn\"),this.classScope.usePrivateName(r,t.start);else{if(!this.hasPlugin(\"privateIn\"))throw this.unexpected(e);this.raise(this.state.start,x.PrivateInExpectedIn,r)}return t}case p.hash:if(this.state.inPipeline)return t=this.startNode(),\"smart\"!==this.getPluginOption(\"pipelineOperator\",\"proposal\")&&this.raise(t.start,x.PrimaryTopicRequiresSmartPipeline),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(t.start,x.PrimaryTopicNotAllowed),this.registerTopicReference(),this.finishNode(t,\"PipelinePrimaryTopicReference\");case p.relational:if(\"<\"===this.state.value){const e=this.input.codePointAt(this.nextTokenStart());(j(e)||62===e)&&this.expectOnePlugin([\"jsx\",\"flow\",\"typescript\"])}default:throw this.unexpected()}}parseAsyncArrowUnaryFunction(e){const t=this.startNodeAtNode(e);this.prodParam.enter(ue(!0,this.prodParam.hasYield));const r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(this.state.pos,x.LineTerminatorBeforeArrow),this.expect(p.arrow),this.parseArrowExpression(t,r,!0),t}parseDo(e){this.expectPlugin(\"doExpressions\"),e&&this.expectPlugin(\"asyncDoExpressions\");const t=this.startNode();t.async=e,this.next();const r=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=r,this.finishNode(t,\"DoExpression\")}parseSuper(){const e=this.startNode();return this.next(),!this.match(p.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(e.start,x.UnexpectedSuper):this.raise(e.start,x.SuperNotAllowed),this.match(p.parenL)||this.match(p.bracketL)||this.match(p.dot)||this.raise(e.start,x.UnsupportedSuper),this.finishNode(e,\"Super\")}parseMaybePrivateName(e){return this.match(p.privateName)?(e||this.raise(this.state.start+1,x.UnexpectedPrivateField),this.parsePrivateName()):this.parseIdentifier(!0)}parsePrivateName(){const e=this.startNode(),t=this.startNodeAt(this.state.start+1,new g(this.state.curLine,this.state.start+1-this.state.lineStart)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,\"PrivateName\")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(p.dot)){const t=this.createIdentifier(this.startNodeAtNode(e),\"function\");return this.next(),this.parseMetaProperty(e,t,\"sent\")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t,\"function\"===t.name&&\"sent\"===r&&(this.isContextual(r)?this.expectPlugin(\"functionSent\"):this.hasPlugin(\"functionSent\")||this.unexpected());const n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(e.property.start,x.UnsupportedMetaProperty,t.name,r),this.finishNode(e,\"MetaProperty\")}parseImportMetaProperty(e){const t=this.createIdentifier(this.startNodeAtNode(e),\"import\");return this.next(),this.isContextual(\"meta\")&&(this.inModule||this.raise(t.start,S.ImportMetaOutsideModule),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,\"meta\")}parseLiteralAtNode(e,t,r){return this.addExtra(r,\"rawValue\",e),this.addExtra(r,\"raw\",this.input.slice(r.start,this.state.end)),r.value=e,this.next(),this.finishNode(r,t)}parseLiteral(e,t){const r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,\"StringLiteral\")}parseNumericLiteral(e){return this.parseLiteral(e,\"NumericLiteral\")}parseBigIntLiteral(e){return this.parseLiteral(e,\"BigIntLiteral\")}parseDecimalLiteral(e){return this.parseLiteral(e,\"DecimalLiteral\")}parseRegExpLiteral(e){const t=this.parseLiteral(e.value,\"RegExpLiteral\");return t.pattern=e.pattern,t.flags=e.flags,t}parseBooleanLiteral(e){const t=this.startNode();return t.value=e,this.next(),this.finishNode(t,\"BooleanLiteral\")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,\"NullLiteral\")}parseParenAndDistinguishExpression(e){const t=this.state.start,r=this.state.startLoc;let n;this.next(),this.expressionScope.enter(new Ne(1));const s=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const o=this.state.start,a=this.state.startLoc,l=[],c=new De;let u,f,d=!0;for(;!this.match(p.parenR);){if(d)d=!1;else if(this.expect(p.comma,-1===c.optionalParameters?null:c.optionalParameters),this.match(p.parenR)){f=this.state.start;break}if(this.match(p.ellipsis)){const e=this.state.start,t=this.state.startLoc;u=this.state.start,l.push(this.parseParenItem(this.parseRestBinding(),e,t)),this.checkCommaAfterRest(41);break}l.push(this.parseMaybeAssignAllowIn(c,this.parseParenItem))}const h=this.state.lastTokEnd,m=this.state.lastTokEndLoc;this.expect(p.parenR),this.state.maybeInArrowParameters=s,this.state.inFSharpPipelineDirectBody=i;let y=this.startNodeAt(t,r);if(e&&this.shouldParseArrow()&&(y=this.parseArrow(y)))return this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(y,l,!1),y;if(this.expressionScope.exit(),l.length||this.unexpected(this.state.lastTokStart),f&&this.unexpected(f),u&&this.unexpected(u),this.checkExpressionErrors(c,!0),this.toReferencedListDeep(l,!0),l.length>1?(n=this.startNodeAt(o,a),n.expressions=l,this.finishNodeAt(n,\"SequenceExpression\",h,m)):n=l[0],!this.options.createParenthesizedExpressions)return this.addExtra(n,\"parenthesized\",!0),this.addExtra(n,\"parenStart\",t),n;const g=this.startNodeAt(t,r);return g.expression=n,this.finishNode(g,\"ParenthesizedExpression\"),g}shouldParseArrow(){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(p.arrow))return e}parseParenItem(e,t,r){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(p.dot)){const t=this.createIdentifier(this.startNodeAtNode(e),\"new\");this.next();const r=this.parseMetaProperty(e,t,\"target\");return this.scope.inNonArrowFunction||this.scope.inClass||this.raise(r.start,x.UnexpectedNewTarget),r}return this.parseNew(e)}parseNew(e){return e.callee=this.parseNoCallExpr(),\"Import\"===e.callee.type?this.raise(e.callee.start,x.ImportCallNotNewExpression):this.isOptionalChain(e.callee)?this.raise(this.state.lastTokEnd,x.OptionalChainingNoNew):this.eat(p.questionDot)&&this.raise(this.state.start,x.OptionalChainingNoNew),this.parseNewArguments(e),this.finishNode(e,\"NewExpression\")}parseNewArguments(e){if(this.eat(p.parenL)){const t=this.parseExprList(p.parenR);this.toReferencedList(t),e.arguments=t}else e.arguments=[]}parseTemplateElement(e){const t=this.startNode();return null===this.state.value&&(e||this.raise(this.state.start+1,x.InvalidEscapeSequenceTemplate)),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\\r\\n?/g,\"\\n\"),cooked:this.state.value},this.next(),t.tail=this.match(p.backQuote),this.finishNode(t,\"TemplateElement\")}parseTemplate(e){const t=this.startNode();this.next(),t.expressions=[];let r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(p.dollarBraceL),t.expressions.push(this.parseTemplateSubstitution()),this.expect(p.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,\"TemplateLiteral\")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){r&&this.expectPlugin(\"recordAndTuple\");const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const i=Object.create(null);let o=!0;const a=this.startNode();for(a.properties=[],this.next();!this.match(e);){if(o)o=!1;else if(this.expect(p.comma),this.match(e)){this.addExtra(a,\"trailingComma\",this.state.lastTokStart);break}const s=this.parsePropertyDefinition(t,n);t||this.checkProto(s,r,i,n),r&&!this.isObjectProperty(s)&&\"SpreadElement\"!==s.type&&this.raise(s.start,x.InvalidRecordProperty),s.shorthand&&this.addExtra(s,\"shorthand\",!0),a.properties.push(s)}this.next(),this.state.inFSharpPipelineDirectBody=s;let l=\"ObjectExpression\";return t?l=\"ObjectPattern\":r&&(l=\"RecordExpression\"),this.finishNode(a,l)}maybeAsyncOrAccessorProp(e){return!e.computed&&\"Identifier\"===e.key.type&&(this.isLiteralPropertyName()||this.match(p.bracketL)||this.match(p.star))}parsePropertyDefinition(e,t){let r=[];if(this.match(p.at))for(this.hasPlugin(\"decorators\")&&this.raise(this.state.start,x.UnsupportedPropertyDecorator);this.match(p.at);)r.push(this.parseDecorator());const n=this.startNode();let s,i,o=!1,a=!1,l=!1;if(this.match(p.ellipsis))return r.length&&this.unexpected(),e?(this.next(),n.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(n,\"RestElement\")):this.parseSpread();r.length&&(n.decorators=r,r=[]),n.method=!1,(e||t)&&(s=this.state.start,i=this.state.startLoc),e||(o=this.eat(p.star));const c=this.state.containsEsc,u=this.parsePropertyName(n,!1);if(!e&&!o&&!c&&this.maybeAsyncOrAccessorProp(n)){const e=u.name;\"async\"!==e||this.hasPrecedingLineBreak()||(a=!0,o=this.eat(p.star),this.parsePropertyName(n,!1)),\"get\"!==e&&\"set\"!==e||(l=!0,n.kind=e,this.match(p.star)&&(o=!0,this.raise(this.state.pos,x.AccessorIsGenerator,e),this.next()),this.parsePropertyName(n,!1))}return this.parseObjPropValue(n,s,i,o,a,e,l,t),n}getGetterSetterExpectedParamCount(e){return\"get\"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;const r=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e),s=e.start;n.length!==r&&(\"get\"===e.kind?this.raise(s,x.BadGetterArity):this.raise(s,x.BadSetterArity)),\"set\"===e.kind&&\"RestElement\"===(null==(t=n[n.length-1])?void 0:t.type)&&this.raise(s,x.BadSetterRestParameter)}parseObjectMethod(e,t,r,n,s){return s?(this.parseMethod(e,t,!1,!1,!1,\"ObjectMethod\"),this.checkGetterSetterParams(e),e):r||t||this.match(p.parenL)?(n&&this.unexpected(),e.kind=\"method\",e.method=!0,this.parseMethod(e,t,r,!1,!1,\"ObjectMethod\")):void 0}parseObjectProperty(e,t,r,n,s){return e.shorthand=!1,this.eat(p.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(s),this.finishNode(e,\"ObjectProperty\")):e.computed||\"Identifier\"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!1),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(p.eq)&&s?(-1===s.shorthandAssign&&(s.shorthandAssign=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,\"ObjectProperty\"))}parseObjPropValue(e,t,r,n,s,i,o,a){const l=this.parseObjectMethod(e,n,s,i,o)||this.parseObjectProperty(e,t,r,i,a);return l||this.unexpected(),l}parsePropertyName(e,t){if(this.eat(p.bracketL))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(p.bracketR);else{const r=this.state.inPropertyName;this.state.inPropertyName=!0;const n=this.state.type;e.key=n===p.num||n===p.string||n===p.bigint||n===p.decimal?this.parseExprAtom():this.parseMaybePrivateName(t),n!==p.privateName&&(e.computed=!1),this.state.inPropertyName=r}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=!!t}parseMethod(e,t,r,n,s,i,o=!1){this.initFunction(e,r),e.generator=!!t;const a=n;return this.scope.enter(18|(o?64:0)|(s?32:0)),this.prodParam.enter(ue(r,e.generator)),this.parseFunctionParams(e,a),this.parseFunctionBodyAndFinish(e,i,!0),this.prodParam.exit(),this.scope.exit(),e}parseArrayLike(e,t,r,n){r&&this.expectPlugin(\"recordAndTuple\");const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!r,n,i),this.state.inFSharpPipelineDirectBody=s,this.finishNode(i,r?\"TupleExpression\":\"ArrayExpression\")}parseArrowExpression(e,t,r,n){this.scope.enter(6);let s=ue(r,!1);!this.match(p.bracketL)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(e,r);const i=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=i,this.finishNode(e,\"ArrowFunctionExpression\")}setArrowFunctionParameters(e,t,r){e.params=this.toAssignableList(t,r,!1)}parseFunctionBodyAndFinish(e,t,r=!1){this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){const n=t&&!this.match(p.braceL);if(this.expressionScope.enter(je()),n)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{const n=this.state.strict,s=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(s=>{const i=!this.isSimpleParamList(e.params);if(s&&i){const t=\"method\"!==e.kind&&\"constructor\"!==e.kind||!e.key?e.start:e.key.end;this.raise(t,x.IllegalLanguageModeDirective)}const o=!n&&this.state.strict;this.checkParams(e,!(this.state.strict||t||r||i),t,o),this.state.strict&&e.id&&this.checkLVal(e.id,\"function name\",65,void 0,void 0,o)})),this.prodParam.exit(),this.expressionScope.exit(),this.state.labels=s}}isSimpleParamList(e){for(let t=0,r=e.length;t<r;t++)if(\"Identifier\"!==e[t].type)return!1;return!0}checkParams(e,t,r,n=!0){const s=new Set;for(const r of e.params)this.checkLVal(r,\"function parameter list\",5,t?null:s,void 0,n)}parseExprList(e,t,r,n){const s=[];let i=!0;for(;!this.eat(e);){if(i)i=!1;else if(this.expect(p.comma),this.match(e)){n&&this.addExtra(n,\"trailingComma\",this.state.lastTokStart),this.next();break}s.push(this.parseExprListItem(t,r))}return s}parseExprListItem(e,t,r){let n;if(this.match(p.comma))e||this.raise(this.state.pos,x.UnexpectedToken,\",\"),n=null;else if(this.match(p.ellipsis)){const e=this.state.start,r=this.state.startLoc;n=this.parseParenItem(this.parseSpread(t),e,r)}else if(this.match(p.question)){this.expectPlugin(\"partialApplication\"),r||this.raise(this.state.start,x.UnexpectedArgumentPlaceholder);const e=this.startNode();this.next(),n=this.finishNode(e,\"ArgumentPlaceholder\")}else n=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return n}parseIdentifier(e){const t=this.startNode(),r=this.parseIdentifierName(t.start,e);return this.createIdentifier(t,r)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,\"Identifier\")}parseIdentifierName(e,t){let r;const{start:n,type:s}=this.state;if(s===p.name)r=this.state.value;else{if(!s.keyword)throw this.unexpected();r=s.keyword}return t?this.state.type=p.name:this.checkReservedWord(r,n,!!s.keyword,!1),this.next(),r}checkReservedWord(e,t,r,n){if(!(e.length>10)&&function(e){return V.has(e)}(e)){if(\"yield\"===e){if(this.prodParam.hasYield)return void this.raise(t,x.YieldBindingIdentifier)}else if(\"await\"===e){if(this.prodParam.hasAwait)return void this.raise(t,x.AwaitBindingIdentifier);if(this.scope.inStaticBlock&&!this.scope.inNonArrowFunction)return void this.raise(t,x.AwaitBindingIdentifierInStaticBlock);this.expressionScope.recordAsyncArrowParametersError(t,x.AwaitBindingIdentifier)}else if(\"arguments\"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(t,x.ArgumentsInClass);r&&q(e)?this.raise(t,x.UnexpectedKeyword,e):(this.state.strict?n?$:F:R)(e,this.inModule)&&this.raise(t,x.UnexpectedReservedWord,e)}}isAwaitAllowed(){return!!this.prodParam.hasAwait||!(!this.options.allowAwaitOutsideFunction||this.scope.inFunction)}parseAwait(e,t){const r=this.startNodeAt(e,t);return this.expressionScope.recordParameterInitializerError(r.start,x.AwaitExpressionFormalParameter),this.eat(p.star)&&this.raise(r.start,x.ObsoleteAwaitStar),this.scope.inFunction||this.options.allowAwaitOutsideFunction||(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,\"AwaitExpression\")}isAmbiguousAwait(){return this.hasPrecedingLineBreak()||this.match(p.plusMin)||this.match(p.parenL)||this.match(p.bracketL)||this.match(p.backQuote)||this.match(p.regexp)||this.match(p.slash)||this.hasPlugin(\"v8intrinsic\")&&this.match(p.modulo)}parseYield(){const e=this.startNode();this.expressionScope.recordParameterInitializerError(e.start,x.YieldInParameter),this.next();let t=!1,r=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(p.star),this.state.type){case p.semi:case p.eof:case p.braceR:case p.parenR:case p.bracketR:case p.braceBarR:case p.colon:case p.comma:if(!t)break;default:r=this.parseMaybeAssign()}return e.delegate=t,e.argument=r,this.finishNode(e,\"YieldExpression\")}checkPipelineAtInfixOperator(e,t){\"smart\"===this.getPluginOption(\"pipelineOperator\",\"proposal\")&&\"SequenceExpression\"===e.type&&this.raise(t,x.PipelineHeadSequenceExpression)}parseSmartPipelineBody(e,t,r){return this.checkSmartPipelineBodyEarlyErrors(e,t),this.parseSmartPipelineBodyInStyle(e,t,r)}checkSmartPipelineBodyEarlyErrors(e,t){if(this.match(p.arrow))throw this.raise(this.state.start,x.PipelineBodyNoArrow);\"SequenceExpression\"===e.type&&this.raise(t,x.PipelineBodySequenceExpression)}parseSmartPipelineBodyInStyle(e,t,r){const n=this.startNodeAt(t,r),s=this.isSimpleReference(e);return s?n.callee=e:(this.topicReferenceWasUsedInCurrentTopicContext()||this.raise(t,x.PipelineTopicUnused),n.expression=e),this.finishNode(n,s?\"PipelineBareFunction\":\"PipelineTopicExpression\")}isSimpleReference(e){switch(e.type){case\"MemberExpression\":return!e.computed&&this.isSimpleReference(e.object);case\"Identifier\":return!0;default:return!1}}withTopicPermittingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withTopicForbiddingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){const t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}primaryTopicReferenceIsAllowedInCurrentTopicContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentTopicContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){const t=this.state.start,r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const s=this.parseExprOp(this.parseMaybeUnary(),t,r,e);return this.state.inFSharpPipelineDirectBody=n,s}parseModuleExpression(){this.expectPlugin(\"moduleBlocks\");const e=this.startNode();this.next(),this.eat(p.braceL);const t=this.initializeScopes(!0);this.enterInitialScopes();const r=this.startNode();try{e.body=this.parseProgram(r,p.braceR,\"module\")}finally{t()}return this.eat(p.braceR),this.finishNode(e,\"ModuleExpression\")}}{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.state.comments,this.options.tokens&&(e.tokens=function(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.type===p.privateName){const{loc:n,start:s,value:i,end:o}=r,a=s+1,l=new g(n.start.line,n.start.column+1);e.splice(t,1,new Oe({type:p.hash,value:\"#\",start:s,end:a,startLoc:n.start,endLoc:l}),new Oe({type:p.name,value:i,start:a,end:o,startLoc:l,endLoc:n.end}))}}return e}(this.tokens)),this.finishNode(e,\"File\")}parseProgram(e,t=p.eof,r=this.options.sourceType){if(e.sourceType=r,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(const[e]of Array.from(this.scope.undefinedExports)){const t=this.scope.undefinedExports.get(e);this.raise(t,x.ModuleExportUndefined,e)}return this.finishNode(e,\"Program\")}stmtToDirective(e){const t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),s=this.input.slice(t.start,t.end),i=r.value=s.slice(1,-1);return this.addExtra(r,\"raw\",s),this.addExtra(r,\"rawValue\",i),n.value=this.finishNodeAt(r,\"DirectiveLiteral\",t.end,t.loc.end),this.finishNodeAt(n,\"Directive\",e.end,e.loc.end)}parseInterpreterDirective(){if(!this.match(p.interpreterDirective))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,\"InterpreterDirective\")}isLet(e){return!!this.isContextual(\"let\")&&this.isLetKeyword(e)}isLetKeyword(e){const t=this.nextTokenStart(),r=this.codePointAtPos(t);if(92===r||91===r)return!0;if(e)return!1;if(123===r)return!0;if(j(r)){Ue.lastIndex=t;const e=Ue.exec(this.input);if(null!==e){const r=this.codePointAtPos(t+e[0].length);if(!D(r)&&92!==r)return!1}return!0}return!1}parseStatement(e,t){return this.match(p.at)&&this.parseDecorators(!0),this.parseStatementContent(e,t)}parseStatementContent(e,t){let r=this.state.type;const n=this.startNode();let s;switch(this.isLet(e)&&(r=p._var,s=\"let\"),r){case p._break:case p._continue:return this.parseBreakContinueStatement(n,r.keyword);case p._debugger:return this.parseDebuggerStatement(n);case p._do:return this.parseDoStatement(n);case p._for:return this.parseForStatement(n);case p._function:if(46===this.lookaheadCharCode())break;return e&&(this.state.strict?this.raise(this.state.start,x.StrictFunction):\"if\"!==e&&\"label\"!==e&&this.raise(this.state.start,x.SloppyFunction)),this.parseFunctionStatement(n,!1,!e);case p._class:return e&&this.unexpected(),this.parseClass(n,!0);case p._if:return this.parseIfStatement(n);case p._return:return this.parseReturnStatement(n);case p._switch:return this.parseSwitchStatement(n);case p._throw:return this.parseThrowStatement(n);case p._try:return this.parseTryStatement(n);case p._const:case p._var:return s=s||this.state.value,e&&\"var\"!==s&&this.raise(this.state.start,x.UnexpectedLexicalDeclaration),this.parseVarStatement(n,s);case p._while:return this.parseWhileStatement(n);case p._with:return this.parseWithStatement(n);case p.braceL:return this.parseBlock();case p.semi:return this.parseEmptyStatement(n);case p._import:{const e=this.lookaheadCharCode();if(40===e||46===e)break}case p._export:{let e;return this.options.allowImportExportEverywhere||t||this.raise(this.state.start,x.UnexpectedImportExport),this.next(),r===p._import?(e=this.parseImport(n),\"ImportDeclaration\"!==e.type||e.importKind&&\"value\"!==e.importKind||(this.sawUnambiguousESM=!0)):(e=this.parseExport(n),(\"ExportNamedDeclaration\"!==e.type||e.exportKind&&\"value\"!==e.exportKind)&&(\"ExportAllDeclaration\"!==e.type||e.exportKind&&\"value\"!==e.exportKind)&&\"ExportDefaultDeclaration\"!==e.type||(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(n),e}default:if(this.isAsyncFunction())return e&&this.raise(this.state.start,x.AsyncFunctionInSingleStatementContext),this.next(),this.parseFunctionStatement(n,!0,!e)}const i=this.state.value,o=this.parseExpression();return r===p.name&&\"Identifier\"===o.type&&this.eat(p.colon)?this.parseLabeledStatement(n,i,o,e):this.parseExpressionStatement(n,o)}assertModuleNodeAllowed(e){this.options.allowImportExportEverywhere||this.inModule||this.raise(e.start,S.ImportOutsideModule)}takeDecorators(e){const t=this.state.decoratorStack[this.state.decoratorStack.length-1];t.length&&(e.decorators=t,this.resetStartLocationFromNode(e,t[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])}canHaveLeadingDecorator(){return this.match(p._class)}parseDecorators(e){const t=this.state.decoratorStack[this.state.decoratorStack.length-1];for(;this.match(p.at);){const e=this.parseDecorator();t.push(e)}if(this.match(p._export))e||this.unexpected(),this.hasPlugin(\"decorators\")&&!this.getPluginOption(\"decorators\",\"decoratorsBeforeExport\")&&this.raise(this.state.start,x.DecoratorExportClass);else if(!this.canHaveLeadingDecorator())throw this.raise(this.state.start,x.UnexpectedLeadingDecorator)}parseDecorator(){this.expectOnePlugin([\"decorators-legacy\",\"decorators\"]);const e=this.startNode();if(this.next(),this.hasPlugin(\"decorators\")){this.state.decoratorStack.push([]);const t=this.state.start,r=this.state.startLoc;let n;if(this.eat(p.parenL))n=this.parseExpression(),this.expect(p.parenR);else for(n=this.parseIdentifier(!1);this.eat(p.dot);){const e=this.startNodeAt(t,r);e.object=n,e.property=this.parseIdentifier(!0),e.computed=!1,n=this.finishNode(e,\"MemberExpression\")}e.expression=this.parseMaybeDecoratorArguments(n),this.state.decoratorStack.pop()}else e.expression=this.parseExprSubscripts();return this.finishNode(e,\"Decorator\")}parseMaybeDecoratorArguments(e){if(this.eat(p.parenL)){const t=this.startNodeAtNode(e);return t.callee=e,t.arguments=this.parseCallExpressionArguments(p.parenR,!1),this.toReferencedList(t.arguments),this.finishNode(t,\"CallExpression\")}return e}parseBreakContinueStatement(e,t){const r=\"break\"===t;return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,r?\"BreakStatement\":\"ContinueStatement\")}verifyBreakContinue(e,t){const r=\"break\"===t;let n;for(n=0;n<this.state.labels.length;++n){const t=this.state.labels[n];if(null==e.label||t.name===e.label.name){if(null!=t.kind&&(r||\"loop\"===t.kind))break;if(e.label&&r)break}}n===this.state.labels.length&&this.raise(e.start,x.IllegalBreakContinue,t)}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,\"DebuggerStatement\")}parseHeaderExpression(){this.expect(p.parenL);const e=this.parseExpression();return this.expect(p.parenR),e}parseDoStatement(e){return this.next(),this.state.labels.push(Be),e.body=this.withTopicForbiddingContext((()=>this.parseStatement(\"do\"))),this.state.labels.pop(),this.expect(p._while),e.test=this.parseHeaderExpression(),this.eat(p.semi),this.finishNode(e,\"DoWhileStatement\")}parseForStatement(e){this.next(),this.state.labels.push(Be);let t=-1;if(this.isAwaitAllowed()&&this.eatContextual(\"await\")&&(t=this.state.lastTokStart),this.scope.enter(0),this.expect(p.parenL),this.match(p.semi))return t>-1&&this.unexpected(t),this.parseFor(e,null);const r=this.isContextual(\"let\"),n=r&&this.isLetKeyword();if(this.match(p._var)||this.match(p._const)||n){const r=this.startNode(),s=n?\"let\":this.state.value;return this.next(),this.parseVar(r,!0,s),this.finishNode(r,\"VariableDeclaration\"),(this.match(p._in)||this.isContextual(\"of\"))&&1===r.declarations.length?this.parseForIn(e,r,t):(t>-1&&this.unexpected(t),this.parseFor(e,r))}const s=this.match(p.name)&&!this.state.containsEsc,i=new De,o=this.parseExpression(!0,i),a=this.isContextual(\"of\");if(a&&(r?this.raise(o.start,x.ForOfLet):-1===t&&s&&\"Identifier\"===o.type&&\"async\"===o.name&&this.raise(o.start,x.ForOfAsync)),a||this.match(p._in)){this.toAssignable(o,!0);const r=a?\"for-of statement\":\"for-in statement\";return this.checkLVal(o,r),this.parseForIn(e,o,t)}return this.checkExpressionErrors(i,!0),t>-1&&this.unexpected(t),this.parseFor(e,o)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?0:2),t)}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatement(\"if\"),e.alternate=this.eat(p._else)?this.parseStatement(\"if\"):null,this.finishNode(e,\"IfStatement\")}parseReturnStatement(e){return this.prodParam.hasReturn||this.options.allowReturnOutsideFunction||this.raise(this.state.start,x.IllegalReturn),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,\"ReturnStatement\")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const t=e.cases=[];let r,n;for(this.expect(p.braceL),this.state.labels.push(Re),this.scope.enter(0);!this.match(p.braceR);)if(this.match(p._case)||this.match(p._default)){const e=this.match(p._case);r&&this.finishNode(r,\"SwitchCase\"),t.push(r=this.startNode()),r.consequent=[],this.next(),e?r.test=this.parseExpression():(n&&this.raise(this.state.lastTokStart,x.MultipleDefaultsInSwitch),n=!0,r.test=null),this.expect(p.colon)}else r?r.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),r&&this.finishNode(r,\"SwitchCase\"),this.next(),this.state.labels.pop(),this.finishNode(e,\"SwitchStatement\")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(this.state.lastTokEnd,x.NewlineAfterThrow),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,\"ThrowStatement\")}parseCatchClauseParam(){const e=this.parseBindingAtom(),t=\"Identifier\"===e.type;return this.scope.enter(t?8:0),this.checkLVal(e,\"catch clause\",9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(p._catch)){const t=this.startNode();this.next(),this.match(p.parenL)?(this.expect(p.parenL),t.param=this.parseCatchClauseParam(),this.expect(p.parenR)):(t.param=null,this.scope.enter(0)),t.body=this.withTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,\"CatchClause\")}return e.finalizer=this.eat(p._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,x.NoCatchOrFinally),this.finishNode(e,\"TryStatement\")}parseVarStatement(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,\"VariableDeclaration\")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Be),e.body=this.withTopicForbiddingContext((()=>this.parseStatement(\"while\"))),this.state.labels.pop(),this.finishNode(e,\"WhileStatement\")}parseWithStatement(e){return this.state.strict&&this.raise(this.state.start,x.StrictWith),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withTopicForbiddingContext((()=>this.parseStatement(\"with\"))),this.finishNode(e,\"WithStatement\")}parseEmptyStatement(e){return this.next(),this.finishNode(e,\"EmptyStatement\")}parseLabeledStatement(e,t,r,n){for(const e of this.state.labels)e.name===t&&this.raise(r.start,x.LabelRedeclaration,t);const s=this.state.type.isLoop?\"loop\":this.match(p._switch)?\"switch\":null;for(let t=this.state.labels.length-1;t>=0;t--){const r=this.state.labels[t];if(r.statementStart!==e.start)break;r.statementStart=this.state.start,r.kind=s}return this.state.labels.push({name:t,kind:s,statementStart:this.state.start}),e.body=this.parseStatement(n?-1===n.indexOf(\"label\")?n+\"label\":n:\"label\"),this.state.labels.pop(),e.label=r,this.finishNode(e,\"LabeledStatement\")}parseExpressionStatement(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,\"ExpressionStatement\")}parseBlock(e=!1,t=!0,r){const n=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(p.braceL),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,p.braceR,r),t&&this.scope.exit(),this.finishNode(n,\"BlockStatement\")}isValidDirective(e){return\"ExpressionStatement\"===e.type&&\"StringLiteral\"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,s){const i=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?o:void 0,r,n,s)}parseBlockOrModuleBlockBody(e,t,r,n,s){const i=this.state.strict;let o=!1,a=!1;for(;!this.match(n);){const n=this.parseStatement(null,r);if(t&&!a){if(this.isValidDirective(n)){const e=this.stmtToDirective(n);t.push(e),o||\"use strict\"!==e.value.value||(o=!0,this.setStrict(!0));continue}a=!0,this.state.strictErrors.clear()}e.push(n)}s&&s.call(this,o),i||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(p.semi)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(p.parenR)?null:this.parseExpression(),this.expect(p.parenR),e.body=this.withTopicForbiddingContext((()=>this.parseStatement(\"for\"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,\"ForStatement\")}parseForIn(e,t,r){const n=this.match(p._in);return this.next(),n?r>-1&&this.unexpected(r):e.await=r>-1,\"VariableDeclaration\"!==t.type||null==t.declarations[0].init||n&&!this.state.strict&&\"var\"===t.kind&&\"Identifier\"===t.declarations[0].id.type?\"AssignmentPattern\"===t.type&&this.raise(t.start,x.InvalidLhs,\"for-loop\"):this.raise(t.start,x.ForInOfLoopInitializer,n?\"for-in\":\"for-of\"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(p.parenR),e.body=this.withTopicForbiddingContext((()=>this.parseStatement(\"for\"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,n?\"ForInStatement\":\"ForOfStatement\")}parseVar(e,t,r){const n=e.declarations=[],s=this.hasPlugin(\"typescript\");for(e.kind=r;;){const e=this.startNode();if(this.parseVarId(e,r),this.eat(p.eq)?e.init=t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():(\"const\"!==r||this.match(p._in)||this.isContextual(\"of\")?\"Identifier\"===e.id.type||t&&(this.match(p._in)||this.isContextual(\"of\"))||this.raise(this.state.lastTokEnd,x.DeclarationMissingInitializer,\"Complex binding patterns\"):s||this.raise(this.state.lastTokEnd,x.DeclarationMissingInitializer,\"Const declarations\"),e.init=null),n.push(this.finishNode(e,\"VariableDeclarator\")),!this.eat(p.comma))break}return e}parseVarId(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,\"variable declaration\",\"var\"===t?5:9,void 0,\"var\"!==t)}parseFunction(e,t=0,r=!1){const n=1&t,s=2&t,i=!(!n||4&t);this.initFunction(e,r),this.match(p.star)&&s&&this.raise(this.state.start,x.GeneratorInSingleStatementContext),e.generator=this.eat(p.star),n&&(e.id=this.parseFunctionId(i));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ue(r,e.generator)),n||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,n?\"FunctionDeclaration\":\"FunctionExpression\")})),this.prodParam.exit(),this.scope.exit(),n&&!s&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,e}parseFunctionId(e){return e||this.match(p.name)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(p.parenL),this.expressionScope.enter(new ke(3)),e.params=this.parseBindingList(p.parenR,41,!1,t),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:9:17,e.id.start)}parseClass(e,t,r){this.next(),this.takeDecorators(e);const n=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,n),this.finishNode(e,t?\"ClassDeclaration\":\"ClassExpression\")}isClassProperty(){return this.match(p.eq)||this.match(p.semi)||this.match(p.braceR)}isClassMethod(){return this.match(p.parenL)}isNonstaticConstructor(e){return!(e.computed||e.static||\"constructor\"!==e.key.name&&\"constructor\"!==e.key.value)}parseClassBody(e,t){this.classScope.enter();const r={hadConstructor:!1,hadSuperClass:e};let n=[];const s=this.startNode();if(s.body=[],this.expect(p.braceL),this.withTopicForbiddingContext((()=>{for(;!this.match(p.braceR);){if(this.eat(p.semi)){if(n.length>0)throw this.raise(this.state.lastTokEnd,x.DecoratorSemicolon);continue}if(this.match(p.at)){n.push(this.parseDecorator());continue}const e=this.startNode();n.length&&(e.decorators=n,this.resetStartLocationFromNode(e,n[0]),n=[]),this.parseClassMember(s,e,r),\"constructor\"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(e.start,x.DecoratorConstructor)}})),this.state.strict=t,this.next(),n.length)throw this.raise(this.state.start,x.TrailingDecorator);return this.classScope.exit(),this.finishNode(s,\"ClassBody\")}parseClassMemberFromModifier(e,t){const r=this.parseIdentifier(!0);if(this.isClassMethod()){const n=t;return n.kind=\"method\",n.computed=!1,n.key=r,n.static=!1,this.pushClassMethod(e,n,!1,!1,!1,!1),!0}if(this.isClassProperty()){const n=t;return n.computed=!1,n.key=r,n.static=!1,e.body.push(this.parseClassProperty(n)),!0}return!1}parseClassMember(e,t,r){const n=this.isContextual(\"static\");if(n){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(p.braceL))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){const s=t,i=t,o=t,a=t,l=s,c=s;if(t.static=n,this.eat(p.star)){l.kind=\"method\";const t=this.match(p.privateName);return this.parseClassElementName(l),t?void this.pushClassPrivateMethod(e,i,!0,!1):(this.isNonstaticConstructor(s)&&this.raise(s.key.start,x.ConstructorIsGenerator),void this.pushClassMethod(e,s,!0,!1,!1,!1))}const u=this.state.containsEsc,f=this.match(p.privateName),d=this.parseClassElementName(t),h=\"Identifier\"===d.type,m=this.state.start;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind=\"method\",f)return void this.pushClassPrivateMethod(e,i,!1,!1);const n=this.isNonstaticConstructor(s);let o=!1;n&&(s.kind=\"constructor\",r.hadConstructor&&!this.hasPlugin(\"typescript\")&&this.raise(d.start,x.DuplicateConstructor),n&&this.hasPlugin(\"typescript\")&&t.override&&this.raise(d.start,x.OverrideOnConstructor),r.hadConstructor=!0,o=r.hadSuperClass),this.pushClassMethod(e,s,!1,!1,n,o)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(e,a):this.pushClassProperty(e,o);else if(!h||\"async\"!==d.name||u||this.isLineTerminator())if(!h||\"get\"!==d.name&&\"set\"!==d.name||u||this.match(p.star)&&this.isLineTerminator())this.isLineTerminator()?f?this.pushClassPrivateProperty(e,a):this.pushClassProperty(e,o):this.unexpected();else{l.kind=d.name;const t=this.match(p.privateName);this.parseClassElementName(s),t?this.pushClassPrivateMethod(e,i,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(s.key.start,x.ConstructorIsAccessor),this.pushClassMethod(e,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else{const t=this.eat(p.star);c.optional&&this.unexpected(m),l.kind=\"method\";const r=this.match(p.privateName);this.parseClassElementName(l),this.parsePostMemberNameModifiers(c),r?this.pushClassPrivateMethod(e,i,t,!0):(this.isNonstaticConstructor(s)&&this.raise(s.key.start,x.ConstructorIsAsync),this.pushClassMethod(e,s,t,!0,!1,!1))}}parseClassElementName(e){const{type:t,value:r,start:n}=this.state;return t!==p.name&&t!==p.string||!e.static||\"prototype\"!==r||this.raise(n,x.StaticPrototype),t===p.privateName&&\"constructor\"===r&&this.raise(n,x.ConstructorClassPrivateField),this.parsePropertyName(e,!0)}parseClassStaticBlock(e,t){var r;this.expectPlugin(\"classStaticBlock\",t.start),this.scope.enter(208);const n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const s=t.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,p.braceR),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,e.body.push(this.finishNode(t,\"StaticBlock\")),null!=(r=t.decorators)&&r.length&&this.raise(t.start,x.DecoratorStaticBlock)}pushClassProperty(e,t){t.computed||\"constructor\"!==t.key.name&&\"constructor\"!==t.key.value||this.raise(t.key.start,x.ConstructorClassField),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){const r=this.parseClassPrivateProperty(t);e.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.start)}pushClassMethod(e,t,r,n,s,i){e.body.push(this.parseMethod(t,r,n,s,i,\"ClassMethod\",!0))}pushClassPrivateMethod(e,t,r,n){const s=this.parseMethod(t,r,n,!1,!1,\"ClassPrivateMethod\",!0);e.body.push(s);const i=\"get\"===s.kind?s.static?6:2:\"set\"===s.kind?s.static?5:1:0;this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),i,s.key.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,\"ClassPrivateProperty\")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,\"ClassProperty\")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(je()),this.prodParam.enter(0),e.value=this.eat(p.eq)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,n=139){this.match(p.name)?(e.id=this.parseIdentifier(),t&&this.checkLVal(e.id,\"class name\",n)):r||!t?e.id=null:this.unexpected(null,x.MissingClassName)}parseClassSuper(e){e.superClass=this.eat(p._extends)?this.parseExprSubscripts():null}parseExport(e){const t=this.maybeParseExportDefaultSpecifier(e),r=!t||this.eat(p.comma),n=r&&this.eatExportStar(e),s=n&&this.maybeParseExportNamespaceSpecifier(e),i=r&&(!s||this.eat(p.comma)),o=t||n;if(n&&!s)return t&&this.unexpected(),this.parseExportFrom(e,!0),this.finishNode(e,\"ExportAllDeclaration\");const a=this.maybeParseExportNamedSpecifiers(e);if(t&&r&&!n&&!a||s&&i&&!a)throw this.unexpected(null,p.braceL);let l;if(o||a?(l=!1,this.parseExportFrom(e,o)):l=this.maybeParseExportDeclaration(e),o||a||l)return this.checkExport(e,!0,!1,!!e.source),this.finishNode(e,\"ExportNamedDeclaration\");if(this.eat(p._default))return e.declaration=this.parseExportDefaultExpression(),this.checkExport(e,!0,!0),this.finishNode(e,\"ExportDefaultDeclaration\");throw this.unexpected(null,p.braceL)}eatExportStar(e){return this.eat(p.star)}maybeParseExportDefaultSpecifier(e){if(this.isExportDefaultSpecifier()){this.expectPlugin(\"exportDefaultFrom\");const t=this.startNode();return t.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(t,\"ExportDefaultSpecifier\")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(\"as\")){e.specifiers||(e.specifiers=[]);const t=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,\"ExportNamespaceSpecifier\")),!0}return!1}maybeParseExportNamedSpecifiers(e){return!!this.match(p.braceL)&&(e.specifiers||(e.specifiers=[]),e.specifiers.push(...this.parseExportSpecifiers()),e.source=null,e.declaration=null,!0)}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(\"async\"))return!1;const e=this.nextTokenStart();return!f.test(this.input.slice(this.state.pos,e))&&this.isUnparsedContextual(e,\"function\")}parseExportDefaultExpression(){const e=this.startNode(),t=this.isAsyncFunction();if(this.match(p._function)||t)return this.next(),t&&this.next(),this.parseFunction(e,5,t);if(this.match(p._class))return this.parseClass(e,!0,!0);if(this.match(p.at))return this.hasPlugin(\"decorators\")&&this.getPluginOption(\"decorators\",\"decoratorsBeforeExport\")&&this.raise(this.state.start,x.DecoratorBeforeExport),this.parseDecorators(!1),this.parseClass(e,!0,!0);if(this.match(p._const)||this.match(p._var)||this.isLet())throw this.raise(this.state.start,x.UnsupportedDefaultExport);{const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}}parseExportDeclaration(e){return this.parseStatement(null)}isExportDefaultSpecifier(){if(this.match(p.name)){const e=this.state.value;if(\"async\"===e&&!this.state.containsEsc||\"let\"===e)return!1;if((\"type\"===e||\"interface\"===e)&&!this.state.containsEsc){const e=this.lookahead();if(e.type===p.name&&\"from\"!==e.value||e.type===p.braceL)return this.expectOnePlugin([\"flow\",\"typescript\"]),!1}}else if(!this.match(p._default))return!1;const e=this.nextTokenStart(),t=this.isUnparsedContextual(e,\"from\");if(44===this.input.charCodeAt(e)||this.match(p.name)&&t)return!0;if(this.match(p._default)&&t){const t=this.input.charCodeAt(this.nextTokenStartSince(e+4));return 34===t||39===t}return!1}parseExportFrom(e,t){if(this.eatContextual(\"from\")){e.source=this.parseImportSource(),this.checkExport(e);const t=this.maybeParseImportAssertions();t&&(e.assertions=t)}else t?this.unexpected():e.source=null;this.semicolon()}shouldParseExportDeclaration(){if(this.match(p.at)&&(this.expectOnePlugin([\"decorators\",\"decorators-legacy\"]),this.hasPlugin(\"decorators\"))){if(!this.getPluginOption(\"decorators\",\"decoratorsBeforeExport\"))return!0;this.unexpected(this.state.start,x.DecoratorBeforeExport)}return\"var\"===this.state.type.keyword||\"const\"===this.state.type.keyword||\"function\"===this.state.type.keyword||\"class\"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){if(t)if(r){if(this.checkDuplicateExports(e,\"default\"),this.hasPlugin(\"exportDefaultFrom\")){var s;const t=e.declaration;\"Identifier\"!==t.type||\"from\"!==t.name||t.end-t.start!=4||null!=(s=t.extra)&&s.parenthesized||this.raise(t.start,x.ExportDefaultFromAsIdentifier)}}else if(e.specifiers&&e.specifiers.length)for(const t of e.specifiers){const{exported:e}=t,r=\"Identifier\"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,r),!n&&t.local){const{local:e}=t;\"Identifier\"!==e.type?this.raise(t.start,x.ExportBindingIsString,e.value,r):(this.checkReservedWord(e.name,e.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration)if(\"FunctionDeclaration\"===e.declaration.type||\"ClassDeclaration\"===e.declaration.type){const t=e.declaration.id;if(!t)throw new Error(\"Assertion failure\");this.checkDuplicateExports(e,t.name)}else if(\"VariableDeclaration\"===e.declaration.type)for(const t of e.declaration.declarations)this.checkDeclaration(t.id);if(this.state.decoratorStack[this.state.decoratorStack.length-1].length)throw this.raise(e.start,x.UnsupportedDecoratorExport)}checkDeclaration(e){if(\"Identifier\"===e.type)this.checkDuplicateExports(e,e.name);else if(\"ObjectPattern\"===e.type)for(const t of e.properties)this.checkDeclaration(t);else if(\"ArrayPattern\"===e.type)for(const t of e.elements)t&&this.checkDeclaration(t);else\"ObjectProperty\"===e.type?this.checkDeclaration(e.value):\"RestElement\"===e.type?this.checkDeclaration(e.argument):\"AssignmentPattern\"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&this.raise(e.start,\"default\"===t?x.DuplicateDefaultExport:x.DuplicateExport,t),this.exportedIdentifiers.add(t)}parseExportSpecifiers(){const e=[];let t=!0;for(this.expect(p.braceL);!this.eat(p.braceR);){if(t)t=!1;else if(this.expect(p.comma),this.eat(p.braceR))break;const r=this.startNode();r.local=this.parseModuleExportName(),r.exported=this.eatContextual(\"as\")?this.parseModuleExportName():r.local.__clone(),e.push(this.finishNode(r,\"ExportSpecifier\"))}return e}parseModuleExportName(){if(this.match(p.string)){const e=this.parseStringLiteral(this.state.value),t=e.value.match(Fe);return t&&this.raise(e.start,x.ModuleExportNameHasLoneSurrogate,t[0].charCodeAt(0).toString(16)),e}return this.parseIdentifier(!0)}parseImport(e){if(e.specifiers=[],!this.match(p.string)){const t=!this.maybeParseDefaultImportSpecifier(e)||this.eat(p.comma),r=t&&this.maybeParseStarImportSpecifier(e);t&&!r&&this.parseNamedImportSpecifiers(e),this.expectContextual(\"from\")}e.source=this.parseImportSource();const t=this.maybeParseImportAssertions();if(t)e.assertions=t;else{const t=this.maybeParseModuleAttributes();t&&(e.attributes=t)}return this.semicolon(),this.finishNode(e,\"ImportDeclaration\")}parseImportSource(){return this.match(p.string)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(e){return this.match(p.name)}parseImportSpecifierLocal(e,t,r,n){t.local=this.parseIdentifier(),this.checkLVal(t.local,n,9),e.specifiers.push(this.finishNode(t,r))}parseAssertEntries(){const e=[],t=new Set;do{if(this.match(p.braceR))break;const r=this.startNode(),n=this.state.value;if(t.has(n)&&this.raise(this.state.start,x.ModuleAttributesWithDuplicateKeys,n),t.add(n),this.match(p.string)?r.key=this.parseStringLiteral(n):r.key=this.parseIdentifier(!0),this.expect(p.colon),!this.match(p.string))throw this.unexpected(this.state.start,x.ModuleAttributeInvalidValue);r.value=this.parseStringLiteral(this.state.value),this.finishNode(r,\"ImportAttribute\"),e.push(r)}while(this.eat(p.comma));return e}maybeParseModuleAttributes(){if(!this.match(p._with)||this.hasPrecedingLineBreak())return this.hasPlugin(\"moduleAttributes\")?[]:null;this.expectPlugin(\"moduleAttributes\"),this.next();const e=[],t=new Set;do{const r=this.startNode();if(r.key=this.parseIdentifier(!0),\"type\"!==r.key.name&&this.raise(r.key.start,x.ModuleAttributeDifferentFromType,r.key.name),t.has(r.key.name)&&this.raise(r.key.start,x.ModuleAttributesWithDuplicateKeys,r.key.name),t.add(r.key.name),this.expect(p.colon),!this.match(p.string))throw this.unexpected(this.state.start,x.ModuleAttributeInvalidValue);r.value=this.parseStringLiteral(this.state.value),this.finishNode(r,\"ImportAttribute\"),e.push(r)}while(this.eat(p.comma));return e}maybeParseImportAssertions(){if(!this.isContextual(\"assert\")||this.hasPrecedingLineBreak())return this.hasPlugin(\"importAssertions\")?[]:null;this.expectPlugin(\"importAssertions\"),this.next(),this.eat(p.braceL);const e=this.parseAssertEntries();return this.eat(p.braceR),e}maybeParseDefaultImportSpecifier(e){return!!this.shouldParseDefaultImport(e)&&(this.parseImportSpecifierLocal(e,this.startNode(),\"ImportDefaultSpecifier\",\"default import specifier\"),!0)}maybeParseStarImportSpecifier(e){if(this.match(p.star)){const t=this.startNode();return this.next(),this.expectContextual(\"as\"),this.parseImportSpecifierLocal(e,t,\"ImportNamespaceSpecifier\",\"import namespace specifier\"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(p.braceL);!this.eat(p.braceR);){if(t)t=!1;else{if(this.eat(p.colon))throw this.raise(this.state.start,x.DestructureNamedImport);if(this.expect(p.comma),this.eat(p.braceR))break}this.parseImportSpecifier(e)}}parseImportSpecifier(e){const t=this.startNode(),r=this.match(p.string);if(t.imported=this.parseModuleExportName(),this.eatContextual(\"as\"))t.local=this.parseIdentifier();else{const{imported:e}=t;if(r)throw this.raise(t.start,x.ImportBindingIsString,e.value);this.checkReservedWord(e.name,t.start,!0,!0),t.local=e.__clone()}this.checkLVal(t.local,\"import specifier\",9),e.specifiers.push(this.finishNode(t,\"ImportSpecifier\"))}isThisParam(e){return\"Identifier\"===e.type&&\"this\"===e.name}}{constructor(e,t){super(e=function(e){const t={};for(const r of Object.keys(Se))t[r]=e&&null!=e[r]?e[r]:Se[r];return t}(e),t),this.options=e,this.initializeScopes(),this.plugins=function(e){const t=new Map;for(const r of e){const[e,n]=Array.isArray(r)?r:[r,{}];t.has(e)||t.set(e,n||{})}return t}(this.options.plugins),this.filename=e.sourceFilename}getScopeHandler(){return K}parse(){this.enterInitialScopes();const e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e}}function qe(e,t){let r=$e;return null!=e&&e.plugins&&(function(e){if(ye(e,\"decorators\")){if(ye(e,\"decorators-legacy\"))throw new Error(\"Cannot use the decorators and decorators-legacy plugin together\");const t=ge(e,\"decorators\",\"decoratorsBeforeExport\");if(null==t)throw new Error(\"The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.\");if(\"boolean\"!=typeof t)throw new Error(\"'decoratorsBeforeExport' must be a boolean.\")}if(ye(e,\"flow\")&&ye(e,\"typescript\"))throw new Error(\"Cannot combine flow and typescript plugins.\");if(ye(e,\"placeholders\")&&ye(e,\"v8intrinsic\"))throw new Error(\"Cannot combine placeholders and v8intrinsic plugins.\");if(ye(e,\"pipelineOperator\")&&!be.includes(ge(e,\"pipelineOperator\",\"proposal\")))throw new Error(\"'pipelineOperator' requires 'proposal' option whose value should be one of: \"+be.map((e=>`'${e}'`)).join(\", \"));if(ye(e,\"moduleAttributes\")){if(ye(e,\"importAssertions\"))throw new Error(\"Cannot combine importAssertions and moduleAttributes plugins.\");if(\"may-2020\"!==ge(e,\"moduleAttributes\",\"version\"))throw new Error(\"The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.\")}if(ye(e,\"recordAndTuple\")&&!ve.includes(ge(e,\"recordAndTuple\",\"syntaxType\")))throw new Error(\"'recordAndTuple' requires 'syntaxType' option whose value should be one of: \"+ve.map((e=>`'${e}'`)).join(\", \"));if(ye(e,\"asyncDoExpressions\")&&!ye(e,\"doExpressions\")){const e=new Error(\"'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.\");throw e.missingPlugins=\"doExpressions\",e}}(e.plugins),r=function(e){const t=xe.filter((t=>ye(e,t))),r=t.join(\"/\");let n=Ve[r];if(!n){n=$e;for(const e of t)n=Ee[e](n);Ve[r]=n}return n}(e.plugins)),new r(e,t)}const Ve={};t.parse=function(e,t){var r;if(\"unambiguous\"!==(null==(r=t)?void 0:r.sourceType))return qe(t,e).parse();t=Object.assign({},t);try{t.sourceType=\"module\";const r=qe(t,e),n=r.parse();if(r.sawUnambiguousESM)return n;if(r.ambiguousScriptDifferentAst)try{return t.sourceType=\"script\",qe(t,e).parse()}catch(e){}else n.program.sourceType=\"script\";return n}catch(r){try{return t.sourceType=\"script\",qe(t,e).parse()}catch(e){}throw r}},t.parseExpression=function(e,t){const r=qe(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()},t.tokTypes=p},(e,t,r)=>{const n=r(23);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r(41).SEMVER_SPEC_VERSION,SemVer:r(3),compareIdentifiers:r(94).compareIdentifiers,rcompareIdentifiers:r(94).rcompareIdentifiers,parse:r(29),valid:r(261),clean:r(262),inc:r(263),diff:r(264),major:r(265),minor:r(266),patch:r(267),prerelease:r(268),compare:r(12),rcompare:r(269),compareLoose:r(270),compareBuild:r(72),sort:r(271),rsort:r(272),gt:r(44),lt:r(73),eq:r(71),neq:r(147),gte:r(74),lte:r(75),cmp:r(148),coerce:r(273),Comparator:r(45),Range:r(13),satisfies:r(46),toComparators:r(276),maxSatisfying:r(277),minSatisfying:r(278),minVersion:r(279),validRange:r(280),outside:r(76),gtr:r(281),ltr:r(282),intersects:r(283),simplifyRange:r(284),subset:r(285)}},(e,t,r)=>{const{MAX_LENGTH:n}=r(41),{re:s,t:i}=r(23),o=r(3),a=r(43);e.exports=(e,t)=>{if(t=a(t),e instanceof o)return e;if(\"string\"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?s[i.LOOSE]:s[i.FULL]).test(e))return null;try{return new o(e,t)}catch(e){return null}}},(e,t,r)=>{\"use strict\";var n=r(7);function s(e){return(s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}var i,o,a=r(240).codes,l=a.ERR_AMBIGUOUS_ARGUMENT,c=a.ERR_INVALID_ARG_TYPE,u=a.ERR_INVALID_ARG_VALUE,p=a.ERR_INVALID_RETURN_VALUE,f=a.ERR_MISSING_ARGS,d=r(249),h=r(36).inspect,m=r(36).types,y=m.isPromise,g=m.isRegExp,b=Object.assign?Object.assign:r(250).assign,v=Object.is?Object.is:r(140);function E(){var e=r(254);i=e.isDeepEqual,o=e.isDeepStrictEqual}new Map;var x=!1,S=e.exports=A,T={};function w(e){if(e.message instanceof Error)throw e.message;throw new d(e)}function P(e,t,r,n){if(!r){var s=!1;if(0===t)s=!0,n=\"No value argument passed to `assert.ok()`\";else if(n instanceof Error)throw n;var i=new d({actual:r,expected:!0,message:n,operator:\"==\",stackStartFn:e});throw i.generatedMessage=s,i}}function A(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];P.apply(void 0,[A,t.length].concat(t))}S.fail=function e(t,r,s,i,o){var a,l=arguments.length;if(0===l)a=\"Failed\";else if(1===l)s=t,t=void 0;else{if(!1===x){x=!0;var c=n.emitWarning?n.emitWarning:void 0;c(\"assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.\",\"DeprecationWarning\",\"DEP0094\")}2===l&&(i=\"!=\")}if(s instanceof Error)throw s;var u={actual:t,expected:r,operator:void 0===i?\"fail\":i,stackStartFn:o||e};void 0!==s&&(u.message=s);var p=new d(u);throw a&&(p.message=a,p.generatedMessage=!0),p},S.AssertionError=d,S.ok=A,S.equal=function e(t,r,n){if(arguments.length<2)throw new f(\"actual\",\"expected\");t!=r&&w({actual:t,expected:r,message:n,operator:\"==\",stackStartFn:e})},S.notEqual=function e(t,r,n){if(arguments.length<2)throw new f(\"actual\",\"expected\");t==r&&w({actual:t,expected:r,message:n,operator:\"!=\",stackStartFn:e})},S.deepEqual=function e(t,r,n){if(arguments.length<2)throw new f(\"actual\",\"expected\");void 0===i&&E(),i(t,r)||w({actual:t,expected:r,message:n,operator:\"deepEqual\",stackStartFn:e})},S.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new f(\"actual\",\"expected\");void 0===i&&E(),i(t,r)&&w({actual:t,expected:r,message:n,operator:\"notDeepEqual\",stackStartFn:e})},S.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f(\"actual\",\"expected\");void 0===i&&E(),o(t,r)||w({actual:t,expected:r,message:n,operator:\"deepStrictEqual\",stackStartFn:e})},S.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f(\"actual\",\"expected\");void 0===i&&E(),o(t,r)&&w({actual:t,expected:r,message:n,operator:\"notDeepStrictEqual\",stackStartFn:e})},S.strictEqual=function e(t,r,n){if(arguments.length<2)throw new f(\"actual\",\"expected\");v(t,r)||w({actual:t,expected:r,message:n,operator:\"strictEqual\",stackStartFn:e})},S.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f(\"actual\",\"expected\");v(t,r)&&w({actual:t,expected:r,message:n,operator:\"notStrictEqual\",stackStartFn:e})};var O=function e(t,r,n){var s=this;!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&\"string\"==typeof n[e]&&g(t[e])&&t[e].test(n[e])?s[e]=n[e]:s[e]=t[e])}))};function C(e,t,r,n,s,i){if(!(r in e)||!o(e[r],t[r])){if(!n){var a=new O(e,s),l=new O(t,s,e),c=new d({actual:a,expected:l,operator:\"deepStrictEqual\",stackStartFn:i});throw c.actual=e,c.expected=t,c.operator=i.name,c}w({actual:e,expected:t,message:n,operator:i.name,stackStartFn:i})}}function I(e,t,r,n){if(\"function\"!=typeof t){if(g(t))return t.test(e);if(2===arguments.length)throw new c(\"expected\",[\"Function\",\"RegExp\"],t);if(\"object\"!==s(e)||null===e){var o=new d({actual:e,expected:t,message:r,operator:\"deepStrictEqual\",stackStartFn:n});throw o.operator=n.name,o}var a=Object.keys(t);if(t instanceof Error)a.push(\"name\",\"message\");else if(0===a.length)throw new u(\"error\",t,\"may not be an empty object\");return void 0===i&&E(),a.forEach((function(s){\"string\"==typeof e[s]&&g(t[s])&&t[s].test(e[s])||C(e,t,s,r,a,n)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function k(e){if(\"function\"!=typeof e)throw new c(\"fn\",\"Function\",e);try{e()}catch(e){return e}return T}function N(e){return y(e)||null!==e&&\"object\"===s(e)&&\"function\"==typeof e.then&&\"function\"==typeof e.catch}function _(e){return Promise.resolve().then((function(){var t;if(\"function\"==typeof e){if(!N(t=e()))throw new p(\"instance of Promise\",\"promiseFn\",t)}else{if(!N(e))throw new c(\"promiseFn\",[\"Function\",\"Promise\"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return T})).catch((function(e){return e}))}))}function j(e,t,r,n){if(\"string\"==typeof r){if(4===arguments.length)throw new c(\"error\",[\"Object\",\"Error\",\"Function\",\"RegExp\"],r);if(\"object\"===s(t)&&null!==t){if(t.message===r)throw new l(\"error/message\",'The error message \"'.concat(t.message,'\" is identical to the message.'))}else if(t===r)throw new l(\"error/message\",'The error \"'.concat(t,'\" is identical to the message.'));n=r,r=void 0}else if(null!=r&&\"object\"!==s(r)&&\"function\"!=typeof r)throw new c(\"error\",[\"Object\",\"Error\",\"Function\",\"RegExp\"],r);if(t===T){var i=\"\";r&&r.name&&(i+=\" (\".concat(r.name,\")\")),i+=n?\": \".concat(n):\".\";var o=\"rejects\"===e.name?\"rejection\":\"exception\";w({actual:void 0,expected:r,operator:e.name,message:\"Missing expected \".concat(o).concat(i),stackStartFn:e})}if(r&&!I(t,r,n,e))throw t}function D(e,t,r,n){if(t!==T){if(\"string\"==typeof r&&(n=r,r=void 0),!r||I(t,r)){var s=n?\": \".concat(n):\".\",i=\"doesNotReject\"===e.name?\"rejection\":\"exception\";w({actual:t,expected:r,operator:e.name,message:\"Got unwanted \".concat(i).concat(s,\"\\n\")+'Actual message: \"'.concat(t&&t.message,'\"'),stackStartFn:e})}throw t}}function L(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];P.apply(void 0,[L,t.length].concat(t))}S.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];j.apply(void 0,[e,k(t)].concat(n))},S.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return _(t).then((function(t){return j.apply(void 0,[e,t].concat(n))}))},S.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];D.apply(void 0,[e,k(t)].concat(n))},S.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return _(t).then((function(t){return D.apply(void 0,[e,t].concat(n))}))},S.ifError=function e(t){if(null!=t){var r=\"ifError got unwanted exception: \";\"object\"===s(t)&&\"string\"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=h(t);var n=new d({actual:t,expected:null,operator:\"ifError\",message:r,stackStartFn:e}),i=t.stack;if(\"string\"==typeof i){var o=i.split(\"\\n\");o.shift();for(var a=n.stack.split(\"\\n\"),l=0;l<o.length;l++){var c=a.indexOf(o[l]);if(-1!==c){a=a.slice(0,c);break}}n.stack=\"\".concat(a.join(\"\\n\"),\"\\n\").concat(o.join(\"\\n\"))}throw n}},S.strict=b(L,S,{equal:S.strictEqual,deepEqual:S.deepStrictEqual,notEqual:S.notStrictEqual,notDeepEqual:S.notDeepStrictEqual}),S.strict.strict=S.strict},(e,t,r)=>{var n=r(16);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},(e,t,r)=>{var n=r(31),s=r(112),i=r(116);e.exports=n?function(e,t,r){return s.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(59);e.exports=n(\"navigator\",\"userAgent\")||\"\"},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.clear=function(){s(),i()},t.clearPath=s,t.clearScope=i,t.scope=t.path=void 0;let r=new WeakMap;t.path=r;let n=new WeakMap;function s(){t.path=r=new WeakMap}function i(){t.scope=n=new WeakMap}t.scope=n},(e,t,r)=>{\"use strict\";let n,s,i=r(22);class o extends i{constructor(e){super(e),this.type=\"root\",this.nodes||(this.nodes=[])}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}normalize(e,t,r){let n=super.normalize(e);if(t)if(\"prepend\"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}toResult(e={}){return new n(new s,this,e).stringify()}}o.registerLazyResult=e=>{n=e},o.registerProcessor=e=>{s=e},e.exports=o,o.default=o},(e,t,r)=>{var n=r(7),s=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(\" \")}r=1;for(var n=arguments,s=n.length,o=String(e).replace(i,(function(e){if(\"%%\"===e)return\"%\";if(r>=s)return e;switch(e){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(e){return\"[Circular]\"}default:return e}})),a=n[r];r<s;a=n[++r])y(a)||!x(a)?o+=\" \"+a:o+=\" \"+l(a);return o},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var s=!1;return function(){if(!s){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation,s=!0}return e.apply(this,arguments)}};var o={},a=/^$/;function l(e,r){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),p(n,e,n.depth)}function c(e,t){var r=l.styles[t];return r?\"\u001b[\"+l.colors[r][0]+\"m\"+e+\"\u001b[\"+l.colors[r][1]+\"m\":e}function u(e,t){return e}function p(e,r,n){if(e.customInspect&&r&&w(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var s=r.inspect(n,e);return b(s)||(s=p(e,s,n)),s}var i=function(e,t){if(v(t))return e.stylize(\"undefined\",\"undefined\");if(b(t)){var r=\"'\"+JSON.stringify(t).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(r,\"string\")}return g(t)?e.stylize(\"\"+t,\"number\"):m(t)?e.stylize(\"\"+t,\"boolean\"):y(t)?e.stylize(\"null\",\"null\"):void 0}(e,r);if(i)return i;var o=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),T(r)&&(o.indexOf(\"message\")>=0||o.indexOf(\"description\")>=0))return f(r);if(0===o.length){if(w(r)){var l=r.name?\": \"+r.name:\"\";return e.stylize(\"[Function\"+l+\"]\",\"special\")}if(E(r))return e.stylize(RegExp.prototype.toString.call(r),\"regexp\");if(S(r))return e.stylize(Date.prototype.toString.call(r),\"date\");if(T(r))return f(r)}var c,u=\"\",x=!1,P=[\"{\",\"}\"];return h(r)&&(x=!0,P=[\"[\",\"]\"]),w(r)&&(u=\" [Function\"+(r.name?\": \"+r.name:\"\")+\"]\"),E(r)&&(u=\" \"+RegExp.prototype.toString.call(r)),S(r)&&(u=\" \"+Date.prototype.toUTCString.call(r)),T(r)&&(u=\" \"+f(r)),0!==o.length||x&&0!=r.length?n<0?E(r)?e.stylize(RegExp.prototype.toString.call(r),\"regexp\"):e.stylize(\"[Object]\",\"special\"):(e.seen.push(r),c=x?function(e,t,r,n,s){for(var i=[],o=0,a=t.length;o<a;++o)A(t,String(o))?i.push(d(e,t,r,n,String(o),!0)):i.push(\"\");return s.forEach((function(s){s.match(/^\\d+$/)||i.push(d(e,t,r,n,s,!0))})),i}(e,r,n,a,o):o.map((function(t){return d(e,r,n,a,t,x)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf(\"\\n\"),e+t.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1}),0)>60?r[0]+(\"\"===t?\"\":t+\"\\n \")+\" \"+e.join(\",\\n  \")+\" \"+r[1]:r[0]+t+\" \"+e.join(\", \")+\" \"+r[1]}(c,u,P)):P[0]+u+P[1]}function f(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function d(e,t,r,n,s,i){var o,a,l;if((l=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=l.set?e.stylize(\"[Getter/Setter]\",\"special\"):e.stylize(\"[Getter]\",\"special\"):l.set&&(a=e.stylize(\"[Setter]\",\"special\")),A(n,s)||(o=\"[\"+s+\"]\"),a||(e.seen.indexOf(l.value)<0?(a=y(r)?p(e,l.value,null):p(e,l.value,r-1)).indexOf(\"\\n\")>-1&&(a=i?a.split(\"\\n\").map((function(e){return\"  \"+e})).join(\"\\n\").substr(2):\"\\n\"+a.split(\"\\n\").map((function(e){return\"   \"+e})).join(\"\\n\")):a=e.stylize(\"[Circular]\",\"special\")),v(o)){if(i&&s.match(/^\\d+$/))return a;(o=JSON.stringify(\"\"+s)).match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,\"name\")):(o=o.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),o=e.stylize(o,\"string\"))}return o+\": \"+a}function h(e){return Array.isArray(e)}function m(e){return\"boolean\"==typeof e}function y(e){return null===e}function g(e){return\"number\"==typeof e}function b(e){return\"string\"==typeof e}function v(e){return void 0===e}function E(e){return x(e)&&\"[object RegExp]\"===P(e)}function x(e){return\"object\"==typeof e&&null!==e}function S(e){return x(e)&&\"[object Date]\"===P(e)}function T(e){return x(e)&&(\"[object Error]\"===P(e)||e instanceof Error)}function w(e){return\"function\"==typeof e}function P(e){return Object.prototype.toString.call(e)}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.debuglog=function(e){return e=e.toUpperCase(),o[e]||(a.test(e)?(n.pid,o[e]=function(){t.format.apply(t,arguments)}):o[e]=function(){}),o[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"},t.types=r(241),t.isArray=h,t.isBoolean=m,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=b,t.isSymbol=function(e){return\"symbol\"==typeof e},t.isUndefined=v,t.isRegExp=E,t.types.isRegExp=E,t.isObject=x,t.isDate=S,t.types.isDate=S,t.isError=T,t.types.isNativeError=T,t.isFunction=w,t.isPrimitive=function(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||void 0===e},t.isBuffer=r(248),t.log=function(){},t.inherits=r(171),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var O=\"undefined\"!=typeof Symbol?Symbol(\"util.promisify.custom\"):void 0;function C(e,t){if(!e){var r=new Error(\"Promise was rejected with a falsy value\");r.reason=e,e=r}return t(e)}t.promisify=function(e){if(\"function\"!=typeof e)throw new TypeError('The \"original\" argument must be of type Function');if(O&&e[O]){var t;if(\"function\"!=typeof(t=e[O]))throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');return Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),s=[],i=0;i<arguments.length;i++)s.push(arguments[i]);s.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,s)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),O&&Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,s(e))},t.promisify.custom=O,t.callbackify=function(e){if(\"function\"!=typeof e)throw new TypeError('The \"original\" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var s=t.pop();if(\"function\"!=typeof s)throw new TypeError(\"The last argument must be of type Function\");var i=this,o=function(){return s.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(o.bind(null,null,e))}),(function(e){n.nextTick(C.bind(null,e,o))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,s(e)),t}},(e,t,r)=>{\"use strict\";\n  /*!\n   * The buffer module from node.js, for the browser.\n   *\n   * @author   Feross Aboukhadijeh <https://feross.org>\n   * @license  MIT\n   */const n=r(427),s=r(428),i=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return p(e)}return c(e,t,r)}function c(e,t,r){if(\"string\"==typeof e)return function(e,t){if(\"string\"==typeof t&&\"\"!==t||(t=\"utf8\"),!l.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const r=0|m(e,t);let n=a(r);const s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return d(e,t,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return d(e,t,r);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const s=function(e){if(l.isBuffer(e)){const t=0|h(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?\"number\"!=typeof e.length||X(e.length)?a(0):f(e):\"Buffer\"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(s)return s;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function u(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e<0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function p(e){return u(e),a(e<0?0:0|h(e))}function f(e){const t=e.length<0?0:0|h(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function h(e){if(e>=o)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+o.toString(16)+\" bytes\");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let s=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return G(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return H(e).length;default:if(s)return n?-1:G(e).length;t=(\"\"+t).toLowerCase(),s=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return k(this,t,r);case\"utf8\":case\"utf-8\":return A(this,t,r);case\"ascii\":return C(this,t,r);case\"latin1\":case\"binary\":return I(this,t,r);case\"base64\":return P(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return N(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,s){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if(\"string\"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,s);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,s);throw new TypeError(\"val must be string, number or Buffer\")}function v(e,t,r,n,s){let i,o=1,a=e.length,l=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){let n=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===l)return n*o}else-1!==n&&(i-=i-n),n=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){let r=!0;for(let n=0;n<l;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function E(e,t,r,n){r=Number(r)||0;const s=e.length-r;n?(n=Number(n))>s&&(n=s):n=s;const i=t.length;let o;for(n>i/2&&(n=i/2),o=0;o<n;++o){const n=parseInt(t.substr(2*o,2),16);if(X(n))return o;e[r+o]=n}return o}function x(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function S(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function T(e,t,r,n){return J(H(t),e,r,n)}function w(e,t,r,n){return J(function(e,t){let r,n,s;const i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,s=r%256,i.push(s),i.push(n);return i}(t,e.length-r),e,r,n)}function P(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);const n=[];let s=t;for(;s<r;){const t=e[s];let i=null,o=t>239?4:t>223?3:t>191?2:1;if(s+o<=r){let r,n,a,l;switch(o){case 1:t<128&&(i=t);break;case 2:r=e[s+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(i=l));break;case 3:r=e[s+1],n=e[s+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(i=l));break;case 4:r=e[s+1],n=e[s+2],a=e[s+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(i=l))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),s+=o}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=O));return r}(n)}t.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!l.TYPED_ARRAY_SUPPORT&&\"undefined\"!=typeof console&&console.error,Object.defineProperty(l.prototype,\"parent\",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,\"offset\",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?\"string\"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return p(e)},l.allocUnsafeSlow=function(e){return p(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let s=0,i=Math.min(r,n);s<i;++s)if(e[s]!==t[s]){r=e[s],n=t[s];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=l.allocUnsafe(t);let s=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))s+t.length>n.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,s)):Uint8Array.prototype.set.call(n,t,s);else{if(!l.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(n,s)}s+=t.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?\"\":0===arguments.length?A(this,0,e):y.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e=\"\";const r=t.INSPECT_MAX_BYTES;return e=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(e+=\" ... \"),\"<Buffer \"+e+\">\"},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,s){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError(\"out of range index\");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(s>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(i,o),c=this.slice(n,s),u=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==u[e]){i=c[e],o=u[e];break}return i<o?-1:o<i?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}const s=this.length-t;if((void 0===r||r>s)&&(r=s),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let i=!1;for(;;)switch(n){case\"hex\":return E(this,e,t,r);case\"utf8\":case\"utf-8\":return x(this,e,t,r);case\"ascii\":case\"latin1\":case\"binary\":return S(this,e,t,r);case\"base64\":return T(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return w(this,e,t,r);default:if(i)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function C(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let s=t;s<r;++s)n+=String.fromCharCode(127&e[s]);return n}function I(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let s=t;s<r;++s)n+=String.fromCharCode(e[s]);return n}function k(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let s=\"\";for(let n=t;n<r;++n)s+=z[e[n]];return s}function N(e,t,r){const n=e.slice(t,r);let s=\"\";for(let e=0;e<n.length-1;e+=2)s+=String.fromCharCode(n[e]+256*n[e+1]);return s}function _(e,t,r){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function j(e,t,r,n,s,i){if(!l.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>s||t<i)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function D(e,t,r,n,s){q(t,n,s,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function L(e,t,r,n,s){q(t,n,s,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function M(e,t,r,n,s,i){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function B(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,0,r,4),s.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,0,r,8),s.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let n=this[e],s=1,i=0;for(;++i<t&&(s*=256);)n+=this[e+i]*s;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let n=this[e+--t],s=1;for(;t>0&&(s*=256);)n+=this[e+--t]*s;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||_(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){V(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,s=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(s)<<BigInt(32))})),l.prototype.readBigUInt64BE=Q((function(e){V(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],s=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(s)})),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let n=this[e],s=1,i=0;for(;++i<t&&(s*=256);)n+=this[e+i]*s;return s*=128,n>=s&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let n=t,s=1,i=this[e+--n];for(;n>0&&(s*=256);)i+=this[e+--n]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||_(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||_(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||_(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){V(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Q((function(e){V(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||_(e,4,this.length),s.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||_(e,4,this.length),s.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||_(e,8,this.length),s.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||_(e,8,this.length),s.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let s=1,i=0;for(this[t]=255&e;++i<r&&(s*=256);)this[t+i]=e/s&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let s=r-1,i=1;for(this[t+s]=255&e;--s>=0&&(i*=256);)this[t+s]=e/i&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return D(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let s=0,i=1,o=0;for(this[t]=255&e;++s<r&&(i*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let s=r-1,i=1,o=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e,t=0){return D(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),l.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const s=n-r;return this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),s},l.prototype.fill=function(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!l.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){const t=e.charCodeAt(0);(\"utf8\"===n&&t<128||\"latin1\"===n)&&(e=t)}}else\"number\"==typeof e?e&=255:\"boolean\"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError(\"Out of range index\");if(r<=t)return this;let s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(s=t;s<r;++s)this[s]=e;else{const i=l.isBuffer(e)?e:l.from(e,n),o=i.length;if(0===o)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(s=0;s<r-t;++s)this[s+t]=i[s%o]}return this};const F={};function U(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t=\"\",r=e.length;const n=\"-\"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function q(e,t,r,n,s,i){if(e>r||e<t){const n=\"bigint\"==typeof t?\"n\":\"\";let s;throw s=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE(\"value\",s,e)}!function(e,t,r){V(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,s,i)}function V(e,t){if(\"number\"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function W(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new F.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${t}`,e)}U(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),U(\"ERR_INVALID_ARG_TYPE\",(function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`}),TypeError),U(\"ERR_OUT_OF_RANGE\",(function(e,t,r){let n=`The value of \"${e}\" is out of range.`,s=r;return Number.isInteger(r)&&Math.abs(r)>2**32?s=$(String(r)):\"bigint\"==typeof r&&(s=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(s=$(s)),s+=\"n\"),n+=` It must be ${t}. Received ${s}`,n}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let s=null;const i=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!s){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}s=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),s=r;continue}r=65536+(s-55296<<10|r-56320)}else s&&(t-=3)>-1&&i.push(239,191,189);if(s=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(e){return n.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(K,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function J(e,t,r,n){let s;for(s=0;s<n&&!(s+r>=t.length||s>=e.length);++s)t[s+r]=e[s];return s}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const z=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let s=0;s<16;++s)t[n+s]=e[r]+e[s]}return t}();function Q(e){return\"undefined\"==typeof BigInt?Z:e}function Z(){throw new Error(\"BigInt not supported\")}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t=!0){return\"string\"==typeof e&&((!t||!(0,n.isKeyword)(e)&&!(0,n.isStrictReservedWord)(e,!0))&&(0,n.isIdentifierName)(e))};var n=r(63)},(e,t,r)=>{\"use strict\";var n=r(7);Object.defineProperty(t,\"__esModule\",{value:!0}),t.codeFrameColumns=a,t.default=function(e,t,r,s={}){if(!i){i=!0;const e=\"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";n.emitWarning?n.emitWarning(e,\"DeprecationWarning\"):new Error(e).name=\"DeprecationWarning\"}return a(e,{start:{column:r=Math.max(r,0),line:t}},s)};var s=r(438);let i=!1;const o=/\\r\\n|[\\n\\r\\u2028\\u2029]/;function a(e,t,r={}){const n=(r.highlightCode||r.forceColor)&&(0,s.shouldHighlight)(r),i=(0,s.getChalk)(r),a=function(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}(i),l=(e,t)=>n?e(t):t,c=e.split(o),{start:u,end:p,markerLines:f}=function(e,t,r){const n=Object.assign({column:0,line:-1},e.start),s=Object.assign({},n,e.end),{linesAbove:i=2,linesBelow:o=3}=r||{},a=n.line,l=n.column,c=s.line,u=s.column;let p=Math.max(a-(i+1),0),f=Math.min(t.length,c+o);-1===a&&(p=0),-1===c&&(f=t.length);const d=c-a,h={};if(d)for(let e=0;e<=d;e++){const r=e+a;if(l)if(0===e){const e=t[r-1].length;h[r]=[l,e-l+1]}else if(e===d)h[r]=[0,u];else{const n=t[r-e].length;h[r]=[0,n]}else h[r]=!0}else h[a]=l===u?!l||[l,0]:[l,u-l];return{start:p,end:f,markerLines:h}}(t,c,r),d=t.start&&\"number\"==typeof t.start.column,h=String(p).length;let m=(n?(0,s.default)(e,r):e).split(o).slice(u,p).map(((e,t)=>{const n=u+1+t,s=` ${` ${n}`.slice(-h)} |`,i=f[n],o=!f[n+1];if(i){let t=\"\";if(Array.isArray(i)){const n=e.slice(0,Math.max(i[0]-1,0)).replace(/[^\\t]/g,\" \"),c=i[1]||1;t=[\"\\n \",l(a.gutter,s.replace(/\\d/g,\" \")),\" \",n,l(a.marker,\"^\").repeat(c)].join(\"\"),o&&r.message&&(t+=\" \"+l(a.message,r.message))}return[l(a.marker,\">\"),l(a.gutter,s),e.length>0?` ${e}`:\"\",t].join(\"\")}return` ${l(a.gutter,s)}${e.length>0?` ${e}`:\"\"}`})).join(\"\\n\");return r.message&&!d&&(m=`${\" \".repeat(h+1)}${r.message}\\n${m}`),n?i.reset(m):m}},(e,t,r)=>{\"use strict\";var n=r(251),s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol(\"foo\"),i=Object.prototype.toString,o=Array.prototype.concat,a=Object.defineProperty,l=a&&function(){var e={};try{for(var t in a(e,\"x\",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),c=function(e,t,r,n){var s;(!(t in e)||\"function\"==typeof(s=n)&&\"[object Function]\"===i.call(s)&&n())&&(l?a(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},u=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);s&&(i=o.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)c(e,i[a],t[i[a]],r[i[a]])};u.supportsDescriptors=!!l,e.exports=u},e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:\"2.0.0\",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},(e,t,r)=>{var n=r(7);const s=(\"object\"==typeof n&&n.env,()=>{});e.exports=s},e=>{const t=[\"includePrerelease\",\"loose\",\"rtl\"];e.exports=e=>e?\"object\"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},(e,t,r)=>{const n=r(12);e.exports=(e,t,r)=>n(e,t,r)>0},(e,t,r)=>{const n=Symbol(\"SemVer ANY\");class s{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}c(\"comparator\",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value=\"\":this.value=this.operator+this.semver.version,c(\"comp\",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:\"\",\"=\"===this.operator&&(this.operator=\"\"),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c(\"Comparator.test\",e,this.options.loose),this.semver===n||e===n)return!0;if(\"string\"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError(\"a Comparator is required\");if(t&&\"object\"==typeof t||(t={loose:!!t,includePrerelease:!1}),\"\"===this.operator)return\"\"===this.value||new p(e.value,t).test(this.value);if(\"\"===e.operator)return\"\"===e.value||new p(this.value,t).test(e.semver);const r=!(\">=\"!==this.operator&&\">\"!==this.operator||\">=\"!==e.operator&&\">\"!==e.operator),n=!(\"<=\"!==this.operator&&\"<\"!==this.operator||\"<=\"!==e.operator&&\"<\"!==e.operator),i=this.semver.version===e.semver.version,o=!(\">=\"!==this.operator&&\"<=\"!==this.operator||\">=\"!==e.operator&&\"<=\"!==e.operator),a=l(this.semver,\"<\",e.semver,t)&&(\">=\"===this.operator||\">\"===this.operator)&&(\"<=\"===e.operator||\"<\"===e.operator),c=l(this.semver,\">\",e.semver,t)&&(\"<=\"===this.operator||\"<\"===this.operator)&&(\">=\"===e.operator||\">\"===e.operator);return r||n||i&&o||a||c}}e.exports=s;const i=r(43),{re:o,t:a}=r(23),l=r(148),c=r(42),u=r(3),p=r(13)},(e,t,r)=>{const n=r(13);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},(e,t,r)=>{\"use strict\";let n=r(48);class s extends n{constructor(e){e&&void 0!==e.value&&\"string\"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type=\"decl\"}get variable(){return this.prop.startsWith(\"--\")||\"$\"===this.prop[0]}}e.exports=s,s.default=s},(e,t,r)=>{\"use strict\";let{isClean:n,my:s}=r(154),i=r(85),o=r(155),a=r(86);function l(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(\"proxyCache\"===n)continue;let s=e[n],i=typeof s;\"parent\"===n&&\"object\"===i?t&&(r[n]=t):\"source\"===n?r[n]=s:Array.isArray(s)?r[n]=s.map((e=>l(e,r))):(\"object\"===i&&null!==s&&(s=l(s)),r[n]=s)}return r}class c{constructor(e={}){this.raws={},this[n]=!1,this[s]=!0;for(let t in e)if(\"nodes\"===t){this.nodes=[];for(let r of e[t])\"function\"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}error(e,t={}){if(this.source){let r=this.positionBy(t);return this.source.input.error(e,r.line,r.column,t)}return new i(e)}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=a){e.stringify&&(e=e.stringify);let t=\"\";return e(this,(e=>{t+=e})),t}assign(e={}){for(let t in e)this[t]=e[t];return this}clone(e={}){let t=l(this);for(let r in e)t[r]=e[r];return t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&\"document\"!==e.parent.type;)e=e.parent;return e}raw(e,t){return(new o).raw(this,e,t)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if(\"parent\"===e||\"proxyCache\"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map((e=>\"object\"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if(\"object\"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if(\"source\"===e){let i=t.get(n.input);null==i&&(i=s,t.set(n.input,s),s++),r[e]={inputId:i,start:n.start,end:n.end}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}positionInside(e){let t=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let s=0;s<e;s++)\"\\n\"===t[s]?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r=this.toString().indexOf(e.word);-1!==r&&(t=this.positionInside(r))}return t}getProxyProcessor(){return{set:(e,t,r)=>(e[t]===r||(e[t]=r,\"prop\"!==t&&\"value\"!==t&&\"name\"!==t&&\"params\"!==t&&\"important\"!==t&&\"text\"!==t||e.markDirty()),!0),get:(e,t)=>\"proxyOf\"===t?e:\"root\"===t?()=>e.root().toProxy():e[t]}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\\n\\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\\n\\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[n]){this[n]=!1;let e=this;for(;e=e.parent;)e[n]=!1}}get proxyOf(){return this}}e.exports=c,c.default=c},(e,t,r)=>{\"use strict\";let n=r(48);class s extends n{constructor(e){super(e),this.type=\"comment\"}}e.exports=s,s.default=s},function(e,t,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return s(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.transformJSXSpreadAttribute=t.isConstant=t.dedupeProperties=t.isOn=t.buildIIFE=t.walksScope=t.transformJSXSpreadChild=t.transformJSXExpressionContainer=t.transformJSXText=t.getJSXAttributeName=t.getTag=t.transformJSXMemberExpression=t.checkIsComponent=t.shouldTransformedToSlots=t.isDirective=t.createIdentifier=t.KEEP_ALIVE=t.FRAGMENT=t.JSX_HELPER_KEY=void 0;const a=i(r(0)),l=o(r(532)),c=o(r(534));t.JSX_HELPER_KEY=\"JSX_HELPER_KEY\",t.FRAGMENT=\"Fragment\",t.KEEP_ALIVE=\"KeepAlive\",t.createIdentifier=(e,t)=>e.get(t)(),t.isDirective=e=>e.startsWith(\"v-\")||e.startsWith(\"v\")&&e.length>=2&&e[1]>=\"A\"&&e[1]<=\"Z\",t.shouldTransformedToSlots=e=>!(e.endsWith(t.FRAGMENT)||e===t.KEEP_ALIVE),t.checkIsComponent=e=>{const r=e.get(\"name\");if(r.isJSXMemberExpression())return t.shouldTransformedToSlots(r.node.property.name);const n=r.node.name;return t.shouldTransformedToSlots(n)&&!l.default.includes(n)&&!c.default.includes(n)},t.transformJSXMemberExpression=e=>{const r=e.node.object,n=e.node.property,s=a.isJSXMemberExpression(r)?t.transformJSXMemberExpression(e.get(\"object\")):a.isJSXIdentifier(r)?a.identifier(r.name):a.nullLiteral(),i=a.identifier(n.name);return a.memberExpression(s,i)},t.getTag=(e,r)=>{var n,s;const i=e.get(\"openingElement\").get(\"name\");if(i.isJSXIdentifier()){const{name:o}=i.node;return l.default.includes(o)||c.default.includes(o)?a.stringLiteral(o):o===t.FRAGMENT?t.createIdentifier(r,t.FRAGMENT):e.scope.hasBinding(o)?a.identifier(o):(null===(s=(n=r.opts).isCustomElement)||void 0===s?void 0:s.call(n,o))?a.stringLiteral(o):a.callExpression(t.createIdentifier(r,\"resolveComponent\"),[a.stringLiteral(o)])}if(i.isJSXMemberExpression())return t.transformJSXMemberExpression(i);throw new Error(`getTag: ${i.type} is not supported`)},t.getJSXAttributeName=e=>{const t=e.node.name;return a.isJSXIdentifier(t)?t.name:`${t.namespace.name}:${t.name.name}`},t.transformJSXText=e=>{const{node:t}=e,r=t.value.split(/\\r\\n|\\n|\\r/);let n=0;for(let e=0;e<r.length;e++)r[e].match(/[^ \\t]/)&&(n=e);let s=\"\";for(let e=0;e<r.length;e++){const t=r[e],i=0===e,o=e===r.length-1,a=e===n;let l=t.replace(/\\t/g,\" \");i||(l=l.replace(/^[ ]+/,\"\")),o||(l=l.replace(/[ ]+$/,\"\")),l&&(a||(l+=\" \"),s+=l)}return\"\"!==s?a.stringLiteral(s):null},t.transformJSXExpressionContainer=e=>e.get(\"expression\").node,t.transformJSXSpreadChild=e=>a.spreadElement(e.get(\"expression\").node),t.walksScope=(e,r,n)=>{e.scope.hasBinding(r)&&e.parentPath&&(a.isJSXElement(e.parentPath.node)&&e.parentPath.setData(\"slotFlag\",n),t.walksScope(e.parentPath,r,n))},t.buildIIFE=(e,t)=>{const{parentPath:r}=e;if(a.isAssignmentExpression(r)){const{left:n}=r.node;if(a.isIdentifier(n))return t.map((t=>{if(a.isIdentifier(t)&&t.name===n.name){const n=e.scope.generateUidIdentifier(t.name);return r.insertBefore(a.variableDeclaration(\"const\",[a.variableDeclarator(n,a.callExpression(a.functionExpression(null,[],a.blockStatement([a.returnStatement(t)])),[]))])),n}return t}))}return t};const u=/^on[^a-z]/;t.isOn=e=>u.test(e),t.dedupeProperties=(e=[],t)=>{if(!t)return e;const r=new Map,n=[];return e.forEach((e=>{if(a.isStringLiteral(e.key)){const{value:t}=e.key,s=r.get(t);s?(\"style\"===t||\"class\"===t||t.startsWith(\"on\"))&&((e,t)=>{a.isArrayExpression(e.value)?e.value.elements.push(t.value):e.value=a.arrayExpression([e.value,t.value])})(s,e):(r.set(t,e),n.push(e))}else n.push(e)})),n},t.isConstant=e=>{if(a.isIdentifier(e))return\"undefined\"===e.name;if(a.isArrayExpression(e)){const{elements:r}=e;return r.every((e=>e&&t.isConstant(e)))}return a.isObjectExpression(e)?e.properties.every((e=>t.isConstant(e.value))):!!a.isLiteral(e)},t.transformJSXSpreadAttribute=(e,r,n,s)=>{const i=r.get(\"argument\"),o=a.isObjectExpression(i.node)?i.node.properties:void 0;o?n?s.push(a.objectExpression(o)):s.push(...o):(i.isIdentifier()&&t.walksScope(e,i.node.name,2),s.push(n?i.node:a.spreadElement(i.node)))}},(e,t,r)=>{\"use strict\";var n=r(69),s=r(67),i=s(\"%Function.prototype.apply%\"),o=s(\"%Function.prototype.call%\"),a=s(\"%Reflect.apply%\",!0)||n.call(o,i),l=s(\"%Object.getOwnPropertyDescriptor%\",!0),c=s(\"%Object.defineProperty%\",!0),u=s(\"%Math.max%\");if(c)try{c({},\"a\",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,o,arguments);if(l&&c){var r=l(t,\"length\");r.configurable&&c(t,\"length\",{value:1+u(0,e.length-(arguments.length-1))})}return t};var p=function(){return a(n,i,arguments)};c?c(e.exports,\"apply\",{value:p}):e.exports.apply=p},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(15))&&n.__esModule?n:{default:n},i=function(e){if(e&&e.__esModule)return e;if(null===e||\"object\"!=typeof e&&\"function\"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=n?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}(r(5));function o(){if(\"function\"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).nodes||(r.nodes=[]),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,c(t,r);var s,o,u=n.prototype;return u.append=function(e){return e.parent=this,this.nodes.push(e),this},u.prepend=function(e){return e.parent=this,this.nodes.unshift(e),this},u.at=function(e){return this.nodes[e]},u.index=function(e){return\"number\"==typeof e?e:this.nodes.indexOf(e)},u.removeChild=function(e){var t;for(var r in e=this.index(e),this.at(e).parent=void 0,this.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this},u.removeAll=function(){for(var e,t=function(e,t){var r;if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if(\"string\"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}return(r=e[Symbol.iterator]()).next.bind(r)}(this.nodes);!(e=t()).done;)e.value.parent=void 0;return this.nodes=[],this},u.empty=function(){return this.removeAll()},u.insertAfter=function(e,t){t.parent=this;var r,n=this.index(e);for(var s in this.nodes.splice(n+1,0,t),t.parent=this,this.indexes)n<=(r=this.indexes[s])&&(this.indexes[s]=r+1);return this},u.insertBefore=function(e,t){t.parent=this;var r,n=this.index(e);for(var s in this.nodes.splice(n,0,t),t.parent=this,this.indexes)(r=this.indexes[s])<=n&&(this.indexes[s]=r+1);return this},u._findChildAtPosition=function(e,t){var r=void 0;return this.each((function(n){if(n.atPosition){var s=n.atPosition(e,t);if(s)return r=s,!1}else if(n.isAtPosition(e,t))return r=n,!1})),r},u.atPosition=function(e,t){return this.isAtPosition(e,t)?this._findChildAtPosition(e,t)||this:void 0},u._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},u.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var r,n;this.indexes[t]<this.length&&(r=this.indexes[t],!1!==(n=e(this.at(r),r)));)this.indexes[t]+=1;return delete this.indexes[t],!1!==n&&void 0}},u.walk=function(e){return this.each((function(t,r){var n=e(t,r);if(!1!==n&&t.length&&(n=t.walk(e)),!1===n)return!1}))},u.walkAttributes=function(e){var t=this;return this.walk((function(r){if(r.type===i.ATTRIBUTE)return e.call(t,r)}))},u.walkClasses=function(e){var t=this;return this.walk((function(r){if(r.type===i.CLASS)return e.call(t,r)}))},u.walkCombinators=function(e){var t=this;return this.walk((function(r){if(r.type===i.COMBINATOR)return e.call(t,r)}))},u.walkComments=function(e){var t=this;return this.walk((function(r){if(r.type===i.COMMENT)return e.call(t,r)}))},u.walkIds=function(e){var t=this;return this.walk((function(r){if(r.type===i.ID)return e.call(t,r)}))},u.walkNesting=function(e){var t=this;return this.walk((function(r){if(r.type===i.NESTING)return e.call(t,r)}))},u.walkPseudos=function(e){var t=this;return this.walk((function(r){if(r.type===i.PSEUDO)return e.call(t,r)}))},u.walkTags=function(e){var t=this;return this.walk((function(r){if(r.type===i.TAG)return e.call(t,r)}))},u.walkUniversals=function(e){var t=this;return this.walk((function(r){if(r.type===i.UNIVERSAL)return e.call(t,r)}))},u.split=function(e){var t=this,r=[];return this.reduce((function(n,s,i){var o=e.call(t,s);return r.push(s),o?(n.push(r),r=[]):i===t.length-1&&n.push(r),n}),[])},u.map=function(e){return this.nodes.map(e)},u.reduce=function(e,t){return this.nodes.reduce(e,t)},u.every=function(e){return this.nodes.every(e)},u.some=function(e){return this.nodes.some(e)},u.filter=function(e){return this.nodes.filter(e)},u.sort=function(e){return this.nodes.sort(e)},u.toString=function(){return this.map(String).join(\"\")},s=n,(o=[{key:\"first\",get:function(){return this.at(0)}},{key:\"last\",get:function(){return this.at(this.length-1)}},{key:\"length\",get:function(){return this.nodes.length}}])&&l(s.prototype,o),n}(s.default);t.default=u,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=i(r(92)),s=r(91);function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,r;function i(){return e.apply(this,arguments)||this}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,a(t,r);var l,c,u=i.prototype;return u.qualifiedName=function(e){return this.namespace?this.namespaceString+\"|\"+e:e},u.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},l=i,(c=[{key:\"namespace\",get:function(){return this._namespace},set:function(e){if(!0===e||\"*\"===e||\"&\"===e)return this._namespace=e,void(this.raws&&delete this.raws.namespace);var t=(0,n.default)(e,{isIdentifier:!0});this._namespace=e,t!==e?((0,s.ensureObject)(this,\"raws\"),this.raws.namespace=t):this.raws&&delete this.raws.namespace}},{key:\"ns\",get:function(){return this._namespace},set:function(e){this.namespace=e}},{key:\"namespaceString\",get:function(){if(this.namespace){var e=this.stringifyProperty(\"namespace\");return!0===e?\"\":e}return\"\"}}])&&o(l.prototype,c),i}(i(r(15)).default);t.default=l,e.exports=t.default},(e,t,r)=>{var n=r(2),s=r(111),i=r(17),o=r(58),a=r(117),l=r(185),c=s(\"wks\"),u=n.Symbol,p=l?u:u&&u.withoutSetter||o;e.exports=function(e){return i(c,e)&&(a||\"string\"==typeof c[e])||(a&&i(u,e)?c[e]=u[e]:c[e]=p(\"Symbol.\"+e)),c[e]}},(e,t,r)=>{var n=r(2),s=r(56),i=\"__core-js_shared__\",o=n[i]||s(i,{});e.exports=o},(e,t,r)=>{var n=r(2),s=r(32);e.exports=function(e,t){try{s(n,e,t)}catch(r){n[e]=t}return t}},(e,t,r)=>{var n=r(24);e.exports=function(e){if(!n(e))throw TypeError(String(e)+\" is not an object\");return e}},e=>{var t=0,r=Math.random();e.exports=function(e){return\"Symbol(\"+String(void 0===e?\"\":e)+\")_\"+(++t+r).toString(36)}},(e,t,r)=>{var n=r(184),s=r(2),i=function(e){return\"function\"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e])||i(s[e]):n[e]&&n[e][t]||s[e]&&s[e][t]}},e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},(e,t,r)=>{var n=r(198),s=r(110);e.exports=function(e){return n(s(e))}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){return!!t&&((0,s.default)(t.type,e)?void 0===r||(0,n.default)(t,r):!r&&\"Placeholder\"===t.type&&e in o.FLIPPED_ALIAS_KEYS&&(0,i.default)(t.expectedNode,e))};var n=r(127),s=r(129),i=r(216),o=r(11)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),Object.defineProperty(t,\"isIdentifierName\",{enumerable:!0,get:function(){return n.isIdentifierName}}),Object.defineProperty(t,\"isIdentifierChar\",{enumerable:!0,get:function(){return n.isIdentifierChar}}),Object.defineProperty(t,\"isIdentifierStart\",{enumerable:!0,get:function(){return n.isIdentifierStart}}),Object.defineProperty(t,\"isReservedWord\",{enumerable:!0,get:function(){return s.isReservedWord}}),Object.defineProperty(t,\"isStrictBindOnlyReservedWord\",{enumerable:!0,get:function(){return s.isStrictBindOnlyReservedWord}}),Object.defineProperty(t,\"isStrictBindReservedWord\",{enumerable:!0,get:function(){return s.isStrictBindReservedWord}}),Object.defineProperty(t,\"isStrictReservedWord\",{enumerable:!0,get:function(){return s.isStrictReservedWord}}),Object.defineProperty(t,\"isKeyword\",{enumerable:!0,get:function(){return s.isKeyword}});var n=r(368),s=r(369)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=s;var n=r(1);function s(e,t,r){let i=[].concat(e);const o=Object.create(null);for(;i.length;){const e=i.shift();if(!e)continue;const a=s.keys[e.type];if((0,n.isIdentifier)(e))t?(o[e.name]=o[e.name]||[]).push(e):o[e.name]=e;else if(!(0,n.isExportDeclaration)(e)||(0,n.isExportAllDeclaration)(e)){if(r){if((0,n.isFunctionDeclaration)(e)){i.push(e.id);continue}if((0,n.isFunctionExpression)(e))continue}if(a)for(let t=0;t<a.length;t++){const r=a[t];e[r]&&(i=i.concat(e[r]))}}else(0,n.isDeclaration)(e.declaration)&&i.push(e.declaration)}return o}s.keys={DeclareClass:[\"id\"],DeclareFunction:[\"id\"],DeclareModule:[\"id\"],DeclareVariable:[\"id\"],DeclareInterface:[\"id\"],DeclareTypeAlias:[\"id\"],DeclareOpaqueType:[\"id\"],InterfaceDeclaration:[\"id\"],TypeAlias:[\"id\"],OpaqueType:[\"id\"],CatchClause:[\"param\"],LabeledStatement:[\"label\"],UnaryExpression:[\"argument\"],AssignmentExpression:[\"left\"],ImportSpecifier:[\"local\"],ImportNamespaceSpecifier:[\"local\"],ImportDefaultSpecifier:[\"local\"],ImportDeclaration:[\"specifiers\"],ExportSpecifier:[\"exported\"],ExportNamespaceSpecifier:[\"exported\"],ExportDefaultSpecifier:[\"exported\"],FunctionDeclaration:[\"id\",\"params\"],FunctionExpression:[\"id\",\"params\"],ArrowFunctionExpression:[\"params\"],ObjectMethod:[\"params\"],ClassMethod:[\"params\"],ForInStatement:[\"left\"],ForOfStatement:[\"left\"],ClassDeclaration:[\"id\"],ClassExpression:[\"id\"],RestElement:[\"argument\"],UpdateExpression:[\"argument\"],ObjectProperty:[\"value\"],AssignmentPattern:[\"left\"],ArrayPattern:[\"elements\"],ObjectPattern:[\"properties\"],VariableDeclaration:[\"declarations\"],VariableDeclarator:[\"id\"]}},e=>{e.exports=function(){return function(){}}},(e,t,r)=>{\"use strict\";var n=r(67),s=r(51),i=s(n(\"String.prototype.indexOf\"));e.exports=function(e,t){var r=n(e,!!t);return\"function\"==typeof r&&i(e,\".prototype.\")>-1?s(r):r}},(e,t,r)=>{\"use strict\";var n,s=SyntaxError,i=Function,o=TypeError,a=function(e){try{return i('\"use strict\"; return ('+e+\").constructor;\")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},\"\")}catch(e){l=null}var c=function(){throw new o},u=l?function(){try{return c}catch(e){try{return l(arguments,\"callee\").get}catch(e){return c}}}():c,p=r(68)(),f=Object.getPrototypeOf||function(e){return e.__proto__},d={},h=\"undefined\"==typeof Uint8Array?n:f(Uint8Array),m={\"%AggregateError%\":\"undefined\"==typeof AggregateError?n:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":\"undefined\"==typeof ArrayBuffer?n:ArrayBuffer,\"%ArrayIteratorPrototype%\":p?f([][Symbol.iterator]()):n,\"%AsyncFromSyncIteratorPrototype%\":n,\"%AsyncFunction%\":d,\"%AsyncGenerator%\":d,\"%AsyncGeneratorFunction%\":d,\"%AsyncIteratorPrototype%\":d,\"%Atomics%\":\"undefined\"==typeof Atomics?n:Atomics,\"%BigInt%\":\"undefined\"==typeof BigInt?n:BigInt,\"%Boolean%\":Boolean,\"%DataView%\":\"undefined\"==typeof DataView?n:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":Error,\"%eval%\":eval,\"%EvalError%\":EvalError,\"%Float32Array%\":\"undefined\"==typeof Float32Array?n:Float32Array,\"%Float64Array%\":\"undefined\"==typeof Float64Array?n:Float64Array,\"%FinalizationRegistry%\":\"undefined\"==typeof FinalizationRegistry?n:FinalizationRegistry,\"%Function%\":i,\"%GeneratorFunction%\":d,\"%Int8Array%\":\"undefined\"==typeof Int8Array?n:Int8Array,\"%Int16Array%\":\"undefined\"==typeof Int16Array?n:Int16Array,\"%Int32Array%\":\"undefined\"==typeof Int32Array?n:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":p?f(f([][Symbol.iterator]())):n,\"%JSON%\":\"object\"==typeof JSON?JSON:n,\"%Map%\":\"undefined\"==typeof Map?n:Map,\"%MapIteratorPrototype%\":\"undefined\"!=typeof Map&&p?f((new Map)[Symbol.iterator]()):n,\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":Object,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":\"undefined\"==typeof Promise?n:Promise,\"%Proxy%\":\"undefined\"==typeof Proxy?n:Proxy,\"%RangeError%\":RangeError,\"%ReferenceError%\":ReferenceError,\"%Reflect%\":\"undefined\"==typeof Reflect?n:Reflect,\"%RegExp%\":RegExp,\"%Set%\":\"undefined\"==typeof Set?n:Set,\"%SetIteratorPrototype%\":\"undefined\"!=typeof Set&&p?f((new Set)[Symbol.iterator]()):n,\"%SharedArrayBuffer%\":\"undefined\"==typeof SharedArrayBuffer?n:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":p?f(\"\"[Symbol.iterator]()):n,\"%Symbol%\":p?Symbol:n,\"%SyntaxError%\":s,\"%ThrowTypeError%\":u,\"%TypedArray%\":h,\"%TypeError%\":o,\"%Uint8Array%\":\"undefined\"==typeof Uint8Array?n:Uint8Array,\"%Uint8ClampedArray%\":\"undefined\"==typeof Uint8ClampedArray?n:Uint8ClampedArray,\"%Uint16Array%\":\"undefined\"==typeof Uint16Array?n:Uint16Array,\"%Uint32Array%\":\"undefined\"==typeof Uint32Array?n:Uint32Array,\"%URIError%\":URIError,\"%WeakMap%\":\"undefined\"==typeof WeakMap?n:WeakMap,\"%WeakRef%\":\"undefined\"==typeof WeakRef?n:WeakRef,\"%WeakSet%\":\"undefined\"==typeof WeakSet?n:WeakSet},y=function e(t){var r;if(\"%AsyncFunction%\"===t)r=a(\"async function () {}\");else if(\"%GeneratorFunction%\"===t)r=a(\"function* () {}\");else if(\"%AsyncGeneratorFunction%\"===t)r=a(\"async function* () {}\");else if(\"%AsyncGenerator%\"===t){var n=e(\"%AsyncGeneratorFunction%\");n&&(r=n.prototype)}else if(\"%AsyncIteratorPrototype%\"===t){var s=e(\"%AsyncGenerator%\");s&&(r=f(s.prototype))}return m[t]=r,r},g={\"%ArrayBufferPrototype%\":[\"ArrayBuffer\",\"prototype\"],\"%ArrayPrototype%\":[\"Array\",\"prototype\"],\"%ArrayProto_entries%\":[\"Array\",\"prototype\",\"entries\"],\"%ArrayProto_forEach%\":[\"Array\",\"prototype\",\"forEach\"],\"%ArrayProto_keys%\":[\"Array\",\"prototype\",\"keys\"],\"%ArrayProto_values%\":[\"Array\",\"prototype\",\"values\"],\"%AsyncFunctionPrototype%\":[\"AsyncFunction\",\"prototype\"],\"%AsyncGenerator%\":[\"AsyncGeneratorFunction\",\"prototype\"],\"%AsyncGeneratorPrototype%\":[\"AsyncGeneratorFunction\",\"prototype\",\"prototype\"],\"%BooleanPrototype%\":[\"Boolean\",\"prototype\"],\"%DataViewPrototype%\":[\"DataView\",\"prototype\"],\"%DatePrototype%\":[\"Date\",\"prototype\"],\"%ErrorPrototype%\":[\"Error\",\"prototype\"],\"%EvalErrorPrototype%\":[\"EvalError\",\"prototype\"],\"%Float32ArrayPrototype%\":[\"Float32Array\",\"prototype\"],\"%Float64ArrayPrototype%\":[\"Float64Array\",\"prototype\"],\"%FunctionPrototype%\":[\"Function\",\"prototype\"],\"%Generator%\":[\"GeneratorFunction\",\"prototype\"],\"%GeneratorPrototype%\":[\"GeneratorFunction\",\"prototype\",\"prototype\"],\"%Int8ArrayPrototype%\":[\"Int8Array\",\"prototype\"],\"%Int16ArrayPrototype%\":[\"Int16Array\",\"prototype\"],\"%Int32ArrayPrototype%\":[\"Int32Array\",\"prototype\"],\"%JSONParse%\":[\"JSON\",\"parse\"],\"%JSONStringify%\":[\"JSON\",\"stringify\"],\"%MapPrototype%\":[\"Map\",\"prototype\"],\"%NumberPrototype%\":[\"Number\",\"prototype\"],\"%ObjectPrototype%\":[\"Object\",\"prototype\"],\"%ObjProto_toString%\":[\"Object\",\"prototype\",\"toString\"],\"%ObjProto_valueOf%\":[\"Object\",\"prototype\",\"valueOf\"],\"%PromisePrototype%\":[\"Promise\",\"prototype\"],\"%PromiseProto_then%\":[\"Promise\",\"prototype\",\"then\"],\"%Promise_all%\":[\"Promise\",\"all\"],\"%Promise_reject%\":[\"Promise\",\"reject\"],\"%Promise_resolve%\":[\"Promise\",\"resolve\"],\"%RangeErrorPrototype%\":[\"RangeError\",\"prototype\"],\"%ReferenceErrorPrototype%\":[\"ReferenceError\",\"prototype\"],\"%RegExpPrototype%\":[\"RegExp\",\"prototype\"],\"%SetPrototype%\":[\"Set\",\"prototype\"],\"%SharedArrayBufferPrototype%\":[\"SharedArrayBuffer\",\"prototype\"],\"%StringPrototype%\":[\"String\",\"prototype\"],\"%SymbolPrototype%\":[\"Symbol\",\"prototype\"],\"%SyntaxErrorPrototype%\":[\"SyntaxError\",\"prototype\"],\"%TypedArrayPrototype%\":[\"TypedArray\",\"prototype\"],\"%TypeErrorPrototype%\":[\"TypeError\",\"prototype\"],\"%Uint8ArrayPrototype%\":[\"Uint8Array\",\"prototype\"],\"%Uint8ClampedArrayPrototype%\":[\"Uint8ClampedArray\",\"prototype\"],\"%Uint16ArrayPrototype%\":[\"Uint16Array\",\"prototype\"],\"%Uint32ArrayPrototype%\":[\"Uint32Array\",\"prototype\"],\"%URIErrorPrototype%\":[\"URIError\",\"prototype\"],\"%WeakMapPrototype%\":[\"WeakMap\",\"prototype\"],\"%WeakSetPrototype%\":[\"WeakSet\",\"prototype\"]},b=r(69),v=r(245),E=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),S=b.call(Function.call,String.prototype.replace),T=b.call(Function.call,String.prototype.slice),w=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,P=/\\\\(\\\\)?/g,A=function(e){var t=T(e,0,1),r=T(e,-1);if(\"%\"===t&&\"%\"!==r)throw new s(\"invalid intrinsic syntax, expected closing `%`\");if(\"%\"===r&&\"%\"!==t)throw new s(\"invalid intrinsic syntax, expected opening `%`\");var n=[];return S(e,w,(function(e,t,r,s){n[n.length]=r?S(s,P,\"$1\"):t||e})),n},O=function(e,t){var r,n=e;if(v(g,n)&&(n=\"%\"+(r=g[n])[0]+\"%\"),v(m,n)){var i=m[n];if(i===d&&(i=y(n)),void 0===i&&!t)throw new o(\"intrinsic \"+e+\" exists, but is not available. Please file an issue!\");return{alias:r,name:n,value:i}}throw new s(\"intrinsic \"+e+\" does not exist!\")};e.exports=function(e,t){if(\"string\"!=typeof e||0===e.length)throw new o(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&\"boolean\"!=typeof t)throw new o('\"allowMissing\" argument must be a boolean');var r=A(e),n=r.length>0?r[0]:\"\",i=O(\"%\"+n+\"%\",t),a=i.name,c=i.value,u=!1,p=i.alias;p&&(n=p[0],x(r,E([0,1],p)));for(var f=1,d=!0;f<r.length;f+=1){var h=r[f],y=T(h,0,1),g=T(h,-1);if(('\"'===y||\"'\"===y||\"`\"===y||'\"'===g||\"'\"===g||\"`\"===g)&&y!==g)throw new s(\"property names with quotes must have matching quotes\");if(\"constructor\"!==h&&d||(u=!0),v(m,a=\"%\"+(n+=\".\"+h)+\"%\"))c=m[a];else if(null!=c){if(!(h in c)){if(!t)throw new o(\"base intrinsic for \"+e+\" exists, but the property is not available.\");return}if(l&&f+1>=r.length){var b=l(c,h);c=(d=!!b)&&\"get\"in b&&!(\"originalValue\"in b.get)?b.get:c[h]}else d=v(c,h),c=c[h];d&&!u&&(m[a]=c)}}return c}},(e,t,r)=>{\"use strict\";var n=\"undefined\"!=typeof Symbol&&Symbol,s=r(243);e.exports=function(){return\"function\"==typeof n&&\"function\"==typeof Symbol&&\"symbol\"==typeof n(\"foo\")&&\"symbol\"==typeof Symbol(\"bar\")&&s()}},(e,t,r)=>{\"use strict\";var n=r(244);e.exports=Function.prototype.bind||n},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.skipAllButComputedKey=l,t.default=t.environmentVisitor=void 0;var n=r(10),s=r(258),i=r(259),o=r(0);function a(e,t,r,n){e=o.cloneNode(e);const s=t||n?e:o.memberExpression(e,o.identifier(\"prototype\"));return o.callExpression(r.addHelper(\"getPrototypeOf\"),[s])}function l(e){if(!e.node.computed)return void e.skip();const t=o.VISITOR_KEYS[e.type];for(const r of t)\"key\"!==r&&e.skipKey(r)}const c={[(o.staticBlock?\"StaticBlock|\":\"\")+\"ClassPrivateProperty|TypeAnnotation\"](e){e.skip()},Function(e){e.isMethod()||e.isArrowFunctionExpression()||e.skip()},\"Method|ClassProperty\"(e){l(e)}};t.environmentVisitor=c;const u=n.default.visitors.merge([c,{Super(e,t){const{node:r,parentPath:n}=e;n.isMemberExpression({object:r})&&t.handle(n)}}]),p=n.default.visitors.merge([c,{Scopable(e,{refName:t}){const r=e.scope.getOwnBinding(t);r&&r.identifier.name===t&&e.scope.rename(t)}}]),f={memoise(e,t){const{scope:r,node:n}=e,{computed:s,property:i}=n;if(!s)return;const o=r.maybeGenerateMemoised(i);o&&this.memoiser.set(i,o,t)},prop(e){const{computed:t,property:r}=e.node;return this.memoiser.has(r)?o.cloneNode(this.memoiser.get(r)):t?o.cloneNode(r):o.stringLiteral(r.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,t){const r=a(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return o.callExpression(this.file.addHelper(\"get\"),[t.memo?o.sequenceExpression([t.memo,r]):r,this.prop(e),t.this])},_getThisRefs(){if(!this.isDerivedConstructor)return{this:o.thisExpression()};const e=this.scope.generateDeclaredUidIdentifier(\"thisSuper\");return{memo:o.assignmentExpression(\"=\",e,o.thisExpression()),this:o.cloneNode(e)}},set(e,t){const r=this._getThisRefs(),n=a(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return o.callExpression(this.file.addHelper(\"set\"),[r.memo?o.sequenceExpression([r.memo,n]):n,this.prop(e),t,r.this,o.booleanLiteral(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(\"Destructuring to a super field is not supported yet.\")},call(e,t){const r=this._getThisRefs();return(0,i.default)(this._get(e,r),o.cloneNode(r.this),t,!1)},optionalCall(e,t){const r=this._getThisRefs();return(0,i.default)(this._get(e,r),o.cloneNode(r.this),t,!0)}},d=Object.assign({},f,{prop(e){const{property:t}=e.node;return this.memoiser.has(t)?o.cloneNode(this.memoiser.get(t)):o.cloneNode(t)},get(e){const{isStatic:t,getSuperRef:r}=this,{computed:n}=e.node,s=this.prop(e);let i;var a,l;return i=t?null!=(a=r())?a:o.memberExpression(o.identifier(\"Function\"),o.identifier(\"prototype\")):o.memberExpression(null!=(l=r())?l:o.identifier(\"Object\"),o.identifier(\"prototype\")),o.memberExpression(i,s,n)},set(e,t){const{computed:r}=e.node,n=this.prop(e);return o.assignmentExpression(\"=\",o.memberExpression(o.thisExpression(),n,r),t)},destructureSet(e){const{computed:t}=e.node,r=this.prop(e);return o.memberExpression(o.thisExpression(),r,t)},call(e,t){return(0,i.default)(this.get(e),o.thisExpression(),t,!1)},optionalCall(e,t){return(0,i.default)(this.get(e),o.thisExpression(),t,!0)}});t.default=class{constructor(e){var t;const r=e.methodPath;this.methodPath=r,this.isDerivedConstructor=r.isClassMethod({kind:\"constructor\"})&&!!e.superRef,this.isStatic=r.isObjectMethod()||r.node.static||(null==r.isStaticBlock?void 0:r.isStaticBlock()),this.isPrivateMethod=r.isPrivate()&&r.isMethod(),this.file=e.file,this.constantSuper=null!=(t=e.constantSuper)?t:e.isLoose,this.opts=e}getObjectRef(){return o.cloneNode(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){return this.opts.superRef?o.cloneNode(this.opts.superRef):this.opts.getSuperRef?o.cloneNode(this.opts.getSuperRef()):void 0}replace(){this.opts.refToPreserve&&this.methodPath.traverse(p,{refName:this.opts.refToPreserve.name});const e=this.constantSuper?d:f;(0,s.default)(this.methodPath,u,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this)},e))}}},(e,t,r)=>{const n=r(12);e.exports=(e,t,r)=>0===n(e,t,r)},(e,t,r)=>{const n=r(3);e.exports=(e,t,r)=>{const s=new n(e,r),i=new n(t,r);return s.compare(i)||s.compareBuild(i)}},(e,t,r)=>{const n=r(12);e.exports=(e,t,r)=>n(e,t,r)<0},(e,t,r)=>{const n=r(12);e.exports=(e,t,r)=>n(e,t,r)>=0},(e,t,r)=>{const n=r(12);e.exports=(e,t,r)=>n(e,t,r)<=0},(e,t,r)=>{const n=r(3),s=r(45),{ANY:i}=s,o=r(13),a=r(46),l=r(44),c=r(73),u=r(75),p=r(74);e.exports=(e,t,r,f)=>{let d,h,m,y,g;switch(e=new n(e,f),t=new o(t,f),r){case\">\":d=l,h=u,m=c,y=\">\",g=\">=\";break;case\"<\":d=c,h=p,m=l,y=\"<\",g=\"<=\";break;default:throw new TypeError('Must provide a hilo val of \"<\" or \">\"')}if(a(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let o=null,a=null;if(n.forEach((e=>{e.semver===i&&(e=new s(\">=0.0.0\")),o=o||e,a=a||e,d(e.semver,o.semver,f)?o=e:m(e.semver,a.semver,f)&&(a=e)})),o.operator===y||o.operator===g)return!1;if((!a.operator||a.operator===y)&&h(e,a.semver))return!1;if(a.operator===g&&m(e,a.semver))return!1}return!0}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.findConfigUpwards=function(e){return null},t.findPackageData=function*(e){return{filepath:e,directories:[],pkg:null,isPackage:!1}},t.findRelativeConfig=function*(e,t,r){return{config:null,ignore:null}},t.findRootConfig=function*(e,t,r){return null},t.loadConfig=function*(e,t,r,n){throw new Error(`Cannot load ${e} relative to ${t} in a browser`)},t.resolveShowConfigPath=function*(e){return null},t.resolvePlugin=function(e,t){return null},t.resolvePreset=function(e,t){return null},t.loadPlugin=function(e,t){throw new Error(`Cannot load plugin ${e} relative to ${t} in a browser`)},t.loadPreset=function(e,t){throw new Error(`Cannot load preset ${e} relative to ${t} in a browser`)},t.ROOT_CONFIG_FILENAMES=void 0,t.ROOT_CONFIG_FILENAMES=[]},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.createConfigItem=function(e,t,r){return void 0!==r?l.errback(e,t,r):\"function\"==typeof t?l.errback(e,void 0,r):l.sync(e,t)},Object.defineProperty(t,\"default\",{enumerable:!0,get:function(){return s.default}}),t.createConfigItemAsync=t.createConfigItemSync=t.loadOptionsAsync=t.loadOptionsSync=t.loadOptions=t.loadPartialConfigAsync=t.loadPartialConfigSync=t.loadPartialConfig=void 0;var s=r(466),i=r(303),o=r(80);const a=n()((function*(e){var t;const r=yield*(0,s.default)(e);return null!=(t=null==r?void 0:r.options)?t:null})),l=n()(o.createConfigItem),c=e=>(t,r)=>(void 0===r&&\"function\"==typeof t&&(r=t,t=void 0),r?e.errback(t,r):e.sync(t)),u=c(i.loadPartialConfig);t.loadPartialConfig=u;const p=i.loadPartialConfig.sync;t.loadPartialConfigSync=p;const f=i.loadPartialConfig.async;t.loadPartialConfigAsync=f;const d=c(a);t.loadOptions=d;const h=a.sync;t.loadOptionsSync=h;const m=a.async;t.loadOptionsAsync=m;const y=l.sync;t.createConfigItemSync=y;const g=l.async;t.createConfigItemAsync=g},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0,t.default=class{constructor(e,t,r){this.key=void 0,this.manipulateOptions=void 0,this.post=void 0,this.pre=void 0,this.visitor=void 0,this.parserOverride=void 0,this.generatorOverride=void 0,this.options=void 0,this.key=e.name||r,this.manipulateOptions=e.manipulateOptions,this.post=e.post,this.pre=e.pre,this.visitor=e.visitor||{},this.parserOverride=e.parserOverride,this.generatorOverride=e.generatorOverride,this.options=t}}},(e,t,r)=>{\"use strict\";function n(){const e=r(8);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.createItemFromDescriptor=i,t.createConfigItem=function*(e,{dirname:t=\".\",type:r}={}){return i(yield*(0,s.createDescriptor)(e,n().resolve(t),{type:r,alias:\"programmatic item\"}))},t.getItemDescriptor=function(e){if(null!=e&&e[o])return e._descriptor};var s=r(288);function i(e){return new a(e)}const o=Symbol.for(\"@babel/core@7 - ConfigItem\");class a{constructor(e){this._descriptor=void 0,this[o]=!0,this.value=void 0,this.options=void 0,this.dirname=void 0,this.name=void 0,this.file=void 0,this._descriptor=e,Object.defineProperty(this,\"_descriptor\",{enumerable:!1}),Object.defineProperty(this,o,{enumerable:!1}),this.value=this._descriptor.value,this.options=this._descriptor.options,this.dirname=this._descriptor.dirname,this.name=this._descriptor.name,this.file=this._descriptor.file?{request:this._descriptor.file.request,resolved:this._descriptor.file.resolved}:void 0,Object.freeze(this)}}Object.freeze(a.prototype)},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.makeWeakCache=l,t.makeWeakCacheSync=function(e){return o(l(e))},t.makeStrongCache=c,t.makeStrongCacheSync=function(e){return o(c(e))},t.assertSimpleType=h;var s=r(287),i=r(150);const o=e=>n()(e).sync;function*a(){return!0}function l(e){return u(WeakMap,e)}function c(e){return u(Map,e)}function u(e,t){const r=new e,n=new e,o=new e;return function*(e,a){const l=yield*(0,s.isAsync)(),c=l?n:r,u=yield*function*(e,t,r,n,i){const o=yield*p(t,n,i);if(o.valid)return o;if(e){const e=yield*p(r,n,i);if(e.valid)return{valid:!0,value:yield*(0,s.waitFor)(e.value.promise)}}return{valid:!1,value:null}}(l,c,o,e,a);if(u.valid)return u.value;const h=new d(a),y=t(e,h);let g,b;if((0,i.isIterableIterator)(y)){const t=y;b=yield*(0,s.onFirstPause)(t,(()=>{g=function(e,t,r){const n=new m;return f(t,e,r,n),n}(h,o,e)}))}else b=y;return f(c,h,e,b),g&&(o.delete(e),g.release(b)),b}}function*p(e,t,r){const n=e.get(t);if(n)for(const{value:e,valid:t}of n)if(yield*t(r))return{valid:!0,value:e};return{valid:!1,value:null}}function f(e,t,r,n){t.configured()||t.forever();let s=e.get(r);switch(t.deactivate(),t.mode()){case\"forever\":s=[{value:n,valid:a}],e.set(r,s);break;case\"invalidate\":s=[{value:n,valid:t.validator()}],e.set(r,s);break;case\"valid\":s?s.push({value:n,valid:t.validator()}):(s=[{value:n,valid:t.validator()}],e.set(r,s))}}class d{constructor(e){this._active=!0,this._never=!1,this._forever=!1,this._invalidate=!1,this._configured=!1,this._pairs=[],this._data=void 0,this._data=e}simple(){return function(e){function t(t){if(\"boolean\"!=typeof t)return e.using((()=>h(t())));t?e.forever():e.never()}return t.forever=()=>e.forever(),t.never=()=>e.never(),t.using=t=>e.using((()=>h(t()))),t.invalidate=t=>e.invalidate((()=>h(t()))),t}(this)}mode(){return this._never?\"never\":this._forever?\"forever\":this._invalidate?\"invalidate\":\"valid\"}forever(){if(!this._active)throw new Error(\"Cannot change caching after evaluation has completed.\");if(this._never)throw new Error(\"Caching has already been configured with .never()\");this._forever=!0,this._configured=!0}never(){if(!this._active)throw new Error(\"Cannot change caching after evaluation has completed.\");if(this._forever)throw new Error(\"Caching has already been configured with .forever()\");this._never=!0,this._configured=!0}using(e){if(!this._active)throw new Error(\"Cannot change caching after evaluation has completed.\");if(this._never||this._forever)throw new Error(\"Caching has already been configured with .never or .forever()\");this._configured=!0;const t=e(this._data),r=(0,s.maybeAsync)(e,\"You appear to be using an async cache handler, but Babel has been called synchronously\");return(0,s.isThenable)(t)?t.then((e=>(this._pairs.push([e,r]),e))):(this._pairs.push([t,r]),t)}invalidate(e){return this._invalidate=!0,this.using(e)}validator(){const e=this._pairs;return function*(t){for(const[r,n]of e)if(r!==(yield*n(t)))return!1;return!0}}deactivate(){this._active=!1}configured(){return this._configured}}function h(e){if((0,s.isThenable)(e))throw new Error(\"You appear to be using an async cache handler, which your current version of Babel does not support. We may add support for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchronously handle your caching logic.\");if(null!=e&&\"string\"!=typeof e&&\"boolean\"!=typeof e&&\"number\"!=typeof e)throw new Error(\"Cache keys must be either string, boolean, number, null, or undefined.\");return e}class m{constructor(){this.released=!1,this.promise=void 0,this._resolve=void 0,this.promise=new Promise((e=>{this._resolve=e}))}release(e){this.released=!0,this._resolve(e)}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.validate=function(e,t){return p({type:\"root\",source:e},t)},t.checkNoUnwrappedItemOptionPairs=function(e,t,r,n){if(0===t)return;const s=e[t-1],i=e[t];s.file&&void 0===s.options&&\"object\"==typeof i.value&&(n.message+=`\\n- Maybe you meant to use\\n\"${r}\": [\\n  [\"${s.file.request}\", ${JSON.stringify(i.value,void 0,2)}]\\n]\\nTo be a valid ${r}, its name and options should be wrapped in a pair of brackets`)},t.assumptionsNames=void 0,r(79);var n=r(481),s=r(301);const i={cwd:s.assertString,root:s.assertString,rootMode:s.assertRootMode,configFile:s.assertConfigFileSearch,caller:s.assertCallerMetadata,filename:s.assertString,filenameRelative:s.assertString,code:s.assertBoolean,ast:s.assertBoolean,cloneInputAst:s.assertBoolean,envName:s.assertString},o={babelrc:s.assertBoolean,babelrcRoots:s.assertBabelrcSearch},a={extends:s.assertString,ignore:s.assertIgnoreList,only:s.assertIgnoreList,targets:s.assertTargets,browserslistConfigFile:s.assertConfigFileSearch,browserslistEnv:s.assertString},l={inputSourceMap:s.assertInputSourceMap,presets:s.assertPluginList,plugins:s.assertPluginList,passPerPreset:s.assertBoolean,assumptions:s.assertAssumptions,env:function(e,t){if(\"env\"===e.parent.type)throw new Error(`${(0,s.msg)(e)} is not allowed inside of another .env block`);const r=e.parent,n=(0,s.assertObject)(e,t);if(n)for(const t of Object.keys(n)){const i=(0,s.assertObject)((0,s.access)(e,t),n[t]);i&&p({type:\"env\",name:t,parent:r},i)}return n},overrides:function(e,t){if(\"env\"===e.parent.type)throw new Error(`${(0,s.msg)(e)} is not allowed inside an .env block`);if(\"overrides\"===e.parent.type)throw new Error(`${(0,s.msg)(e)} is not allowed inside an .overrides block`);const r=e.parent,n=(0,s.assertArray)(e,t);if(n)for(const[t,i]of n.entries()){const n=(0,s.access)(e,t),o=(0,s.assertObject)(n,i);if(!o)throw new Error(`${(0,s.msg)(n)} must be an object`);p({type:\"overrides\",index:t,parent:r},o)}return n},test:s.assertConfigApplicableTest,include:s.assertConfigApplicableTest,exclude:s.assertConfigApplicableTest,retainLines:s.assertBoolean,comments:s.assertBoolean,shouldPrintComment:s.assertFunction,compact:s.assertCompact,minified:s.assertBoolean,auxiliaryCommentBefore:s.assertString,auxiliaryCommentAfter:s.assertString,sourceType:s.assertSourceType,wrapPluginVisitorMethod:s.assertFunction,highlightCode:s.assertBoolean,sourceMaps:s.assertSourceMaps,sourceMap:s.assertSourceMaps,sourceFileName:s.assertString,sourceRoot:s.assertString,parserOpts:s.assertObject,generatorOpts:s.assertObject};Object.assign(l,{getModuleId:s.assertFunction,moduleRoot:s.assertString,moduleIds:s.assertBoolean,moduleId:s.assertString});const c=new Set([\"arrayLikeIsIterable\",\"constantReexports\",\"constantSuper\",\"enumerableModuleMeta\",\"ignoreFunctionLength\",\"ignoreToPrimitiveHint\",\"iterableIsArray\",\"mutableTemplateObject\",\"noClassCalls\",\"noDocumentAll\",\"noNewArrows\",\"objectRestNoSymbols\",\"privateFieldsAsProperties\",\"pureGetters\",\"setClassMethods\",\"setComputedProperties\",\"setPublicClassFields\",\"setSpreadProperties\",\"skipForOfIteratorClosing\",\"superIsCallableConstructor\"]);function u(e){return\"root\"===e.type?e.source:u(e.parent)}function p(e,t){const r=u(e);return function(e){if(d(e,\"sourceMap\")&&d(e,\"sourceMaps\"))throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\")}(t),Object.keys(t).forEach((n=>{const c={type:\"option\",name:n,parent:e};if(\"preset\"===r&&a[n])throw new Error(`${(0,s.msg)(c)} is not allowed in preset options`);if(\"arguments\"!==r&&i[n])throw new Error(`${(0,s.msg)(c)} is only allowed in root programmatic options`);if(\"arguments\"!==r&&\"configfile\"!==r&&o[n]){if(\"babelrcfile\"===r||\"extendsfile\"===r)throw new Error(`${(0,s.msg)(c)} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, or babel.config.js/config file options`);throw new Error(`${(0,s.msg)(c)} is only allowed in root programmatic options, or babel.config.js/config file options`)}(l[n]||a[n]||o[n]||i[n]||f)(c,t[n])})),t}function f(e){const t=e.name;if(n.default[t]){const{message:r,version:i=5}=n.default[t];throw new Error(`Using removed Babel ${i} option: ${(0,s.msg)(e)} - ${r}`)}{const t=new Error(`Unknown option: ${(0,s.msg)(e)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`);throw t.code=\"BABEL_UNKNOWN_OPTION\",t}}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assumptionsNames=c},(e,t,r)=>{\"use strict\";e.exports=r(507)},(e,t,r)=>{\"use strict\";var n=r(7);let s=r(85),i=r(47),o=r(156),a=r(22),l=r(308),c=r(86),u=r(309),p=r(87),f=r(160),d=r(49),h=r(88),m=r(159),y=r(90),g=r(161),b=r(162),v=r(89),E=r(35),x=r(48);function S(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new l(e)}S.plugin=function(e,t){function r(...r){let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new l).version,n}let s;return console&&console.warn&&n.env.LANG&&n.env.LANG.startsWith(\"cn\"),Object.defineProperty(r,\"postcss\",{get:()=>(s||(s=r()),s)}),r.process=function(e,t,n){return S([r(n)]).process(e,t)},r},S.stringify=c,S.parse=g,S.fromJSON=u,S.list=b,S.comment=e=>new d(e),S.atRule=e=>new h(e),S.decl=e=>new i(e),S.rule=e=>new v(e),S.root=e=>new E(e),S.document=e=>new p(e),S.CssSyntaxError=s,S.Declaration=i,S.Container=a,S.Document=p,S.Comment=d,S.Warning=f,S.AtRule=h,S.Result=m,S.Input=y,S.Rule=v,S.Root=E,S.Node=x,o.registerPostcss(S),e.exports=S,S.default=S},(e,t,r)=>{\"use strict\";let{red:n,bold:s,gray:i,options:o}=r(513),a=r(319);class l extends Error{constructor(e,t,r,n,s,i){super(e),this.name=\"CssSyntaxError\",this.reason=e,s&&(this.file=s),n&&(this.source=n),i&&(this.plugin=i),void 0!==t&&void 0!==r&&(this.line=t,this.column=r),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,l)}setMessage(){this.message=this.plugin?this.plugin+\": \":\"\",this.message+=this.file?this.file:\"<css input>\",void 0!==this.line&&(this.message+=\":\"+this.line+\":\"+this.column),this.message+=\": \"+this.reason}showSourceCode(e){if(!this.source)return\"\";let t=this.source;null==e&&(e=o.enabled),a&&e&&(t=a(t));let r,l,c=t.split(/\\r?\\n/),u=Math.max(this.line-3,0),p=Math.min(this.line+2,c.length),f=String(p).length;return e?(r=e=>s(n(e)),l=e=>i(e)):r=l=e=>e,c.slice(u,p).map(((e,t)=>{let n=u+1+t,s=\" \"+(\" \"+n).slice(-f)+\" | \";if(n===this.line){let t=l(s.replace(/\\d/g,\" \"))+e.slice(0,this.column-1).replace(/[^\\t]/g,\" \");return r(\">\")+l(s)+e+\"\\n \"+t+r(\"^\")}return\" \"+l(s)+e})).join(\"\\n\")}toString(){let e=this.showSourceCode();return e&&(e=\"\\n\\n\"+e+\"\\n\"),this.name+\": \"+this.message+e}}e.exports=l,l.default=l},(e,t,r)=>{\"use strict\";let n=r(155);function s(e,t){new n(t).stringify(e)}e.exports=s,s.default=s},(e,t,r)=>{\"use strict\";let n,s,i=r(22);class o extends i{constructor(e){super({type:\"document\",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new s,this,e).stringify()}}o.registerLazyResult=e=>{n=e},o.registerProcessor=e=>{s=e},e.exports=o,o.default=o},(e,t,r)=>{\"use strict\";let n=r(22);class s extends n{constructor(e){super(e),this.type=\"atrule\"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=s,s.default=s,n.registerAtRule(s)},(e,t,r)=>{\"use strict\";let n=r(22),s=r(162);class i extends n{constructor(e){super(e),this.type=\"rule\",this.nodes||(this.nodes=[])}get selectors(){return s.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\\s*/):null,r=t?t[0]:\",\"+this.raw(\"between\",\"beforeOpen\");this.selector=e.join(r)}}e.exports=i,i.default=i,n.registerRule(i)},(e,t,r)=>{\"use strict\";let{SourceMapConsumer:n,SourceMapGenerator:s}=r(157),{fileURLToPath:i,pathToFileURL:o}=r(321),{resolve:a,isAbsolute:l}=r(158),{nanoid:c}=r(325),u=r(319),p=r(85),f=r(163),d=Symbol(\"fromOffsetCache\"),h=Boolean(n&&s),m=Boolean(a&&l);class y{constructor(e,t={}){if(null==e||\"object\"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),\"\\ufeff\"===this.css[0]||\"￾\"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\\w+:\\/\\//.test(t.from)||l(t.from)?this.file=t.from:this.file=a(t.from)),m&&h){let e=new f(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=\"<input css \"+c(6)+\">\"),this.map&&(this.map.file=this.from)}fromOffset(e){let t,r;if(this[d])r=this[d];else{let e=this.css.split(\"\\n\");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[d]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{line:n+1,col:e-r[n]+1}}error(e,t,r,n={}){let s;if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let i=this.origin(t,r);return s=i?new p(e,i.line,i.column,i.source,i.file,n.plugin):new p(e,t,r,this.css,this.file,n.plugin),s.input={line:t,column:r,source:this.css},this.file&&(o&&(s.input.url=o(this.file).toString()),s.input.file=this.file),s}origin(e,t){if(!this.map)return!1;let r,n=this.map.consumer(),s=n.originalPositionFor({line:e,column:t});if(!s.source)return!1;r=l(s.source)?o(s.source):new URL(s.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let a={url:r.toString(),line:s.line,column:s.column};if(\"file:\"===r.protocol){if(!i)throw new Error(\"file: protocol is not available in this PostCSS build\");a.file=i(r)}let c=n.sourceContentFor(s.source);return c&&(a.source=c),a}mapResolve(e){return/^\\w+:\\/\\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||\".\",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let t of[\"hasBOM\",\"css\",\"file\",\"id\"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=y,y.default=y,u&&u.registerInput&&u.registerInput(y)},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.stripComments=t.ensureObject=t.getProp=t.unesc=void 0;var n=a(r(98));t.unesc=n.default;var s=a(r(174));t.getProp=s.default;var i=a(r(175));t.ensureObject=i.default;var o=a(r(176));function a(e){return e&&e.__esModule?e:{default:e}}t.stripComments=o.default},e=>{\"use strict\";\n  /*! https://mths.be/cssesc v3.0.0 by @mathias */var t={}.hasOwnProperty,r=/[ -,\\.\\/:-@\\[-\\^`\\{-~]/,n=/[ -,\\.\\/:-@\\[\\]\\^`\\{-~]/,s=/(^|\\\\+)?(\\\\[A-F0-9]{1,6})\\x20(?![a-fA-F0-9\\x20])/g,i=function e(i,o){\"single\"!=(o=function(e,r){if(!e)return r;var n={};for(var s in r)n[s]=t.call(e,s)?e[s]:r[s];return n}(o,e.options)).quotes&&\"double\"!=o.quotes&&(o.quotes=\"single\");for(var a=\"double\"==o.quotes?'\"':\"'\",l=o.isIdentifier,c=i.charAt(0),u=\"\",p=0,f=i.length;p<f;){var d=i.charAt(p++),h=d.charCodeAt(),m=void 0;if(h<32||h>126){if(h>=55296&&h<=56319&&p<f){var y=i.charCodeAt(p++);56320==(64512&y)?h=((1023&h)<<10)+(1023&y)+65536:p--}m=\"\\\\\"+h.toString(16).toUpperCase()+\" \"}else m=o.escapeEverything?r.test(d)?\"\\\\\"+d:\"\\\\\"+h.toString(16).toUpperCase()+\" \":/[\\t\\n\\f\\r\\x0B]/.test(d)?\"\\\\\"+h.toString(16).toUpperCase()+\" \":\"\\\\\"==d||!l&&('\"'==d&&a==d||\"'\"==d&&a==d)||l&&n.test(d)?\"\\\\\"+d:d;u+=m}return l&&(/^-[-\\d]/.test(u)?u=\"\\\\-\"+u.slice(1):/\\d/.test(c)&&(u=\"\\\\3\"+c+\" \"+u.slice(1))),u=u.replace(s,(function(e,t,r){return t&&t.length%2?e:(t||\"\")+r})),!l&&o.wrap?a+u+a:u};i.options={escapeEverything:!1,isIdentifier:!1,quotes:\"single\",wrap:!1},i.version=\"3.0.0\",e.exports=i},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.createClassFeaturePlugin=function({name:e,feature:t,loose:r,manipulateOptions:f,api:d={assumption:()=>{}}}){const h=d.assumption(\"setPublicClassFields\"),m=d.assumption(\"privateFieldsAsProperties\"),y=d.assumption(\"constantSuper\"),g=d.assumption(\"noDocumentAll\");if(!0===r){const e=[];void 0!==h&&e.push('\"setPublicClassFields\"'),void 0!==m&&e.push('\"privateFieldsAsProperties\"'),e.length}return{name:e,manipulateOptions:f,pre(){(0,c.enableFeature)(this.file,t,r),(!this.file.get(p)||this.file.get(p)<u)&&this.file.set(p,u)},visitor:{Class(e,r){if(this.file.get(p)!==u)return;(0,c.verifyUsedFeatures)(e,this.file);const i=(0,c.isLoose)(this.file,t);let f,d=(0,a.hasOwnDecorators)(e.node);const b=[],v=[],E=[],x=new Set,S=e.get(\"body\");for(const e of S.get(\"body\")){if((0,c.verifyUsedFeatures)(e,this.file),e.node.computed&&E.push(e),e.isPrivate()){const{name:t}=e.node.key.id,r=`get ${t}`,n=`set ${t}`;if(\"get\"===e.node.kind){if(x.has(r)||x.has(t)&&!x.has(n))throw e.buildCodeFrameError(\"Duplicate private field\");x.add(r).add(t)}else if(\"set\"===e.node.kind){if(x.has(n)||x.has(t)&&!x.has(r))throw e.buildCodeFrameError(\"Duplicate private field\");x.add(n).add(t)}else{if(x.has(t)&&!x.has(r)&&!x.has(n)||x.has(t)&&(x.has(r)||x.has(n)))throw e.buildCodeFrameError(\"Duplicate private field\");x.add(t)}}e.isClassMethod({kind:\"constructor\"})?f=e:(v.push(e),(e.isProperty()||e.isPrivate()||null!=e.isStaticBlock&&e.isStaticBlock())&&b.push(e)),d||(d=(0,a.hasOwnDecorators)(e.node))}if(!b.length&&!d)return;const T=e.node.id;let w;!T||e.isClassExpression()?((0,s.default)(e),w=e.scope.generateUidIdentifier(\"class\")):w=n.types.cloneNode(e.node.id);const P=(0,o.buildPrivateNamesMap)(b),A=(0,o.buildPrivateNamesNodes)(P,null!=m?m:i,r);let O,C,I,k,N;(0,o.transformPrivateNamesUsage)(w,e,P,{privateFieldsAsProperties:null!=m?m:i,noDocumentAll:g},r),d?(C=I=O=[],({instanceNodes:k,wrapClass:N}=(0,a.buildDecoratedClass)(w,e,v,this.file))):(O=(0,l.extractComputedKeys)(w,e,E,this.file),({staticNodes:C,pureStaticNodes:I,instanceNodes:k,wrapClass:N}=(0,o.buildFieldsInitNodes)(w,e.node.superClass,b,P,r,null!=h?h:i,null!=m?m:i,null!=y?y:i,T))),k.length>0&&(0,l.injectInitialization)(e,f,k,((e,t)=>{if(!d)for(const r of b)r.node.static||r.traverse(e,t)})),(e=N(e)).insertBefore([...A,...O]),C.length>0&&e.insertAfter(C),I.length>0&&e.find((e=>e.isStatement()||e.isDeclaration())).insertAfter(I)},PrivateName(e){if(this.file.get(p)===u&&!e.parentPath.isPrivate({key:e.node}))throw e.buildCodeFrameError(`Unknown PrivateName \"${e}\"`)},ExportDefaultDeclaration(e){if(this.file.get(p)!==u)return;const t=e.get(\"declaration\");t.isClassDeclaration()&&(0,a.hasDecorators)(t.node)&&(t.node.id?(0,i.default)(e):t.node.type=\"ClassExpression\")}}}},Object.defineProperty(t,\"injectInitialization\",{enumerable:!0,get:function(){return l.injectInitialization}}),Object.defineProperty(t,\"enableFeature\",{enumerable:!0,get:function(){return c.enableFeature}}),Object.defineProperty(t,\"FEATURES\",{enumerable:!0,get:function(){return c.FEATURES}});var n=r(9),s=r(134),i=r(132),o=r(537),a=r(311),l=r(539),c=r(540);const u=\"7.14.6\".split(\".\").reduce(((e,t)=>1e5*e+ +t),0),p=\"@babel/plugin-class-features/version\"},e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),s=t.test(r);return n&&s&&(e=+e,r=+r),e===r?0:n&&!s?-1:s&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},function(e,t){!function(e){\"use strict\";class t{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e}}replace(e,t,r,n){e&&(null!==r?e[t][r]=n:e[t]=n)}remove(e,t,r){e&&(null!==r?e[t].splice(r,1):delete e[t])}}class r extends t{constructor(e,t){super(),this.enter=e,this.leave=t}visit(e,t,r,n){if(e){if(this.enter){const s=this.should_skip,i=this.should_remove,o=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,t,r,n),this.replacement&&(e=this.replacement,this.replace(t,r,n,e)),this.should_remove&&this.remove(t,r,n);const a=this.should_skip,l=this.should_remove;if(this.should_skip=s,this.should_remove=i,this.replacement=o,a)return e;if(l)return null}for(const t in e){const r=e[t];if(\"object\"==typeof r)if(Array.isArray(r))for(let n=0;n<r.length;n+=1)null!==r[n]&&\"string\"==typeof r[n].type&&(this.visit(r[n],e,t,n)||n--);else null!==r&&\"string\"==typeof r.type&&this.visit(r,e,t,null)}if(this.leave){const s=this.replacement,i=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,t,r,n),this.replacement&&(e=this.replacement,this.replace(t,r,n,e)),this.should_remove&&this.remove(t,r,n);const o=this.should_remove;if(this.replacement=s,this.should_remove=i,o)return null}}return e}}class n extends t{constructor(e,t){super(),this.enter=e,this.leave=t}async visit(e,t,r,n){if(e){if(this.enter){const s=this.should_skip,i=this.should_remove,o=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,await this.enter.call(this.context,e,t,r,n),this.replacement&&(e=this.replacement,this.replace(t,r,n,e)),this.should_remove&&this.remove(t,r,n);const a=this.should_skip,l=this.should_remove;if(this.should_skip=s,this.should_remove=i,this.replacement=o,a)return e;if(l)return null}for(const t in e){const r=e[t];if(\"object\"==typeof r)if(Array.isArray(r))for(let n=0;n<r.length;n+=1)null!==r[n]&&\"string\"==typeof r[n].type&&(await this.visit(r[n],e,t,n)||n--);else null!==r&&\"string\"==typeof r.type&&await this.visit(r,e,t,null)}if(this.leave){const s=this.replacement,i=this.should_remove;this.replacement=null,this.should_remove=!1,await this.leave.call(this.context,e,t,r,n),this.replacement&&(e=this.replacement,this.replace(t,r,n,e)),this.should_remove&&this.remove(t,r,n);const o=this.should_remove;if(this.replacement=s,this.should_remove=i,o)return null}}return e}}e.asyncWalk=async function(e,{enter:t,leave:r}){const s=new n(t,r);return await s.visit(e,null)},e.walk=function(e,{enter:t,leave:n}){return new r(t,n).visit(e,null)},Object.defineProperty(e,\"__esModule\",{value:!0})}(t)},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(172))&&n.__esModule?n:{default:n},i=function(e){if(e&&e.__esModule)return e;if(null===e||\"object\"!=typeof e&&\"function\"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=n?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}(r(166));function o(){if(\"function\"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}var a=function(e){return new s.default(e)};Object.assign(a,i),delete a.__esModule;var l=a;t.default=l,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(52))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.ROOT,r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,a(t,r);var s,l,c=n.prototype;return c.toString=function(){var e=this.reduce((function(e,t){return e.push(String(t)),e}),[]).join(\",\");return this.trailingComma?e+\",\":e},c.error=function(e,t){return this._error?this._error(e,t):new Error(e)},s=n,(l=[{key:\"errorGenerator\",set:function(e){this._error=e}}])&&o(s.prototype,l),n}(s.default);t.default=l,e.exports=t.default},(e,t)=>{\"use strict\";function r(e){for(var t=e.toLowerCase(),r=\"\",n=!1,s=0;s<6&&void 0!==t[s];s++){var i=t.charCodeAt(s);if(n=32===i,!(i>=97&&i<=102||i>=48&&i<=57))break;r+=t[s]}if(0!==r.length){var o=parseInt(r,16);return o>=55296&&o<=57343||0===o||o>1114111?[\"�\",r.length+(n?1:0)]:[String.fromCodePoint(o),r.length+(n?1:0)]}}t.__esModule=!0,t.default=function(e){if(!n.test(e))return e;for(var t=\"\",s=0;s<e.length;s++)if(\"\\\\\"!==e[s])t+=e[s];else{var i=r(e.slice(s+1,s+7));if(void 0!==i){t+=i[0],s+=i[1];continue}if(\"\\\\\"===e[s+1]){t+=\"\\\\\",s++;continue}e.length===s+1&&(t+=e[s])}return t};var n=/\\\\/;e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(52))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.SELECTOR,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=a(r(92)),s=r(91),i=a(r(15)),o=r(5);function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){var t,r,i,a;function u(t){var r;return(r=e.call(this,t)||this).type=o.CLASS,r._constructed=!0,r}return r=e,(t=u).prototype=Object.create(r.prototype),t.prototype.constructor=t,c(t,r),u.prototype.valueToString=function(){return\".\"+e.prototype.valueToString.call(this)},i=u,(a=[{key:\"value\",get:function(){return this._value},set:function(e){if(this._constructed){var t=(0,n.default)(e,{isIdentifier:!0});t!==e?((0,s.ensureObject)(this,\"raws\"),this.raws.value=t):this.raws&&delete this.raws.value}this._value=e}}])&&l(i.prototype,a),u}(i.default);t.default=u,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(15))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.COMMENT,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(15))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.ID,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n.prototype.valueToString=function(){return\"#\"+e.prototype.valueToString.call(this)},n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(53))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.TAG,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(15))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.STRING,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(52))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.PSEUDO,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n.prototype.toString=function(){var e=this.length?\"(\"+this.map(String).join(\",\")+\")\":\"\";return[this.rawSpaceBefore,this.stringifyProperty(\"value\"),e,this.rawSpaceAfter].join(\"\")},n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(53))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.UNIVERSAL,r.value=\"*\",r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(15))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.COMBINATOR,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(15))&&n.__esModule?n:{default:n},i=r(5);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=i.NESTING,r.value=\"&\",r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),n}(s.default);t.default=a,e.exports=t.default},(e,t,r)=>{var n=r(110);e.exports=function(e){return Object(n(e))}},e=>{e.exports=function(e){if(null==e)throw TypeError(\"Can't call method on \"+e);return e}},(e,t,r)=>{var n=r(183),s=r(55);(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})(\"versions\",[]).push({version:\"3.15.2\",mode:n?\"pure\":\"global\",copyright:\"© 2021 Denis Pushkarev (zloirock.ru)\"})},(e,t,r)=>{var n=r(31),s=r(113),i=r(57),o=r(115),a=Object.defineProperty;t.f=n?a:function(e,t,r){if(i(e),t=o(t,!0),i(r),s)try{return a(e,t,r)}catch(e){}if(\"get\"in r||\"set\"in r)throw TypeError(\"Accessors not supported\");return\"value\"in r&&(e[t]=r.value),e}},(e,t,r)=>{var n=r(31),s=r(16),i=r(114);e.exports=!n&&!s((function(){return 7!=Object.defineProperty(i(\"div\"),\"a\",{get:function(){return 7}}).a}))},(e,t,r)=>{var n=r(2),s=r(24),i=n.document,o=s(i)&&s(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},(e,t,r)=>{var n=r(24);e.exports=function(e,t){if(!n(e))return e;var r,s;if(t&&\"function\"==typeof(r=e.toString)&&!n(s=r.call(e)))return s;if(\"function\"==typeof(r=e.valueOf)&&!n(s=r.call(e)))return s;if(!t&&\"function\"==typeof(r=e.toString)&&!n(s=r.call(e)))return s;throw TypeError(\"Can't convert object to primitive value\")}},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{var n=r(118),s=r(16);e.exports=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},(e,t,r)=>{var n,s,i=r(2),o=r(33),a=i.process,l=a&&a.versions,c=l&&l.v8;c?s=(n=c.split(\".\"))[0]<4?1:n[0]+n[1]:o&&(!(n=o.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\\/(\\d+)/))&&(s=n[1]),e.exports=s&&+s},(e,t,r)=>{var n=r(2),s=r(32),i=r(17),o=r(56),a=r(120),l=r(186),c=l.get,u=l.enforce,p=String(String).split(\"String\");(e.exports=function(e,t,r,a){var l,c=!!a&&!!a.unsafe,f=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;\"function\"==typeof r&&(\"string\"!=typeof t||i(r,\"name\")||s(r,\"name\",t),(l=u(r)).source||(l.source=p.join(\"string\"==typeof t?t:\"\"))),e!==n?(c?!d&&e[t]&&(f=!0):delete e[t],f?e[t]=r:s(e,t,r)):f?e[t]=r:o(t,r)})(Function.prototype,\"toString\",(function(){return\"function\"==typeof this&&c(this).source||a(this)}))},(e,t,r)=>{var n=r(55),s=Function.toString;\"function\"!=typeof n.inspectSource&&(n.inspectSource=function(e){return s.call(e)}),e.exports=n.inspectSource},(e,t,r)=>{var n=r(111),s=r(58),i=n(\"keys\");e.exports=function(e){return i[e]||(i[e]=s(e))}},e=>{e.exports={}},e=>{e.exports=function(e){if(\"function\"!=typeof e)throw TypeError(String(e)+\" is not a function\");return e}},(e,t,r)=>{var n=r(125),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:t)(e)}},(e,t,r)=>{\"use strict\";function n(){const e=r(211);return n=function(){return e},e}function s(){const e=r(10);return s=function(){return e},e}function i(){const e=r(39);return i=function(){return e},e}function o(){const e=r(0);return o=function(){return e},e}function a(){const e=r(239);return a=function(){return e},e}function l(){const e=r(28);return l=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;const c={enter(e,t){const r=e.node.loc;r&&(t.loc=r,e.stop())}};class u{constructor(e,{code:t,ast:r,inputMap:n}){this._map=new Map,this.opts=void 0,this.declarations={},this.path=null,this.ast={},this.scope=void 0,this.metadata={},this.code=\"\",this.inputMap=null,this.hub={file:this,getCode:()=>this.code,getScope:()=>this.scope,addHelper:this.addHelper.bind(this),buildError:this.buildCodeFrameError.bind(this)},this.opts=e,this.code=t,this.ast=r,this.inputMap=n,this.path=s().NodePath.get({hub:this.hub,parentPath:null,parent:this.ast,container:this.ast,key:\"program\"}).setContext(),this.scope=this.path.scope}get shebang(){const{interpreter:e}=this.path.node;return e?e.value:\"\"}set shebang(e){e?this.path.get(\"interpreter\").replaceWith(o().interpreterDirective(e)):this.path.get(\"interpreter\").remove()}set(e,t){if(\"helpersNamespace\"===e)throw new Error(\"Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to explore using 'helperGenerator' alongside 'file.availableHelper()'.\");this._map.set(e,t)}get(e){return this._map.get(e)}has(e){return this._map.has(e)}getModuleName(){return(0,a().getModuleName)(this.opts,this.opts)}addImport(){throw new Error(\"This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed  from that module, such as 'addNamed' or 'addDefault'.\")}availableHelper(e,t){let r;try{r=n().minVersion(e)}catch(e){if(\"BABEL_HELPER_UNKNOWN\"!==e.code)throw e;return!1}return\"string\"!=typeof t||(l().valid(t)&&(t=`^${t}`),!l().intersects(`<${r}`,t)&&!l().intersects(\">=8.0.0\",t))}addHelper(e){const t=this.declarations[e];if(t)return o().cloneNode(t);const r=this.get(\"helperGenerator\");if(r){const t=r(e);if(t)return t}n().ensure(e,u);const s=this.declarations[e]=this.scope.generateUidIdentifier(e),i={};for(const t of n().getDependencies(e))i[t]=this.addHelper(t);const{nodes:a,globals:l}=n().get(e,(e=>i[e]),s,Object.keys(this.scope.getAllBindings()));return l.forEach((e=>{this.path.scope.hasBinding(e,!0)&&this.path.scope.rename(e)})),a.forEach((e=>{e._compact=!0})),this.path.unshiftContainer(\"body\",a),this.path.get(\"body\").forEach((e=>{-1!==a.indexOf(e.node)&&e.isVariableDeclaration()&&this.scope.registerDeclaration(e)})),s}addTemplateObject(){throw new Error(\"This function has been moved into the template literal transform itself.\")}buildCodeFrameError(e,t,r=SyntaxError){let n=e&&(e.loc||e._loc);if(!n&&e){const r={loc:null};(0,s().default)(e,c,this.scope,r),n=r.loc;let i=\"This is an error on an internal node. Probably an internal error.\";n&&(i+=\" Location has been estimated.\"),t+=` (${i})`}if(n){const{highlightCode:e=!0}=this.opts;t+=\"\\n\"+(0,i().codeFrameColumns)(this.code,{start:{line:n.start.line,column:n.start.column+1},end:n.end&&n.start.line===n.end.line?{line:n.end.line,column:n.end.column+1}:void 0},{highlightCode:e})}return new r(t)}}t.default=u},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){const r=Object.keys(t);for(const n of r)if(e[n]!==t[n])return!1;return!0}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.classMethodOrDeclareMethodCommon=t.classMethodOrPropertyCommon=t.patternLikeCommon=t.functionDeclarationCommon=t.functionTypeAnnotationCommon=t.functionCommon=void 0,r(62),r(38),r(63);var n=r(25),s=r(20);(0,s.default)(\"ArrayExpression\",{fields:{elements:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeOrValueType)(\"null\",\"Expression\",\"SpreadElement\"))),default:[]}},visitor:[\"elements\"],aliases:[\"Expression\"]}),(0,s.default)(\"AssignmentExpression\",{fields:{operator:{validate:(0,s.assertValueType)(\"string\")},left:{validate:(0,s.assertNodeType)(\"LVal\")},right:{validate:(0,s.assertNodeType)(\"Expression\")}},builder:[\"operator\",\"left\",\"right\"],visitor:[\"left\",\"right\"],aliases:[\"Expression\"]}),(0,s.default)(\"BinaryExpression\",{builder:[\"operator\",\"left\",\"right\"],fields:{operator:{validate:(0,s.assertOneOf)(...n.BINARY_OPERATORS)},left:{validate:function(){const e=(0,s.assertNodeType)(\"Expression\"),t=(0,s.assertNodeType)(\"Expression\",\"PrivateName\"),r=function(r,n,s){(\"in\"===r.operator?t:e)(r,n,s)};return r.oneOfNodeTypes=[\"Expression\",\"PrivateName\"],r}()},right:{validate:(0,s.assertNodeType)(\"Expression\")}},visitor:[\"left\",\"right\"],aliases:[\"Binary\",\"Expression\"]}),(0,s.default)(\"InterpreterDirective\",{builder:[\"value\"],fields:{value:{validate:(0,s.assertValueType)(\"string\")}}}),(0,s.default)(\"Directive\",{visitor:[\"value\"],fields:{value:{validate:(0,s.assertNodeType)(\"DirectiveLiteral\")}}}),(0,s.default)(\"DirectiveLiteral\",{builder:[\"value\"],fields:{value:{validate:(0,s.assertValueType)(\"string\")}}}),(0,s.default)(\"BlockStatement\",{builder:[\"body\",\"directives\"],visitor:[\"directives\",\"body\"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Directive\"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Statement\")))}},aliases:[\"Scopable\",\"BlockParent\",\"Block\",\"Statement\"]}),(0,s.default)(\"BreakStatement\",{visitor:[\"label\"],fields:{label:{validate:(0,s.assertNodeType)(\"Identifier\"),optional:!0}},aliases:[\"Statement\",\"Terminatorless\",\"CompletionStatement\"]}),(0,s.default)(\"CallExpression\",{visitor:[\"callee\",\"arguments\",\"typeParameters\",\"typeArguments\"],builder:[\"callee\",\"arguments\"],aliases:[\"Expression\"],fields:Object.assign({callee:{validate:(0,s.assertNodeType)(\"Expression\",\"V8IntrinsicIdentifier\")},arguments:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Expression\",\"SpreadElement\",\"JSXNamespacedName\",\"ArgumentPlaceholder\")))}},{optional:{validate:(0,s.assertOneOf)(!0,!1),optional:!0}},{typeArguments:{validate:(0,s.assertNodeType)(\"TypeParameterInstantiation\"),optional:!0},typeParameters:{validate:(0,s.assertNodeType)(\"TSTypeParameterInstantiation\"),optional:!0}})}),(0,s.default)(\"CatchClause\",{visitor:[\"param\",\"body\"],fields:{param:{validate:(0,s.assertNodeType)(\"Identifier\",\"ArrayPattern\",\"ObjectPattern\"),optional:!0},body:{validate:(0,s.assertNodeType)(\"BlockStatement\")}},aliases:[\"Scopable\",\"BlockParent\"]}),(0,s.default)(\"ConditionalExpression\",{visitor:[\"test\",\"consequent\",\"alternate\"],fields:{test:{validate:(0,s.assertNodeType)(\"Expression\")},consequent:{validate:(0,s.assertNodeType)(\"Expression\")},alternate:{validate:(0,s.assertNodeType)(\"Expression\")}},aliases:[\"Expression\",\"Conditional\"]}),(0,s.default)(\"ContinueStatement\",{visitor:[\"label\"],fields:{label:{validate:(0,s.assertNodeType)(\"Identifier\"),optional:!0}},aliases:[\"Statement\",\"Terminatorless\",\"CompletionStatement\"]}),(0,s.default)(\"DebuggerStatement\",{aliases:[\"Statement\"]}),(0,s.default)(\"DoWhileStatement\",{visitor:[\"test\",\"body\"],fields:{test:{validate:(0,s.assertNodeType)(\"Expression\")},body:{validate:(0,s.assertNodeType)(\"Statement\")}},aliases:[\"Statement\",\"BlockParent\",\"Loop\",\"While\",\"Scopable\"]}),(0,s.default)(\"EmptyStatement\",{aliases:[\"Statement\"]}),(0,s.default)(\"ExpressionStatement\",{visitor:[\"expression\"],fields:{expression:{validate:(0,s.assertNodeType)(\"Expression\")}},aliases:[\"Statement\",\"ExpressionWrapper\"]}),(0,s.default)(\"File\",{builder:[\"program\",\"comments\",\"tokens\"],visitor:[\"program\"],fields:{program:{validate:(0,s.assertNodeType)(\"Program\")},comments:{validate:Object.assign((()=>{}),{each:{oneOfNodeTypes:[\"CommentBlock\",\"CommentLine\"]}}),optional:!0},tokens:{validate:(0,s.assertEach)(Object.assign((()=>{}),{type:\"any\"})),optional:!0}}}),(0,s.default)(\"ForInStatement\",{visitor:[\"left\",\"right\",\"body\"],aliases:[\"Scopable\",\"Statement\",\"For\",\"BlockParent\",\"Loop\",\"ForXStatement\"],fields:{left:{validate:(0,s.assertNodeType)(\"VariableDeclaration\",\"LVal\")},right:{validate:(0,s.assertNodeType)(\"Expression\")},body:{validate:(0,s.assertNodeType)(\"Statement\")}}}),(0,s.default)(\"ForStatement\",{visitor:[\"init\",\"test\",\"update\",\"body\"],aliases:[\"Scopable\",\"Statement\",\"For\",\"BlockParent\",\"Loop\"],fields:{init:{validate:(0,s.assertNodeType)(\"VariableDeclaration\",\"Expression\"),optional:!0},test:{validate:(0,s.assertNodeType)(\"Expression\"),optional:!0},update:{validate:(0,s.assertNodeType)(\"Expression\"),optional:!0},body:{validate:(0,s.assertNodeType)(\"Statement\")}}});const i={params:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Identifier\",\"Pattern\",\"RestElement\")))},generator:{default:!1},async:{default:!1}};t.functionCommon=i;const o={returnType:{validate:(0,s.assertNodeType)(\"TypeAnnotation\",\"TSTypeAnnotation\",\"Noop\"),optional:!0},typeParameters:{validate:(0,s.assertNodeType)(\"TypeParameterDeclaration\",\"TSTypeParameterDeclaration\",\"Noop\"),optional:!0}};t.functionTypeAnnotationCommon=o;const a=Object.assign({},i,{declare:{validate:(0,s.assertValueType)(\"boolean\"),optional:!0},id:{validate:(0,s.assertNodeType)(\"Identifier\"),optional:!0}});t.functionDeclarationCommon=a,(0,s.default)(\"FunctionDeclaration\",{builder:[\"id\",\"params\",\"body\",\"generator\",\"async\"],visitor:[\"id\",\"params\",\"body\",\"returnType\",\"typeParameters\"],fields:Object.assign({},a,o,{body:{validate:(0,s.assertNodeType)(\"BlockStatement\")}}),aliases:[\"Scopable\",\"Function\",\"BlockParent\",\"FunctionParent\",\"Statement\",\"Pureish\",\"Declaration\"],validate:()=>{}}),(0,s.default)(\"FunctionExpression\",{inherits:\"FunctionDeclaration\",aliases:[\"Scopable\",\"Function\",\"BlockParent\",\"FunctionParent\",\"Expression\",\"Pureish\"],fields:Object.assign({},i,o,{id:{validate:(0,s.assertNodeType)(\"Identifier\"),optional:!0},body:{validate:(0,s.assertNodeType)(\"BlockStatement\")}})});const l={typeAnnotation:{validate:(0,s.assertNodeType)(\"TypeAnnotation\",\"TSTypeAnnotation\",\"Noop\"),optional:!0},decorators:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Decorator\")))}};t.patternLikeCommon=l,(0,s.default)(\"Identifier\",{builder:[\"name\"],visitor:[\"typeAnnotation\",\"decorators\"],aliases:[\"Expression\",\"PatternLike\",\"LVal\",\"TSEntityName\"],fields:Object.assign({},l,{name:{validate:(0,s.chain)((0,s.assertValueType)(\"string\"),Object.assign((function(e,t,r){}),{type:\"string\"}))},optional:{validate:(0,s.assertValueType)(\"boolean\"),optional:!0}}),validate(e,t,r){}}),(0,s.default)(\"IfStatement\",{visitor:[\"test\",\"consequent\",\"alternate\"],aliases:[\"Statement\",\"Conditional\"],fields:{test:{validate:(0,s.assertNodeType)(\"Expression\")},consequent:{validate:(0,s.assertNodeType)(\"Statement\")},alternate:{optional:!0,validate:(0,s.assertNodeType)(\"Statement\")}}}),(0,s.default)(\"LabeledStatement\",{visitor:[\"label\",\"body\"],aliases:[\"Statement\"],fields:{label:{validate:(0,s.assertNodeType)(\"Identifier\")},body:{validate:(0,s.assertNodeType)(\"Statement\")}}}),(0,s.default)(\"StringLiteral\",{builder:[\"value\"],fields:{value:{validate:(0,s.assertValueType)(\"string\")}},aliases:[\"Expression\",\"Pureish\",\"Literal\",\"Immutable\"]}),(0,s.default)(\"NumericLiteral\",{builder:[\"value\"],deprecatedAlias:\"NumberLiteral\",fields:{value:{validate:(0,s.assertValueType)(\"number\")}},aliases:[\"Expression\",\"Pureish\",\"Literal\",\"Immutable\"]}),(0,s.default)(\"NullLiteral\",{aliases:[\"Expression\",\"Pureish\",\"Literal\",\"Immutable\"]}),(0,s.default)(\"BooleanLiteral\",{builder:[\"value\"],fields:{value:{validate:(0,s.assertValueType)(\"boolean\")}},aliases:[\"Expression\",\"Pureish\",\"Literal\",\"Immutable\"]}),(0,s.default)(\"RegExpLiteral\",{builder:[\"pattern\",\"flags\"],deprecatedAlias:\"RegexLiteral\",aliases:[\"Expression\",\"Pureish\",\"Literal\"],fields:{pattern:{validate:(0,s.assertValueType)(\"string\")},flags:{validate:(0,s.chain)((0,s.assertValueType)(\"string\"),Object.assign((function(e,t,r){}),{type:\"string\"})),default:\"\"}}}),(0,s.default)(\"LogicalExpression\",{builder:[\"operator\",\"left\",\"right\"],visitor:[\"left\",\"right\"],aliases:[\"Binary\",\"Expression\"],fields:{operator:{validate:(0,s.assertOneOf)(...n.LOGICAL_OPERATORS)},left:{validate:(0,s.assertNodeType)(\"Expression\")},right:{validate:(0,s.assertNodeType)(\"Expression\")}}}),(0,s.default)(\"MemberExpression\",{builder:[\"object\",\"property\",\"computed\",\"optional\"],visitor:[\"object\",\"property\"],aliases:[\"Expression\",\"LVal\"],fields:Object.assign({object:{validate:(0,s.assertNodeType)(\"Expression\")},property:{validate:function(){const e=(0,s.assertNodeType)(\"Identifier\",\"PrivateName\"),t=(0,s.assertNodeType)(\"Expression\"),r=function(r,n,s){(r.computed?t:e)(r,n,s)};return r.oneOfNodeTypes=[\"Expression\",\"Identifier\",\"PrivateName\"],r}()},computed:{default:!1}},{optional:{validate:(0,s.assertOneOf)(!0,!1),optional:!0}})}),(0,s.default)(\"NewExpression\",{inherits:\"CallExpression\"}),(0,s.default)(\"Program\",{visitor:[\"directives\",\"body\"],builder:[\"body\",\"directives\",\"sourceType\",\"interpreter\"],fields:{sourceFile:{validate:(0,s.assertValueType)(\"string\")},sourceType:{validate:(0,s.assertOneOf)(\"script\",\"module\"),default:\"script\"},interpreter:{validate:(0,s.assertNodeType)(\"InterpreterDirective\"),default:null,optional:!0},directives:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Directive\"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Statement\")))}},aliases:[\"Scopable\",\"BlockParent\",\"Block\"]}),(0,s.default)(\"ObjectExpression\",{visitor:[\"properties\"],aliases:[\"Expression\"],fields:{properties:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"ObjectMethod\",\"ObjectProperty\",\"SpreadElement\")))}}}),(0,s.default)(\"ObjectMethod\",{builder:[\"kind\",\"key\",\"params\",\"body\",\"computed\",\"generator\",\"async\"],fields:Object.assign({},i,o,{kind:Object.assign({validate:(0,s.assertOneOf)(\"method\",\"get\",\"set\")},{default:\"method\"}),computed:{default:!1},key:{validate:function(){const e=(0,s.assertNodeType)(\"Identifier\",\"StringLiteral\",\"NumericLiteral\"),t=(0,s.assertNodeType)(\"Expression\"),r=function(r,n,s){(r.computed?t:e)(r,n,s)};return r.oneOfNodeTypes=[\"Expression\",\"Identifier\",\"StringLiteral\",\"NumericLiteral\"],r}()},decorators:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Decorator\"))),optional:!0},body:{validate:(0,s.assertNodeType)(\"BlockStatement\")}}),visitor:[\"key\",\"params\",\"body\",\"decorators\",\"returnType\",\"typeParameters\"],aliases:[\"UserWhitespacable\",\"Function\",\"Scopable\",\"BlockParent\",\"FunctionParent\",\"Method\",\"ObjectMember\"]}),(0,s.default)(\"ObjectProperty\",{builder:[\"key\",\"value\",\"computed\",\"shorthand\",\"decorators\"],fields:{computed:{default:!1},key:{validate:function(){const e=(0,s.assertNodeType)(\"Identifier\",\"StringLiteral\",\"NumericLiteral\"),t=(0,s.assertNodeType)(\"Expression\"),r=function(r,n,s){(r.computed?t:e)(r,n,s)};return r.oneOfNodeTypes=[\"Expression\",\"Identifier\",\"StringLiteral\",\"NumericLiteral\"],r}()},value:{validate:(0,s.assertNodeType)(\"Expression\",\"PatternLike\")},shorthand:{validate:(0,s.chain)((0,s.assertValueType)(\"boolean\"),Object.assign((function(e,t,r){}),{type:\"boolean\"}),(function(e,t,r){})),default:!1},decorators:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Decorator\"))),optional:!0}},visitor:[\"key\",\"value\",\"decorators\"],aliases:[\"UserWhitespacable\",\"Property\",\"ObjectMember\"],validate:((0,s.assertNodeType)(\"Identifier\",\"Pattern\"),(0,s.assertNodeType)(\"Expression\"),function(e,t,r){})}),(0,s.default)(\"RestElement\",{visitor:[\"argument\",\"typeAnnotation\"],builder:[\"argument\"],aliases:[\"LVal\",\"PatternLike\"],deprecatedAlias:\"RestProperty\",fields:Object.assign({},l,{argument:{validate:(0,s.assertNodeType)(\"LVal\")}}),validate(e,t){}}),(0,s.default)(\"ReturnStatement\",{visitor:[\"argument\"],aliases:[\"Statement\",\"Terminatorless\",\"CompletionStatement\"],fields:{argument:{validate:(0,s.assertNodeType)(\"Expression\"),optional:!0}}}),(0,s.default)(\"SequenceExpression\",{visitor:[\"expressions\"],fields:{expressions:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Expression\")))}},aliases:[\"Expression\"]}),(0,s.default)(\"ParenthesizedExpression\",{visitor:[\"expression\"],aliases:[\"Expression\",\"ExpressionWrapper\"],fields:{expression:{validate:(0,s.assertNodeType)(\"Expression\")}}}),(0,s.default)(\"SwitchCase\",{visitor:[\"test\",\"consequent\"],fields:{test:{validate:(0,s.assertNodeType)(\"Expression\"),optional:!0},consequent:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Statement\")))}}}),(0,s.default)(\"SwitchStatement\",{visitor:[\"discriminant\",\"cases\"],aliases:[\"Statement\",\"BlockParent\",\"Scopable\"],fields:{discriminant:{validate:(0,s.assertNodeType)(\"Expression\")},cases:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"SwitchCase\")))}}}),(0,s.default)(\"ThisExpression\",{aliases:[\"Expression\"]}),(0,s.default)(\"ThrowStatement\",{visitor:[\"argument\"],aliases:[\"Statement\",\"Terminatorless\",\"CompletionStatement\"],fields:{argument:{validate:(0,s.assertNodeType)(\"Expression\")}}}),(0,s.default)(\"TryStatement\",{visitor:[\"block\",\"handler\",\"finalizer\"],aliases:[\"Statement\"],fields:{block:{validate:(0,s.chain)((0,s.assertNodeType)(\"BlockStatement\"),Object.assign((function(e){}),{oneOfNodeTypes:[\"BlockStatement\"]}))},handler:{optional:!0,validate:(0,s.assertNodeType)(\"CatchClause\")},finalizer:{optional:!0,validate:(0,s.assertNodeType)(\"BlockStatement\")}}}),(0,s.default)(\"UnaryExpression\",{builder:[\"operator\",\"argument\",\"prefix\"],fields:{prefix:{default:!0},argument:{validate:(0,s.assertNodeType)(\"Expression\")},operator:{validate:(0,s.assertOneOf)(...n.UNARY_OPERATORS)}},visitor:[\"argument\"],aliases:[\"UnaryLike\",\"Expression\"]}),(0,s.default)(\"UpdateExpression\",{builder:[\"operator\",\"argument\",\"prefix\"],fields:{prefix:{default:!1},argument:{validate:(0,s.assertNodeType)(\"Expression\")},operator:{validate:(0,s.assertOneOf)(...n.UPDATE_OPERATORS)}},visitor:[\"argument\"],aliases:[\"Expression\"]}),(0,s.default)(\"VariableDeclaration\",{builder:[\"kind\",\"declarations\"],visitor:[\"declarations\"],aliases:[\"Statement\",\"Declaration\"],fields:{declare:{validate:(0,s.assertValueType)(\"boolean\"),optional:!0},kind:{validate:(0,s.assertOneOf)(\"var\",\"let\",\"const\")},declarations:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"VariableDeclarator\")))}},validate(e,t,r){}}),(0,s.default)(\"VariableDeclarator\",{visitor:[\"id\",\"init\"],fields:{id:{validate:(0,s.assertNodeType)(\"LVal\")},definite:{optional:!0,validate:(0,s.assertValueType)(\"boolean\")},init:{optional:!0,validate:(0,s.assertNodeType)(\"Expression\")}}}),(0,s.default)(\"WhileStatement\",{visitor:[\"test\",\"body\"],aliases:[\"Statement\",\"BlockParent\",\"Loop\",\"While\",\"Scopable\"],fields:{test:{validate:(0,s.assertNodeType)(\"Expression\")},body:{validate:(0,s.assertNodeType)(\"Statement\")}}}),(0,s.default)(\"WithStatement\",{visitor:[\"object\",\"body\"],aliases:[\"Statement\"],fields:{object:{validate:(0,s.assertNodeType)(\"Expression\")},body:{validate:(0,s.assertNodeType)(\"Statement\")}}}),(0,s.default)(\"AssignmentPattern\",{visitor:[\"left\",\"right\",\"decorators\"],builder:[\"left\",\"right\"],aliases:[\"Pattern\",\"PatternLike\",\"LVal\"],fields:Object.assign({},l,{left:{validate:(0,s.assertNodeType)(\"Identifier\",\"ObjectPattern\",\"ArrayPattern\",\"MemberExpression\")},right:{validate:(0,s.assertNodeType)(\"Expression\")},decorators:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Decorator\"))),optional:!0}})}),(0,s.default)(\"ArrayPattern\",{visitor:[\"elements\",\"typeAnnotation\"],builder:[\"elements\"],aliases:[\"Pattern\",\"PatternLike\",\"LVal\"],fields:Object.assign({},l,{elements:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeOrValueType)(\"null\",\"PatternLike\")))},decorators:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Decorator\"))),optional:!0}})}),(0,s.default)(\"ArrowFunctionExpression\",{builder:[\"params\",\"body\",\"async\"],visitor:[\"params\",\"body\",\"returnType\",\"typeParameters\"],aliases:[\"Scopable\",\"Function\",\"BlockParent\",\"FunctionParent\",\"Expression\",\"Pureish\"],fields:Object.assign({},i,o,{expression:{validate:(0,s.assertValueType)(\"boolean\")},body:{validate:(0,s.assertNodeType)(\"BlockStatement\",\"Expression\")}})}),(0,s.default)(\"ClassBody\",{visitor:[\"body\"],fields:{body:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"ClassMethod\",\"ClassPrivateMethod\",\"ClassProperty\",\"ClassPrivateProperty\",\"TSDeclareMethod\",\"TSIndexSignature\")))}}}),(0,s.default)(\"ClassExpression\",{builder:[\"id\",\"superClass\",\"body\",\"decorators\"],visitor:[\"id\",\"body\",\"superClass\",\"mixins\",\"typeParameters\",\"superTypeParameters\",\"implements\",\"decorators\"],aliases:[\"Scopable\",\"Class\",\"Expression\"],fields:{id:{validate:(0,s.assertNodeType)(\"Identifier\"),optional:!0},typeParameters:{validate:(0,s.assertNodeType)(\"TypeParameterDeclaration\",\"TSTypeParameterDeclaration\",\"Noop\"),optional:!0},body:{validate:(0,s.assertNodeType)(\"ClassBody\")},superClass:{optional:!0,validate:(0,s.assertNodeType)(\"Expression\")},superTypeParameters:{validate:(0,s.assertNodeType)(\"TypeParameterInstantiation\",\"TSTypeParameterInstantiation\"),optional:!0},implements:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"TSExpressionWithTypeArguments\",\"ClassImplements\"))),optional:!0},decorators:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Decorator\"))),optional:!0},mixins:{validate:(0,s.assertNodeType)(\"InterfaceExtends\"),optional:!0}}}),(0,s.default)(\"ClassDeclaration\",{inherits:\"ClassExpression\",aliases:[\"Scopable\",\"Class\",\"Statement\",\"Declaration\"],fields:{id:{validate:(0,s.assertNodeType)(\"Identifier\")},typeParameters:{validate:(0,s.assertNodeType)(\"TypeParameterDeclaration\",\"TSTypeParameterDeclaration\",\"Noop\"),optional:!0},body:{validate:(0,s.assertNodeType)(\"ClassBody\")},superClass:{optional:!0,validate:(0,s.assertNodeType)(\"Expression\")},superTypeParameters:{validate:(0,s.assertNodeType)(\"TypeParameterInstantiation\",\"TSTypeParameterInstantiation\"),optional:!0},implements:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"TSExpressionWithTypeArguments\",\"ClassImplements\"))),optional:!0},decorators:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Decorator\"))),optional:!0},mixins:{validate:(0,s.assertNodeType)(\"InterfaceExtends\"),optional:!0},declare:{validate:(0,s.assertValueType)(\"boolean\"),optional:!0},abstract:{validate:(0,s.assertValueType)(\"boolean\"),optional:!0}},validate:((0,s.assertNodeType)(\"Identifier\"),function(e,t,r){})}),(0,s.default)(\"ExportAllDeclaration\",{visitor:[\"source\"],aliases:[\"Statement\",\"Declaration\",\"ModuleDeclaration\",\"ExportDeclaration\"],fields:{source:{validate:(0,s.assertNodeType)(\"StringLiteral\")},exportKind:(0,s.validateOptional)((0,s.assertOneOf)(\"type\",\"value\")),assertions:{optional:!0,validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"ImportAttribute\")))}}}),(0,s.default)(\"ExportDefaultDeclaration\",{visitor:[\"declaration\"],aliases:[\"Statement\",\"Declaration\",\"ModuleDeclaration\",\"ExportDeclaration\"],fields:{declaration:{validate:(0,s.assertNodeType)(\"FunctionDeclaration\",\"TSDeclareFunction\",\"ClassDeclaration\",\"Expression\")}}}),(0,s.default)(\"ExportNamedDeclaration\",{visitor:[\"declaration\",\"specifiers\",\"source\"],aliases:[\"Statement\",\"Declaration\",\"ModuleDeclaration\",\"ExportDeclaration\"],fields:{declaration:{optional:!0,validate:(0,s.chain)((0,s.assertNodeType)(\"Declaration\"),Object.assign((function(e,t,r){}),{oneOfNodeTypes:[\"Declaration\"]}),(function(e,t,r){}))},assertions:{optional:!0,validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"ImportAttribute\")))},specifiers:{default:[],validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)(function(){const e=(0,s.assertNodeType)(\"ExportSpecifier\",\"ExportDefaultSpecifier\",\"ExportNamespaceSpecifier\");return(0,s.assertNodeType)(\"ExportSpecifier\"),e}()))},source:{validate:(0,s.assertNodeType)(\"StringLiteral\"),optional:!0},exportKind:(0,s.validateOptional)((0,s.assertOneOf)(\"type\",\"value\"))}}),(0,s.default)(\"ExportSpecifier\",{visitor:[\"local\",\"exported\"],aliases:[\"ModuleSpecifier\"],fields:{local:{validate:(0,s.assertNodeType)(\"Identifier\")},exported:{validate:(0,s.assertNodeType)(\"Identifier\",\"StringLiteral\")}}}),(0,s.default)(\"ForOfStatement\",{visitor:[\"left\",\"right\",\"body\"],builder:[\"left\",\"right\",\"body\",\"await\"],aliases:[\"Scopable\",\"Statement\",\"For\",\"BlockParent\",\"Loop\",\"ForXStatement\"],fields:{left:{validate:(0,s.assertNodeType)(\"VariableDeclaration\",\"LVal\")},right:{validate:(0,s.assertNodeType)(\"Expression\")},body:{validate:(0,s.assertNodeType)(\"Statement\")},await:{default:!1}}}),(0,s.default)(\"ImportDeclaration\",{visitor:[\"specifiers\",\"source\"],aliases:[\"Statement\",\"Declaration\",\"ModuleDeclaration\"],fields:{assertions:{optional:!0,validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"ImportAttribute\")))},specifiers:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"ImportSpecifier\",\"ImportDefaultSpecifier\",\"ImportNamespaceSpecifier\")))},source:{validate:(0,s.assertNodeType)(\"StringLiteral\")},importKind:{validate:(0,s.assertOneOf)(\"type\",\"typeof\",\"value\"),optional:!0}}}),(0,s.default)(\"ImportDefaultSpecifier\",{visitor:[\"local\"],aliases:[\"ModuleSpecifier\"],fields:{local:{validate:(0,s.assertNodeType)(\"Identifier\")}}}),(0,s.default)(\"ImportNamespaceSpecifier\",{visitor:[\"local\"],aliases:[\"ModuleSpecifier\"],fields:{local:{validate:(0,s.assertNodeType)(\"Identifier\")}}}),(0,s.default)(\"ImportSpecifier\",{visitor:[\"local\",\"imported\"],aliases:[\"ModuleSpecifier\"],fields:{local:{validate:(0,s.assertNodeType)(\"Identifier\")},imported:{validate:(0,s.assertNodeType)(\"Identifier\",\"StringLiteral\")},importKind:{validate:(0,s.assertOneOf)(\"type\",\"typeof\"),optional:!0}}}),(0,s.default)(\"MetaProperty\",{visitor:[\"meta\",\"property\"],aliases:[\"Expression\"],fields:{meta:{validate:(0,s.chain)((0,s.assertNodeType)(\"Identifier\"),Object.assign((function(e,t,r){}),{oneOfNodeTypes:[\"Identifier\"]}))},property:{validate:(0,s.assertNodeType)(\"Identifier\")}}});const c={abstract:{validate:(0,s.assertValueType)(\"boolean\"),optional:!0},accessibility:{validate:(0,s.assertOneOf)(\"public\",\"private\",\"protected\"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,s.assertValueType)(\"boolean\"),optional:!0},key:{validate:(0,s.chain)(function(){const e=(0,s.assertNodeType)(\"Identifier\",\"StringLiteral\",\"NumericLiteral\"),t=(0,s.assertNodeType)(\"Expression\");return function(r,n,s){(r.computed?t:e)(r,n,s)}}(),(0,s.assertNodeType)(\"Identifier\",\"StringLiteral\",\"NumericLiteral\",\"Expression\"))}};t.classMethodOrPropertyCommon=c;const u=Object.assign({},i,c,{params:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Identifier\",\"Pattern\",\"RestElement\",\"TSParameterProperty\")))},kind:{validate:(0,s.assertOneOf)(\"get\",\"set\",\"method\",\"constructor\"),default:\"method\"},access:{validate:(0,s.chain)((0,s.assertValueType)(\"string\"),(0,s.assertOneOf)(\"public\",\"private\",\"protected\")),optional:!0},decorators:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Decorator\"))),optional:!0}});t.classMethodOrDeclareMethodCommon=u,(0,s.default)(\"ClassMethod\",{aliases:[\"Function\",\"Scopable\",\"BlockParent\",\"FunctionParent\",\"Method\"],builder:[\"kind\",\"key\",\"params\",\"body\",\"computed\",\"static\",\"generator\",\"async\"],visitor:[\"key\",\"params\",\"body\",\"decorators\",\"returnType\",\"typeParameters\"],fields:Object.assign({},u,o,{body:{validate:(0,s.assertNodeType)(\"BlockStatement\")}})}),(0,s.default)(\"ObjectPattern\",{visitor:[\"properties\",\"typeAnnotation\",\"decorators\"],builder:[\"properties\"],aliases:[\"Pattern\",\"PatternLike\",\"LVal\"],fields:Object.assign({},l,{properties:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"RestElement\",\"ObjectProperty\")))}})}),(0,s.default)(\"SpreadElement\",{visitor:[\"argument\"],aliases:[\"UnaryLike\"],deprecatedAlias:\"SpreadProperty\",fields:{argument:{validate:(0,s.assertNodeType)(\"Expression\")}}}),(0,s.default)(\"Super\",{aliases:[\"Expression\"]}),(0,s.default)(\"TaggedTemplateExpression\",{visitor:[\"tag\",\"quasi\"],aliases:[\"Expression\"],fields:{tag:{validate:(0,s.assertNodeType)(\"Expression\")},quasi:{validate:(0,s.assertNodeType)(\"TemplateLiteral\")},typeParameters:{validate:(0,s.assertNodeType)(\"TypeParameterInstantiation\",\"TSTypeParameterInstantiation\"),optional:!0}}}),(0,s.default)(\"TemplateElement\",{builder:[\"value\",\"tail\"],fields:{value:{validate:(0,s.assertShape)({raw:{validate:(0,s.assertValueType)(\"string\")},cooked:{validate:(0,s.assertValueType)(\"string\"),optional:!0}})},tail:{default:!1}}}),(0,s.default)(\"TemplateLiteral\",{visitor:[\"quasis\",\"expressions\"],aliases:[\"Expression\",\"Literal\"],fields:{quasis:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"TemplateElement\")))},expressions:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Expression\",\"TSType\")),(function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.\\nExpected ${r.length+1} quasis but got ${e.quasis.length}`)}))}}}),(0,s.default)(\"YieldExpression\",{builder:[\"argument\",\"delegate\"],visitor:[\"argument\"],aliases:[\"Expression\",\"Terminatorless\"],fields:{delegate:{validate:(0,s.chain)((0,s.assertValueType)(\"boolean\"),Object.assign((function(e,t,r){}),{type:\"boolean\"})),default:!1},argument:{optional:!0,validate:(0,s.assertNodeType)(\"Expression\")}}}),(0,s.default)(\"AwaitExpression\",{builder:[\"argument\"],visitor:[\"argument\"],aliases:[\"Expression\",\"Terminatorless\"],fields:{argument:{validate:(0,s.assertNodeType)(\"Expression\")}}}),(0,s.default)(\"Import\",{aliases:[\"Expression\"]}),(0,s.default)(\"BigIntLiteral\",{builder:[\"value\"],fields:{value:{validate:(0,s.assertValueType)(\"string\")}},aliases:[\"Expression\",\"Pureish\",\"Literal\",\"Immutable\"]}),(0,s.default)(\"ExportNamespaceSpecifier\",{visitor:[\"exported\"],aliases:[\"ModuleSpecifier\"],fields:{exported:{validate:(0,s.assertNodeType)(\"Identifier\")}}}),(0,s.default)(\"OptionalMemberExpression\",{builder:[\"object\",\"property\",\"computed\",\"optional\"],visitor:[\"object\",\"property\"],aliases:[\"Expression\"],fields:{object:{validate:(0,s.assertNodeType)(\"Expression\")},property:{validate:function(){const e=(0,s.assertNodeType)(\"Identifier\"),t=(0,s.assertNodeType)(\"Expression\"),r=function(r,n,s){(r.computed?t:e)(r,n,s)};return r.oneOfNodeTypes=[\"Expression\",\"Identifier\"],r}()},computed:{default:!1},optional:{validate:(0,s.assertValueType)(\"boolean\")}}}),(0,s.default)(\"OptionalCallExpression\",{visitor:[\"callee\",\"arguments\",\"typeParameters\",\"typeArguments\"],builder:[\"callee\",\"arguments\",\"optional\"],aliases:[\"Expression\"],fields:{callee:{validate:(0,s.assertNodeType)(\"Expression\")},arguments:{validate:(0,s.chain)((0,s.assertValueType)(\"array\"),(0,s.assertEach)((0,s.assertNodeType)(\"Expression\",\"SpreadElement\",\"JSXNamespacedName\",\"ArgumentPlaceholder\")))},optional:{validate:(0,s.assertValueType)(\"boolean\")},typeArguments:{validate:(0,s.assertNodeType)(\"TypeParameterInstantiation\"),optional:!0},typeParameters:{validate:(0,s.assertNodeType)(\"TSTypeParameterInstantiation\"),optional:!0}}})},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if(e===t)return!0;if(n.ALIAS_KEYS[t])return!1;const r=n.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(const t of r)if(e===t)return!0}return!1};var n=r(11)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){if(!e)return;const o=n.NODE_FIELDS[e.type];if(!o)return;s(e,t,r,o[t]),i(e,t,r)},t.validateField=s,t.validateChild=i;var n=r(11);function s(e,t,r,n){null!=n&&n.validate&&(n.optional&&null==r||n.validate(e,t,r))}function i(e,t,r){if(null==r)return;const s=n.NODE_PARENT_VALIDATIONS[r.type];s&&s(e,t,r)}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){t&&r&&(t[e]=Array.from(new Set([].concat(t[e],r[e]).filter(Boolean))))}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if(!e.isExportDeclaration())throw new Error(\"Only export declarations can be split.\");const t=e.isExportDefaultDeclaration(),r=e.get(\"declaration\"),s=r.isClassDeclaration();if(t){const t=r.isFunctionDeclaration()||s,i=r.isScope()?r.scope.parent:r.scope;let o=r.node.id,a=!1;o||(a=!0,o=i.generateUidIdentifier(\"default\"),(t||r.isFunctionExpression()||r.isClassExpression())&&(r.node.id=n.cloneNode(o)));const l=t?r:n.variableDeclaration(\"var\",[n.variableDeclarator(n.cloneNode(o),r.node)]),c=n.exportNamedDeclaration(null,[n.exportSpecifier(n.cloneNode(o),n.identifier(\"default\"))]);return e.insertAfter(c),e.replaceWith(l),a&&i.registerDeclaration(e),e}if(e.get(\"specifiers\").length>0)throw new Error(\"It doesn't make sense to split exported specifiers.\");const i=r.getOuterBindingIdentifiers(),o=Object.keys(i).map((e=>n.exportSpecifier(n.identifier(e),n.identifier(e)))),a=n.exportNamedDeclaration(null,o);return e.insertAfter(a),e.replaceWith(r.node),e};var n=r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){return new i(e,t,r).generate()},t.CodeGenerator=void 0;var n=r(416),s=r(418);class i extends s.default{constructor(e,t={},r){super(function(e,t){const r={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,indent:{adjustMultilineComment:!0,style:\"  \",base:0},decoratorsBeforeExport:!!t.decoratorsBeforeExport,jsescOption:Object.assign({quotes:\"double\",wrap:!0,minimal:!1},t.jsescOption),recordAndTupleSyntaxType:t.recordAndTupleSyntaxType};return r.jsonCompatibleStrings=t.jsonCompatibleStrings,r.minified?(r.compact=!0,r.shouldPrintComment=r.shouldPrintComment||(()=>r.comments)):r.shouldPrintComment=r.shouldPrintComment||(e=>r.comments||e.indexOf(\"@license\")>=0||e.indexOf(\"@preserve\")>=0),\"auto\"===r.compact&&(r.compact=e.length>5e5,r.compact),r.compact&&(r.indent.adjustMultilineComment=!1),r}(r,t),t.sourceMaps?new n.default(t,r):null),this.ast=void 0,this.ast=e}generate(){return super.generate(this.ast)}}t.CodeGenerator=class{constructor(e,t,r){this._generator=void 0,this._generator=new i(e,t,r)}generate(){return this._generator.generate()}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function({node:e,parent:t,scope:r,id:s},c=!1){if(e.id)return;if(!i.isObjectProperty(t)&&!i.isObjectMethod(t,{kind:\"method\"})||t.computed&&!i.isLiteral(t.key)){if(i.isVariableDeclarator(t)){if(s=t.id,i.isIdentifier(s)&&!c){const t=r.parent.getBinding(s.name);if(t&&t.constant&&r.getBinding(s.name)===t)return e.id=i.cloneNode(s),void(e.id[i.NOT_LOCAL_BINDING]=!0)}}else if(i.isAssignmentExpression(t,{operator:\"=\"}))s=t.left;else if(!s)return}else s=t.key;let u;return s&&i.isLiteral(s)?u=function(e){return i.isNullLiteral(e)?\"null\":i.isRegExpLiteral(e)?`_${e.pattern}_${e.flags}`:i.isTemplateLiteral(e)?e.quasis.map((e=>e.value.raw)).join(\"\"):void 0!==e.value?e.value+\"\":\"\"}(s):s&&i.isIdentifier(s)&&(u=s.name),void 0!==u?(u=i.toBindingIdentifierName(u),(s=i.identifier(u))[i.NOT_LOCAL_BINDING]=!0,function(e,t,r,s){if(e.selfReference){if(!s.hasBinding(r.name)||s.hasGlobal(r.name)){if(!i.isFunction(t))return;let e=o;t.generator&&(e=a);const l=e({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:s.generateUidIdentifier(r.name)}).expression,c=l.callee.body.body[0].params;for(let e=0,r=(0,n.default)(t);e<r;e++)c.push(s.generateUidIdentifier(\"x\"));return l}s.rename(r.name)}t.id=r,s.getProgramParent().references[r.name]=!0}(function(e,t,r){const n={selfAssignment:!1,selfReference:!1,outerDeclar:r.getBindingIdentifier(t),references:[],name:t},s=r.getOwnBinding(t);return s?\"param\"===s.kind&&(n.selfReference=!0):(n.outerDeclar||r.hasGlobal(t))&&r.traverse(e,l,n),n}(e,u,r),e,s,r)||e):void 0};var n=r(442),s=r(21),i=r(0);const o=(0,s.default)(\"\\n  (function (FUNCTION_KEY) {\\n    function FUNCTION_ID() {\\n      return FUNCTION_KEY.apply(this, arguments);\\n    }\\n\\n    FUNCTION_ID.toString = function () {\\n      return FUNCTION_KEY.toString();\\n    }\\n\\n    return FUNCTION_ID;\\n  })(FUNCTION)\\n\"),a=(0,s.default)(\"\\n  (function (FUNCTION_KEY) {\\n    function* FUNCTION_ID() {\\n      return yield* FUNCTION_KEY.apply(this, arguments);\\n    }\\n\\n    FUNCTION_ID.toString = function () {\\n      return FUNCTION_KEY.toString();\\n    };\\n\\n    return FUNCTION_ID;\\n  })(FUNCTION)\\n\"),l={\"ReferencedIdentifier|BindingIdentifier\"(e,t){e.node.name===t.name&&e.scope.getBindingIdentifier(t.name)===t.outerDeclar&&(t.selfReference=!0,e.stop())}}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.merge=function(e,t){const{placeholderWhitelist:r=e.placeholderWhitelist,placeholderPattern:n=e.placeholderPattern,preserveComments:s=e.preserveComments,syntacticPlaceholders:i=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,t.parser),placeholderWhitelist:r,placeholderPattern:n,preserveComments:s,syntacticPlaceholders:i}},t.validate=function(e){if(null!=e&&\"object\"!=typeof e)throw new Error(\"Unknown template options.\");const t=e||{},{placeholderWhitelist:r,placeholderPattern:n,preserveComments:s,syntacticPlaceholders:i}=t,o=function(e,t){if(null==e)return{};var r,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(s[r]=e[r]);return s}(t,[\"placeholderWhitelist\",\"placeholderPattern\",\"preserveComments\",\"syntacticPlaceholders\"]);if(null!=r&&!(r instanceof Set))throw new Error(\"'.placeholderWhitelist' must be a Set, null, or undefined\");if(null!=n&&!(n instanceof RegExp)&&!1!==n)throw new Error(\"'.placeholderPattern' must be a RegExp, false, null, or undefined\");if(null!=s&&\"boolean\"!=typeof s)throw new Error(\"'.preserveComments' must be a boolean, null, or undefined\");if(null!=i&&\"boolean\"!=typeof i)throw new Error(\"'.syntacticPlaceholders' must be a boolean, null, or undefined\");if(!0===i&&(null!=r||null!=n))throw new Error(\"'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'\");return{parser:o,placeholderWhitelist:r||void 0,placeholderPattern:null==n?void 0:n,preserveComments:null==s?void 0:s,syntacticPlaceholders:null==i?void 0:i}},t.normalizeReplacements=function(e){if(Array.isArray(e))return e.reduce(((e,t,r)=>(e[\"$\"+r]=t,e)),{});if(\"object\"==typeof e||null==e)return e||void 0;throw new Error(\"Template replacements must be an array, object, null, or undefined\")}},e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,s){if(\"[object Function]\"!==r.call(n))throw new TypeError(\"iterator must be a function\");var i=e.length;if(i===+i)for(var o=0;o<i;o++)n.call(s,e[o],o,e);else for(var a in e)t.call(e,a)&&n.call(s,e[a],a,e)}},(e,t,r)=>{\"use strict\";var n=[\"BigInt64Array\",\"BigUint64Array\",\"Float32Array\",\"Float64Array\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Uint16Array\",\"Uint32Array\",\"Uint8Array\",\"Uint8ClampedArray\"];e.exports=function(){for(var e=[],t=0;t<n.length;t++)\"function\"==typeof r.g[n[t]]&&(e[e.length]=n[t]);return e}},(e,t,r)=>{\"use strict\";var n=r(67)(\"%Object.getOwnPropertyDescriptor%\");if(n)try{n([],\"length\")}catch(e){n=null}e.exports=n},(e,t,r)=>{\"use strict\";var n=r(136),s=r(137),i=r(66),o=i(\"Object.prototype.toString\"),a=r(68)()&&\"symbol\"==typeof Symbol.toStringTag,l=s(),c=i(\"Array.prototype.indexOf\",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},u=i(\"String.prototype.slice\"),p={},f=r(138),d=Object.getPrototypeOf;a&&f&&d&&n(l,(function(e){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw new EvalError(\"this engine has support for Symbol.toStringTag, but \"+e+\" does not have the property! Please report this.\");var n=d(t),s=f(n,Symbol.toStringTag);if(!s){var i=d(n);s=f(i,Symbol.toStringTag)}p[e]=s.get})),e.exports=function(e){if(!e||\"object\"!=typeof e)return!1;if(!a){var t=u(o(e),8,-1);return c(l,t)>-1}return!!f&&function(e){var t=!1;return n(p,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},(e,t,r)=>{\"use strict\";var n=r(40),s=r(51),i=r(142),o=r(143),a=r(253),l=s(o(),Object);n(l,{getPolyfill:o,implementation:i,shim:a}),e.exports=l},e=>{\"use strict\";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n=\"[object Arguments]\"===r;return n||(n=\"[object Array]\"!==r&&null!==e&&\"object\"==typeof e&&\"number\"==typeof e.length&&e.length>=0&&\"[object Function]\"===t.call(e.callee)),n}},e=>{\"use strict\";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},(e,t,r)=>{\"use strict\";var n=r(142);e.exports=function(){return\"function\"==typeof Object.is?Object.is:n}},e=>{\"use strict\";e.exports=function(e){return e!=e}},(e,t,r)=>{\"use strict\";var n=r(144);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN(\"a\")?Number.isNaN:n}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.addDefault=function(e,t,r){return new n.default(e).addDefault(t,r)},t.addNamed=function(e,t,r,s){return new n.default(e).addNamed(t,r,s)},t.addNamespace=function(e,t,r){return new n.default(e).addNamespace(t,r)},t.addSideEffect=function(e,t,r){return new n.default(e).addSideEffect(t,r)},Object.defineProperty(t,\"ImportInjector\",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,\"isModule\",{enumerable:!0,get:function(){return s.default}});var n=r(459),s=r(257)},(e,t,r)=>{const n=r(12);e.exports=(e,t,r)=>0!==n(e,t,r)},(e,t,r)=>{const n=r(71),s=r(147),i=r(44),o=r(74),a=r(73),l=r(75);e.exports=(e,t,r,c)=>{switch(t){case\"===\":return\"object\"==typeof e&&(e=e.version),\"object\"==typeof r&&(r=r.version),e===r;case\"!==\":return\"object\"==typeof e&&(e=e.version),\"object\"==typeof r&&(r=r.version),e!==r;case\"\":case\"=\":case\"==\":return n(e,r,c);case\"!=\":return s(e,r,c);case\">\":return i(e,r,c);case\">=\":return o(e,r,c);case\"<\":return a(e,r,c);case\"<=\":return l(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},(e,t,r)=>{\"use strict\";const n=r(274),s=Symbol(\"max\"),i=Symbol(\"length\"),o=Symbol(\"lengthCalculator\"),a=Symbol(\"allowStale\"),l=Symbol(\"maxAge\"),c=Symbol(\"dispose\"),u=Symbol(\"noDisposeOnSet\"),p=Symbol(\"lruList\"),f=Symbol(\"cache\"),d=Symbol(\"updateAgeOnGet\"),h=()=>1,m=(e,t,r)=>{const n=e[f].get(t);if(n){const t=n.value;if(y(e,t)){if(b(e,n),!e[a])return}else r&&(e[d]&&(n.value.now=Date.now()),e[p].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]},g=e=>{if(e[i]>e[s])for(let t=e[p].tail;e[i]>e[s]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[i]-=r.length,e[f].delete(r.key),e[p].removeNode(t)}};class v{constructor(e,t,r,n,s){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=s||0}}const E=(e,t,r,n)=>{let s=r.value;y(e,s)&&(b(e,r),e[a]||(s=void 0)),s&&t.call(n,s.value,s.key,e)};e.exports=class{constructor(e){if(\"number\"==typeof e&&(e={max:e}),e||(e={}),e.max&&(\"number\"!=typeof e.max||e.max<0))throw new TypeError(\"max must be a non-negative number\");this[s]=e.max||1/0;const t=e.length||h;if(this[o]=\"function\"!=typeof t?h:t,this[a]=e.stale||!1,e.maxAge&&\"number\"!=typeof e.maxAge)throw new TypeError(\"maxAge must be a number\");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(\"number\"!=typeof e||e<0)throw new TypeError(\"max must be a non-negative number\");this[s]=e||1/0,g(this)}get max(){return this[s]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(\"number\"!=typeof e)throw new TypeError(\"maxAge must be a non-negative number\");this[l]=e,g(this)}get maxAge(){return this[l]}set lengthCalculator(e){\"function\"!=typeof e&&(e=h),e!==this[o]&&(this[o]=e,this[i]=0,this[p].forEach((e=>{e.length=this[o](e.value,e.key),this[i]+=e.length}))),g(this)}get lengthCalculator(){return this[o]}get length(){return this[i]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let r=this[p].tail;null!==r;){const n=r.prev;E(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[p].head;null!==r;){const n=r.next;E(this,e,r,t),r=n}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach((e=>this[c](e.key,e.value))),this[f]=new Map,this[p]=new n,this[i]=0}dump(){return this[p].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,r){if((r=r||this[l])&&\"number\"!=typeof r)throw new TypeError(\"maxAge must be a number\");const n=r?Date.now():0,a=this[o](t,e);if(this[f].has(e)){if(a>this[s])return b(this,this[f].get(e)),!1;const o=this[f].get(e).value;return this[c]&&(this[u]||this[c](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[i]+=a-o.length,o.length=a,this.get(e),g(this),!0}const d=new v(e,t,a,n,r);return d.length>this[s]?(this[c]&&this[c](e,t),!1):(this[i]+=d.length,this[p].unshift(d),this[f].set(e,this[p].head),g(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!y(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[p].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],s=n.e||0;if(0===s)this.set(n.k,n.v);else{const e=s-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[f].forEach(((e,t)=>m(this,t,!1)))}}},(e,t)=>{\"use strict\";function r(e,t){for(const r of Object.keys(t)){const n=t[r];void 0!==n&&(e[r]=n)}}Object.defineProperty(t,\"__esModule\",{value:!0}),t.mergeOptions=function(e,t){for(const n of Object.keys(t))if(\"parserOpts\"!==n&&\"generatorOpts\"!==n&&\"assumptions\"!==n||!t[n]){const r=t[n];void 0!==r&&(e[n]=r)}else{const s=t[n];r(e[n]||(e[n]={}),s)}},t.isIterableIterator=function(e){return!!e&&\"function\"==typeof e.next&&\"function\"==typeof e[Symbol.iterator]}},e=>{function t(e){this.name=\"BrowserslistError\",this.message=e,this.browserslist=!0,Error.captureStackTrace&&Error.captureStackTrace(this,t)}t.prototype=Error.prototype,e.exports=t},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.semverMin=l,t.semverify=function(e){if(\"string\"==typeof e&&n.valid(e))return e;a.invariant(\"number\"==typeof e||\"string\"==typeof e&&o.test(e),`'${e}' is not a valid version`);const t=e.toString().split(\".\");for(;t.length<3;)t.push(\"0\");return t.join(\".\")},t.isUnreleasedVersion=function(e,t){const r=i.unreleasedLabels[t];return!!r&&r===e.toString().toLowerCase()},t.getLowestUnreleased=c,t.getHighestUnreleased=function(e,t,r){return c(e,t,r)===e?t:e},t.getLowestImplementedVersion=function(e,t){const r=e[t];return r||\"android\"!==t?r:e.chrome};var n=r(28),s=r(297),i=r(153);const o=/^(\\d+|\\d+.\\d+)$/,a=new s.OptionValidator(\"@babel/helper-compilation-targets\");function l(e,t){return e&&n.lt(e,t)?e:t}function c(e,t,r){const n=i.unreleasedLabels[r],s=[e,t].some((e=>e===n));return s?e===s?t:e||t:l(e,t)}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.browserNameMap=t.unreleasedLabels=void 0,t.unreleasedLabels={safari:\"tp\"},t.browserNameMap={and_chr:\"chrome\",and_ff:\"firefox\",android:\"android\",chrome:\"chrome\",edge:\"edge\",firefox:\"firefox\",ie:\"ie\",ie_mob:\"ie\",ios_saf:\"ios\",node:\"node\",op_mob:\"opera\",opera:\"opera\",safari:\"safari\",samsung:\"samsung\"}},e=>{\"use strict\";e.exports.isClean=Symbol(\"isClean\"),e.exports.my=Symbol(\"my\")},e=>{\"use strict\";const t={colon:\": \",indent:\"    \",beforeDecl:\"\\n\",beforeRule:\"\\n\",beforeOpen:\" \",beforeClose:\"\\n\",beforeComment:\"\\n\",after:\"\\n\",emptyBody:\"\",commentLeft:\" \",commentRight:\" \",semicolon:!1};e.exports=class{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error(\"Unknown AST node type \"+e.type+\". Maybe you need to change PostCSS stringifier.\");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,\"left\",\"commentLeft\"),r=this.raw(e,\"right\",\"commentRight\");this.builder(\"/*\"+t+e.text+r+\"*/\",e)}decl(e,t){let r=this.raw(e,\"between\",\"colon\"),n=e.prop+r+this.rawValue(e,\"value\");e.important&&(n+=e.raws.important||\" !important\"),t&&(n+=\";\"),this.builder(n,e)}rule(e){this.block(e,this.rawValue(e,\"selector\")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,\"end\")}atrule(e,t){let r=\"@\"+e.name,n=e.params?this.rawValue(e,\"params\"):\"\";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=\" \"),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||\"\")+(t?\";\":\"\");this.builder(r+n+s,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&\"comment\"===e.nodes[t].type;)t-=1;let r=this.raw(e,\"semicolon\");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],i=this.raw(s,\"before\");i&&this.builder(i),this.stringify(s,t!==n||r)}}block(e,t){let r,n=this.raw(e,\"between\",\"beforeOpen\");this.builder(t+n+\"{\",e,\"start\"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,\"after\")):r=this.raw(e,\"after\",\"emptyBody\"),r&&this.builder(r),this.builder(\"}\",e,\"end\")}raw(e,r,n){let s;if(n||(n=r),r&&(s=e.raws[r],void 0!==s))return s;let i=e.parent;if(\"before\"===n){if(!i||\"root\"===i.type&&i.first===e)return\"\";if(i&&\"document\"===i.type)return\"\"}if(!i)return t[n];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if(\"before\"===n||\"after\"===n)return this.beforeAfter(e,n);{let t=\"raw\"+((a=n)[0].toUpperCase()+a.slice(1));this[t]?s=this[t](o,e):o.walk((e=>{if(s=e.raws[r],void 0!==s)return!1}))}var a;return void 0===s&&(s=t[n]),o.rawCache[n]=s,s}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&\"decl\"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split(\"\\n\");return t=e[e.length-1],t=t.replace(/\\S/g,\"\"),!1}})),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes(\"\\n\")&&(r=r.replace(/[^\\n]+$/,\"\")),!1})),void 0===r?r=this.raw(t,null,\"beforeDecl\"):r&&(r=r.replace(/\\S/g,\"\")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes(\"\\n\")&&(r=r.replace(/[^\\n]+$/,\"\")),!1})),void 0===r?r=this.raw(t,null,\"beforeRule\"):r&&(r=r.replace(/\\S/g,\"\")),r}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes(\"\\n\")&&(t=t.replace(/[^\\n]+$/,\"\")),!1})),t&&(t=t.replace(/\\S/g,\"\")),t}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes(\"\\n\")&&(t=t.replace(/[^\\n]+$/,\"\")),!1})),t&&(t=t.replace(/\\S/g,\"\")),t}rawBeforeOpen(e){let t;return e.walk((e=>{if(\"decl\"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\\s:]/g,\"\"),!1})),t}beforeAfter(e,t){let r;r=\"decl\"===e.type?this.raw(e,null,\"beforeDecl\"):\"comment\"===e.type?this.raw(e,null,\"beforeComment\"):\"before\"===t?this.raw(e,null,\"beforeRule\"):this.raw(e,null,\"beforeClose\");let n=e.parent,s=0;for(;n&&\"root\"!==n.type;)s+=1,n=n.parent;if(r.includes(\"\\n\")){let t=this.raw(e,null,\"indent\");if(t.length)for(let e=0;e<s;e++)r+=t}return r}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}}},(e,t,r)=>{\"use strict\";let{isClean:n,my:s}=r(154),i=r(320),o=r(86),a=r(22),l=r(87),c=(r(322),r(159)),u=r(161),p=r(35);const f={document:\"Document\",root:\"Root\",atrule:\"AtRule\",rule:\"Rule\",decl:\"Declaration\",comment:\"Comment\"},d={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},h={postcssPlugin:!0,prepare:!0,Once:!0};function m(e){return\"object\"==typeof e&&\"function\"==typeof e.then}function y(e){let t=!1,r=f[e.type];return\"decl\"===e.type?t=e.prop.toLowerCase():\"atrule\"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+\"-\"+t,0,r+\"Exit\",r+\"Exit-\"+t]:t?[r,r+\"-\"+t,r+\"Exit\",r+\"Exit-\"+t]:e.append?[r,0,r+\"Exit\"]:[r,r+\"Exit\"]}function g(e){let t;return t=\"document\"===e.type?[\"Document\",0,\"DocumentExit\"]:\"root\"===e.type?[\"Root\",0,\"RootExit\"]:y(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function b(e){return e[n]=!1,e.nodes&&e.nodes.forEach((e=>b(e))),e}let v={};class E{constructor(e,t,r){let n;if(this.stringified=!1,this.processed=!1,\"object\"!=typeof t||null===t||\"root\"!==t.type&&\"document\"!==t.type)if(t instanceof E||t instanceof c)n=b(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=u;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(t,r)}catch(e){this.processed=!0,this.error=e}n&&!n[s]&&a.rebuild(n)}else n=b(t);this.result=new c(e,n,r),this.helpers={...v,result:this.result,postcss:v},this.plugins=this.processor.plugins.map((e=>\"object\"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}get[Symbol.toStringTag](){return\"LazyResult\"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(m(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];)e[n]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(\"document\"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=o;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new i(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}walkSync(e){e[n]=!0;let t=y(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[n]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(\"root\"!==t.type&&\"document\"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if(\"object\"==typeof e&&e.Once){if(\"document\"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if(\"function\"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error(\"Use process(css).then(cb) to work with async plugins\")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,\"CssSyntaxError\"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(m(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];){e[n]=!0;let t=[g(e)];for(;t.length>0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(\"document\"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if(\"object\"==typeof t)for(let r in t){if(!d[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[r])if(\"object\"==typeof t[r])for(let n in t[r])e(t,\"*\"===n?r:r+\"-\"+n.toLowerCase(),t[r][n]);else\"function\"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(\"root\"!==r.type&&\"document\"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,i=t.iterator;for(;s=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!s[n])return s[n]=!0,void e.push(g(s));t.iterator=0,delete r.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[n]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}E.registerPostcss=e=>{v=e},e.exports=E,E.default=E,p.registerLazyResult(E),l.registerLazyResult(E)},()=>{},()=>{},(e,t,r)=>{\"use strict\";let n=r(160);class s{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>\"warning\"===e.type))}get content(){return this.css}}e.exports=s,s.default=s},e=>{\"use strict\";class t{constructor(e,t={}){if(this.type=\"warning\",this.text=e,t.node&&t.node.source){let e=t.node.positionBy(t);this.line=e.line,this.column=e.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+\": \"+this.text:this.text}}e.exports=t,t.default=t},(e,t,r)=>{\"use strict\";let n=r(22),s=r(323),i=r(90);function o(e,t){let r=new i(e,t),n=new s(r);try{n.parse()}catch(e){throw e}return n.root}e.exports=o,o.default=o,n.registerParse(o)},e=>{\"use strict\";let t={split(e,t,r){let n=[],s=\"\",i=!1,o=0,a=!1,l=!1;for(let r of e)l?l=!1:\"\\\\\"===r?l=!0:a?r===a&&(a=!1):'\"'===r||\"'\"===r?a=r:\"(\"===r?o+=1:\")\"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(\"\"!==s&&n.push(s.trim()),s=\"\",i=!1):s+=r;return(r||\"\"!==s)&&n.push(s.trim()),n},space:e=>t.split(e,[\" \",\"\\n\",\"\\t\"]),comma:e=>t.split(e,[\",\"],!0)};e.exports=t,t.default=t},(e,t,r)=>{\"use strict\";var n=r(37).Buffer;let{SourceMapConsumer:s,SourceMapGenerator:i}=r(157),{existsSync:o,readFileSync:a}=r(514),{dirname:l,join:c}=r(158);class u{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,\"data:\");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=l(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new s(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.match(/\\/\\*\\s*# sourceMappingURL=((?:(?!sourceMappingURL=).)*)\\*\\//)[1].trim()}loadAnnotation(e){let t=e.match(/\\/\\*\\s*# sourceMappingURL=(?:(?!sourceMappingURL=).)*\\*\\//gm);if(t&&t.length>0){let e=t[t.length-1];e&&(this.annotation=this.getAnnotationURL(e))}}decodeInline(e){if(/^data:application\\/json;charset=utf-?8,/.test(e)||/^data:application\\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\\/json;charset=utf-?8;base64,/.test(e)||/^data:application\\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),n?n.from(t,\"base64\").toString():window.atob(t);var t;let r=e.match(/data:application\\/json;([^,]+),/)[1];throw new Error(\"Unsupported source map encoding \"+r)}loadFile(e){if(this.root=l(e),o(e))return this.mapFile=e,a(e,\"utf-8\").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if(\"string\"==typeof t)return t;if(\"function\"!=typeof t){if(t instanceof s)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error(\"Unsupported previous source map format: \"+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error(\"Unable to load previous source map: \"+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=c(l(e),t)),this.loadFile(t)}}}isMap(e){return\"object\"==typeof e&&(\"string\"==typeof e.mappings||\"string\"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=u,u.default=u},e=>{const t=/[$]?[\\w-]+/g;e.exports=(e,r)=>{let n;for(;n=t.exec(e);){const s=r[n[0]];s&&(e=e.slice(0,n.index)+s+e.slice(t.lastIndex),t.lastIndex-=n[0].length-s.length)}return e}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(422);Object.keys(n).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=r(423);Object.keys(s).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=r(424);Object.keys(i).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=r(425);Object.keys(o).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=r(426);Object.keys(a).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var l=r(234);Object.keys(l).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var c=r(235);Object.keys(c).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var u=r(429);Object.keys(u).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var p=r(430);Object.keys(p).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var f=r(431);Object.keys(f).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var d=r(432);Object.keys(d).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}))},(e,t,r)=>{\"use strict\";t.__esModule=!0;var n=r(5);Object.keys(n).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var s=r(516);Object.keys(s).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var i=r(517);Object.keys(i).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))}))},function(e,t,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return s(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0});const a=i(r(0)),l=r(146),c=r(50),u=o(r(169)),p=/^xlink([A-Z])/,f=(e,t)=>{const r=((e,t)=>e.map((e=>{if(e.isJSXText()){const r=c.transformJSXText(e);return r?a.callExpression(c.createIdentifier(t,\"createTextVNode\"),[r]):r}if(e.isJSXExpressionContainer()){const t=c.transformJSXExpressionContainer(e);if(a.isIdentifier(t)){const{name:r}=t,{referencePaths:n=[]}=e.scope.getBinding(r)||{};n.forEach((e=>{c.walksScope(e,r,2)}))}return t}if(a.isJSXSpreadChild(e))return c.transformJSXSpreadChild(e);if(e.isCallExpression())return e.node;if(e.isJSXElement())return f(e,t);throw new Error(`getChildren: ${e.type} is not supported`)})).filter((e=>null!=e&&!a.isJSXEmptyExpression(e))))(e.get(\"children\"),t),{tag:n,props:s,isComponent:i,directives:o,patchFlag:d,dynamicPropNames:h,slots:m}=((e,t)=>{const r=c.getTag(e,t),n=c.checkIsComponent(e.get(\"openingElement\")),s=e.get(\"openingElement\").get(\"attributes\"),i=[],o=new Set;let d=null,h=0;if(0===s.length)return{tag:r,isComponent:n,slots:d,props:a.nullLiteral(),directives:i,patchFlag:h,dynamicPropNames:o};let m=[],y=!1,g=!1,b=!1,v=!1,E=!1;const x=[],{mergeProps:S=!0}=t.opts;s.forEach((s=>{if(s.isJSXAttribute()){let h=c.getJSXAttributeName(s);const S=((e,t)=>{const r=e.get(\"value\");return r.isJSXElement()?f(r,t):r.isStringLiteral()?r.node:r.isJSXExpressionContainer()?c.transformJSXExpressionContainer(r):null})(s,t);if(c.isConstant(S)&&\"ref\"!==h||(!n&&c.isOn(h)&&\"onclick\"!==h.toLowerCase()&&\"onUpdate:modelValue\"!==h&&(v=!0),\"ref\"===h?y=!0:\"class\"!==h||n?\"style\"!==h||n?\"key\"===h||c.isDirective(h)||\"on\"===h||o.add(h):b=!0:g=!0),t.opts.transformOn&&(\"on\"===h||\"nativeOn\"===h))return t.get(\"transformOn\")||t.set(\"transformOn\",l.addDefault(e,\"@vue/babel-helper-vue-transform-on\",{nameHint:\"_transformOn\"})),void x.push(a.callExpression(t.get(\"transformOn\"),[S||a.booleanLiteral(!0)]));if(c.isDirective(h)){const{directive:e,modifiers:l,values:c,args:p,directiveName:f}=u.default({tag:r,isComponent:n,name:h,path:s,state:t,value:S});if(\"slots\"===f)return void(d=S);e?i.push(a.arrayExpression(e)):\"html\"===f?(m.push(a.objectProperty(a.stringLiteral(\"innerHTML\"),c[0])),o.add(\"innerHTML\")):\"text\"===f&&(m.push(a.objectProperty(a.stringLiteral(\"textContent\"),c[0])),o.add(\"textContent\")),[\"models\",\"model\"].includes(f)&&c.forEach(((t,r)=>{var n,s,i,c;const u=p[r],f=u&&!a.isStringLiteral(u)&&!a.isNullLiteral(u);e||(m.push(a.objectProperty(a.isNullLiteral(u)?a.stringLiteral(\"modelValue\"):u,t,f)),f||o.add((null===(n=u)||void 0===n?void 0:n.value)||\"modelValue\"),(null===(s=l[r])||void 0===s?void 0:s.size)&&m.push(a.objectProperty(f?a.binaryExpression(\"+\",u,a.stringLiteral(\"Modifiers\")):a.stringLiteral(`${(null===(i=u)||void 0===i?void 0:i.value)||\"model\"}Modifiers`),a.objectExpression([...l[r]].map((e=>a.objectProperty(a.stringLiteral(e),a.booleanLiteral(!0))))),f)));const d=f?a.binaryExpression(\"+\",a.stringLiteral(\"onUpdate\"),u):a.stringLiteral(`onUpdate:${(null===(c=u)||void 0===c?void 0:c.value)||\"modelValue\"}`);m.push(a.objectProperty(d,a.arrowFunctionExpression([a.identifier(\"$event\")],a.assignmentExpression(\"=\",t,a.identifier(\"$event\"))),f)),f?E=!0:o.add(d.value)}))}else h.match(p)&&(h=h.replace(p,((e,t)=>`xlink:${t.toLowerCase()}`))),m.push(a.objectProperty(a.stringLiteral(h),S||a.booleanLiteral(!0)))}else m.length&&S&&(x.push(a.objectExpression(c.dedupeProperties(m,S))),m=[]),E=!0,c.transformJSXSpreadAttribute(e,s,S,S?x:m)})),E?h|=16:(g&&(h|=2),b&&(h|=4),o.size&&(h|=8),v&&(h|=32)),0!==h&&32!==h||!(y||i.length>0)||(h|=512);let T=a.nullLiteral();return x.length?(m.length&&x.push(a.objectExpression(c.dedupeProperties(m,S))),T=x.length>1?a.callExpression(c.createIdentifier(t,\"mergeProps\"),x):x[0]):m.length&&(T=1===m.length&&a.isSpreadElement(m[0])?m[0].argument:a.objectExpression(c.dedupeProperties(m,S))),{tag:r,props:T,isComponent:n,slots:d,directives:i,patchFlag:h,dynamicPropNames:o}})(e,t),{optimize:y=!1}=t.opts,g=e.getData(\"slotFlag\")||1;let b;if(r.length>1||m)b=i?r.length?a.objectExpression([!!r.length&&a.objectProperty(a.identifier(\"default\"),a.arrowFunctionExpression([],a.arrayExpression(c.buildIIFE(e,r)))),...m?a.isObjectExpression(m)?m.properties:[a.spreadElement(m)]:[],y&&a.objectProperty(a.identifier(\"_\"),a.numericLiteral(g))].filter(Boolean)):m:a.arrayExpression(r);else if(1===r.length){const{enableObjectSlots:n=!0}=t.opts,s=r[0],o=a.objectExpression([a.objectProperty(a.identifier(\"default\"),a.arrowFunctionExpression([],a.arrayExpression(c.buildIIFE(e,[s])))),y&&a.objectProperty(a.identifier(\"_\"),a.numericLiteral(g))].filter(Boolean));if(a.isIdentifier(s)&&i)b=n?a.conditionalExpression(a.callExpression(t.get(\"@vue/babel-plugin-jsx/runtimeIsSlot\")(),[s]),s,o):o;else if(a.isCallExpression(s)&&s.loc&&i)if(n){const{scope:r}=e,n=r.generateUidIdentifier(\"slot\");r&&r.push({id:n,kind:\"let\"});const i=a.objectExpression([a.objectProperty(a.identifier(\"default\"),a.arrowFunctionExpression([],a.arrayExpression(c.buildIIFE(e,[n])))),y&&a.objectProperty(a.identifier(\"_\"),a.numericLiteral(g))].filter(Boolean)),o=a.assignmentExpression(\"=\",n,s),l=a.callExpression(t.get(\"@vue/babel-plugin-jsx/runtimeIsSlot\")(),[o]);b=a.conditionalExpression(l,n,i)}else b=o;else b=a.isFunctionExpression(s)||a.isArrowFunctionExpression(s)?a.objectExpression([a.objectProperty(a.identifier(\"default\"),s)]):a.isObjectExpression(s)?a.objectExpression([...s.properties,y&&a.objectProperty(a.identifier(\"_\"),a.numericLiteral(g))].filter(Boolean)):i?a.objectExpression([a.objectProperty(a.identifier(\"default\"),a.arrowFunctionExpression([],a.arrayExpression([s])))]):a.arrayExpression([s])}const v=a.callExpression(c.createIdentifier(t,\"createVNode\"),[n,s,b||a.nullLiteral(),!!d&&y&&a.numericLiteral(d),!!h.size&&y&&a.arrayExpression([...h.keys()].map((e=>a.stringLiteral(e))))].filter(Boolean));return o.length?a.callExpression(c.createIdentifier(t,\"withDirectives\"),[v,a.arrayExpression(o)]):v};t.default={JSXElement:{exit(e,t){e.replaceWith(f(e,t))}}}},function(e,t,r){var n;/*! https://mths.be/punycode v1.3.2 by @mathias */e=r.nmd(e),function(s){t&&t.nodeType,e&&e.nodeType;var i=\"object\"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var o,a=2147483647,l=36,c=/^xn--/,u=/[^\\x20-\\x7E]/,p=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,f={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},d=Math.floor,h=String.fromCharCode;function m(e){throw RangeError(f[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function g(e,t){var r=e.split(\"@\"),n=\"\";return r.length>1&&(n=r[0]+\"@\",e=r[1]),n+y((e=e.replace(p,\".\")).split(\".\"),t).join(\".\")}function b(e){for(var t,r,n=[],s=0,i=e.length;s<i;)(t=e.charCodeAt(s++))>=55296&&t<=56319&&s<i?56320==(64512&(r=e.charCodeAt(s++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),s--):n.push(t);return n}function v(e){return y(e,(function(e){var t=\"\";return e>65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+h(e)})).join(\"\")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=l)e=d(e/35);return d(n+36*e/(e+38))}function S(e){var t,r,n,s,i,o,c,u,p,f,h,y=[],g=e.length,b=0,E=128,S=72;for((r=e.lastIndexOf(\"-\"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&m(\"not-basic\"),y.push(e.charCodeAt(n));for(s=r>0?r+1:0;s<g;){for(i=b,o=1,c=l;s>=g&&m(\"invalid-input\"),((u=(h=e.charCodeAt(s++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:l)>=l||u>d((a-b)/o))&&m(\"overflow\"),b+=u*o,!(u<(p=c<=S?1:c>=S+26?26:c-S));c+=l)o>d(a/(f=l-p))&&m(\"overflow\"),o*=f;S=x(b-i,t=y.length+1,0==i),d(b/t)>a-E&&m(\"overflow\"),E+=d(b/t),b%=t,y.splice(b++,0,E)}return v(y)}function T(e){var t,r,n,s,i,o,c,u,p,f,y,g,v,S,T,w=[];for(g=(e=b(e)).length,t=128,r=0,i=72,o=0;o<g;++o)(y=e[o])<128&&w.push(h(y));for(n=s=w.length,s&&w.push(\"-\");n<g;){for(c=a,o=0;o<g;++o)(y=e[o])>=t&&y<c&&(c=y);for(c-t>d((a-r)/(v=n+1))&&m(\"overflow\"),r+=(c-t)*v,t=c,o=0;o<g;++o)if((y=e[o])<t&&++r>a&&m(\"overflow\"),y==t){for(u=r,p=l;!(u<(f=p<=i?1:p>=i+26?26:p-i));p+=l)T=u-f,S=l-f,w.push(h(E(f+T%S,0))),u=d(T/S);w.push(h(E(u,0))),i=x(r,v,n==s),r=0,++n}++r,++t}return w.join(\"\")}o={version:\"1.3.2\",ucs2:{decode:b,encode:v},decode:S,encode:T,toASCII:function(e){return g(e,(function(e){return u.test(e)?\"xn--\"+T(e):e}))},toUnicode:function(e){return g(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return s(t,e),t};Object.defineProperty(t,\"__esModule\",{value:!0});const o=i(r(0)),a=r(50),l=e=>o.isArrayExpression(e)?e.elements.map((e=>o.isStringLiteral(e)?e.value:\"\")).filter(Boolean):[],c=(e,t,r,n)=>{var s;if(\"show\"===n)return a.createIdentifier(t,\"vShow\");if(\"model\"===n){let n;const i=(e=>{const t=e.get(\"attributes\").find((e=>!!o.isJSXAttribute(e)&&o.isJSXIdentifier(e.get(\"name\"))&&\"type\"===e.get(\"name\").node.name));return t?t.get(\"value\").node:null})(e.parentPath);switch(r.value){case\"select\":n=a.createIdentifier(t,\"vModelSelect\");break;case\"textarea\":n=a.createIdentifier(t,\"vModelText\");break;default:if(o.isStringLiteral(i)||!i)switch(null===(s=i)||void 0===s?void 0:s.value){case\"checkbox\":n=a.createIdentifier(t,\"vModelCheckbox\");break;case\"radio\":n=a.createIdentifier(t,\"vModelRadio\");break;default:n=a.createIdentifier(t,\"vModelText\")}else n=a.createIdentifier(t,\"vModelDynamic\")}return n}return o.callExpression(a.createIdentifier(t,\"resolveDirective\"),[o.stringLiteral(n)])};t.default=e=>{var t,r,n;const{name:s,path:i,value:a,state:u,tag:p,isComponent:f}=e,d=[],h=[],m=[],y=s.split(\"_\"),g=(null===(t=y.shift())||void 0===t?void 0:t.replace(/^v/,\"\").replace(/^-/,\"\").replace(/^\\S/,(e=>e.toLowerCase())))||\"\",b=\"models\"===g,v=\"model\"===g;if(v&&!o.isJSXExpressionContainer(i.get(\"value\")))throw new Error(\"You have to use JSX Expression inside your v-model\");if(b&&!f)throw new Error(\"v-models can only use in custom components\");const E=![\"html\",\"text\",\"model\",\"models\"].includes(g)||v&&!f;let x=y;return o.isArrayExpression(a)?(b?a.elements:[a]).forEach((e=>{if(b&&!o.isArrayExpression(e))throw new Error(\"You should pass a Two-dimensional Arrays to v-models\");const{elements:t}=e,[r,n,s]=t;!n||o.isArrayExpression(n)||o.isSpreadElement(n)?o.isArrayExpression(n)?(E||d.push(o.nullLiteral()),x=l(n)):E||d.push(o.nullLiteral()):(d.push(n),x=l(s)),m.push(new Set(x)),h.push(r)})):v&&!E?(d.push(o.nullLiteral()),m.push(new Set(y))):m.push(new Set(y)),{directiveName:g,modifiers:m,values:h.length?h:[a],args:d,directive:E?[c(i,u,p,g),h[0]||a,(null===(r=m[0])||void 0===r?void 0:r.size)?d[0]||o.unaryExpression(\"void\",o.numericLiteral(0),!0):d[0],!!(null===(n=m[0])||void 0===n?void 0:n.size)&&o.objectExpression([...m[0]].map((e=>o.objectProperty(o.identifier(e),o.booleanLiteral(!0)))))].filter(Boolean):void 0}}},function(e,t,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return s(t,e),t};Object.defineProperty(t,\"__esModule\",{value:!0});const o=i(r(0)),a=r(50);t.default={JSXFragment:{enter(e,t){const r=a.createIdentifier(t,a.FRAGMENT);e.replaceWith(((e,t)=>{const r=e.get(\"children\")||[];return o.jsxElement(o.jsxOpeningElement(t,[]),o.jsxClosingElement(t),r.map((({node:e})=>e)),!1)})(e,o.isIdentifier(r)?o.jsxIdentifier(r.name):o.jsxMemberExpression(o.jsxIdentifier(r.object.name),o.jsxIdentifier(r.property.name))))}}}},e=>{\"function\"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s=(n=r(173))&&n.__esModule?n:{default:n},i=function(){function e(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}var t=e.prototype;return t._shouldUpdateSelector=function(e,t){return void 0===t&&(t={}),!1!==Object.assign({},this.options,t).updateSelector&&\"string\"!=typeof e},t._isLossy=function(e){return void 0===e&&(e={}),!1===Object.assign({},this.options,e).lossless},t._root=function(e,t){return void 0===t&&(t={}),new s.default(e,this._parseOptions(t)).root},t._parseOptions=function(e){return{lossy:this._isLossy(e)}},t._run=function(e,t){var r=this;return void 0===t&&(t={}),new Promise((function(n,s){try{var i=r._root(e,t);Promise.resolve(r.func(i)).then((function(n){var s=void 0;return r._shouldUpdateSelector(e,t)&&(s=i.toString(),e.selector=s),{transform:n,root:i,string:s}})).then(n,s)}catch(e){return void s(e)}}))},t._runSync=function(e,t){void 0===t&&(t={});var r=this._root(e,t),n=this.func(r);if(n&&\"function\"==typeof n.then)throw new Error(\"Selector processor returned a promise to a synchronous call.\");var s=void 0;return t.updateSelector&&\"string\"!=typeof e&&(s=r.toString(),e.selector=s),{transform:n,root:r,string:s}},t.ast=function(e,t){return this._run(e,t).then((function(e){return e.root}))},t.astSync=function(e,t){return this._runSync(e,t).root},t.transform=function(e,t){return this._run(e,t).then((function(e){return e.transform}))},t.transformSync=function(e,t){return this._runSync(e,t).transform},t.process=function(e,t){return this._run(e,t).then((function(e){return e.string||e.root.toString()}))},t.processSync=function(e,t){var r=this._runSync(e,t);return r.string||r.root.toString()},e}();t.default=i,e.exports=t.default},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,s,i=w(r(97)),o=w(r(99)),a=w(r(100)),l=w(r(101)),c=w(r(102)),u=w(r(103)),p=w(r(104)),f=w(r(105)),d=T(r(326)),h=w(r(106)),m=w(r(107)),y=w(r(108)),g=w(r(177)),b=T(r(515)),v=T(r(328)),E=T(r(5)),x=r(91);function S(){if(\"function\"!=typeof WeakMap)return null;var e=new WeakMap;return S=function(){return e},e}function T(e){if(e&&e.__esModule)return e;if(null===e||\"object\"!=typeof e&&\"function\"!=typeof e)return{default:e};var t=S();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=n?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}function P(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var A=((n={})[v.space]=!0,n[v.cr]=!0,n[v.feed]=!0,n[v.newline]=!0,n[v.tab]=!0,n),O=Object.assign({},A,((s={})[v.comment]=!0,s));function C(e){return{line:e[b.FIELDS.START_LINE],column:e[b.FIELDS.START_COL]}}function I(e){return{line:e[b.FIELDS.END_LINE],column:e[b.FIELDS.END_COL]}}function k(e,t,r,n){return{start:{line:e,column:t},end:{line:r,column:n}}}function N(e){return k(e[b.FIELDS.START_LINE],e[b.FIELDS.START_COL],e[b.FIELDS.END_LINE],e[b.FIELDS.END_COL])}function _(e,t){if(e)return k(e[b.FIELDS.START_LINE],e[b.FIELDS.START_COL],t[b.FIELDS.END_LINE],t[b.FIELDS.END_COL])}function j(e,t){var r=e[t];if(\"string\"==typeof r)return-1!==r.indexOf(\"\\\\\")&&((0,x.ensureObject)(e,\"raws\"),e[t]=(0,x.unesc)(r),void 0===e.raws[t]&&(e.raws[t]=r)),e}function D(e,t){for(var r=-1,n=[];-1!==(r=e.indexOf(t,r+1));)n.push(r);return n}var L=function(){function e(e,t){void 0===t&&(t={}),this.rule=e,this.options=Object.assign({lossy:!1,safe:!1},t),this.position=0,this.css=\"string\"==typeof this.rule?this.rule:this.rule.selector,this.tokens=(0,b.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var r=_(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new i.default({source:r}),this.root.errorGenerator=this._errorGenerator();var n=new o.default({source:{start:{line:1,column:1}}});this.root.append(n),this.current=n,this.loop()}var t,r,n=e.prototype;return n._errorGenerator=function(){var e=this;return function(t,r){return\"string\"==typeof e.rule?new Error(t):e.rule.error(t,r)}},n.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[b.FIELDS.TYPE]!==v.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[b.FIELDS.TYPE]!==v.closeSquare)return this.expected(\"closing square bracket\",this.currToken[b.FIELDS.START_POS]);var r=e.length,n={source:k(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[b.FIELDS.START_POS]};if(1===r&&!~[v.word].indexOf(e[0][b.FIELDS.TYPE]))return this.expected(\"attribute\",e[0][b.FIELDS.START_POS]);for(var s=0,i=\"\",o=\"\",a=null,l=!1;s<r;){var c=e[s],u=this.content(c),p=e[s+1];switch(c[b.FIELDS.TYPE]){case v.space:if(l=!0,this.options.lossy)break;if(a){(0,x.ensureObject)(n,\"spaces\",a);var f=n.spaces[a].after||\"\";n.spaces[a].after=f+u;var h=(0,x.getProp)(n,\"raws\",\"spaces\",a,\"after\")||null;h&&(n.raws.spaces[a].after=h+u)}else i+=u,o+=u;break;case v.asterisk:p[b.FIELDS.TYPE]===v.equals?(n.operator=u,a=\"operator\"):n.namespace&&(\"namespace\"!==a||l)||!p||(i&&((0,x.ensureObject)(n,\"spaces\",\"attribute\"),n.spaces.attribute.before=i,i=\"\"),o&&((0,x.ensureObject)(n,\"raws\",\"spaces\",\"attribute\"),n.raws.spaces.attribute.before=i,o=\"\"),n.namespace=(n.namespace||\"\")+u,(0,x.getProp)(n,\"raws\",\"namespace\")&&(n.raws.namespace+=u),a=\"namespace\"),l=!1;break;case v.dollar:if(\"value\"===a){var m=(0,x.getProp)(n,\"raws\",\"value\");n.value+=\"$\",m&&(n.raws.value=m+\"$\");break}case v.caret:p[b.FIELDS.TYPE]===v.equals&&(n.operator=u,a=\"operator\"),l=!1;break;case v.combinator:if(\"~\"===u&&p[b.FIELDS.TYPE]===v.equals&&(n.operator=u,a=\"operator\"),\"|\"!==u){l=!1;break}p[b.FIELDS.TYPE]===v.equals?(n.operator=u,a=\"operator\"):n.namespace||n.attribute||(n.namespace=!0),l=!1;break;case v.word:if(p&&\"|\"===this.content(p)&&e[s+2]&&e[s+2][b.FIELDS.TYPE]!==v.equals&&!n.operator&&!n.namespace)n.namespace=u,a=\"namespace\";else if(!n.attribute||\"attribute\"===a&&!l)i&&((0,x.ensureObject)(n,\"spaces\",\"attribute\"),n.spaces.attribute.before=i,i=\"\"),o&&((0,x.ensureObject)(n,\"raws\",\"spaces\",\"attribute\"),n.raws.spaces.attribute.before=o,o=\"\"),n.attribute=(n.attribute||\"\")+u,(0,x.getProp)(n,\"raws\",\"attribute\")&&(n.raws.attribute+=u),a=\"attribute\";else if(!n.value&&\"\"!==n.value||\"value\"===a&&!l){var y=(0,x.unesc)(u),g=(0,x.getProp)(n,\"raws\",\"value\")||\"\",E=n.value||\"\";n.value=E+y,n.quoteMark=null,(y!==u||g)&&((0,x.ensureObject)(n,\"raws\"),n.raws.value=(g||E)+u),a=\"value\"}else{var S=\"i\"===u||\"I\"===u;!n.value&&\"\"!==n.value||!n.quoteMark&&!l?(n.value||\"\"===n.value)&&(a=\"value\",n.value+=u,n.raws.value&&(n.raws.value+=u)):(n.insensitive=S,S&&\"I\"!==u||((0,x.ensureObject)(n,\"raws\"),n.raws.insensitiveFlag=u),a=\"insensitive\",i&&((0,x.ensureObject)(n,\"spaces\",\"insensitive\"),n.spaces.insensitive.before=i,i=\"\"),o&&((0,x.ensureObject)(n,\"raws\",\"spaces\",\"insensitive\"),n.raws.spaces.insensitive.before=o,o=\"\"))}l=!1;break;case v.str:if(!n.attribute||!n.operator)return this.error(\"Expected an attribute followed by an operator preceding the string.\",{index:c[b.FIELDS.START_POS]});var T=(0,d.unescapeValue)(u),w=T.unescaped,P=T.quoteMark;n.value=w,n.quoteMark=P,a=\"value\",(0,x.ensureObject)(n,\"raws\"),n.raws.value=u,l=!1;break;case v.equals:if(!n.attribute)return this.expected(\"attribute\",c[b.FIELDS.START_POS],u);if(n.value)return this.error('Unexpected \"=\" found; an operator was already defined.',{index:c[b.FIELDS.START_POS]});n.operator=n.operator?n.operator+u:u,a=\"operator\",l=!1;break;case v.comment:if(a)if(l||p&&p[b.FIELDS.TYPE]===v.space||\"insensitive\"===a){var A=(0,x.getProp)(n,\"spaces\",a,\"after\")||\"\",O=(0,x.getProp)(n,\"raws\",\"spaces\",a,\"after\")||A;(0,x.ensureObject)(n,\"raws\",\"spaces\",a),n.raws.spaces[a].after=O+u}else{var C=n[a]||\"\",I=(0,x.getProp)(n,\"raws\",a)||C;(0,x.ensureObject)(n,\"raws\"),n.raws[a]=I+u}else o+=u;break;default:return this.error('Unexpected \"'+u+'\" found.',{index:c[b.FIELDS.START_POS]})}s++}j(n,\"attribute\"),j(n,\"namespace\"),this.newNode(new d.default(n)),this.position++},n.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,r=[],n=\"\",s=void 0;do{if(A[this.currToken[b.FIELDS.TYPE]])this.options.lossy||(n+=this.content());else if(this.currToken[b.FIELDS.TYPE]===v.comment){var i={};n&&(i.before=n,n=\"\"),s=new l.default({value:this.content(),source:N(this.currToken),sourceIndex:this.currToken[b.FIELDS.START_POS],spaces:i}),r.push(s)}}while(++this.position<e);if(n)if(s)s.spaces.after=n;else if(!this.options.lossy){var o=this.tokens[t],a=this.tokens[this.position-1];r.push(new p.default({value:\"\",source:k(o[b.FIELDS.START_LINE],o[b.FIELDS.START_COL],a[b.FIELDS.END_LINE],a[b.FIELDS.END_COL]),sourceIndex:o[b.FIELDS.START_POS],spaces:{before:n,after:\"\"}}))}return r},n.convertWhitespaceNodesToSpace=function(e,t){var r=this;void 0===t&&(t=!1);var n=\"\",s=\"\";return e.forEach((function(e){var i=r.lossySpace(e.spaces.before,t),o=r.lossySpace(e.rawSpaceBefore,t);n+=i+r.lossySpace(e.spaces.after,t&&0===i.length),s+=i+e.value+r.lossySpace(e.rawSpaceAfter,t&&0===o.length)})),s===n&&(s=void 0),{space:n,rawSpace:s}},n.isNamedCombinator=function(e){return void 0===e&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][b.FIELDS.TYPE]===v.slash&&this.tokens[e+1]&&this.tokens[e+1][b.FIELDS.TYPE]===v.word&&this.tokens[e+2]&&this.tokens[e+2][b.FIELDS.TYPE]===v.slash},n.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,x.unesc)(e).toLowerCase(),r={};t!==e&&(r.value=\"/\"+e+\"/\");var n=new m.default({value:\"/\"+t+\"/\",source:k(this.currToken[b.FIELDS.START_LINE],this.currToken[b.FIELDS.START_COL],this.tokens[this.position+2][b.FIELDS.END_LINE],this.tokens[this.position+2][b.FIELDS.END_COL]),sourceIndex:this.currToken[b.FIELDS.START_POS],raws:r});return this.position=this.position+3,n}this.unexpected()},n.combinator=function(){var e=this;if(\"|\"===this.content())return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(!(t<0||this.tokens[t][b.FIELDS.TYPE]===v.comma)){var r,n=this.currToken,s=void 0;if(t>this.position&&(s=this.parseWhitespaceEquivalentTokens(t)),this.isNamedCombinator()?r=this.namedCombinator():this.currToken[b.FIELDS.TYPE]===v.combinator?(r=new m.default({value:this.content(),source:N(this.currToken),sourceIndex:this.currToken[b.FIELDS.START_POS]}),this.position++):A[this.currToken[b.FIELDS.TYPE]]||s||this.unexpected(),r){if(s){var i=this.convertWhitespaceNodesToSpace(s),o=i.space,a=i.rawSpace;r.spaces.before=o,r.rawSpaceBefore=a}}else{var l=this.convertWhitespaceNodesToSpace(s,!0),c=l.space,u=l.rawSpace;u||(u=c);var p={},f={spaces:{}};c.endsWith(\" \")&&u.endsWith(\" \")?(p.before=c.slice(0,c.length-1),f.spaces.before=u.slice(0,u.length-1)):c.startsWith(\" \")&&u.startsWith(\" \")?(p.after=c.slice(1),f.spaces.after=u.slice(1)):f.value=u,r=new m.default({value:\" \",source:_(n,this.tokens[this.position-1]),sourceIndex:n[b.FIELDS.START_POS],spaces:p,raws:f})}return this.currToken&&this.currToken[b.FIELDS.TYPE]===v.space&&(r.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(r)}var d=this.parseWhitespaceEquivalentTokens(t);if(d.length>0){var h=this.current.last;if(h){var y=this.convertWhitespaceNodesToSpace(d),g=y.space,E=y.rawSpace;void 0!==E&&(h.rawSpaceAfter+=E),h.spaces.after+=g}else d.forEach((function(t){return e.newNode(t)}))}},n.comma=function(){if(this.position===this.tokens.length-1)return this.root.trailingComma=!0,void this.position++;this.current._inferEndPosition();var e=new o.default({source:{start:C(this.tokens[this.position+1])}});this.current.parent.append(e),this.current=e,this.position++},n.comment=function(){var e=this.currToken;this.newNode(new l.default({value:this.content(),source:N(e),sourceIndex:e[b.FIELDS.START_POS]})),this.position++},n.error=function(e,t){throw this.root.error(e,t)},n.missingBackslash=function(){return this.error(\"Expected a backslash preceding the semicolon.\",{index:this.currToken[b.FIELDS.START_POS]})},n.missingParenthesis=function(){return this.expected(\"opening parenthesis\",this.currToken[b.FIELDS.START_POS])},n.missingSquareBracket=function(){return this.expected(\"opening square bracket\",this.currToken[b.FIELDS.START_POS])},n.unexpected=function(){return this.error(\"Unexpected '\"+this.content()+\"'. Escaping special characters with \\\\ may help.\",this.currToken[b.FIELDS.START_POS])},n.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;return this.nextToken[b.FIELDS.TYPE]===v.word?(this.position++,this.word(e)):this.nextToken[b.FIELDS.TYPE]===v.asterisk?(this.position++,this.universal(e)):void 0},n.nesting=function(){if(this.nextToken&&\"|\"===this.content(this.nextToken))this.position++;else{var e=this.currToken;this.newNode(new y.default({value:this.content(),source:N(e),sourceIndex:e[b.FIELDS.START_POS]})),this.position++}},n.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===E.PSEUDO){var r=new o.default({source:{start:C(this.tokens[this.position-1])}}),n=this.current;for(e.append(r),this.current=r;this.position<this.tokens.length&&t;)this.currToken[b.FIELDS.TYPE]===v.openParenthesis&&t++,this.currToken[b.FIELDS.TYPE]===v.closeParenthesis&&t--,t?this.parse():(this.current.source.end=I(this.currToken),this.current.parent.source.end=I(this.currToken),this.position++);this.current=n}else{for(var s,i=this.currToken,a=\"(\";this.position<this.tokens.length&&t;)this.currToken[b.FIELDS.TYPE]===v.openParenthesis&&t++,this.currToken[b.FIELDS.TYPE]===v.closeParenthesis&&t--,s=this.currToken,a+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape(\"value\",a,a):this.newNode(new p.default({value:a,source:k(i[b.FIELDS.START_LINE],i[b.FIELDS.START_COL],s[b.FIELDS.END_LINE],s[b.FIELDS.END_COL]),sourceIndex:i[b.FIELDS.START_POS]}))}if(t)return this.expected(\"closing parenthesis\",this.currToken[b.FIELDS.START_POS])},n.pseudo=function(){for(var e=this,t=\"\",r=this.currToken;this.currToken&&this.currToken[b.FIELDS.TYPE]===v.colon;)t+=this.content(),this.position++;return this.currToken?this.currToken[b.FIELDS.TYPE]!==v.word?this.expected([\"pseudo-class\",\"pseudo-element\"],this.currToken[b.FIELDS.START_POS]):void this.splitWord(!1,(function(n,s){t+=n,e.newNode(new f.default({value:t,source:_(r,e.currToken),sourceIndex:r[b.FIELDS.START_POS]})),s>1&&e.nextToken&&e.nextToken[b.FIELDS.TYPE]===v.openParenthesis&&e.error(\"Misplaced parenthesis.\",{index:e.nextToken[b.FIELDS.START_POS]})})):this.expected([\"pseudo-class\",\"pseudo-element\"],this.position-1)},n.space=function(){var e=this.content();0===this.position||this.prevToken[b.FIELDS.TYPE]===v.comma||this.prevToken[b.FIELDS.TYPE]===v.openParenthesis||this.current.nodes.every((function(e){return\"comment\"===e.type}))?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[b.FIELDS.TYPE]===v.comma||this.nextToken[b.FIELDS.TYPE]===v.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},n.string=function(){var e=this.currToken;this.newNode(new p.default({value:this.content(),source:N(e),sourceIndex:e[b.FIELDS.START_POS]})),this.position++},n.universal=function(e){var t=this.nextToken;if(t&&\"|\"===this.content(t))return this.position++,this.namespace();var r=this.currToken;this.newNode(new h.default({value:this.content(),source:N(r),sourceIndex:r[b.FIELDS.START_POS]}),e),this.position++},n.splitWord=function(e,t){for(var r=this,n=this.nextToken,s=this.content();n&&~[v.dollar,v.caret,v.equals,v.word].indexOf(n[b.FIELDS.TYPE]);){this.position++;var i=this.content();if(s+=i,i.lastIndexOf(\"\\\\\")===i.length-1){var o=this.nextToken;o&&o[b.FIELDS.TYPE]===v.space&&(s+=this.requiredSpace(this.content(o)),this.position++)}n=this.nextToken}var l=D(s,\".\").filter((function(e){return\"\\\\\"!==s[e-1]})),p=D(s,\"#\").filter((function(e){return\"\\\\\"!==s[e-1]})),f=D(s,\"#{\");f.length&&(p=p.filter((function(e){return!~f.indexOf(e)})));var d=(0,g.default)(function(){var e=Array.prototype.concat.apply([],arguments);return e.filter((function(t,r){return r===e.indexOf(t)}))}([0].concat(l,p)));d.forEach((function(n,i){var o,f=d[i+1]||s.length,h=s.slice(n,f);if(0===i&&t)return t.call(r,h,d.length);var m=r.currToken,y=m[b.FIELDS.START_POS]+d[i],g=k(m[1],m[2]+n,m[3],m[2]+(f-1));if(~l.indexOf(n)){var v={value:h.slice(1),source:g,sourceIndex:y};o=new a.default(j(v,\"value\"))}else if(~p.indexOf(n)){var E={value:h.slice(1),source:g,sourceIndex:y};o=new c.default(j(E,\"value\"))}else{var x={value:h,source:g,sourceIndex:y};j(x,\"value\"),o=new u.default(x)}r.newNode(o,e),e=null})),this.position++},n.word=function(e){var t=this.nextToken;return t&&\"|\"===this.content(t)?(this.position++,this.namespace()):this.splitWord(e)},n.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},n.parse=function(e){switch(this.currToken[b.FIELDS.TYPE]){case v.space:this.space();break;case v.comment:this.comment();break;case v.openParenthesis:this.parentheses();break;case v.closeParenthesis:e&&this.missingParenthesis();break;case v.openSquare:this.attribute();break;case v.dollar:case v.caret:case v.equals:case v.word:this.word();break;case v.colon:this.pseudo();break;case v.comma:this.comma();break;case v.asterisk:this.universal();break;case v.ampersand:this.nesting();break;case v.slash:case v.combinator:this.combinator();break;case v.str:this.string();break;case v.closeSquare:this.missingSquareBracket();case v.semicolon:this.missingBackslash();default:this.unexpected()}},n.expected=function(e,t,r){if(Array.isArray(e)){var n=e.pop();e=e.join(\", \")+\" or \"+n}var s=/^[aeiou]/.test(e[0])?\"an\":\"a\";return r?this.error(\"Expected \"+s+\" \"+e+', found \"'+r+'\" instead.',{index:t}):this.error(\"Expected \"+s+\" \"+e+\".\",{index:t})},n.requiredSpace=function(e){return this.options.lossy?\" \":e},n.optionalSpace=function(e){return this.options.lossy?\"\":e},n.lossySpace=function(e,t){return this.options.lossy?t?\" \":\"\":e},n.parseParenthesisToken=function(e){var t=this.content(e);return e[b.FIELDS.TYPE]===v.space?this.requiredSpace(t):t},n.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||\"\")+t),t=!0),e.namespace=t,j(e,\"namespace\")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=\"\"),this.current.append(e)},n.content=function(e){return void 0===e&&(e=this.currToken),this.css.slice(e[b.FIELDS.START_POS],e[b.FIELDS.END_POS])},n.locateNextMeaningfulToken=function(e){void 0===e&&(e=this.position+1);for(var t=e;t<this.tokens.length;){if(!O[this.tokens[t][b.FIELDS.TYPE]])return t;t++}return-1},t=e,(r=[{key:\"currToken\",get:function(){return this.tokens[this.position]}},{key:\"nextToken\",get:function(){return this.tokens[this.position+1]}},{key:\"prevToken\",get:function(){return this.tokens[this.position-1]}}])&&P(t.prototype,r),e}();t.default=L,e.exports=t.default},(e,t)=>{\"use strict\";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(;r.length>0;){var s=r.shift();if(!e[s])return;e=e[s]}return e},e.exports=t.default},(e,t)=>{\"use strict\";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(;r.length>0;){var s=r.shift();e[s]||(e[s]={}),e=e[s]}},e.exports=t.default},(e,t)=>{\"use strict\";t.__esModule=!0,t.default=function(e){for(var t=\"\",r=e.indexOf(\"/*\"),n=0;r>=0;){t+=e.slice(n,r);var s=e.indexOf(\"*/\",r+2);if(s<0)return t;n=s+2,r=e.indexOf(\"/*\",n)}return t+e.slice(n)},e.exports=t.default},(e,t)=>{\"use strict\";t.__esModule=!0,t.default=function(e){return e.sort((function(e,t){return e-t}))},e.exports=t.default},function(e,t){!function(e){\"use strict\";for(var t={},r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",n=0;n<r.length;n++)t[r.charCodeAt(n)]=n;function s(e,t,r){4===r?e.push([t[0],t[1],t[2],t[3]]):5===r?e.push([t[0],t[1],t[2],t[3],t[4]]):1===r&&e.push([t[0]])}function i(e){var t=\"\";e=e<0?-e<<1|1:e<<1;do{var n=31&e;(e>>>=5)>0&&(n|=32),t+=r[n]}while(e>0);return t}e.decode=function(e){for(var r=[],n=[],i=[0,0,0,0,0],o=0,a=0,l=0,c=0;a<e.length;a++){var u=e.charCodeAt(a);if(44===u)s(n,i,o),o=0;else if(59===u)s(n,i,o),o=0,r.push(n),n=[],i[0]=0;else{var p=t[u];if(void 0===p)throw new Error(\"Invalid character (\"+String.fromCharCode(u)+\")\");var f=32&p;if(c+=(p&=31)<<l,f)l+=5;else{var d=1&c;c>>>=1,d&&(c=0===c?-2147483648:-c),i[o]+=c,o++,c=l=0}}}return s(n,i,o),r.push(n),r},e.encode=function(e){for(var t=0,r=0,n=0,s=0,o=\"\",a=0;a<e.length;a++){var l=e[a];if(a>0&&(o+=\";\"),0!==l.length){for(var c=0,u=[],p=0,f=l;p<f.length;p++){var d=f[p],h=i(d[0]-c);c=d[0],d.length>1&&(h+=i(d[1]-t)+i(d[2]-r)+i(d[3]-n),t=d[1],r=d[2],n=d[3]),5===d.length&&(h+=i(d[4]-s),s=d[4]),u.push(h)}o+=u.join(\",\")}}return o},Object.defineProperty(e,\"__esModule\",{value:!0})}(t)},(e,t,r)=>{\"use strict\";var n,s=r(180),i=r(31),o=r(2),a=r(24),l=r(17),c=r(181),u=r(32),p=r(119),f=r(112).f,d=r(188),h=r(190),m=r(54),y=r(58),g=o.Int8Array,b=g&&g.prototype,v=o.Uint8ClampedArray,E=v&&v.prototype,x=g&&d(g),S=b&&d(b),T=Object.prototype,w=T.isPrototypeOf,P=m(\"toStringTag\"),A=y(\"TYPED_ARRAY_TAG\"),O=s&&!!h&&\"Opera\"!==c(o.opera),C=!1,I={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},k={BigInt64Array:8,BigUint64Array:8},N=function(e){if(!a(e))return!1;var t=c(e);return l(I,t)||l(k,t)};for(n in I)o[n]||(O=!1);if((!O||\"function\"!=typeof x||x===Function.prototype)&&(x=function(){throw TypeError(\"Incorrect invocation\")},O))for(n in I)o[n]&&h(o[n],x);if((!O||!S||S===T)&&(S=x.prototype,O))for(n in I)o[n]&&h(o[n].prototype,S);if(O&&d(E)!==S&&h(E,S),i&&!l(S,P))for(n in C=!0,f(S,P,{get:function(){return a(this)?this[A]:void 0}}),I)o[n]&&u(o[n],A,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:O,TYPED_ARRAY_TAG:C&&A,aTypedArray:function(e){if(N(e))return e;throw TypeError(\"Target is not a typed array\")},aTypedArrayConstructor:function(e){if(h){if(w.call(x,e))return e}else for(var t in I)if(l(I,n)){var r=o[t];if(r&&(e===r||w.call(r,e)))return e}throw TypeError(\"Target is not a typed array constructor\")},exportTypedArrayMethod:function(e,t,r){if(i){if(r)for(var n in I){var s=o[n];if(s&&l(s.prototype,e))try{delete s.prototype[e]}catch(e){}}S[e]&&!r||p(S,e,r?t:O&&b[e]||t)}},exportTypedArrayStaticMethod:function(e,t,r){var n,s;if(i){if(h){if(r)for(n in I)if((s=o[n])&&l(s,e))try{delete s[e]}catch(e){}if(x[e]&&!r)return;try{return p(x,e,r?t:O&&x[e]||t)}catch(e){}}for(n in I)!(s=o[n])||s[e]&&!r||p(s,e,t)}},isView:function(e){if(!a(e))return!1;var t=c(e);return\"DataView\"===t||l(I,t)||l(k,t)},isTypedArray:N,TypedArray:x,TypedArrayPrototype:S}},e=>{e.exports=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof DataView},(e,t,r)=>{var n=r(182),s=r(60),i=r(54)(\"toStringTag\"),o=\"Arguments\"==s(function(){return arguments}());e.exports=n?s:function(e){var t,r,n;return void 0===e?\"Undefined\":null===e?\"Null\":\"string\"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?s(t):\"Object\"==(n=s(t))&&\"function\"==typeof t.callee?\"Arguments\":n}},(e,t,r)=>{var n={};n[r(54)(\"toStringTag\")]=\"z\",e.exports=\"[object z]\"===String(n)},e=>{e.exports=!1},(e,t,r)=>{var n=r(2);e.exports=n},(e,t,r)=>{var n=r(117);e.exports=n&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator},(e,t,r)=>{var n,s,i,o=r(187),a=r(2),l=r(24),c=r(32),u=r(17),p=r(55),f=r(121),d=r(122),h=\"Object already initialized\",m=a.WeakMap;if(o||p.state){var y=p.state||(p.state=new m),g=y.get,b=y.has,v=y.set;n=function(e,t){if(b.call(y,e))throw new TypeError(h);return t.facade=e,v.call(y,e,t),t},s=function(e){return g.call(y,e)||{}},i=function(e){return b.call(y,e)}}else{var E=f(\"state\");d[E]=!0,n=function(e,t){if(u(e,E))throw new TypeError(h);return t.facade=e,c(e,E,t),t},s=function(e){return u(e,E)?e[E]:{}},i=function(e){return u(e,E)}}e.exports={set:n,get:s,has:i,enforce:function(e){return i(e)?s(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=s(t)).type!==e)throw TypeError(\"Incompatible receiver, \"+e+\" required\");return r}}}},(e,t,r)=>{var n=r(2),s=r(120),i=n.WeakMap;e.exports=\"function\"==typeof i&&/native code/.test(s(i))},(e,t,r)=>{var n=r(17),s=r(109),i=r(121),o=r(189),a=i(\"IE_PROTO\"),l=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=s(e),n(e,a)?e[a]:\"function\"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},(e,t,r)=>{var n=r(16);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},(e,t,r)=>{var n=r(57),s=r(191);e.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return n(r),s(i),t?e.call(r,i):r.__proto__=i,r}}():void 0)},(e,t,r)=>{var n=r(24);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError(\"Can't set \"+String(e)+\" as a prototype\");return e}},e=>{var t=Math.floor,r=function(e,i){var o=e.length,a=t(o/2);return o<8?n(e,i):s(r(e.slice(0,a),i),r(e.slice(a),i),i)},n=function(e,t){for(var r,n,s=e.length,i=1;i<s;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},s=function(e,t,r){for(var n=e.length,s=t.length,i=0,o=0,a=[];i<n||o<s;)i<n&&o<s?a.push(r(e[i],t[o])<=0?e[i++]:t[o++]):a.push(i<n?e[i++]:t[o++]);return a};e.exports=r},(e,t,r)=>{var n=r(33).match(/firefox\\/(\\d+)/i);e.exports=!!n&&+n[1]},(e,t,r)=>{var n=r(33);e.exports=/MSIE|Trident/.test(n)},(e,t,r)=>{var n=r(33).match(/AppleWebKit\\/(\\d+)\\./);e.exports=!!n&&+n[1]},(e,t,r)=>{var n=r(2),s=r(197).f,i=r(32),o=r(119),a=r(56),l=r(199),c=r(205);e.exports=function(e,t){var r,u,p,f,d,h=e.target,m=e.global,y=e.stat;if(r=m?n:y?n[h]||a(h,{}):(n[h]||{}).prototype)for(u in t){if(f=t[u],p=e.noTargetGet?(d=s(r,u))&&d.value:r[u],!c(m?u:h+(y?\".\":\"#\")+u,e.forced)&&void 0!==p){if(typeof f==typeof p)continue;l(f,p)}(e.sham||p&&p.sham)&&i(f,\"sham\",!0),o(r,u,f,e)}}},(e,t,r)=>{var n=r(31),s=r(358),i=r(116),o=r(61),a=r(115),l=r(17),c=r(113),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=o(e),t=a(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return i(!s.f.call(e,t),e[t])}},(e,t,r)=>{var n=r(16),s=r(60),i=\"\".split;e.exports=n((function(){return!Object(\"z\").propertyIsEnumerable(0)}))?function(e){return\"String\"==s(e)?i.call(e,\"\"):Object(e)}:Object},(e,t,r)=>{var n=r(17),s=r(200),i=r(197),o=r(112);e.exports=function(e,t){for(var r=s(t),a=o.f,l=i.f,c=0;c<r.length;c++){var u=r[c];n(e,u)||a(e,u,l(t,u))}}},(e,t,r)=>{var n=r(59),s=r(359),i=r(360),o=r(57);e.exports=n(\"Reflect\",\"ownKeys\")||function(e){var t=s.f(o(e)),r=i.f;return r?t.concat(r(e)):t}},(e,t,r)=>{var n=r(17),s=r(61),i=r(202).indexOf,o=r(122);e.exports=function(e,t){var r,a=s(e),l=0,c=[];for(r in a)!n(o,r)&&n(a,r)&&c.push(r);for(;t.length>l;)n(a,r=t[l++])&&(~i(c,r)||c.push(r));return c}},(e,t,r)=>{var n=r(61),s=r(124),i=r(203),o=function(e){return function(t,r,o){var a,l=n(t),c=s(l.length),u=i(o,c);if(e&&r!=r){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},(e,t,r)=>{var n=r(125),s=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?s(r+t,0):i(r,t)}},e=>{e.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},(e,t,r)=>{var n=r(16),s=/#|\\.prototype\\./,i=function(e,t){var r=a[o(e)];return r==c||r!=l&&(\"function\"==typeof t?n(t):!!t)},o=i.normalize=function(e){return String(e).replace(s,\".\").toLowerCase()},a=i.data={},l=i.NATIVE=\"N\",c=i.POLYFILL=\"P\";e.exports=i},(e,t,r)=>{var n,s,i,o=r(2),a=r(16),l=r(207),c=r(208),u=r(114),p=r(209),f=r(210),d=o.location,h=o.setImmediate,m=o.clearImmediate,y=o.process,g=o.MessageChannel,b=o.Dispatch,v=0,E={},x=function(e){if(E.hasOwnProperty(e)){var t=E[e];delete E[e],t()}},S=function(e){return function(){x(e)}},T=function(e){x(e.data)},w=function(e){o.postMessage(e+\"\",d.protocol+\"//\"+d.host)};h&&m||(h=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return E[++v]=function(){(\"function\"==typeof e?e:Function(e)).apply(void 0,t)},n(v),v},m=function(e){delete E[e]},f?n=function(e){y.nextTick(S(e))}:b&&b.now?n=function(e){b.now(S(e))}:g&&!p?(i=(s=new g).port2,s.port1.onmessage=T,n=l(i.postMessage,i,1)):o.addEventListener&&\"function\"==typeof postMessage&&!o.importScripts&&d&&\"file:\"!==d.protocol&&!a(w)?(n=w,o.addEventListener(\"message\",T,!1)):n=\"onreadystatechange\"in u(\"script\")?function(e){c.appendChild(u(\"script\")).onreadystatechange=function(){c.removeChild(this),x(e)}}:function(e){setTimeout(S(e),0)}),e.exports={set:h,clear:m}},(e,t,r)=>{var n=r(123);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,s){return e.call(t,r,n,s)}}return function(){return e.apply(t,arguments)}}},(e,t,r)=>{var n=r(59);e.exports=n(\"document\",\"documentElement\")},(e,t,r)=>{var n=r(33);e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(n)},(e,t,r)=>{var n=r(60),s=r(2);e.exports=\"process\"==n(s.process)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.get=u,t.minVersion=function(e){return c(e).minVersion()},t.getDependencies=function(e){return Array.from(c(e).dependencies.values())},t.ensure=function(e,t){a||(a=t),c(e)},t.default=t.list=void 0;var n=r(10),s=r(0),i=r(457);function o(e){const t=[];for(;e.parentPath;e=e.parentPath)t.push(e.key),e.inList&&t.push(e.listKey);return t.reverse().join(\".\")}let a;const l=Object.create(null);function c(e){if(!l[e]){const t=i.default[e];if(!t)throw Object.assign(new ReferenceError(`Unknown helper ${e}`),{code:\"BABEL_HELPER_UNKNOWN\",helper:e});const r=()=>{const r={ast:s.file(t.ast())};return a?new a({filename:`babel-helper://${e}`},r):r},c=function(e){const t=new Set,r=new Set,s=new Map;let a,l;const c=[],u=[],p=[],f={ImportDeclaration(e){const t=e.node.source.value;if(!i.default[t])throw e.buildCodeFrameError(`Unknown helper ${t}`);if(1!==e.get(\"specifiers\").length||!e.get(\"specifiers.0\").isImportDefaultSpecifier())throw e.buildCodeFrameError(\"Helpers can only import a default value\");const r=e.node.specifiers[0].local;s.set(r,t),u.push(o(e))},ExportDefaultDeclaration(e){const t=e.get(\"declaration\");if(t.isFunctionDeclaration()){if(!t.node.id)throw t.buildCodeFrameError(\"Helpers should give names to their exported func declaration\");a=t.node.id.name}l=o(e)},ExportAllDeclaration(e){throw e.buildCodeFrameError(\"Helpers can only export default\")},ExportNamedDeclaration(e){throw e.buildCodeFrameError(\"Helpers can only export default\")},Statement(e){e.isModuleDeclaration()||e.skip()}},d={Program(e){const t=e.scope.getAllBindings();Object.keys(t).forEach((e=>{e!==a&&(s.has(t[e].identifier)||r.add(e))}))},ReferencedIdentifier(e){const r=e.node.name,n=e.scope.getBinding(r,!0);n?s.has(n.identifier)&&p.push(o(e)):t.add(r)},AssignmentExpression(e){const t=e.get(\"left\");if(!(a in t.getBindingIdentifiers()))return;if(!t.isIdentifier())throw t.buildCodeFrameError(\"Only simple assignments to exports are allowed in helpers\");const r=e.scope.getBinding(a);null!=r&&r.scope.path.isProgram()&&c.push(o(e))}};if((0,n.default)(e.ast,f,e.scope),(0,n.default)(e.ast,d,e.scope),!l)throw new Error(\"Helpers must default-export something.\");return c.reverse(),{globals:Array.from(t),localBindingNames:Array.from(r),dependencies:s,exportBindingAssignments:c,exportPath:l,exportName:a,importBindingsReferences:p,importPaths:u}}(r());l[e]={build(e,t,i){const o=r();return function(e,t,r,i,o){if(i&&!r)throw new Error(\"Unexpected local bindings for module-based helpers.\");if(!r)return;const{localBindingNames:a,dependencies:l,exportBindingAssignments:c,exportPath:u,exportName:p,importBindingsReferences:f,importPaths:d}=t,h={};l.forEach(((e,t)=>{h[t.name]=\"function\"==typeof o&&o(e)||t}));const m={},y=new Set(i||[]);a.forEach((e=>{let t=e;for(;y.has(t);)t=\"_\"+t;t!==e&&(m[e]=t)})),\"Identifier\"===r.type&&p!==r.name&&(m[p]=r.name);const g={Program(e){const t=e.get(u),n=d.map((t=>e.get(t))),i=f.map((t=>e.get(t))),o=t.get(\"declaration\");if(\"Identifier\"===r.type)o.isFunctionDeclaration()?t.replaceWith(o):t.replaceWith(s.variableDeclaration(\"var\",[s.variableDeclarator(r,o.node)]));else{if(\"MemberExpression\"!==r.type)throw new Error(\"Unexpected helper format.\");o.isFunctionDeclaration()?(c.forEach((t=>{const n=e.get(t);n.replaceWith(s.assignmentExpression(\"=\",r,n.node))})),t.replaceWith(o),e.pushContainer(\"body\",s.expressionStatement(s.assignmentExpression(\"=\",r,s.identifier(p))))):t.replaceWith(s.expressionStatement(s.assignmentExpression(\"=\",r,o.node)))}Object.keys(m).forEach((t=>{e.scope.rename(t,m[t])}));for(const e of n)e.remove();for(const e of i){const t=s.cloneNode(h[e.node.name]);e.replaceWith(t)}e.stop()}};(0,n.default)(e.ast,g,e.scope)}(o,c,t,i,e),{nodes:o.ast.program.body,globals:c.globals}},minVersion:()=>t.minVersion,dependencies:c.dependencies}}return l[e]}function u(e,t,r,n){return c(e).build(t,r,n)}const p=Object.keys(i.default).map((e=>e.replace(/^_/,\"\"))).filter((e=>\"__esModule\"!==e));t.list=p;var f=u;t.default=f},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ForAwaitStatement=t.NumericLiteralTypeAnnotation=t.ExistentialTypeParam=t.SpreadProperty=t.RestProperty=t.Flow=t.Pure=t.Generated=t.User=t.Var=t.BlockScoped=t.Referenced=t.Scope=t.Expression=t.Statement=t.BindingIdentifier=t.ReferencedMemberExpression=t.ReferencedIdentifier=void 0;var n=r(0);const s={types:[\"Identifier\",\"JSXIdentifier\"],checkPath(e,t){const{node:r,parent:s}=e;if(!n.isIdentifier(r,t)&&!n.isJSXMemberExpression(s,t)){if(!n.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return n.isReferenced(r,s,e.parentPath.parent)}};t.ReferencedIdentifier=s;const i={types:[\"MemberExpression\"],checkPath:({node:e,parent:t})=>n.isMemberExpression(e)&&n.isReferenced(e,t)};t.ReferencedMemberExpression=i;const o={types:[\"Identifier\"],checkPath(e){const{node:t,parent:r}=e,s=e.parentPath.parent;return n.isIdentifier(t)&&n.isBinding(t,r,s)}};t.BindingIdentifier=o;const a={types:[\"Statement\"],checkPath({node:e,parent:t}){if(n.isStatement(e)){if(n.isVariableDeclaration(e)){if(n.isForXStatement(t,{left:e}))return!1;if(n.isForStatement(t,{init:e}))return!1}return!0}return!1}};t.Statement=a;const l={types:[\"Expression\"],checkPath:e=>e.isIdentifier()?e.isReferencedIdentifier():n.isExpression(e.node)};t.Expression=l;const c={types:[\"Scopable\",\"Pattern\"],checkPath:e=>n.isScope(e.node,e.parent)};t.Scope=c;const u={checkPath:e=>n.isReferenced(e.node,e.parent)};t.Referenced=u;const p={checkPath:e=>n.isBlockScoped(e.node)};t.BlockScoped=p;const f={types:[\"VariableDeclaration\"],checkPath:e=>n.isVar(e.node)};t.Var=f;t.User={checkPath:e=>e.node&&!!e.node.loc};t.Generated={checkPath:e=>!e.isUser()};t.Pure={checkPath:(e,t)=>e.scope.isPure(e.node,t)};const d={types:[\"Flow\",\"ImportDeclaration\",\"ExportDeclaration\",\"ImportSpecifier\"],checkPath:({node:e})=>!(!n.isFlow(e)&&(n.isImportDeclaration(e)?\"type\"!==e.importKind&&\"typeof\"!==e.importKind:n.isExportDeclaration(e)?\"type\"!==e.exportKind:!n.isImportSpecifier(e)||\"type\"!==e.importKind&&\"typeof\"!==e.importKind))};t.Flow=d;t.RestProperty={types:[\"RestElement\"],checkPath:e=>e.parentPath&&e.parentPath.isObjectPattern()};t.SpreadProperty={types:[\"RestElement\"],checkPath:e=>e.parentPath&&e.parentPath.isObjectExpression()},t.ExistentialTypeParam={types:[\"ExistsTypeAnnotation\"]},t.NumericLiteralTypeAnnotation={types:[\"NumberLiteralTypeAnnotation\"]};t.ForAwaitStatement={types:[\"ForOfStatement\"],checkPath:({node:e})=>!0===e.await}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){const r=e.split(\".\");return e=>(0,n.default)(e,r,t)};var n=r(214)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){if(!(0,n.isMemberExpression)(e))return!1;const s=Array.isArray(t)?t:t.split(\".\"),i=[];let o;for(o=e;(0,n.isMemberExpression)(o);o=o.object)i.push(o.property);if(i.push(o),i.length<s.length)return!1;if(!r&&i.length>s.length)return!1;for(let e=0,t=i.length-1;e<s.length;e++,t--){const r=i[t];let o;if((0,n.isIdentifier)(r))o=r.name;else if((0,n.isStringLiteral)(r))o=r.value;else{if(!(0,n.isThisExpression)(r))return!1;o=\"this\"}if(s[e]!==o)return!1}return!0};var n=r(1)},e=>{\"use strict\";let t=null;function r(e){if(null!==t&&(t.property,1)){const e=t;return t=r.prototype=null,e}return t=r.prototype=null==e?Object.create(null):e,new r}r(),e.exports=function(e){return r(e)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if(e===t)return!0;const r=n.PLACEHOLDERS_ALIAS[e];if(r)for(const e of r)if(t===e)return!0;return!1};var n=r(11)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.PLACEHOLDERS_FLIPPED_ALIAS=t.PLACEHOLDERS_ALIAS=t.PLACEHOLDERS=void 0;var n=r(20);const s=[\"Identifier\",\"StringLiteral\",\"Expression\",\"Statement\",\"Declaration\",\"BlockStatement\",\"ClassBody\",\"Pattern\"];t.PLACEHOLDERS=s;const i={Declaration:[\"Statement\"],Pattern:[\"PatternLike\",\"LVal\"]};t.PLACEHOLDERS_ALIAS=i;for(const e of s){const t=n.ALIAS_KEYS[e];null!=t&&t.length&&(i[e]=t)}const o={};t.PLACEHOLDERS_FLIPPED_ALIAS=o,Object.keys(i).forEach((e=>{i[e].forEach((t=>{Object.hasOwnProperty.call(o,t)||(o[t]=[]),o[t].push(e)}))}))},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return!(!e||!n.VISITOR_KEYS[e.type])};var n=r(11)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t){const r={},i={},o=[],a=[];for(let l=0;l<t.length;l++){const c=t[l];if(c&&!(a.indexOf(c)>=0)){if((0,n.isAnyTypeAnnotation)(c))return[c];if((0,n.isFlowBaseAnnotation)(c))i[c.type]=c;else if((0,n.isUnionTypeAnnotation)(c))o.indexOf(c.types)<0&&(t=t.concat(c.types),o.push(c.types));else if((0,n.isGenericTypeAnnotation)(c)){const t=s(c.id);if(r[t]){let n=r[t];n.typeParameters?c.typeParameters&&(n.typeParameters.params=e(n.typeParameters.params.concat(c.typeParameters.params))):n=c.typeParameters}else r[t]=c}else a.push(c)}}for(const e of Object.keys(i))a.push(i[e]);for(const e of Object.keys(r))a.push(r[e]);return a};var n=r(1);function s(e){return(0,n.isIdentifier)(e)?e.name:`${e.id.name}.${s(e.qualification)}`}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){if(!r||!e)return e;const n=`${t}Comments`;return e[n]?e[n]=\"leading\"===t?r.concat(e[n]):e[n].concat(r):e[n]=r,e}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(\"innerComments\",e,t)};var n=r(131)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(\"leadingComments\",e,t)};var n=r(131)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,n.default)(e,t),(0,s.default)(e,t),(0,i.default)(e,t),e};var n=r(224),s=r(222),i=r(221)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(\"trailingComments\",e,t)};var n=r(131)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.isBlockStatement)(e))return e;let r=[];return(0,n.isEmptyStatement)(e)?r=[]:((0,n.isStatement)(e)||(e=(0,n.isFunction)(t)?(0,s.returnStatement)(e):(0,s.expressionStatement)(e)),r=[e]),(0,s.blockStatement)(r)};var n=r(1),s=r(6)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){e+=\"\";let t=\"\";for(const r of e)t+=(0,s.isIdentifierChar)(r.codePointAt(0))?r:\"-\";return t=t.replace(/^[-0-9]+/,\"\"),t=t.replace(/[-\\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():\"\"})),(0,n.default)(t)||(t=`_${t}`),t||\"_\"};var n=r(38),s=r(63)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,n.default)(e,s.default,t),e};var n=r(228),s=r(229)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t,r,s){if(!t)return;const i=n.VISITOR_KEYS[t.type];if(i){r(t,s=s||{});for(const n of i){const i=t[n];if(Array.isArray(i))for(const t of i)e(t,r,s);else e(i,r,s)}}};var n=r(11)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t={}){const r=t.preserveComments?s:i;for(const t of r)null!=e[t]&&(e[t]=void 0);for(const t of Object.keys(e))\"_\"===t[0]&&null!=e[t]&&(e[t]=void 0);const n=Object.getOwnPropertySymbols(e);for(const t of n)e[t]=null};var n=r(25);const s=[\"tokens\",\"start\",\"end\",\"loc\",\"raw\",\"rawValue\"],i=n.COMMENT_KEYS.concat([\"comments\"]).concat(s)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.isVariableDeclaration)(e)&&(\"var\"!==e.kind||e[s.BLOCK_SCOPED_SYMBOL])};var n=r(1),s=r(25)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(413),s=r(10),i=r(232),o=r(414),a=r(0),l=r(34);function c(e,t){switch(null==e?void 0:e.type){default:if(a.isModuleDeclaration(e))if((a.isExportAllDeclaration(e)||a.isExportNamedDeclaration(e)||a.isImportDeclaration(e))&&e.source)c(e.source,t);else if((a.isExportNamedDeclaration(e)||a.isImportDeclaration(e))&&e.specifiers&&e.specifiers.length)for(const r of e.specifiers)c(r,t);else(a.isExportDefaultDeclaration(e)||a.isExportNamedDeclaration(e))&&e.declaration&&c(e.declaration,t);else a.isModuleSpecifier(e)?c(e.local,t):a.isLiteral(e)&&t.push(e.value);break;case\"MemberExpression\":case\"OptionalMemberExpression\":case\"JSXMemberExpression\":c(e.object,t),c(e.property,t);break;case\"Identifier\":case\"JSXIdentifier\":t.push(e.name);break;case\"CallExpression\":case\"OptionalCallExpression\":case\"NewExpression\":c(e.callee,t);break;case\"ObjectExpression\":case\"ObjectPattern\":for(const r of e.properties)c(r,t);break;case\"SpreadElement\":case\"RestElement\":c(e.argument,t);break;case\"ObjectProperty\":case\"ObjectMethod\":case\"ClassProperty\":case\"ClassMethod\":case\"ClassPrivateProperty\":case\"ClassPrivateMethod\":c(e.key,t);break;case\"ThisExpression\":t.push(\"this\");break;case\"Super\":t.push(\"super\");break;case\"Import\":t.push(\"import\");break;case\"DoExpression\":t.push(\"do\");break;case\"YieldExpression\":t.push(\"yield\"),c(e.argument,t);break;case\"AwaitExpression\":t.push(\"await\"),c(e.argument,t);break;case\"AssignmentExpression\":c(e.left,t);break;case\"VariableDeclarator\":c(e.id,t);break;case\"FunctionExpression\":case\"FunctionDeclaration\":case\"ClassExpression\":case\"ClassDeclaration\":case\"PrivateName\":c(e.id,t);break;case\"ParenthesizedExpression\":c(e.expression,t);break;case\"UnaryExpression\":case\"UpdateExpression\":c(e.argument,t);break;case\"MetaProperty\":c(e.meta,t),c(e.property,t);break;case\"JSXElement\":c(e.openingElement,t);break;case\"JSXOpeningElement\":t.push(e.name);break;case\"JSXFragment\":c(e.openingFragment,t);break;case\"JSXOpeningFragment\":t.push(\"Fragment\");break;case\"JSXNamespacedName\":c(e.namespace,t),c(e.name,t)}}const u={For(e){for(const t of a.FOR_INIT_KEYS){const r=e.get(t);r.isVar()&&(e.scope.getFunctionParent()||e.scope.getProgramParent()).registerBinding(\"var\",r)}},Declaration(e){e.isBlockScoped()||e.isExportDeclaration()||(e.scope.getFunctionParent()||e.scope.getProgramParent()).registerDeclaration(e)},ReferencedIdentifier(e,t){t.references.push(e)},ForXStatement(e,t){const r=e.get(\"left\");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(e)},ExportDeclaration:{exit(e){const{node:t,scope:r}=e;if(a.isExportAllDeclaration(t))return;const n=t.declaration;if(a.isClassDeclaration(n)||a.isFunctionDeclaration(n)){const t=n.id;if(!t)return;const s=r.getBinding(t.name);s&&s.reference(e)}else if(a.isVariableDeclaration(n))for(const t of n.declarations)for(const n of Object.keys(a.getBindingIdentifiers(t))){const t=r.getBinding(n);t&&t.reference(e)}}},LabeledStatement(e){e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression(e,t){t.assignments.push(e)},UpdateExpression(e,t){t.constantViolations.push(e)},UnaryExpression(e,t){\"delete\"===e.node.operator&&t.constantViolations.push(e)},BlockScoped(e){let t=e.scope;if(t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e),e.isClassDeclaration()&&e.node.id){const t=e.node.id.name;e.scope.bindings[t]=e.scope.parent.getBinding(t)}},CatchClause(e){e.scope.registerBinding(\"let\",e)},Function(e){e.isFunctionExpression()&&e.has(\"id\")&&!e.get(\"id\").node[a.NOT_LOCAL_BINDING]&&e.scope.registerBinding(\"local\",e.get(\"id\"),e);const t=e.get(\"params\");for(const r of t)e.scope.registerBinding(\"param\",r)},ClassExpression(e){e.has(\"id\")&&!e.get(\"id\").node[a.NOT_LOCAL_BINDING]&&e.scope.registerBinding(\"local\",e)}};let p=0;class f{constructor(e){this.uid=void 0,this.path=void 0,this.block=void 0,this.labels=void 0,this.inited=void 0,this.bindings=void 0,this.references=void 0,this.globals=void 0,this.uids=void 0,this.data=void 0,this.crawling=void 0;const{node:t}=e,r=l.scope.get(t);if((null==r?void 0:r.path)===e)return r;l.scope.set(t,this),this.uid=p++,this.block=t,this.path=e,this.labels=new Map,this.inited=!1}get parent(){var e;let t,r=this.path;do{const e=\"key\"===r.key;r=r.parentPath,e&&r.isMethod()&&(r=r.parentPath),r&&r.isScope()&&(t=r)}while(r&&!t);return null==(e=t)?void 0:e.scope}get parentBlock(){return this.path.parent}get hub(){return this.path.hub}traverse(e,t,r){(0,s.default)(e,t,this,r,this.path)}generateDeclaredUidIdentifier(e){const t=this.generateUidIdentifier(e);return this.push({id:t}),a.cloneNode(t)}generateUidIdentifier(e){return a.identifier(this.generateUid(e))}generateUid(e=\"temp\"){let t;e=a.toIdentifier(e).replace(/^_+/,\"\").replace(/[0-9]+$/g,\"\");let r=1;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));const n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t}_generateUid(e,t){let r=e;return t>1&&(r+=t),`_${r}`}generateUidBasedOnNode(e,t){const r=[];c(e,r);let n=r.join(\"$\");return n=n.replace(/^_/,\"\")||t||\"ref\",this.generateUid(n.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return a.identifier(this.generateUidBasedOnNode(e,t))}isStatic(e){if(a.isThisExpression(e)||a.isSuper(e))return!0;if(a.isIdentifier(e)){const t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1}maybeGenerateMemoised(e,t){if(this.isStatic(e))return null;{const r=this.generateUidIdentifierBasedOnNode(e);return t?r:(this.push({id:r}),a.cloneNode(r))}}checkBlockScopedCollisions(e,t,r,n){if(\"param\"!==t&&\"local\"!==e.kind&&(\"let\"===t||\"let\"===e.kind||\"const\"===e.kind||\"module\"===e.kind||\"param\"===e.kind&&(\"let\"===t||\"const\"===t)))throw this.hub.buildError(n,`Duplicate declaration \"${r}\"`,TypeError)}rename(e,t,r){const s=this.getBinding(e);if(s)return t=t||this.generateUidIdentifier(e).name,new n.default(s,e,t).rename(r)}_renameFromMap(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)}dump(){\"-\".repeat(60);let e=this;do{for(const t of Object.keys(e.bindings))e.bindings[t]}while(e=e.parent)}toArray(e,t,r){if(a.isIdentifier(e)){const t=this.getBinding(e.name);if(null!=t&&t.constant&&t.path.isGenericType(\"Array\"))return e}if(a.isArrayExpression(e))return e;if(a.isIdentifier(e,{name:\"arguments\"}))return a.callExpression(a.memberExpression(a.memberExpression(a.memberExpression(a.identifier(\"Array\"),a.identifier(\"prototype\")),a.identifier(\"slice\")),a.identifier(\"call\")),[e]);let n;const s=[e];return!0===t?n=\"toConsumableArray\":t?(s.push(a.numericLiteral(t)),n=\"slicedToArray\"):n=\"toArray\",r&&(s.unshift(this.hub.addHelper(n)),n=\"maybeArrayLike\"),a.callExpression(this.hub.addHelper(n),s)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding(\"hoisted\",e.get(\"id\"),e);else if(e.isVariableDeclaration()){const t=e.get(\"declarations\");for(const r of t)this.registerBinding(e.node.kind,r)}else if(e.isClassDeclaration())this.registerBinding(\"let\",e);else if(e.isImportDeclaration()){const t=e.get(\"specifiers\");for(const e of t)this.registerBinding(\"module\",e)}else if(e.isExportDeclaration()){const t=e.get(\"declaration\");(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration())&&this.registerDeclaration(t)}else this.registerBinding(\"unknown\",e)}buildUndefinedNode(){return a.unaryExpression(\"void\",a.numericLiteral(0),!0)}registerConstantViolation(e){const t=e.getBindingIdentifiers();for(const r of Object.keys(t)){const t=this.getBinding(r);t&&t.reassign(e)}}registerBinding(e,t,r=t){if(!e)throw new ReferenceError(\"no `kind`\");if(t.isVariableDeclaration()){const r=t.get(\"declarations\");for(const t of r)this.registerBinding(e,t);return}const n=this.getProgramParent(),s=t.getOuterBindingIdentifiers(!0);for(const t of Object.keys(s)){n.references[t]=!0;for(const n of s[t]){const s=this.getOwnBinding(t);if(s){if(s.identifier===n)continue;this.checkBlockScopedCollisions(s,e,t,n)}s?this.registerConstantViolation(r):this.bindings[t]=new i.default({identifier:n,scope:this,path:r,kind:e})}}}addGlobal(e){this.globals[e.name]=e}hasUid(e){let t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1}hasGlobal(e){let t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1}hasReference(e){return!!this.getProgramParent().references[e]}isPure(e,t){if(a.isIdentifier(e)){const r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(a.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(a.isClassBody(e)){for(const r of e.body)if(!this.isPure(r,t))return!1;return!0}if(a.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(a.isArrayExpression(e)){for(const r of e.elements)if(!this.isPure(r,t))return!1;return!0}if(a.isObjectExpression(e)){for(const r of e.properties)if(!this.isPure(r,t))return!1;return!0}if(a.isMethod(e))return!(e.computed&&!this.isPure(e.key,t))&&\"get\"!==e.kind&&\"set\"!==e.kind;if(a.isProperty(e))return!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t);if(a.isUnaryExpression(e))return this.isPure(e.argument,t);if(a.isTaggedTemplateExpression(e))return a.matchesPattern(e.tag,\"String.raw\")&&!this.hasBinding(\"String\",!0)&&this.isPure(e.quasi,t);if(a.isTemplateLiteral(e)){for(const r of e.expressions)if(!this.isPure(r,t))return!1;return!0}return a.isPureish(e)}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{const r=t.data[e];if(null!=r)return r}while(t=t.parent)}removeData(e){let t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)}init(){this.inited||(this.inited=!0,this.crawl())}crawl(){const e=this.path;this.references=Object.create(null),this.bindings=Object.create(null),this.globals=Object.create(null),this.uids=Object.create(null),this.data=Object.create(null);const t=this.getProgramParent();if(t.crawling)return;const r={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,\"Program\"!==e.type&&u._exploded){for(const t of u.enter)t(e,r);const t=u[e.type];if(t)for(const n of t.enter)n(e,r)}e.traverse(u,r),this.crawling=!1;for(const e of r.assignments){const r=e.getBindingIdentifiers();for(const n of Object.keys(r))e.scope.getBinding(n)||t.addGlobal(r[n]);e.scope.registerConstantViolation(e)}for(const e of r.references){const r=e.scope.getBinding(e.node.name);r?r.reference(e):t.addGlobal(e.node)}for(const e of r.constantViolations)e.scope.registerConstantViolation(e)}push(e){let t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=(this.getFunctionParent()||this.getProgramParent()).path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(t.ensureBlock(),t=t.get(\"body\"));const r=e.unique,n=e.kind||\"var\",s=null==e._blockHoist?2:e._blockHoist,i=`declaration:${n}:${s}`;let o=!r&&t.getData(i);if(!o){const e=a.variableDeclaration(n,[]);e._blockHoist=s,[o]=t.unshiftContainer(\"body\",[e]),r||t.setData(i,o)}const l=a.variableDeclarator(e.id,e.init);o.node.declarations.push(l),this.registerBinding(n,o.get(\"declarations\").pop())}getProgramParent(){let e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error(\"Couldn't find a Program\")}getFunctionParent(){let e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);return null}getBlockParent(){let e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error(\"We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...\")}getAllBindings(){const e=Object.create(null);let t=this;do{for(const r of Object.keys(t.bindings))r in e==0&&(e[r]=t.bindings[r]);t=t.parent}while(t);return e}getAllBindingsOfKind(...e){const t=Object.create(null);for(const r of e){let e=this;do{for(const n of Object.keys(e.bindings)){const s=e.bindings[n];s.kind===r&&(t[n]=s)}e=e.parent}while(e)}return t}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t,r=this;do{const s=r.getOwnBinding(e);var n;if(s&&(null==(n=t)||!n.isPattern()||\"param\"===s.kind))return s;t=r.path}while(r=r.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){var t;return null==(t=this.getBinding(e))?void 0:t.identifier}getOwnBindingIdentifier(e){const t=this.bindings[e];return null==t?void 0:t.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(e,t){return!(!e||!this.hasOwnBinding(e)&&!this.parentHasBinding(e,t)&&!this.hasUid(e)&&(t||!f.globals.includes(e))&&(t||!f.contextVariables.includes(e)))}parentHasBinding(e,t){var r;return null==(r=this.parent)?void 0:r.hasBinding(e,t)}moveBindingTo(e,t){const r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){var t;null==(t=this.getBinding(e))||t.scope.removeOwnBinding(e);let r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)}}t.default=f,f.globals=Object.keys(o.builtin),f.contextVariables=[\"arguments\",\"undefined\",\"Infinity\",\"NaN\"]},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0,t.default=class{constructor({identifier:e,scope:t,path:r,kind:n}){this.identifier=void 0,this.scope=void 0,this.path=void 0,this.kind=void 0,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.identifier=e,this.scope=t,this.path=r,this.kind=n,this.clearValue()}deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)}reference(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))}dereference(){this.references--,this.referenced=!!this.references}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.needsWhitespace=f,t.needsWhitespaceBefore=function(e,t){return f(e,t,\"before\")},t.needsWhitespaceAfter=function(e,t){return f(e,t,\"after\")},t.needsParens=function(e,t,r){return!!t&&(!(!i.isNewExpression(t)||t.callee!==e||!p(e))||u(a,e,t,r))};var n=r(420),s=r(421),i=r(0);function o(e){const t={};function r(e,r){const n=t[e];t[e]=n?function(e,t,s){const i=n(e,t,s);return null==i?r(e,t,s):i}:r}for(const t of Object.keys(e)){const n=i.FLIPPED_ALIAS_KEYS[t];if(n)for(const s of n)r(s,e[t]);else r(t,e[t])}return t}const a=o(s),l=o(n.nodes),c=o(n.list);function u(e,t,r,n){const s=e[t.type];return s?s(t,r,n):null}function p(e){return!!i.isCallExpression(e)||i.isMemberExpression(e)&&p(e.object)}function f(e,t,r){if(!e)return 0;i.isExpressionStatement(e)&&(e=e.expression);let n=u(l,e,t);if(!n){const s=u(c,e,t);if(s)for(let t=0;t<s.length&&(n=f(s[t],e,r),!n);t++);}return\"object\"==typeof n&&null!==n&&n[r]||0}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ImportSpecifier=function(e){\"type\"!==e.importKind&&\"typeof\"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word(\"as\"),this.space(),this.print(e.local,e))},t.ImportDefaultSpecifier=function(e){this.print(e.local,e)},t.ExportDefaultSpecifier=function(e){this.print(e.exported,e)},t.ExportSpecifier=function(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word(\"as\"),this.space(),this.print(e.exported,e))},t.ExportNamespaceSpecifier=function(e){this.token(\"*\"),this.space(),this.word(\"as\"),this.space(),this.print(e.exported,e)},t.ExportAllDeclaration=function(e){this.word(\"export\"),this.space(),\"type\"===e.exportKind&&(this.word(\"type\"),this.space()),this.token(\"*\"),this.space(),this.word(\"from\"),this.space(),this.print(e.source,e),this.printAssertions(e),this.semicolon()},t.ExportNamedDeclaration=function(e){this.format.decoratorsBeforeExport&&n.isClassDeclaration(e.declaration)&&this.printJoin(e.declaration.decorators,e),this.word(\"export\"),this.space(),s.apply(this,arguments)},t.ExportDefaultDeclaration=function(e){this.format.decoratorsBeforeExport&&n.isClassDeclaration(e.declaration)&&this.printJoin(e.declaration.decorators,e),this.word(\"export\"),this.space(),this.word(\"default\"),this.space(),s.apply(this,arguments)},t.ImportDeclaration=function(e){this.word(\"import\"),this.space(),(\"type\"===e.importKind||\"typeof\"===e.importKind)&&(this.word(e.importKind),this.space());const t=e.specifiers.slice(0);if(null!=t&&t.length){for(;;){const r=t[0];if(!n.isImportDefaultSpecifier(r)&&!n.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(\",\"),this.space())}t.length&&(this.token(\"{\"),this.space(),this.printList(t,e),this.space(),this.token(\"}\")),this.space(),this.word(\"from\"),this.space()}var r;this.print(e.source,e),this.printAssertions(e),null!=(r=e.attributes)&&r.length&&(this.space(),this.word(\"with\"),this.space(),this.printList(e.attributes,e)),this.semicolon()},t.ImportAttribute=function(e){this.print(e.key),this.token(\":\"),this.space(),this.print(e.value)},t.ImportNamespaceSpecifier=function(e){this.token(\"*\"),this.space(),this.word(\"as\"),this.space(),this.print(e.local,e)};var n=r(0);function s(e){if(e.declaration){const t=e.declaration;this.print(t,e),n.isStatement(t)||this.semicolon()}else{\"type\"===e.exportKind&&(this.word(\"type\"),this.space());const t=e.specifiers.slice(0);let r=!1;for(;;){const s=t[0];if(!n.isExportDefaultSpecifier(s)&&!n.isExportNamespaceSpecifier(s))break;r=!0,this.print(t.shift(),e),t.length&&(this.token(\",\"),this.space())}(t.length||!t.length&&!r)&&(this.token(\"{\"),t.length&&(this.space(),this.printList(t,e),this.space()),this.token(\"}\")),e.source&&(this.space(),this.word(\"from\"),this.space(),this.print(e.source,e),this.printAssertions(e)),this.semicolon()}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.Identifier=function(e){this.exactSource(e.loc,(()=>{this.word(e.name)}))},t.ArgumentPlaceholder=function(){this.token(\"?\")},t.SpreadElement=t.RestElement=function(e){this.token(\"...\"),this.print(e.argument,e)},t.ObjectPattern=t.ObjectExpression=function(e){const t=e.properties;this.token(\"{\"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token(\"}\")},t.ObjectMethod=function(e){this.printJoin(e.decorators,e),this._methodHead(e),this.space(),this.print(e.body,e)},t.ObjectProperty=function(e){if(this.printJoin(e.decorators,e),e.computed)this.token(\"[\"),this.print(e.key,e),this.token(\"]\");else{if(n.isAssignmentPattern(e.value)&&n.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&n.isIdentifier(e.key)&&n.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(\":\"),this.space(),this.print(e.value,e)},t.ArrayPattern=t.ArrayExpression=function(e){const t=e.elements,r=t.length;this.token(\"[\"),this.printInnerComments(e);for(let n=0;n<t.length;n++){const s=t[n];s?(n>0&&this.space(),this.print(s,e),n<r-1&&this.token(\",\")):this.token(\",\")}this.token(\"]\")},t.RecordExpression=function(e){const t=e.properties;let r,n;if(\"bar\"===this.format.recordAndTupleSyntaxType)r=\"{|\",n=\"|}\";else{if(\"hash\"!==this.format.recordAndTupleSyntaxType)throw new Error(`The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);r=\"#{\",n=\"}\"}this.token(r),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token(n)},t.TupleExpression=function(e){const t=e.elements,r=t.length;let n,s;if(\"bar\"===this.format.recordAndTupleSyntaxType)n=\"[|\",s=\"|]\";else{if(\"hash\"!==this.format.recordAndTupleSyntaxType)throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);n=\"#[\",s=\"]\"}this.token(n),this.printInnerComments(e);for(let n=0;n<t.length;n++){const s=t[n];s&&(n>0&&this.space(),this.print(s,e),n<r-1&&this.token(\",\"))}this.token(s)},t.RegExpLiteral=function(e){this.word(`/${e.pattern}/${e.flags}`)},t.BooleanLiteral=function(e){this.word(e.value?\"true\":\"false\")},t.NullLiteral=function(){this.word(\"null\")},t.NumericLiteral=function(e){const t=this.getPossibleRaw(e),r=this.format.jsescOption,n=e.value+\"\";r.numbers?this.number(s(e.value,r)):null==t?this.number(n):this.format.minified?this.number(t.length<n.length?t:n):this.number(t)},t.StringLiteral=function(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&null!=t)return void this.token(t);const r=s(e.value,Object.assign(this.format.jsescOption,this.format.jsonCompatibleStrings&&{json:!0}));return this.token(r)},t.BigIntLiteral=function(e){const t=this.getPossibleRaw(e);this.format.minified||null==t?this.word(e.value+\"n\"):this.word(t)},t.DecimalLiteral=function(e){const t=this.getPossibleRaw(e);this.format.minified||null==t?this.word(e.value+\"m\"):this.word(t)},t.PipelineTopicExpression=function(e){this.print(e.expression,e)},t.PipelineBareFunction=function(e){this.print(e.callee,e)},t.PipelinePrimaryTopicReference=function(){this.token(\"#\")};var n=r(0),s=r(236)},(e,t,r)=>{\"use strict\";var n=r(37).Buffer;const s={},i=s.hasOwnProperty,o=(e,t)=>{for(const r in e)i.call(e,r)&&t(r,e[r])},a=s.toString,l=Array.isArray,c=n.isBuffer,u={'\"':'\\\\\"',\"'\":\"\\\\'\",\"\\\\\":\"\\\\\\\\\",\"\\b\":\"\\\\b\",\"\\f\":\"\\\\f\",\"\\n\":\"\\\\n\",\"\\r\":\"\\\\r\",\"\\t\":\"\\\\t\"},p=/[\"'\\\\\\b\\f\\n\\r\\t]/,f=/[0-9]/,d=/[ !#-&\\(-\\[\\]-_a-~]/,h=(e,t)=>{const r=()=>{E=v,++t.indentLevel,v=t.indent.repeat(t.indentLevel)},n={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:\"single\",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:\"decimal\",indent:\"\\t\",indentLevel:0,__inline1__:!1,__inline2__:!1},s=t&&t.json;var i,m;s&&(n.quotes=\"double\",n.wrap=!0),i=n,\"single\"!=(t=(m=t)?(o(m,((e,t)=>{i[e]=t})),i):i).quotes&&\"double\"!=t.quotes&&\"backtick\"!=t.quotes&&(t.quotes=\"single\");const y=\"double\"==t.quotes?'\"':\"backtick\"==t.quotes?\"`\":\"'\",g=t.compact,b=t.lowercaseHex;let v=t.indent.repeat(t.indentLevel),E=\"\";const x=t.__inline1__,S=t.__inline2__,T=g?\"\":\"\\n\";let w,P=!0;const A=\"binary\"==t.numbers,O=\"octal\"==t.numbers,C=\"decimal\"==t.numbers,I=\"hexadecimal\"==t.numbers;if(s&&e&&\"function\"==typeof e.toJSON&&(e=e.toJSON()),\"string\"!=typeof(k=e)&&\"[object String]\"!=a.call(k)){if((e=>\"[object Map]\"==a.call(e))(e))return 0==e.size?\"new Map()\":(g||(t.__inline1__=!0,t.__inline2__=!1),\"new Map(\"+h(Array.from(e),t)+\")\");if((e=>\"[object Set]\"==a.call(e))(e))return 0==e.size?\"new Set()\":\"new Set(\"+h(Array.from(e),t)+\")\";if(c(e))return 0==e.length?\"Buffer.from([])\":\"Buffer.from(\"+h(Array.from(e),t)+\")\";if(l(e))return w=[],t.wrap=!0,x&&(t.__inline1__=!1,t.__inline2__=!0),S||r(),((e,t)=>{const r=e.length;let n=-1;for(;++n<r;)t(e[n])})(e,(e=>{P=!1,S&&(t.__inline2__=!1),w.push((g||S?\"\":v)+h(e,t))})),P?\"[]\":S?\"[\"+w.join(\", \")+\"]\":\"[\"+T+w.join(\",\"+T)+T+(g?\"\":E)+\"]\";if(!(e=>\"number\"==typeof e||\"[object Number]\"==a.call(e))(e))return(e=>\"[object Object]\"==a.call(e))(e)?(w=[],t.wrap=!0,r(),o(e,((e,r)=>{P=!1,w.push((g?\"\":v)+h(e,t)+\":\"+(g?\"\":\" \")+h(r,t))})),P?\"{}\":\"{\"+T+w.join(\",\"+T)+T+(g?\"\":E)+\"}\"):s?JSON.stringify(e)||\"null\":String(e);if(s)return JSON.stringify(e);if(C)return String(e);if(I){let t=e.toString(16);return b||(t=t.toUpperCase()),\"0x\"+t}if(A)return\"0b\"+e.toString(2);if(O)return\"0o\"+e.toString(8)}var k;const N=e;let _=-1;const j=N.length;for(w=\"\";++_<j;){const e=N.charAt(_);if(t.es6){const e=N.charCodeAt(_);if(e>=55296&&e<=56319&&j>_+1){const t=N.charCodeAt(_+1);if(t>=56320&&t<=57343){let r=(1024*(e-55296)+t-56320+65536).toString(16);b||(r=r.toUpperCase()),w+=\"\\\\u{\"+r+\"}\",++_;continue}}}if(!t.escapeEverything){if(d.test(e)){w+=e;continue}if('\"'==e){w+=y==e?'\\\\\"':e;continue}if(\"`\"==e){w+=y==e?\"\\\\`\":e;continue}if(\"'\"==e){w+=y==e?\"\\\\'\":e;continue}}if(\"\\0\"==e&&!s&&!f.test(N.charAt(_+1))){w+=\"\\\\0\";continue}if(p.test(e)){w+=u[e];continue}const r=e.charCodeAt(0);if(t.minimal&&8232!=r&&8233!=r){w+=e;continue}let n=r.toString(16);b||(n=n.toUpperCase());const i=n.length>2||s,o=\"\\\\\"+(i?\"u\":\"x\")+(\"0000\"+n).slice(i?-4:-2);w+=o}return t.wrap&&(w=y+w+y),\"`\"==y&&(w=w.replace(/\\$\\{/g,\"\\\\${\")),t.isScriptContext?w.replace(/<\\/(script|style)/gi,\"<\\\\/$1\").replace(/<!--/g,s?\"\\\\u003C!--\":\"\\\\x3C!--\"):w};h.version=\"2.5.2\",e.exports=h},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){const{placeholderWhitelist:o,placeholderPattern:l,preserveComments:c,syntacticPlaceholders:u}=r,p=function(e,t,r){const n=(t.plugins||[]).slice();!1!==r&&n.push(\"placeholders\"),t=Object.assign({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,sourceType:\"module\"},t,{plugins:n});try{return(0,s.parse)(e,t)}catch(t){const r=t.loc;throw r&&(t.message+=\"\\n\"+(0,i.codeFrameColumns)(e,{start:r}),t.code=\"BABEL_TEMPLATE_PARSE_ERROR\"),t}}(t,r.parser,u);n.removePropertiesDeep(p,{preserveComments:c}),e.validate(p);const f={placeholders:[],placeholderNames:new Set},d={placeholders:[],placeholderNames:new Set},h={value:void 0};return n.traverse(p,a,{syntactic:f,legacy:d,isLegacyRef:h,placeholderWhitelist:o,placeholderPattern:l,syntacticPlaceholders:u}),Object.assign({ast:p},h.value?d:f)};var n=r(0),s=r(27),i=r(39);const o=/^[_$A-Z0-9]+$/;function a(e,t,r){var s;let i;if(n.isPlaceholder(e)){if(!1===r.syntacticPlaceholders)throw new Error(\"%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.\");i=e.name.name,r.isLegacyRef.value=!1}else{if(!1===r.isLegacyRef.value||r.syntacticPlaceholders)return;if(n.isIdentifier(e)||n.isJSXIdentifier(e))i=e.name,r.isLegacyRef.value=!0;else{if(!n.isStringLiteral(e))return;i=e.value,r.isLegacyRef.value=!0}}if(!r.isLegacyRef.value&&(null!=r.placeholderPattern||null!=r.placeholderWhitelist))throw new Error(\"'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'\");if(r.isLegacyRef.value&&(!1===r.placeholderPattern||!(r.placeholderPattern||o).test(i))&&(null==(s=r.placeholderWhitelist)||!s.has(i)))return;t=t.slice();const{node:a,key:l}=t[t.length-1];let c;n.isStringLiteral(e)||n.isPlaceholder(e,{expectedNode:\"StringLiteral\"})?c=\"string\":n.isNewExpression(a)&&\"arguments\"===l||n.isCallExpression(a)&&\"arguments\"===l||n.isFunction(a)&&\"params\"===l?c=\"param\":n.isExpressionStatement(a)&&!n.isPlaceholder(e)?(c=\"statement\",t=t.slice(0,-1)):c=n.isStatement(e)&&n.isPlaceholder(e)?\"statement\":\"other\";const{placeholders:u,placeholderNames:p}=r.isLegacyRef.value?r.legacy:r.syntactic;u.push({name:i,type:c,resolve:e=>function(e,t){let r=e;for(let e=0;e<t.length-1;e++){const{key:n,index:s}=t[e];r=void 0===s?r[n]:r[n][s]}const{key:n,index:s}=t[t.length-1];return{parent:r,key:n,index:s}}(e,t),isDuplicate:p.has(i)}),p.add(i)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){const r=n.cloneNode(e.ast);return t&&(e.placeholders.forEach((e=>{if(!Object.prototype.hasOwnProperty.call(t,e.name)){const t=e.name;throw new Error(`Error: No substitution given for \"${t}\". If this is not meant to be a\\n            placeholder you may want to consider passing one of the following options to @babel/template:\\n            - { placeholderPattern: false, placeholderWhitelist: new Set(['${t}'])}\\n            - { placeholderPattern: /^${t}$/ }`)}})),Object.keys(t).forEach((t=>{if(!e.placeholderNames.has(t))throw new Error(`Unknown substitution \"${t}\" given`)}))),e.placeholders.slice().reverse().forEach((e=>{try{!function(e,t,r){e.isDuplicate&&(Array.isArray(r)?r=r.map((e=>n.cloneNode(e))):\"object\"==typeof r&&(r=n.cloneNode(r)));const{parent:s,key:i,index:o}=e.resolve(t);if(\"string\"===e.type){if(\"string\"==typeof r&&(r=n.stringLiteral(r)),!r||!n.isStringLiteral(r))throw new Error(\"Expected string substitution\")}else if(\"statement\"===e.type)void 0===o?r?Array.isArray(r)?r=n.blockStatement(r):\"string\"==typeof r?r=n.expressionStatement(n.identifier(r)):n.isStatement(r)||(r=n.expressionStatement(r)):r=n.emptyStatement():r&&!Array.isArray(r)&&(\"string\"==typeof r&&(r=n.identifier(r)),n.isStatement(r)||(r=n.expressionStatement(r)));else if(\"param\"===e.type){if(\"string\"==typeof r&&(r=n.identifier(r)),void 0===o)throw new Error(\"Assertion failure.\")}else if(\"string\"==typeof r&&(r=n.identifier(r)),Array.isArray(r))throw new Error(\"Cannot replace single expression with an array.\");if(void 0===o)n.validate(s,i,r),s[i]=r;else{const t=s[i].slice();\"statement\"===e.type||\"param\"===e.type?null==r?t.splice(o,1):Array.isArray(r)?t.splice(o,1,...r):t[o]=r:t[o]=r,n.validate(s,i,t),s[i]=t}}(e,r,t&&t[e.name]||null)}catch(t){throw t.message=`@babel/template placeholder \"${e.name}\": ${t.message}`,t}})),r};var n=r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.rewriteModuleStatementsAndPrepareHeader=function(e,{loose:t,exportName:r,strict:u,allowTopLevelThis:p,strictMode:d,noInterop:m,importInterop:y=(m?\"none\":\"babel\"),lazy:g,esNamespaceOnly:b,constantReexports:v=t,enumerableModuleMeta:E=t}){(0,c.validateImportInteropOption)(y),n((0,o.isModule)(e),\"Cannot process module statements in a script\"),e.node.sourceType=\"script\";const x=(0,c.default)(e,r,{importInterop:y,initializeReexports:v,lazy:g,esNamespaceOnly:b});p||(0,a.default)(e),(0,l.default)(e,x),!1!==d&&(e.node.directives.some((e=>\"use strict\"===e.value.value))||e.unshiftContainer(\"directives\",s.directive(s.directiveLiteral(\"use strict\"))));const S=[];(0,c.hasExports)(x)&&!u&&S.push(function(e,t=!1){return(t?i.default.statement`\n        EXPORTS.__esModule = true;\n      `:i.default.statement`\n        Object.defineProperty(EXPORTS, \"__esModule\", {\n          value: true,\n        });\n      `)({EXPORTS:e.exportName})}(x,E));const T=function(e,t){const r=Object.create(null);for(const e of t.local.values())for(const t of e.names)r[t]=!0;let n=!1;for(const e of t.source.values()){for(const t of e.reexports.keys())r[t]=!0;for(const t of e.reexportNamespace)r[t]=!0;n=n||!!e.reexportAll}if(!n||0===Object.keys(r).length)return null;const i=e.scope.generateUidIdentifier(\"exportNames\");return delete r.default,{name:i.name,statement:s.variableDeclaration(\"var\",[s.variableDeclarator(i,s.valueToNode(r))])}}(e,x);return T&&(x.exportNameListName=T.name,S.push(T.statement)),S.push(...function(e,t,r=!1){const n=[],i=[];for(const[e,r]of t.local)\"import\"===r.kind||(\"hoisted\"===r.kind?n.push(h(t,r.names,s.identifier(e))):i.push(...r.names));for(const e of t.source.values()){r||n.push(...f(t,e,!1));for(const t of e.reexportNamespace)i.push(t)}return n.push(...function(e,t){const r=[];for(let t=0;t<e.length;t+=100)r.push(e.slice(t,t+100));return r}(i).map((r=>h(t,r,e.scope.buildUndefinedNode())))),n}(e,x,v)),{meta:x,headers:S}},t.ensureStatementsHoisted=function(e){e.forEach((e=>{e._blockHoist=3}))},t.wrapInterop=function(e,t,r){if(\"none\"===r)return null;if(\"node-namespace\"===r)return s.callExpression(e.hub.addHelper(\"interopRequireWildcard\"),[t,s.booleanLiteral(!0)]);if(\"node-default\"===r)return null;let n;if(\"default\"===r)n=\"interopRequireDefault\";else{if(\"namespace\"!==r)throw new Error(`Unknown interop: ${r}`);n=\"interopRequireWildcard\"}return s.callExpression(e.hub.addHelper(n),[t])},t.buildNamespaceInitStatements=function(e,t,r=!1){const n=[];let o=s.identifier(t.name);t.lazy&&(o=s.callExpression(o,[]));for(const e of t.importsNamespace)e!==t.name&&n.push(i.default.statement`var NAME = SOURCE;`({NAME:e,SOURCE:s.cloneNode(o)}));r&&n.push(...f(e,t,!0));for(const r of t.reexportNamespace)n.push((t.lazy?i.default.statement`\n            Object.defineProperty(EXPORTS, \"NAME\", {\n              enumerable: true,\n              get: function() {\n                return NAMESPACE;\n              }\n            });\n          `:i.default.statement`EXPORTS.NAME = NAMESPACE;`)({EXPORTS:e.exportName,NAME:r,NAMESPACE:s.cloneNode(o)}));if(t.reexportAll){const a=function(e,t,r){return(r?i.default.statement`\n        Object.keys(NAMESPACE).forEach(function(key) {\n          if (key === \"default\" || key === \"__esModule\") return;\n          VERIFY_NAME_LIST;\n          if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n          EXPORTS[key] = NAMESPACE[key];\n        });\n      `:i.default.statement`\n        Object.keys(NAMESPACE).forEach(function(key) {\n          if (key === \"default\" || key === \"__esModule\") return;\n          VERIFY_NAME_LIST;\n          if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n          Object.defineProperty(EXPORTS, key, {\n            enumerable: true,\n            get: function() {\n              return NAMESPACE[key];\n            },\n          });\n        });\n    `)({NAMESPACE:t,EXPORTS:e.exportName,VERIFY_NAME_LIST:e.exportNameListName?i.default`\n            if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;\n          `({EXPORTS_LIST:e.exportNameListName}):null})}(e,s.cloneNode(o),r);a.loc=t.reexportAll.loc,n.push(a)}return n},Object.defineProperty(t,\"isModule\",{enumerable:!0,get:function(){return o.isModule}}),Object.defineProperty(t,\"rewriteThis\",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,\"hasExports\",{enumerable:!0,get:function(){return c.hasExports}}),Object.defineProperty(t,\"isSideEffectImport\",{enumerable:!0,get:function(){return c.isSideEffectImport}}),Object.defineProperty(t,\"getModuleName\",{enumerable:!0,get:function(){return u.default}});var n=r(30),s=r(0),i=r(21),o=r(146),a=r(461),l=r(462),c=r(463),u=r(464);const p={constant:i.default.statement`EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;`,constantComputed:i.default.statement`EXPORTS[\"EXPORT_NAME\"] = NAMESPACE_IMPORT;`,spec:i.default`\n    Object.defineProperty(EXPORTS, \"EXPORT_NAME\", {\n      enumerable: true,\n      get: function() {\n        return NAMESPACE_IMPORT;\n      },\n    });\n    `},f=(e,t,r)=>{const n=t.lazy?s.callExpression(s.identifier(t.name),[]):s.identifier(t.name),{stringSpecifiers:i}=e;return Array.from(t.reexports,(([o,a])=>{let l=s.cloneNode(n);\"default\"===a&&\"node-default\"===t.interop||(l=i.has(a)?s.memberExpression(l,s.stringLiteral(a),!0):s.memberExpression(l,s.identifier(a)));const c={EXPORTS:e.exportName,EXPORT_NAME:o,NAMESPACE_IMPORT:l};return r||s.isIdentifier(l)?i.has(o)?p.constantComputed(c):p.constant(c):p.spec(c)}))},d={computed:i.default.expression`EXPORTS[\"NAME\"] = VALUE`,default:i.default.expression`EXPORTS.NAME = VALUE`};function h(e,t,r){const{stringSpecifiers:n,exportName:i}=e;return s.expressionStatement(t.reduce(((e,t)=>{const r={EXPORTS:i,NAME:t,VALUE:e};return n.has(t)?d.computed(r):d.default(r)}),r))}},(e,t,r)=>{\"use strict\";function n(e){return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var o,a,l={};function c(e,t,r){r||(r=Error);var o=function(r){function o(r,i,a){var l;return function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,o),(l=function(e,t){return!t||\"object\"!==n(t)&&\"function\"!=typeof t?function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}(e):t}(this,s(o).call(this,function(e,r,n){return\"string\"==typeof t?t:t(e,r,n)}(r,i,a)))).code=e,l}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(o,r),o}(r);l[e]=o}function u(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?\"one of \".concat(t,\" \").concat(e.slice(0,r-1).join(\", \"),\", or \")+e[r-1]:2===r?\"one of \".concat(t,\" \").concat(e[0],\" or \").concat(e[1]):\"of \".concat(t,\" \").concat(e[0])}return\"of \".concat(t,\" \").concat(String(e))}c(\"ERR_AMBIGUOUS_ARGUMENT\",'The \"%s\" argument is ambiguous. %s',TypeError),c(\"ERR_INVALID_ARG_TYPE\",(function(e,t,s){var i,a,l,c,p;if(void 0===o&&(o=r(30)),o(\"string\"==typeof e,\"'name' must be a string\"),\"string\"==typeof t&&(a=\"not \",t.substr(0,a.length)===a)?(i=\"must not be\",t=t.replace(/^not /,\"\")):i=\"must be\",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e,\" argument\"))l=\"The \".concat(e,\" \").concat(i,\" \").concat(u(t,\"type\"));else{var f=(\"number\"!=typeof p&&(p=0),p+\".\".length>(c=e).length||-1===c.indexOf(\".\",p)?\"argument\":\"property\");l='The \"'.concat(e,'\" ').concat(f,\" \").concat(i,\" \").concat(u(t,\"type\"))}return l+\". Received type \".concat(n(s))}),TypeError),c(\"ERR_INVALID_ARG_VALUE\",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"is invalid\";void 0===a&&(a=r(36));var s=a.inspect(t);return s.length>128&&(s=\"\".concat(s.slice(0,128),\"...\")),\"The argument '\".concat(e,\"' \").concat(n,\". Received \").concat(s)}),TypeError,RangeError),c(\"ERR_INVALID_RETURN_VALUE\",(function(e,t,r){var s;return s=r&&r.constructor&&r.constructor.name?\"instance of \".concat(r.constructor.name):\"type \".concat(n(r)),\"Expected \".concat(e,' to be returned from the \"').concat(t,'\"')+\" function but got \".concat(s,\".\")}),TypeError),c(\"ERR_MISSING_ARGS\",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===o&&(o=r(30)),o(t.length>0,\"At least one arg needs to be specified\");var s=\"The \",i=t.length;switch(t=t.map((function(e){return'\"'.concat(e,'\"')})),i){case 1:s+=\"\".concat(t[0],\" argument\");break;case 2:s+=\"\".concat(t[0],\" and \").concat(t[1],\" arguments\");break;default:s+=t.slice(0,i-1).join(\", \"),s+=\", and \".concat(t[i-1],\" arguments\")}return\"\".concat(s,\" must be specified\")}),TypeError),e.exports.codes=l},(e,t,r)=>{\"use strict\";var n=r(242),s=r(246),i=r(247),o=r(139);function a(e){return e.call.bind(e)}var l=\"undefined\"!=typeof BigInt,c=\"undefined\"!=typeof Symbol,u=a(Object.prototype.toString),p=a(Number.prototype.valueOf),f=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(l)var h=a(BigInt.prototype.valueOf);if(c)var m=a(Symbol.prototype.valueOf);function y(e,t){if(\"object\"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return\"[object Map]\"===u(e)}function b(e){return\"[object Set]\"===u(e)}function v(e){return\"[object WeakMap]\"===u(e)}function E(e){return\"[object WeakSet]\"===u(e)}function x(e){return\"[object ArrayBuffer]\"===u(e)}function S(e){return\"undefined\"!=typeof ArrayBuffer&&(x.working?x(e):e instanceof ArrayBuffer)}function T(e){return\"[object DataView]\"===u(e)}function w(e){return\"undefined\"!=typeof DataView&&(T.working?T(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=s,t.isTypedArray=o,t.isPromise=function(e){return\"undefined\"!=typeof Promise&&e instanceof Promise||null!==e&&\"object\"==typeof e&&\"function\"==typeof e.then&&\"function\"==typeof e.catch},t.isArrayBufferView=function(e){return\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||w(e)},t.isUint8Array=function(e){return\"Uint8Array\"===i(e)},t.isUint8ClampedArray=function(e){return\"Uint8ClampedArray\"===i(e)},t.isUint16Array=function(e){return\"Uint16Array\"===i(e)},t.isUint32Array=function(e){return\"Uint32Array\"===i(e)},t.isInt8Array=function(e){return\"Int8Array\"===i(e)},t.isInt16Array=function(e){return\"Int16Array\"===i(e)},t.isInt32Array=function(e){return\"Int32Array\"===i(e)},t.isFloat32Array=function(e){return\"Float32Array\"===i(e)},t.isFloat64Array=function(e){return\"Float64Array\"===i(e)},t.isBigInt64Array=function(e){return\"BigInt64Array\"===i(e)},t.isBigUint64Array=function(e){return\"BigUint64Array\"===i(e)},g.working=\"undefined\"!=typeof Map&&g(new Map),t.isMap=function(e){return\"undefined\"!=typeof Map&&(g.working?g(e):e instanceof Map)},b.working=\"undefined\"!=typeof Set&&b(new Set),t.isSet=function(e){return\"undefined\"!=typeof Set&&(b.working?b(e):e instanceof Set)},v.working=\"undefined\"!=typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return\"undefined\"!=typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},E.working=\"undefined\"!=typeof WeakSet&&E(new WeakSet),t.isWeakSet=function(e){return E(e)},x.working=\"undefined\"!=typeof ArrayBuffer&&x(new ArrayBuffer),t.isArrayBuffer=S,T.working=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof DataView&&T(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=w;var P=\"undefined\"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(e){return\"[object SharedArrayBuffer]\"===u(e)}function O(e){return void 0!==P&&(void 0===A.working&&(A.working=A(new P)),A.working?A(e):e instanceof P)}function C(e){return y(e,p)}function I(e){return y(e,f)}function k(e){return y(e,d)}function N(e){return l&&y(e,h)}function _(e){return c&&y(e,m)}t.isSharedArrayBuffer=O,t.isAsyncFunction=function(e){return\"[object AsyncFunction]\"===u(e)},t.isMapIterator=function(e){return\"[object Map Iterator]\"===u(e)},t.isSetIterator=function(e){return\"[object Set Iterator]\"===u(e)},t.isGeneratorObject=function(e){return\"[object Generator]\"===u(e)},t.isWebAssemblyCompiledModule=function(e){return\"[object WebAssembly.Module]\"===u(e)},t.isNumberObject=C,t.isStringObject=I,t.isBooleanObject=k,t.isBigIntObject=N,t.isSymbolObject=_,t.isBoxedPrimitive=function(e){return C(e)||I(e)||k(e)||N(e)||_(e)},t.isAnyArrayBuffer=function(e){return\"undefined\"!=typeof Uint8Array&&(S(e)||O(e))},[\"isProxy\",\"isExternal\",\"isModuleNamespaceObject\"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+\" is not supported in userland\")}})}))},(e,t,r)=>{\"use strict\";var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.toStringTag,s=r(66)(\"Object.prototype.toString\"),i=function(e){return!(n&&e&&\"object\"==typeof e&&Symbol.toStringTag in e)&&\"[object Arguments]\"===s(e)},o=function(e){return!!i(e)||null!==e&&\"object\"==typeof e&&\"number\"==typeof e.length&&e.length>=0&&\"[object Array]\"!==s(e)&&\"[object Function]\"===s(e.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=o,e.exports=a?i:o},e=>{\"use strict\";e.exports=function(){if(\"function\"!=typeof Symbol||\"function\"!=typeof Object.getOwnPropertySymbols)return!1;if(\"symbol\"==typeof Symbol.iterator)return!0;var e={},t=Symbol(\"test\"),r=Object(t);if(\"string\"==typeof t)return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(t))return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if(\"function\"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if(\"function\"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(\"function\"==typeof Object.getOwnPropertyDescriptor){var s=Object.getOwnPropertyDescriptor(e,t);if(42!==s.value||!0!==s.enumerable)return!1}return!0}},e=>{\"use strict\";var t=\"Function.prototype.bind called on incompatible \",r=Array.prototype.slice,n=Object.prototype.toString,s=\"[object Function]\";e.exports=function(e){var i=this;if(\"function\"!=typeof i||n.call(i)!==s)throw new TypeError(t+i);for(var o,a=r.call(arguments,1),l=function(){if(this instanceof o){var t=i.apply(this,a.concat(r.call(arguments)));return Object(t)===t?t:this}return i.apply(e,a.concat(r.call(arguments)))},c=Math.max(0,i.length-a.length),u=[],p=0;p<c;p++)u.push(\"$\"+p);if(o=Function(\"binder\",\"return function (\"+u.join(\",\")+\"){ return binder.apply(this,arguments); }\")(l),i.prototype){var f=function(){};f.prototype=i.prototype,o.prototype=new f,f.prototype=null}return o}},(e,t,r)=>{\"use strict\";var n=r(69);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},e=>{\"use strict\";var t,r=Object.prototype.toString,n=Function.prototype.toString,s=/^\\s*(?:function)?\\*/,i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.toStringTag,o=Object.getPrototypeOf;e.exports=function(e){if(\"function\"!=typeof e)return!1;if(s.test(n.call(e)))return!0;if(!i)return\"[object GeneratorFunction]\"===r.call(e);if(!o)return!1;if(void 0===t){var a=function(){if(!i)return!1;try{return Function(\"return function*() {}\")()}catch(e){}}();t=!!a&&o(a)}return o(e)===t}},(e,t,r)=>{\"use strict\";var n=r(136),s=r(137),i=r(66),o=i(\"Object.prototype.toString\"),a=r(68)()&&\"symbol\"==typeof Symbol.toStringTag,l=s(),c=i(\"String.prototype.slice\"),u={},p=r(138),f=Object.getPrototypeOf;a&&p&&f&&n(l,(function(e){if(\"function\"==typeof r.g[e]){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw new EvalError(\"this engine has support for Symbol.toStringTag, but \"+e+\" does not have the property! Please report this.\");var n=f(t),s=p(n,Symbol.toStringTag);if(!s){var i=f(n);s=p(i,Symbol.toStringTag)}u[e]=s.get}}));var d=r(139);e.exports=function(e){return!!d(e)&&(a?function(e){var t=!1;return n(u,(function(r,n){if(!t)try{var s=r.call(e);s===n&&(t=s)}catch(e){}})),t}(e):c(o(e),8,-1))}},e=>{e.exports=function(e){return e&&\"object\"==typeof e&&\"function\"==typeof e.copy&&\"function\"==typeof e.fill&&\"function\"==typeof e.readUInt8}},(e,t,r)=>{\"use strict\";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return!t||\"object\"!==f(t)&&\"function\"!=typeof t?o(e):t}function o(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function a(e){var t=\"function\"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf(\"[native code]\")))return e;var r;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function l(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e,t,r){return(c=l()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var s=new(Function.bind.apply(e,n));return r&&u(s,r.prototype),s}).apply(null,arguments)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){return(f=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}var d=r(36).inspect,h=r(240).codes.ERR_INVALID_ARG_TYPE;function m(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var y=\"\",g=\"\",b={deepStrictEqual:\"Expected values to be strictly deep-equal:\",strictEqual:\"Expected values to be strictly equal:\",strictEqualObject:'Expected \"actual\" to be reference-equal to \"expected\":',deepEqual:\"Expected values to be loosely deep-equal:\",equal:\"Expected values to be loosely equal:\",notDeepStrictEqual:'Expected \"actual\" not to be strictly deep-equal to:',notStrictEqual:'Expected \"actual\" to be strictly unequal to:',notStrictEqualObject:'Expected \"actual\" not to be reference-equal to \"expected\":',notDeepEqual:'Expected \"actual\" not to be loosely deep-equal to:',notEqual:'Expected \"actual\" to be loosely unequal to:',notIdentical:\"Values identical but not reference-equal:\"};function v(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,\"message\",{value:e.message}),r}function E(e){return d(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var x=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t),\"object\"!==f(e)||null===e)throw new h(\"options\",\"Object\",e);var n=e.message,s=e.operator,a=e.stackStartFn,l=e.actual,c=e.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)r=i(this,p(t).call(this,String(n)));else if(\"object\"===f(l)&&null!==l&&\"object\"===f(c)&&null!==c&&\"stack\"in l&&l instanceof Error&&\"stack\"in c&&c instanceof Error&&(l=v(l),c=v(c)),\"deepStrictEqual\"===s||\"strictEqual\"===s)r=i(this,p(t).call(this,function(e,t,r){var n=\"\",s=\"\",i=0,o=\"\",a=!1,l=E(e),c=l.split(\"\\n\"),u=E(t).split(\"\\n\"),p=0,d=\"\";if(\"strictEqual\"===r&&\"object\"===f(e)&&\"object\"===f(t)&&null!==e&&null!==t&&(r=\"strictEqualObject\"),1===c.length&&1===u.length&&c[0]!==u[0]){var h=c[0].length+u[0].length;if(h<=10){if(!(\"object\"===f(e)&&null!==e||\"object\"===f(t)&&null!==t||0===e&&0===t))return\"\".concat(b[r],\"\\n\\n\")+\"\".concat(c[0],\" !== \").concat(u[0],\"\\n\")}else if(\"strictEqualObject\"!==r&&h<80){for(;c[0][p]===u[0][p];)p++;p>2&&(d=\"\\n  \".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return\"\";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(\" \",p),\"^\"),p=0)}}for(var v=c[c.length-1],x=u[u.length-1];v===x&&(p++<2?o=\"\\n  \".concat(v).concat(o):n=v,c.pop(),u.pop(),0!==c.length&&0!==u.length);)v=c[c.length-1],x=u[u.length-1];var S=Math.max(c.length,u.length);if(0===S){var T=l.split(\"\\n\");if(T.length>30)for(T[26]=\"\".concat(y,\"...\").concat(g);T.length>27;)T.pop();return\"\".concat(b.notIdentical,\"\\n\\n\").concat(T.join(\"\\n\"),\"\\n\")}p>3&&(o=\"\\n\".concat(y,\"...\").concat(g).concat(o),a=!0),\"\"!==n&&(o=\"\\n  \".concat(n).concat(o),n=\"\");var w=0,P=b[r]+\"\\n\".concat(\"\",\"+ actual\").concat(g,\" \").concat(\"\",\"- expected\").concat(g),A=\" \".concat(y,\"...\").concat(g,\" Lines skipped\");for(p=0;p<S;p++){var O=p-i;if(c.length<p+1)O>1&&p>2&&(O>4?(s+=\"\\n\".concat(y,\"...\").concat(g),a=!0):O>3&&(s+=\"\\n  \".concat(u[p-2]),w++),s+=\"\\n  \".concat(u[p-1]),w++),i=p,n+=\"\\n\".concat(\"\",\"-\").concat(g,\" \").concat(u[p]),w++;else if(u.length<p+1)O>1&&p>2&&(O>4?(s+=\"\\n\".concat(y,\"...\").concat(g),a=!0):O>3&&(s+=\"\\n  \".concat(c[p-2]),w++),s+=\"\\n  \".concat(c[p-1]),w++),i=p,s+=\"\\n\".concat(\"\",\"+\").concat(g,\" \").concat(c[p]),w++;else{var C=u[p],I=c[p],k=I!==C&&(!m(I,\",\")||I.slice(0,-1)!==C);k&&m(C,\",\")&&C.slice(0,-1)===I&&(k=!1,I+=\",\"),k?(O>1&&p>2&&(O>4?(s+=\"\\n\".concat(y,\"...\").concat(g),a=!0):O>3&&(s+=\"\\n  \".concat(c[p-2]),w++),s+=\"\\n  \".concat(c[p-1]),w++),i=p,s+=\"\\n\".concat(\"\",\"+\").concat(g,\" \").concat(I),n+=\"\\n\".concat(\"\",\"-\").concat(g,\" \").concat(C),w+=2):(s+=n,n=\"\",1!==O&&0!==p||(s+=\"\\n  \".concat(I),w++))}if(w>20&&p<S-2)return\"\".concat(P).concat(A,\"\\n\").concat(s,\"\\n\").concat(y,\"...\").concat(g).concat(n,\"\\n\")+\"\".concat(y,\"...\").concat(g)}return\"\".concat(P).concat(a?A:\"\",\"\\n\").concat(s).concat(n).concat(o).concat(d)}(l,c,s)));else if(\"notDeepStrictEqual\"===s||\"notStrictEqual\"===s){var d=b[s],x=E(l).split(\"\\n\");if(\"notStrictEqual\"===s&&\"object\"===f(l)&&null!==l&&(d=b.notStrictEqualObject),x.length>30)for(x[26]=\"\".concat(y,\"...\").concat(g);x.length>27;)x.pop();r=1===x.length?i(this,p(t).call(this,\"\".concat(d,\" \").concat(x[0]))):i(this,p(t).call(this,\"\".concat(d,\"\\n\\n\").concat(x.join(\"\\n\"),\"\\n\")))}else{var S=E(l),T=\"\",w=b[s];\"notDeepEqual\"===s||\"notEqual\"===s?(S=\"\".concat(b[s],\"\\n\\n\").concat(S)).length>1024&&(S=\"\".concat(S.slice(0,1021),\"...\")):(T=\"\".concat(E(c)),S.length>512&&(S=\"\".concat(S.slice(0,509),\"...\")),T.length>512&&(T=\"\".concat(T.slice(0,509),\"...\")),\"deepEqual\"===s||\"equal\"===s?S=\"\".concat(w,\"\\n\\n\").concat(S,\"\\n\\nshould equal\\n\\n\"):T=\" \".concat(s,\" \").concat(T)),r=i(this,p(t).call(this,\"\".concat(S).concat(T)))}return Error.stackTraceLimit=u,r.generatedMessage=!n,Object.defineProperty(o(r),\"name\",{value:\"AssertionError [ERR_ASSERTION]\",enumerable:!1,writable:!0,configurable:!0}),r.code=\"ERR_ASSERTION\",r.actual=l,r.expected=c,r.operator=s,Error.captureStackTrace&&Error.captureStackTrace(o(r),a),r.stack,r.name=\"AssertionError\",i(r)}var r,a;return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),r=t,(a=[{key:\"toString\",value:function(){return\"\".concat(this.name,\" [\").concat(this.code,\"]: \").concat(this.message)}},{key:d.custom,value:function(e,t){return d(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},s=Object.keys(r);\"function\"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),s.forEach((function(t){n(e,t,r[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}])&&s(r.prototype,a),t}(a(Error));e.exports=x},e=>{\"use strict\";function t(e,t){if(null==e)throw new TypeError(\"Cannot convert first argument to object\");for(var r=Object(e),n=1;n<arguments.length;n++){var s=arguments[n];if(null!=s)for(var i=Object.keys(Object(s)),o=0,a=i.length;o<a;o++){var l=i[o],c=Object.getOwnPropertyDescriptor(s,l);void 0!==c&&c.enumerable&&(r[l]=s[l])}}return r}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,\"assign\",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},(e,t,r)=>{\"use strict\";var n=Array.prototype.slice,s=r(141),i=Object.keys,o=i?function(e){return i(e)}:r(252),a=Object.keys;o.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return s(e)?a(n.call(e)):a(e)}):Object.keys=o,Object.keys||o},e.exports=o},(e,t,r)=>{\"use strict\";var n;if(!Object.keys){var s=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=r(141),a=Object.prototype.propertyIsEnumerable,l=!a.call({toString:null},\"toString\"),c=a.call((function(){}),\"prototype\"),u=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],p=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if(\"undefined\"==typeof window)return!1;for(var e in window)try{if(!f[\"$\"+e]&&s.call(window,e)&&null!==window[e]&&\"object\"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&\"object\"==typeof e,r=\"[object Function]\"===i.call(e),n=o(e),a=t&&\"[object String]\"===i.call(e),f=[];if(!t&&!r&&!n)throw new TypeError(\"Object.keys called on a non-object\");var h=c&&r;if(a&&e.length>0&&!s.call(e,0))for(var m=0;m<e.length;++m)f.push(String(m));if(n&&e.length>0)for(var y=0;y<e.length;++y)f.push(String(y));else for(var g in e)h&&\"prototype\"===g||!s.call(e,g)||f.push(String(g));if(l)for(var b=function(e){if(\"undefined\"==typeof window||!d)return p(e);try{return p(e)}catch(e){return!1}}(e),v=0;v<u.length;++v)b&&\"constructor\"===u[v]||!s.call(e,u[v])||f.push(u[v]);return f}}e.exports=n},(e,t,r)=>{\"use strict\";var n=r(143),s=r(40);e.exports=function(){var e=n();return s(Object,{is:e},{is:function(){return Object.is!==e}}),e}},(e,t,r)=>{\"use strict\";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,s=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){s=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(s)throw i}}return r}(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}()}function s(e){return(s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}var i=void 0!==/a/g.flags,o=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},a=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},l=Object.is?Object.is:r(140),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},u=Number.isNaN?Number.isNaN:r(255);function p(e){return e.call.bind(e)}var f=p(Object.prototype.hasOwnProperty),d=p(Object.prototype.propertyIsEnumerable),h=p(Object.prototype.toString),m=r(36).types,y=m.isAnyArrayBuffer,g=m.isArrayBufferView,b=m.isDate,v=m.isMap,E=m.isRegExp,x=m.isSet,S=m.isNativeError,T=m.isBoxedPrimitive,w=m.isNumberObject,P=m.isStringObject,A=m.isBooleanObject,O=m.isBigIntObject,C=m.isSymbolObject,I=m.isFloat32Array,k=m.isFloat64Array;function N(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function _(e){return Object.keys(e).filter(N).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}\n  /*!\n   * The buffer module from node.js, for the browser.\n   *\n   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n   * @license  MIT\n   */function j(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,s=0,i=Math.min(r,n);s<i;++s)if(e[s]!==t[s]){r=e[s],n=t[s];break}return r<n?-1:n<r?1:0}function D(e,t,r,n){if(e===t)return 0!==e||!r||l(e,t);if(r){if(\"object\"!==s(e))return\"number\"==typeof e&&u(e)&&u(t);if(\"object\"!==s(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||\"object\"!==s(e))return(null===t||\"object\"!==s(t))&&e==t;if(null===t||\"object\"!==s(t))return!1}var o,a,c,p,f=h(e);if(f!==h(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var d=_(e),m=_(t);return d.length===m.length&&M(e,t,r,n,1,d)}if(\"[object Object]\"===f&&(!v(e)&&v(t)||!x(e)&&x(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(E(e)){if(!E(t)||(c=e,p=t,!(i?c.source===p.source&&c.flags===p.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(p))))return!1}else if(S(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(g(e)){if(r||!I(e)&&!k(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===j(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var N=_(e),D=_(t);return N.length===D.length&&M(e,t,r,n,0,N)}if(x(e))return!(!x(t)||e.size!==t.size)&&M(e,t,r,n,2);if(v(e))return!(!v(t)||e.size!==t.size)&&M(e,t,r,n,3);if(y(e)){if(a=t,(o=e).byteLength!==a.byteLength||0!==j(new Uint8Array(o),new Uint8Array(a)))return!1}else if(T(e)&&!function(e,t){return w(e)?w(t)&&l(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):P(e)?P(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):A(e)?A(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):O(e)?O(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):C(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return M(e,t,r,n,0)}function L(e,t){return t.filter((function(t){return d(e,t)}))}function M(e,t,r,n,s,i){if(5===arguments.length){i=Object.keys(e);var o=Object.keys(t);if(i.length!==o.length)return!1}for(var a=0;a<i.length;a++)if(!f(t,i[a]))return!1;if(r&&5===arguments.length){var l=c(e);if(0!==l.length){var u=0;for(a=0;a<l.length;a++){var p=l[a];if(d(e,p)){if(!d(t,p))return!1;i.push(p),u++}else if(d(t,p))return!1}var h=c(t);if(l.length!==h.length&&L(t,h).length!==u)return!1}else{var m=c(t);if(0!==m.length&&0!==L(t,m).length)return!1}}if(0===i.length&&(0===s||1===s&&0===e.length||0===e.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var y=n.val1.get(e);if(void 0!==y){var g=n.val2.get(t);if(void 0!==g)return y===g}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var b=q(e,t,r,i,n,s);return n.val1.delete(e),n.val2.delete(t),b}function B(e,t,r,n){for(var s=o(e),i=0;i<s.length;i++){var a=s[i];if(D(t,a,r,n))return e.delete(a),!0}return!1}function R(e){switch(s(e)){case\"undefined\":return null;case\"object\":return;case\"symbol\":return!1;case\"string\":e=+e;case\"number\":if(u(e))return!1}return!0}function F(e,t,r){var n=R(r);return null!=n?n:t.has(n)&&!e.has(n)}function U(e,t,r,n,s){var i=R(r);if(null!=i)return i;var o=t.get(i);return!(void 0===o&&!t.has(i)||!D(n,o,!1,s))&&!e.has(i)&&D(n,o,!1,s)}function $(e,t,r,n,s,i){for(var a=o(e),l=0;l<a.length;l++){var c=a[l];if(D(r,c,s,i)&&D(n,t.get(c),s,i))return e.delete(c),!0}return!1}function q(e,t,r,i,l,c){var u=0;if(2===c){if(!function(e,t,r,n){for(var i=null,a=o(e),l=0;l<a.length;l++){var c=a[l];if(\"object\"===s(c)&&null!==c)null===i&&(i=new Set),i.add(c);else if(!t.has(c)){if(r)return!1;if(!F(e,t,c))return!1;null===i&&(i=new Set),i.add(c)}}if(null!==i){for(var u=o(t),p=0;p<u.length;p++){var f=u[p];if(\"object\"===s(f)&&null!==f){if(!B(i,f,r,n))return!1}else if(!r&&!e.has(f)&&!B(i,f,r,n))return!1}return 0===i.size}return!0}(e,t,r,l))return!1}else if(3===c){if(!function(e,t,r,i){for(var o=null,l=a(e),c=0;c<l.length;c++){var u=n(l[c],2),p=u[0],f=u[1];if(\"object\"===s(p)&&null!==p)null===o&&(o=new Set),o.add(p);else{var d=t.get(p);if(void 0===d&&!t.has(p)||!D(f,d,r,i)){if(r)return!1;if(!U(e,t,p,f,i))return!1;null===o&&(o=new Set),o.add(p)}}}if(null!==o){for(var h=a(t),m=0;m<h.length;m++){var y=n(h[m],2),g=(p=y[0],y[1]);if(\"object\"===s(p)&&null!==p){if(!$(o,e,p,g,r,i))return!1}else if(!(r||e.has(p)&&D(e.get(p),g,!1,i)||$(o,e,p,g,!1,i)))return!1}return 0===o.size}return!0}(e,t,r,l))return!1}else if(1===c)for(;u<e.length;u++){if(!f(e,u)){if(f(t,u))return!1;for(var p=Object.keys(e);u<p.length;u++){var d=p[u];if(!f(t,d)||!D(e[d],t[d],r,l))return!1}return p.length===Object.keys(t).length}if(!f(t,u)||!D(e[u],t[u],r,l))return!1}for(u=0;u<i.length;u++){var h=i[u];if(!D(e[h],t[h],r,l))return!1}return!0}e.exports={isDeepEqual:function(e,t){return D(e,t,!1)},isDeepStrictEqual:function(e,t){return D(e,t,!0)}}},(e,t,r)=>{\"use strict\";var n=r(51),s=r(40),i=r(144),o=r(145),a=r(256),l=n(o(),Number);s(l,{getPolyfill:o,implementation:i,shim:a}),e.exports=l},(e,t,r)=>{\"use strict\";var n=r(40),s=r(145);e.exports=function(){var e=s();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){const{sourceType:t}=e.node;if(\"module\"!==t&&\"script\"!==t)throw e.buildCodeFrameError(`Unknown sourceType \"${t}\", cannot transform.`);return\"module\"===e.node.sourceType}},(e,t,r)=>{\"use strict\";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if(\"default\"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(t,\"__esModule\",{value:!0});var s=n(r(0));function i(e){const t=e,{node:r,parentPath:n}=t;if(n.isLogicalExpression()){const{operator:e,right:t}=n.node;if(\"&&\"===e||\"||\"===e||\"??\"===e&&r===t)return i(n)}if(n.isSequenceExpression()){const{expressions:e}=n.node;return e[e.length-1]!==r||i(n)}return n.isConditional({test:r})||n.isUnaryExpression({operator:\"!\"})||n.isLoop({test:r})}class o{constructor(){this._map=void 0,this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e),{value:r}=t;return t.count--,0===t.count?s.assignmentExpression(\"=\",r,e):r}set(e,t,r){return this._map.set(e,{count:r,value:t})}}function a(e,t){const{node:r}=e;if(e.isOptionalMemberExpression())return s.memberExpression(t,r.property,r.computed);if(e.isOptionalCallExpression()){const n=e.get(\"callee\");if(e.node.optional&&n.isOptionalMemberExpression()){const{object:i}=n.node,o=e.scope.maybeGenerateMemoised(i)||i;return n.get(\"object\").replaceWith(s.assignmentExpression(\"=\",o,i)),s.callExpression(s.memberExpression(t,s.identifier(\"call\")),[o,...r.arguments])}return s.callExpression(t,r.arguments)}return e.node}const l={memoise(){},handle(e,t){const{node:r,parent:n,parentPath:o,scope:l}=e;if(e.isOptionalMemberExpression()){if(function(e){for(;e&&!e.isProgram();){const{parentPath:t,container:r,listKey:n}=e,s=t.node;if(n){if(r!==s[n])return!0}else if(r!==s)return!0;e=t}return!1}(e))return;const c=e.find((({node:t,parent:r,parentPath:n})=>n.isOptionalMemberExpression()?r.optional||r.object!==t:!n.isOptionalCallExpression()||t!==e.node&&r.optional||r.callee!==t));if(l.path.isPattern())return void c.replaceWith(s.callExpression(s.arrowFunctionExpression([],c.node),[]));const u=i(c),p=c.parentPath;if(p.isUpdateExpression({argument:r})||p.isAssignmentExpression({left:r}))throw e.buildCodeFrameError(\"can't handle assignment\");const f=p.isUnaryExpression({operator:\"delete\"});if(f&&c.isOptionalMemberExpression()&&c.get(\"property\").isPrivateName())throw e.buildCodeFrameError(\"can't delete a private class element\");let d=e;for(;;)if(d.isOptionalMemberExpression()){if(d.node.optional)break;d=d.get(\"object\")}else{if(!d.isOptionalCallExpression())throw new Error(`Internal error: unexpected ${d.node.type}`);if(d.node.optional)break;d=d.get(\"callee\")}const h=d.isOptionalMemberExpression()?\"object\":\"callee\",m=d.node[h],y=l.maybeGenerateMemoised(m),g=null!=y?y:m,b=o.isOptionalCallExpression({callee:r}),v=o.isCallExpression({callee:r});d.replaceWith(a(d,g)),b?n.optional?o.replaceWith(this.optionalCall(e,n.arguments)):o.replaceWith(this.call(e,n.arguments)):v?e.replaceWith(this.boundGet(e)):e.replaceWith(this.get(e));let E,x=e.node;for(let t=e;t!==c;){const{parentPath:e}=t;if(e===c&&b&&n.optional){x=e.node;break}x=a(e,x),t=e}const S=c.parentPath;if(s.isMemberExpression(x)&&S.isOptionalCallExpression({callee:c.node,optional:!0})){const{object:t}=x;E=e.scope.maybeGenerateMemoised(t),E&&(x.object=s.assignmentExpression(\"=\",E,t))}let T=c;f&&(T=S,x=S.node);const w=y?s.assignmentExpression(\"=\",s.cloneNode(g),s.cloneNode(m)):s.cloneNode(g);if(u){let e;e=t?s.binaryExpression(\"!=\",w,s.nullLiteral()):s.logicalExpression(\"&&\",s.binaryExpression(\"!==\",w,s.nullLiteral()),s.binaryExpression(\"!==\",s.cloneNode(g),l.buildUndefinedNode())),T.replaceWith(s.logicalExpression(\"&&\",e,x))}else{let e;e=t?s.binaryExpression(\"==\",w,s.nullLiteral()):s.logicalExpression(\"||\",s.binaryExpression(\"===\",w,s.nullLiteral()),s.binaryExpression(\"===\",s.cloneNode(g),l.buildUndefinedNode())),T.replaceWith(s.conditionalExpression(e,f?s.booleanLiteral(!0):l.buildUndefinedNode(),x))}if(E){const e=S.node;S.replaceWith(s.optionalCallExpression(s.optionalMemberExpression(e.callee,s.identifier(\"call\"),!1,!0),[s.cloneNode(E),...e.arguments],!1))}}else if(o.isUpdateExpression({argument:r})){if(this.simpleSet)return void e.replaceWith(this.simpleSet(e));const{operator:t,prefix:i}=n;this.memoise(e,2);const a=s.binaryExpression(t[0],s.unaryExpression(\"+\",this.get(e)),s.numericLiteral(1));if(i)o.replaceWith(this.set(e,a));else{const{scope:t}=e,n=t.generateUidIdentifierBasedOnNode(r);t.push({id:n}),a.left=s.assignmentExpression(\"=\",s.cloneNode(n),a.left),o.replaceWith(s.sequenceExpression([this.set(e,a),s.cloneNode(n)]))}}else if(o.isAssignmentExpression({left:r})){if(this.simpleSet)return void e.replaceWith(this.simpleSet(e));const{operator:t,right:r}=n;if(\"=\"===t)o.replaceWith(this.set(e,r));else{const n=t.slice(0,-1);s.LOGICAL_OPERATORS.includes(n)?(this.memoise(e,1),o.replaceWith(s.logicalExpression(n,this.get(e),this.set(e,r)))):(this.memoise(e,2),o.replaceWith(this.set(e,s.binaryExpression(n,this.get(e),r))))}}else{if(!o.isCallExpression({callee:r}))return o.isOptionalCallExpression({callee:r})?l.path.isPattern()?void o.replaceWith(s.callExpression(s.arrowFunctionExpression([],o.node),[])):void o.replaceWith(this.optionalCall(e,n.arguments)):void(o.isForXStatement({left:r})||o.isObjectProperty({value:r})&&o.parentPath.isObjectPattern()||o.isAssignmentPattern({left:r})&&o.parentPath.isObjectProperty({value:n})&&o.parentPath.parentPath.isObjectPattern()||o.isArrayPattern()||o.isAssignmentPattern({left:r})&&o.parentPath.isArrayPattern()||o.isRestElement()?e.replaceWith(this.destructureSet(e)):o.isTaggedTemplateExpression()?e.replaceWith(this.boundGet(e)):e.replaceWith(this.get(e)));o.replaceWith(this.call(e,n.arguments))}}};t.default=function(e,t,r){e.traverse(t,Object.assign({},l,r,{memoiser:new o}))}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r,s){return 1===r.length&&n.isSpreadElement(r[0])&&n.isIdentifier(r[0].argument,{name:\"arguments\"})?s?n.optionalCallExpression(n.optionalMemberExpression(e,n.identifier(\"apply\"),!1,!0),[t,r[0].argument],!1):n.callExpression(n.memberExpression(e,n.identifier(\"apply\")),[t,r[0].argument]):s?n.optionalCallExpression(n.optionalMemberExpression(e,n.identifier(\"call\"),!1,!0),[t,...r],!1):n.callExpression(n.memberExpression(e,n.identifier(\"call\")),[t,...r])};var n=r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){e.traverse(s,{scope:e.scope,bindingNames:t,seen:new WeakSet})};var n=r(0);const s={UpdateExpression:{exit(e){const{scope:t,bindingNames:r}=this,s=e.get(\"argument\");if(!s.isIdentifier())return;const i=s.node.name;if(r.has(i)&&t.getBinding(i)===e.scope.getBinding(i))if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()){const t=\"++\"==e.node.operator?\"+=\":\"-=\";e.replaceWith(n.assignmentExpression(t,s.node,n.numericLiteral(1)))}else if(e.node.prefix)e.replaceWith(n.assignmentExpression(\"=\",n.identifier(i),n.binaryExpression(e.node.operator[0],n.unaryExpression(\"+\",s.node),n.numericLiteral(1))));else{const t=e.scope.generateUidIdentifierBasedOnNode(s.node,\"old\"),r=t.name;e.scope.push({id:t});const i=n.binaryExpression(e.node.operator[0],n.identifier(r),n.numericLiteral(1));e.replaceWith(n.sequenceExpression([n.assignmentExpression(\"=\",n.identifier(r),n.unaryExpression(\"+\",s.node)),n.assignmentExpression(\"=\",n.cloneNode(s.node),i),n.identifier(r)]))}}},AssignmentExpression:{exit(e){const{scope:t,seen:r,bindingNames:s}=this;if(\"=\"===e.node.operator)return;if(r.has(e.node))return;r.add(e.node);const i=e.get(\"left\");if(!i.isIdentifier())return;const o=i.node.name;s.has(o)&&t.getBinding(o)===e.scope.getBinding(o)&&(e.node.right=n.binaryExpression(e.node.operator.slice(0,-1),n.cloneNode(e.node.left),e.node.right),e.node.operator=\"=\")}}}},(e,t,r)=>{const n=r(29);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},(e,t,r)=>{const n=r(29);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,\"\"),t);return r?r.version:null}},(e,t,r)=>{const n=r(3);e.exports=(e,t,r,s)=>{\"string\"==typeof r&&(s=r,r=void 0);try{return new n(e,r).inc(t,s).version}catch(e){return null}}},(e,t,r)=>{const n=r(29),s=r(71);e.exports=(e,t)=>{if(s(e,t))return null;{const r=n(e),s=n(t),i=r.prerelease.length||s.prerelease.length,o=i?\"pre\":\"\",a=i?\"prerelease\":\"\";for(const e in r)if((\"major\"===e||\"minor\"===e||\"patch\"===e)&&r[e]!==s[e])return o+e;return a}}},(e,t,r)=>{const n=r(3);e.exports=(e,t)=>new n(e,t).major},(e,t,r)=>{const n=r(3);e.exports=(e,t)=>new n(e,t).minor},(e,t,r)=>{const n=r(3);e.exports=(e,t)=>new n(e,t).patch},(e,t,r)=>{const n=r(29);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},(e,t,r)=>{const n=r(12);e.exports=(e,t,r)=>n(t,e,r)},(e,t,r)=>{const n=r(12);e.exports=(e,t)=>n(e,t,!0)},(e,t,r)=>{const n=r(72);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},(e,t,r)=>{const n=r(72);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},(e,t,r)=>{const n=r(3),s=r(29),{re:i,t:o}=r(23);e.exports=(e,t)=>{if(e instanceof n)return e;if(\"number\"==typeof e&&(e=String(e)),\"string\"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[o.COERCERTL].lastIndex=-1}else r=e.match(i[o.COERCE]);return null===r?null:s(`${r[2]}.${r[3]||\"0\"}.${r[4]||\"0\"}`,t)}},(e,t,r)=>{\"use strict\";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&\"function\"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function s(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error(\"removing node which does not belong to this list\");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError(\"Reduce of empty list with no initial value\");n=this.head.next,r=this.head.value}for(var s=0;null!==n;s++)r=e(r,n.value,s),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError(\"Reduce of empty list with no initial value\");n=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==n;s--)r=e(r,n.value,s),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var o=[];for(n=0;i&&n<t;n++)o.push(i.value),i=this.removeNode(i);for(null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev),n=0;n<r.length;n++)i=s(this,i,r[n]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(275)(n)}catch(e){}},e=>{\"use strict\";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},(e,t,r)=>{const n=r(13);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(\" \").trim().split(\" \")))},(e,t,r)=>{const n=r(3),s=r(13);e.exports=(e,t,r)=>{let i=null,o=null,a=null;try{a=new s(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==o.compare(e)||(i=e,o=new n(i,r)))})),i}},(e,t,r)=>{const n=r(3),s=r(13);e.exports=(e,t,r)=>{let i=null,o=null,a=null;try{a=new s(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==o.compare(e)||(i=e,o=new n(i,r)))})),i}},(e,t,r)=>{const n=r(3),s=r(13),i=r(44);e.exports=(e,t)=>{e=new s(e,t);let r=new n(\"0.0.0\");if(e.test(r))return r;if(r=new n(\"0.0.0-0\"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let o=null;s.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case\">\":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case\"\":case\">=\":o&&!i(t,o)||(o=t);break;case\"<\":case\"<=\":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||r&&!i(r,o)||(r=o)}return r&&e.test(r)?r:null}},(e,t,r)=>{const n=r(13);e.exports=(e,t)=>{try{return new n(e,t).range||\"*\"}catch(e){return null}}},(e,t,r)=>{const n=r(76);e.exports=(e,t,r)=>n(e,t,\">\",r)},(e,t,r)=>{const n=r(76);e.exports=(e,t,r)=>n(e,t,\"<\",r)},(e,t,r)=>{const n=r(13);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t))},(e,t,r)=>{const n=r(46),s=r(12);e.exports=(e,t,r)=>{const i=[];let o=null,a=null;const l=e.sort(((e,t)=>s(e,t,r)));for(const e of l)n(e,t,r)?(a=e,o||(o=e)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const c=[];for(const[e,t]of i)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push(\"*\");const u=c.join(\" || \"),p=\"string\"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},(e,t,r)=>{const n=r(13),s=r(45),{ANY:i}=s,o=r(46),a=r(12),l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?[new s(\">=0.0.0-0\")]:[new s(\">=0.0.0\")]}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=[new s(\">=0.0.0\")]}const n=new Set;let l,p,f,d,h,m,y;for(const t of e)\">\"===t.operator||\">=\"===t.operator?l=c(l,t,r):\"<\"===t.operator||\"<=\"===t.operator?p=u(p,t,r):n.add(t.semver);if(n.size>1)return null;if(l&&p){if(f=a(l.semver,p.semver,r),f>0)return null;if(0===f&&(\">=\"!==l.operator||\"<=\"!==p.operator))return null}for(const e of n){if(l&&!o(e,String(l),r))return null;if(p&&!o(e,String(p),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let g=!(!p||r.includePrerelease||!p.semver.prerelease.length)&&p.semver,b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver;g&&1===g.prerelease.length&&\"<\"===p.operator&&0===g.prerelease[0]&&(g=!1);for(const e of t){if(y=y||\">\"===e.operator||\">=\"===e.operator,m=m||\"<\"===e.operator||\"<=\"===e.operator,l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),\">\"===e.operator||\">=\"===e.operator){if(d=c(l,e,r),d===e&&d!==l)return!1}else if(\">=\"===l.operator&&!o(l.semver,String(e),r))return!1;if(p)if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),\"<\"===e.operator||\"<=\"===e.operator){if(h=u(p,e,r),h===e&&h!==p)return!1}else if(\"<=\"===p.operator&&!o(p.semver,String(e),r))return!1;if(!e.operator&&(p||l)&&0!==f)return!1}return!(l&&m&&!p&&0!==f||p&&y&&!l&&0!==f||b||g)},c=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||\">\"===t.operator&&\">=\"===e.operator?t:e},u=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||\"<\"===t.operator&&\"<=\"===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let s=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.getEnv=function(e=\"development\"){return\"production\"}},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.maybeAsync=function(e,t){return n()({sync(...r){const n=e.apply(this,r);if(u(n))throw new Error(t);return n},async(...t){return Promise.resolve(e.apply(this,t))}})},t.forwardAsync=function(e,t){const r=n()(e);return a((e=>{const n=r[e];return t(n)}))},t.isThenable=u,t.waitFor=t.onFirstPause=t.isAsync=void 0;const s=e=>e,i=n()((function*(e){return yield*e})),o=n()({sync:()=>!1,errback:e=>e(null,!0)});t.isAsync=o;const a=n()({sync:e=>e(\"sync\"),async:e=>e(\"async\")}),l=n()({name:\"onFirstPause\",arity:2,sync:function(e){return i.sync(e)},errback:function(e,t,r){let n=!1;i.errback(e,((e,t)=>{n=!0,r(e,t)})),n||t()}});t.onFirstPause=l;const c=n()({sync:s,async:s});function u(e){return!(!e||\"object\"!=typeof e&&\"function\"!=typeof e||!e.then||\"function\"!=typeof e.then)}t.waitFor=c},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.createCachedDescriptors=function(e,t,r){const{plugins:n,presets:s,passPerPreset:i}=t;return{options:c(t,e),plugins:n?()=>d(n,e)(r):()=>l([]),presets:s?()=>p(s,e)(r)(!!i):()=>l([])}},t.createUncachedDescriptors=function(e,t,r){let n,s;return{options:c(t,e),*plugins(){return n||(n=yield*g(t.plugins||[],e,r)),n},*presets(){return s||(s=yield*y(t.presets||[],e,r,!!t.passPerPreset)),s}}},t.createDescriptor=v;var s=r(77),i=r(80),o=r(81),a=r(289);function*l(e){return e}function c(e,t){return\"string\"==typeof e.browserslistConfigFile&&(e.browserslistConfigFile=(0,a.resolveBrowserslistConfigFile)(e.browserslistConfigFile,t)),e}const u=new WeakMap,p=(0,o.makeWeakCacheSync)(((e,t)=>{const r=t.using((e=>e));return(0,o.makeStrongCacheSync)((t=>(0,o.makeStrongCache)((function*(n){return(yield*y(e,r,t,n)).map((e=>m(u,e)))}))))})),f=new WeakMap,d=(0,o.makeWeakCacheSync)(((e,t)=>{const r=t.using((e=>e));return(0,o.makeStrongCache)((function*(t){return(yield*g(e,r,t)).map((e=>m(f,e)))}))})),h={};function m(e,t){const{value:r,options:n=h}=t;if(!1===n)return t;let s=e.get(r);s||(s=new WeakMap,e.set(r,s));let i=s.get(n);if(i||(i=[],s.set(n,i)),-1===i.indexOf(t)){const e=i.filter((e=>{return n=t,(r=e).name===n.name&&r.value===n.value&&r.options===n.options&&r.dirname===n.dirname&&r.alias===n.alias&&r.ownPass===n.ownPass&&(r.file&&r.file.request)===(n.file&&n.file.request)&&(r.file&&r.file.resolved)===(n.file&&n.file.resolved);var r,n}));if(e.length>0)return e[0];i.push(t)}return t}function*y(e,t,r,n){return yield*b(\"preset\",e,t,r,n)}function*g(e,t,r){return yield*b(\"plugin\",e,t,r)}function*b(e,t,r,s,i){const o=yield*n().all(t.map(((t,n)=>v(t,r,{type:e,alias:`${s}$${n}`,ownPass:!!i}))));return function(e){const t=new Map;for(const r of e){if(\"function\"!=typeof r.value)continue;let n=t.get(r.value);if(n||(n=new Set,t.set(r.value,n)),n.has(r.name)){const t=e.filter((e=>e.value===r.value));throw new Error([\"Duplicate plugin/preset detected.\",\"If you'd like to use two separate instances of a plugin,\",\"they need separate names, e.g.\",\"\",\"  plugins: [\",\"    ['some-plugin', {}],\",\"    ['some-plugin', {}, 'some unique name'],\",\"  ]\",\"\",\"Duplicates detected are:\",`${JSON.stringify(t,null,2)}`].join(\"\\n\"))}n.add(r.name)}}(o),o}function*v(e,t,{type:r,alias:n,ownPass:o}){const a=(0,i.getItemDescriptor)(e);if(a)return a;let l,c,u,p=e;Array.isArray(p)&&(3===p.length?[p,c,l]=p:[p,c]=p);let f=null;if(\"string\"==typeof p){if(\"string\"!=typeof r)throw new Error(\"To resolve a string-based item, the type of item must be given\");const e=\"plugin\"===r?s.loadPlugin:s.loadPreset,n=p;({filepath:f,value:p}=yield*e(p,t)),u={request:n,resolved:f}}if(!p)throw new Error(`Unexpected falsy value: ${String(p)}`);if(\"object\"==typeof p&&p.__esModule){if(!p.default)throw new Error(\"Must export a default export when using ES6 modules.\");p=p.default}if(\"object\"!=typeof p&&\"function\"!=typeof p)throw new Error(`Unsupported format: ${typeof p}. Expected an object or a function.`);if(null!==f&&\"object\"==typeof p&&p)throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${f}`);return{name:l,alias:f||n,value:p,options:c,dirname:t,ownPass:o,file:u}}},(e,t,r)=>{\"use strict\";function n(){const e=r(290);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.resolveBrowserslistConfigFile=function(e,t){},t.resolveTargets=function(e,t){let r=e.targets;return(\"string\"==typeof r||Array.isArray(r))&&(r={browsers:r}),r&&r.esmodules&&(r=Object.assign({},r,{esmodules:\"intersect\"})),(0,n().default)(r,{ignoreBrowserslistConfig:!0,browserslistEnv:e.browserslistEnv})}},(e,t,r)=>{\"use strict\";var n=r(7);Object.defineProperty(t,\"__esModule\",{value:!0}),t.isBrowsersQueryValid=m,t.default=function(e={},t={}){var r;let{browsers:n,esmodules:o}=e;const{configPath:u=\".\"}=t;!function(e){h.invariant(void 0===e||m(e),`'${String(e)}' is not a valid browserslist query`)}(n);let p=function(e){const t=Object.keys(c.TargetNames);for(const r of Object.keys(e))if(!(r in c.TargetNames))throw new Error(h.formatMessage(`'${r}' is not a valid target\\n- Did you mean '${(0,i.findSuggestion)(r,t)}'?`));return e}(function(e){const t=Object.assign({},e);return delete t.esmodules,delete t.browsers,t}(e));const f=!!n||Object.keys(p).length>0,y=!t.ignoreBrowserslistConfig&&!f;if(!n&&y&&(n=s.loadConfig({config:t.configFile,path:u,env:t.browserslistEnv}),null==n&&(n=[])),!o||\"intersect\"===o&&null!=(r=n)&&r.length||(n=Object.keys(d).map((e=>`${e} >= ${d[e]}`)).join(\", \"),o=!1),n){const e=function(e){return e.reduce(((e,t)=>{const[r,n]=t.split(\" \"),s=l.browserNameMap[r];if(!s)return e;try{const t=n.split(\"-\")[0].toLowerCase(),i=(0,a.isUnreleasedVersion)(t,r);if(!e[s])return e[s]=i?t:(0,a.semverify)(t),e;const o=e[s],l=(0,a.isUnreleasedVersion)(o,r);if(l&&i)e[s]=(0,a.getLowestUnreleased)(o,t,r);else if(l)e[s]=(0,a.semverify)(t);else if(!l&&!i){const r=(0,a.semverify)(t);e[s]=(0,a.semverMin)(o,r)}}catch(e){}return e}),{})}(s(n,{mobileToDesktop:!0}));if(\"intersect\"===o)for(const t of Object.keys(e)){const r=e[t];d[t]?e[t]=(0,a.getHighestUnreleased)(r,(0,a.semverify)(d[t]),t):delete e[t]}p=Object.assign(e,p)}const b={},v=[];for(const e of Object.keys(p).sort()){var E;const t=p[e];\"number\"==typeof t&&t%1!=0&&v.push({target:e,value:t});const r=null!=(E=g[e])?E:g.__default,[n,s]=r(e,t);s&&(b[n]=s)}return(x=v).length&&x.forEach((({target:e,value:t})=>{})),b;var x},Object.defineProperty(t,\"unreleasedLabels\",{enumerable:!0,get:function(){return l.unreleasedLabels}}),Object.defineProperty(t,\"TargetNames\",{enumerable:!0,get:function(){return c.TargetNames}}),Object.defineProperty(t,\"prettifyTargets\",{enumerable:!0,get:function(){return u.prettifyTargets}}),Object.defineProperty(t,\"getInclusionReasons\",{enumerable:!0,get:function(){return p.getInclusionReasons}}),Object.defineProperty(t,\"filterItems\",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,\"isRequired\",{enumerable:!0,get:function(){return f.isRequired}});var s=r(291),i=r(297),o=r(474),a=r(152),l=r(153),c=r(476),u=r(299),p=r(477),f=r(478);const d=o[\"es6.module\"],h=new i.OptionValidator(\"@babel/helper-compilation-targets\");function m(e){return\"string\"==typeof e||Array.isArray(e)&&e.every((e=>\"string\"==typeof e))}function y(e,t){try{return(0,a.semverify)(t)}catch(r){throw new Error(h.formatMessage(`'${t}' is not a valid value for 'targets.${e}'.`))}}const g={__default:(e,t)=>[e,(0,a.isUnreleasedVersion)(t,e)?t.toLowerCase():y(e,t)],node:(e,t)=>[e,!0===t||\"current\"===t?n.versions.node:y(e,t)]}},(e,t,r)=>{var n=r(7),s=r(467),i=r(468).a,o=r(471),a=r(472),l=r(295),c=r(151),u=r(296);function p(e,t){return 0===(e+\".\").indexOf(t+\".\")}function f(e){return e.filter((function(e){return\"string\"==typeof e}))}function d(e){var t=e;return 3===e.split(\".\").length&&(t=e.split(\".\").slice(0,-1).join(\".\")),t}function h(e){return function(t){return e+\" \"+t}}function m(e){return parseInt(e.split(\".\")[0])}function y(e,t){if(0===e.length)return[];var r=g(e.map(m)),n=r[r.length-t];if(!n)return e;for(var s=[],i=e.length-1;i>=0&&!(n>m(e[i]));i--)s.unshift(e[i]);return s}function g(e){for(var t=[],r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r]);return t}function b(e,t,r){for(var n in r)e[t+\" \"+n]=r[n]}function v(e,t){return t=parseFloat(t),\">\"===e?function(e){return parseFloat(e)>t}:\">=\"===e?function(e){return parseFloat(e)>=t}:\"<\"===e?function(e){return parseFloat(e)<t}:function(e){return parseFloat(e)<=t}}function E(e){return parseInt(e)}function x(e,t){return e<t?-1:e>t?1:0}function S(e,t){return x(parseInt(e[0]),parseInt(t[0]))||x(parseInt(e[1]||\"0\"),parseInt(t[1]||\"0\"))||x(parseInt(e[2]||\"0\"),parseInt(t[2]||\"0\"))}function T(e,t){switch(void 0===(t=t.split(\".\").map(E))[1]&&(t[1]=\"x\"),e){case\"<=\":return function(e){return w(e=e.split(\".\").map(E),t)<=0};default:case\">=\":return function(e){return w(e=e.split(\".\").map(E),t)>=0}}}function w(e,t){return e[0]!==t[0]?e[0]<t[0]?-1:1:\"x\"===t[1]?0:e[1]!==t[1]?e[1]<t[1]?-1:1:0}function P(e,t){return function(e,t){return-1!==e.versions.indexOf(t)?t:!!L.versionAliases[e.name][t]&&L.versionAliases[e.name][t]}(e,t)||1===e.versions.length&&e.versions[0]}function A(e,t){return e/=1e3,Object.keys(i).reduce((function(r,n){var s=C(n,t);if(!s)return r;var i=Object.keys(s.releaseDate).filter((function(t){return s.releaseDate[t]>=e}));return r.concat(i.map(h(s.name)))}),[])}function O(e){return{name:e.name,versions:e.versions,released:e.released,releaseDate:e.releaseDate}}function C(e,t){if(e=e.toLowerCase(),e=L.aliases[e]||e,t.mobileToDesktop&&L.desktopNames[e]){var r=L.data[L.desktopNames[e]];if(\"android\"===e)return i=r,(s=O(L.data[e])).released=I(s.released,i.released),s.versions=I(s.versions,i.versions),s;var n=O(r);return n.name=e,\"op_mob\"===e&&(n=function(e,t){e.versions=e.versions.map((function(e){return t[e]||e})),e.released=e.versions.map((function(e){return t[e]||e}));var r={};for(var n in e.releaseDate)r[t[n]||n]=e.releaseDate[n];return e.releaseDate=r,e}(n,{\"10.0-10.1\":\"10\"})),n}var s,i;return L.data[e]}function I(e,t){var r=t[t.length-1];return e.filter((function(e){return/^(?:[2-4]\\.|[34]$)/.test(e)})).concat(t.slice(37-r-1))}function k(e,t){var r=C(e,t);if(!r)throw new c(\"Unknown browser \"+e);return r}function N(e){return new c(\"Unknown browser query `\"+e+\"`. Maybe you are using old Browserslist or made typo in query.\")}function _(e,t,r){if(r.mobileToDesktop)return e;var n=L.data.android.released,s=n[n.length-1]-37-t;return s>0?e.slice(-1):e.slice(s-1)}function j(e,t){return(e=Array.isArray(e)?R(e.map(M)):M(e)).reduce((function(e,r,n){var s=r.queryString,i=0===s.indexOf(\"not \");if(i){if(0===n)throw new c(\"Write any browsers query (for instance, `defaults`) before `\"+s+\"`\");s=s.slice(4)}for(var o=0;o<q.length;o++){var a=q[o],l=s.match(a.regexp);if(l){var u=[t].concat(l.slice(1)),p=a.select.apply(L,u).map((function(e){var r=e.split(\" \");return\"0\"===r[1]?r[0]+\" \"+C(r[0],t).versions[0]:e}));switch(r.type){case 2:return i?e.filter((function(e){return-1===p.indexOf(e)})):e.filter((function(e){return-1!==p.indexOf(e)}));case 1:default:if(i){var f={};return p.forEach((function(e){f[e]=!0})),e.filter((function(e){return!f[e]}))}return e.concat(p)}}}throw N(s)}),[])}var D={};function L(e,t){(void 0===t&&(t={}),void 0===t.path&&(t.path=a.resolve?a.resolve(\".\"):\".\"),null==e)&&(e=L.loadConfig(t)||L.defaults);if(\"string\"!=typeof e&&!Array.isArray(e))throw new c(\"Browser queries must be an array or string. Got \"+typeof e+\".\");var r={ignoreUnknownVersions:t.ignoreUnknownVersions,dangerousExtend:t.dangerousExtend,mobileToDesktop:t.mobileToDesktop,path:t.path,env:t.env};u.oldDataWarning(L.data);var s=u.getStat(t,L.data);if(s)for(var i in r.customUsage={},s)b(r.customUsage,i,s[i]);var o=JSON.stringify([e,r]);if(D[o])return D[o];var l=g(j(e,r)).sort((function(e,t){if(e=e.split(\" \"),t=t.split(\" \"),e[0]===t[0]){var r=e[1].split(\"-\")[0];return S(t[1].split(\"-\")[0].split(\".\"),r.split(\".\"))}return x(e[0],t[0])}));return n.env.BROWSERSLIST_DISABLE_CACHE||(D[o]=l),l}function M(e){var t=[];do{e=B(e,t)}while(e);return t}function B(e,t){var r=/^(?:,\\s*|\\s+or\\s+)(.*)/i,n=/^\\s+and\\s+(.*)/i;return function(e,t){for(var r=1,n=e.length;r<=n;r++)if(t(e.substr(-r,r),r,n))return e.slice(0,-r);return\"\"}(e,(function(e,s,i){return n.test(e)?(t.unshift({type:2,queryString:e.match(n)[1]}),!0):r.test(e)?(t.unshift({type:1,queryString:e.match(r)[1]}),!0):s===i&&(t.unshift({type:1,queryString:e.trim()}),!0)}))}function R(e){return Array.isArray(e)?e.reduce((function(e,t){return e.concat(R(t))}),[]):[e]}function F(e,t){var r=s.filter((function(e){return\"nodejs\"===e.name})).filter((function(e){return p(e.version,t)}));if(0===r.length){if(e.ignoreUnknownVersions)return[];throw new c(\"Unknown version \"+t+\" of Node.js\")}return[\"node \"+r[r.length-1].version]}function U(e,t,r,n){return t=parseInt(t),r=parseInt(r||\"01\")-1,n=parseInt(n||\"01\"),A(Date.UTC(t,r,n,0,0,0),e)}function $(e,t,r){t=parseFloat(t);var n=L.usage.global;if(r)if(r.match(/^my\\s+stats$/)){if(!e.customUsage)throw new c(\"Custom usage statistics was not provided\");n=e.customUsage}else{var s;s=2===r.length?r.toUpperCase():r.toLowerCase(),u.loadCountry(L.usage,s,L.data),n=L.usage[s]}for(var i,o=Object.keys(n).sort((function(e,t){return n[t]-n[e]})),a=0,l=[],p=0;p<=o.length&&(i=o[p],0!==n[i])&&(a+=n[i],l.push(i),!(a>=t));p++);return l}L.cache={},L.data={},L.usage={global:{},custom:null},L.defaults=[\"> 0.5%\",\"last 2 versions\",\"Firefox ESR\",\"not dead\"],L.aliases={fx:\"firefox\",ff:\"firefox\",ios:\"ios_saf\",explorer:\"ie\",blackberry:\"bb\",explorermobile:\"ie_mob\",operamini:\"op_mini\",operamobile:\"op_mob\",chromeandroid:\"and_chr\",firefoxandroid:\"and_ff\",ucandroid:\"and_uc\",qqandroid:\"and_qq\"},L.desktopNames={and_chr:\"chrome\",and_ff:\"firefox\",ie_mob:\"ie\",op_mob:\"opera\",android:\"chrome\"},L.versionAliases={},L.clearCaches=u.clearCaches,L.parseConfig=u.parseConfig,L.readConfig=u.readConfig,L.findConfig=u.findConfig,L.loadConfig=u.loadConfig,L.coverage=function(e,t){var r;if(void 0===t)r=L.usage.global;else if(\"my stats\"===t){var n={};n.path=a.resolve?a.resolve(\".\"):\".\";var s=u.getStat(n);if(!s)throw new c(\"Custom usage statistics was not provided\");for(var i in r={},s)b(r,i,s[i])}else if(\"string\"==typeof t)t=t.length>2?t.toLowerCase():t.toUpperCase(),u.loadCountry(L.usage,t,L.data),r=L.usage[t];else for(var o in\"dataByBrowser\"in t&&(t=t.dataByBrowser),r={},t)for(var l in t[o])r[o+\" \"+l]=t[o][l];return e.reduce((function(e,t){var n=r[t];return void 0===n&&(n=r[t.replace(/ \\S+$/,\" 0\")]),e+(n||0)}),0)};var q=[{regexp:/^last\\s+(\\d+)\\s+major\\s+versions?$/i,select:function(e,t){return Object.keys(i).reduce((function(r,n){var s=C(n,e);if(!s)return r;var i=y(s.released,t);return i=i.map(h(s.name)),\"android\"===s.name&&(i=_(i,t,e)),r.concat(i)}),[])}},{regexp:/^last\\s+(\\d+)\\s+versions?$/i,select:function(e,t){return Object.keys(i).reduce((function(r,n){var s=C(n,e);if(!s)return r;var i=s.released.slice(-t);return i=i.map(h(s.name)),\"android\"===s.name&&(i=_(i,t,e)),r.concat(i)}),[])}},{regexp:/^last\\s+(\\d+)\\s+electron\\s+major\\s+versions?$/i,select:function(e,t){return y(Object.keys(l),t).map((function(e){return\"chrome \"+l[e]}))}},{regexp:/^last\\s+(\\d+)\\s+(\\w+)\\s+major\\s+versions?$/i,select:function(e,t,r){var n=k(r,e),s=y(n.released,t).map(h(n.name));return\"android\"===n.name&&(s=_(s,t,e)),s}},{regexp:/^last\\s+(\\d+)\\s+electron\\s+versions?$/i,select:function(e,t){return Object.keys(l).slice(-t).map((function(e){return\"chrome \"+l[e]}))}},{regexp:/^last\\s+(\\d+)\\s+(\\w+)\\s+versions?$/i,select:function(e,t,r){var n=k(r,e),s=n.released.slice(-t).map(h(n.name));return\"android\"===n.name&&(s=_(s,t,e)),s}},{regexp:/^unreleased\\s+versions$/i,select:function(e){return Object.keys(i).reduce((function(t,r){var n=C(r,e);if(!n)return t;var s=n.versions.filter((function(e){return-1===n.released.indexOf(e)}));return s=s.map(h(n.name)),t.concat(s)}),[])}},{regexp:/^unreleased\\s+electron\\s+versions?$/i,select:function(){return[]}},{regexp:/^unreleased\\s+(\\w+)\\s+versions?$/i,select:function(e,t){var r=k(t,e);return r.versions.filter((function(e){return-1===r.released.indexOf(e)})).map(h(r.name))}},{regexp:/^last\\s+(\\d*.?\\d+)\\s+years?$/i,select:function(e,t){return A(Date.now()-31558432982.4*t,e)}},{regexp:/^since (\\d+)$/i,select:U},{regexp:/^since (\\d+)-(\\d+)$/i,select:U},{regexp:/^since (\\d+)-(\\d+)-(\\d+)$/i,select:U},{regexp:/^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%$/,select:function(e,t,r){r=parseFloat(r);var n=L.usage.global;return Object.keys(n).reduce((function(e,s){return\">\"===t?n[s]>r&&e.push(s):\"<\"===t?n[s]<r&&e.push(s):\"<=\"===t?n[s]<=r&&e.push(s):n[s]>=r&&e.push(s),e}),[])}},{regexp:/^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+my\\s+stats$/,select:function(e,t,r){if(r=parseFloat(r),!e.customUsage)throw new c(\"Custom usage statistics was not provided\");var n=e.customUsage;return Object.keys(n).reduce((function(e,s){return\">\"===t?n[s]>r&&e.push(s):\"<\"===t?n[s]<r&&e.push(s):\"<=\"===t?n[s]<=r&&e.push(s):n[s]>=r&&e.push(s),e}),[])}},{regexp:/^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+(\\S+)\\s+stats$/,select:function(e,t,r,n){r=parseFloat(r);var s=u.loadStat(e,n,L.data);if(s)for(var i in e.customUsage={},s)b(e.customUsage,i,s[i]);if(!e.customUsage)throw new c(\"Custom usage statistics was not provided\");var o=e.customUsage;return Object.keys(o).reduce((function(e,n){return\">\"===t?o[n]>r&&e.push(n):\"<\"===t?o[n]<r&&e.push(n):\"<=\"===t?o[n]<=r&&e.push(n):o[n]>=r&&e.push(n),e}),[])}},{regexp:/^(>=?|<=?)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+((alt-)?\\w\\w)$/,select:function(e,t,r,n){r=parseFloat(r),n=2===n.length?n.toUpperCase():n.toLowerCase(),u.loadCountry(L.usage,n,L.data);var s=L.usage[n];return Object.keys(s).reduce((function(e,n){return\">\"===t?s[n]>r&&e.push(n):\"<\"===t?s[n]<r&&e.push(n):\"<=\"===t?s[n]<=r&&e.push(n):s[n]>=r&&e.push(n),e}),[])}},{regexp:/^cover\\s+(\\d+|\\d+\\.\\d+|\\.\\d+)%$/,select:$},{regexp:/^cover\\s+(\\d+|\\d+\\.\\d+|\\.\\d+)%\\s+in\\s+(my\\s+stats|(alt-)?\\w\\w)$/,select:$},{regexp:/^supports\\s+([\\w-]+)$/,select:function(e,t){u.loadFeature(L.cache,t);var r=L.cache[t];return Object.keys(r).reduce((function(e,t){var n=r[t];return(n.indexOf(\"y\")>=0||n.indexOf(\"a\")>=0)&&e.push(t),e}),[])}},{regexp:/^electron\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,select:function(e,t,r){var n=d(t),s=d(r);if(!l[n])throw new c(\"Unknown version \"+t+\" of electron\");if(!l[s])throw new c(\"Unknown version \"+r+\" of electron\");return t=parseFloat(t),r=parseFloat(r),Object.keys(l).filter((function(e){var n=parseFloat(e);return n>=t&&n<=r})).map((function(e){return\"chrome \"+l[e]}))}},{regexp:/^node\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,select:function(e,t,r){return s.filter((function(e){return\"nodejs\"===e.name})).map((function(e){return e.version})).filter(T(\">=\",t)).filter(T(\"<=\",r)).map((function(e){return\"node \"+e}))}},{regexp:/^(\\w+)\\s+([\\d.]+)\\s*-\\s*([\\d.]+)$/i,select:function(e,t,r,n){var s=k(t,e);return r=parseFloat(P(s,r)||r),n=parseFloat(P(s,n)||n),s.released.filter((function(e){var t=parseFloat(e);return t>=r&&t<=n})).map(h(s.name))}},{regexp:/^electron\\s*(>=?|<=?)\\s*([\\d.]+)$/i,select:function(e,t,r){var n=d(r);return Object.keys(l).filter(v(t,n)).map((function(e){return\"chrome \"+l[e]}))}},{regexp:/^node\\s*(>=?|<=?)\\s*([\\d.]+)$/i,select:function(e,t,r){return s.filter((function(e){return\"nodejs\"===e.name})).map((function(e){return e.version})).filter(function(e,t){return(t=t.split(\".\").map(E))[1]=t[1]||0,t[2]=t[2]||0,\">\"===e?function(e){return S(e=e.split(\".\").map(E),t)>0}:\">=\"===e?function(e){return S(e=e.split(\".\").map(E),t)>=0}:\"<\"===e?function(e){return e=e.split(\".\").map(E),S(t,e)>0}:function(e){return e=e.split(\".\").map(E),S(t,e)>=0}}(t,r)).map((function(e){return\"node \"+e}))}},{regexp:/^(\\w+)\\s*(>=?|<=?)\\s*([\\d.]+)$/,select:function(e,t,r,n){var s=k(t,e),i=L.versionAliases[s.name][n];return i&&(n=i),s.released.filter(v(r,n)).map((function(e){return s.name+\" \"+e}))}},{regexp:/^(firefox|ff|fx)\\s+esr$/i,select:function(){return[\"firefox 78\"]}},{regexp:/(operamini|op_mini)\\s+all/i,select:function(){return[\"op_mini all\"]}},{regexp:/^electron\\s+([\\d.]+)$/i,select:function(e,t){var r=d(t),n=l[r];if(!n)throw new c(\"Unknown version \"+t+\" of electron\");return[\"chrome \"+n]}},{regexp:/^node\\s+(\\d+)$/i,select:F},{regexp:/^node\\s+(\\d+\\.\\d+)$/i,select:F},{regexp:/^node\\s+(\\d+\\.\\d+\\.\\d+)$/i,select:F},{regexp:/^current\\s+node$/i,select:function(e){return[u.currentNode(j,e)]}},{regexp:/^maintained\\s+node\\s+versions$/i,select:function(e){var t=Date.now();return j(Object.keys(o).filter((function(e){return t<Date.parse(o[e].end)&&t>Date.parse(o[e].start)&&(r=e.slice(1),s.some((function(e){return p(e.version,r)})));var r})).map((function(e){return\"node \"+e.slice(1)})),e)}},{regexp:/^phantomjs\\s+1.9$/i,select:function(){return[\"safari 5\"]}},{regexp:/^phantomjs\\s+2.1$/i,select:function(){return[\"safari 6\"]}},{regexp:/^(\\w+)\\s+(tp|[\\d.]+)$/i,select:function(e,t,r){/^tp$/i.test(r)&&(r=\"TP\");var n=k(t,e),s=P(n,r);if(s)r=s;else{if(!(s=P(n,s=-1===r.indexOf(\".\")?r+\".0\":r.replace(/\\.0$/,\"\")))){if(e.ignoreUnknownVersions)return[];throw new c(\"Unknown version \"+r+\" of \"+t)}r=s}return[n.name+\" \"+r]}},{regexp:/^browserslist config$/i,select:function(e){return L(void 0,e)}},{regexp:/^extends (.+)$/i,select:function(e,t){return j(u.loadQueries(e,t),e)}},{regexp:/^defaults$/i,select:function(e){return j(L.defaults,e)}},{regexp:/^dead$/i,select:function(e){return j([\"ie <= 10\",\"ie_mob <= 11\",\"bb <= 10\",\"op_mob <= 12.1\",\"samsung 4\"],e)}},{regexp:/^(\\w+)$/i,select:function(e,t){throw C(t,e)?new c(\"Specify versions in Browserslist query for browser \"+t):N(t)}}];!function(){for(var e in i){var t=i[e];L.data[e]={name:e,versions:f(i[e].versions),released:f(i[e].versions.slice(0,-3)),releaseDate:i[e].release_date},b(L.usage.global,e,t.usage_global),L.versionAliases[e]={};for(var r=0;r<t.versions.length;r++){var n=t.versions[r];if(n&&-1!==n.indexOf(\"-\"))for(var s=n.split(\"-\"),o=0;o<s.length;o++)L.versionAliases[e][s[o]]=n}}L.versionAliases.op_mob[59]=\"58\"}(),e.exports=L},e=>{e.exports={A:\"ie\",B:\"edge\",C:\"firefox\",D:\"chrome\",E:\"safari\",F:\"opera\",G:\"ios_saf\",H:\"op_mini\",I:\"android\",J:\"bb\",K:\"op_mob\",L:\"and_chr\",M:\"and_ff\",N:\"ie_mob\",O:\"and_uc\",P:\"samsung\",Q:\"and_qq\",R:\"baidu\",S:\"kaios\"}},e=>{e.exports={0:\"43\",1:\"44\",2:\"45\",3:\"46\",4:\"47\",5:\"48\",6:\"49\",7:\"50\",8:\"51\",9:\"52\",A:\"10\",B:\"11\",C:\"12\",D:\"7\",E:\"8\",F:\"9\",G:\"15\",H:\"91\",I:\"4\",J:\"6\",K:\"13\",L:\"14\",M:\"16\",N:\"17\",O:\"18\",P:\"89\",Q:\"62\",R:\"79\",S:\"80\",T:\"81\",U:\"83\",V:\"84\",W:\"85\",X:\"86\",Y:\"87\",Z:\"88\",a:\"90\",b:\"5\",c:\"19\",d:\"20\",e:\"21\",f:\"22\",g:\"23\",h:\"24\",i:\"25\",j:\"26\",k:\"27\",l:\"28\",m:\"29\",n:\"30\",o:\"31\",p:\"32\",q:\"33\",r:\"34\",s:\"35\",t:\"36\",u:\"37\",v:\"38\",w:\"39\",x:\"40\",y:\"41\",z:\"42\",AB:\"53\",BB:\"54\",CB:\"55\",DB:\"56\",EB:\"57\",FB:\"58\",GB:\"60\",HB:\"63\",IB:\"64\",JB:\"65\",KB:\"66\",LB:\"67\",MB:\"68\",NB:\"69\",OB:\"70\",PB:\"71\",QB:\"72\",RB:\"73\",SB:\"74\",TB:\"75\",UB:\"76\",VB:\"77\",WB:\"11.1\",XB:\"12.1\",YB:\"3\",ZB:\"59\",aB:\"61\",bB:\"78\",cB:\"3.2\",dB:\"10.1\",eB:\"11.5\",fB:\"4.2-4.3\",gB:\"5.5\",hB:\"2\",iB:\"82\",jB:\"3.5\",kB:\"3.6\",lB:\"92\",mB:\"93\",nB:\"94\",oB:\"3.1\",pB:\"5.1\",qB:\"6.1\",rB:\"7.1\",sB:\"9.1\",tB:\"13.1\",uB:\"14.1\",vB:\"TP\",wB:\"9.5-9.6\",xB:\"10.0-10.1\",yB:\"10.5\",zB:\"10.6\",\"0B\":\"11.6\",\"1B\":\"4.0-4.1\",\"2B\":\"5.0-5.1\",\"3B\":\"6.0-6.1\",\"4B\":\"7.0-7.1\",\"5B\":\"8.1-8.4\",\"6B\":\"9.0-9.2\",\"7B\":\"9.3\",\"8B\":\"10.0-10.2\",\"9B\":\"10.3\",AC:\"11.0-11.2\",BC:\"11.3-11.4\",CC:\"12.0-12.1\",DC:\"12.2-12.4\",EC:\"13.0-13.1\",FC:\"13.2\",GC:\"13.3\",HC:\"13.4-13.7\",IC:\"14.0-14.4\",JC:\"14.5-14.7\",KC:\"all\",LC:\"2.1\",MC:\"2.2\",NC:\"2.3\",OC:\"4.1\",PC:\"4.4\",QC:\"4.4.3-4.4.4\",RC:\"12.12\",SC:\"5.0-5.4\",TC:\"6.2-6.4\",UC:\"7.2-7.4\",VC:\"8.2\",WC:\"9.2\",XC:\"11.1-11.2\",YC:\"12.0\",ZC:\"13.0\",aC:\"14.0\",bC:\"10.4\",cC:\"7.12\",dC:\"2.5\"}},e=>{e.exports={A:{A:{J:.0131217,D:.00621152,E:.0202173,F:.0943475,A:.0067391,B:.849127,gB:.009298},B:\"ms\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"gB\",\"J\",\"D\",\"E\",\"F\",\"A\",\"B\",\"\",\"\",\"\"],E:\"IE\",F:{gB:962323200,J:998870400,D:1161129600,E:1237420800,F:1300060800,A:1346716800,B:1381968e3}},B:{A:{C:.008402,K:.004267,L:.004201,G:.004201,M:.008402,N:.025206,O:.08402,R:0,S:.004298,T:.00944,U:.00415,V:.008402,W:.008402,X:.008402,Y:.008402,Z:.008402,P:.029407,a:.121829,H:3.18436},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"C\",\"K\",\"L\",\"G\",\"M\",\"N\",\"O\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"P\",\"a\",\"H\",\"\",\"\",\"\"],E:\"Edge\",F:{C:1438128e3,K:1447286400,L:1470096e3,G:1491868800,M:1508198400,N:1525046400,O:1542067200,R:1579046400,S:1581033600,T:1586736e3,U:1590019200,V:1594857600,W:1598486400,X:1602201600,Y:1605830400,Z:161136e4,P:1614816e3,a:1618358400,H:1622073600},D:{C:\"ms\",K:\"ms\",L:\"ms\",G:\"ms\",M:\"ms\",N:\"ms\",O:\"ms\"}},C:{A:{0:.054613,1:.004201,2:.004201,3:.004525,4:.004201,5:.008402,6:.004538,7:.004267,8:.004204,9:.071417,hB:.012813,YB:.004271,I:.021005,b:.004879,J:.020136,D:.005725,E:.004525,F:.00533,A:.004283,B:.012603,C:.004471,K:.004486,L:.00453,G:.008542,M:.004417,N:.004425,O:.008542,c:.004443,d:.004283,e:.008542,f:.013698,g:.008542,h:.008786,i:.017084,j:.004317,k:.004393,l:.004418,m:.008834,n:.008542,o:.008928,p:.004471,q:.009284,r:.004707,s:.009076,t:.004425,u:.004783,v:.004271,w:.004783,x:.00487,y:.005029,z:.0047,AB:.004335,BB:.004201,CB:.004201,DB:.012603,EB:.004425,FB:.004204,ZB:.004201,GB:.008402,aB:.00472,Q:.004425,HB:.012603,IB:.00415,JB:.004267,KB:.008402,LB:.004267,MB:.012603,NB:.00415,OB:.008402,PB:.004425,QB:.016804,RB:.00415,SB:.00415,TB:.008542,UB:.004298,VB:.004201,bB:.151236,R:.008402,S:.008402,T:.008402,iB:.016804,U:.008402,V:.021005,W:.012603,X:.016804,Y:.029407,Z:.399095,P:1.91986,a:.029407,H:0,jB:.008786,kB:.00487},B:\"moz\",C:[\"hB\",\"YB\",\"jB\",\"kB\",\"I\",\"b\",\"J\",\"D\",\"E\",\"F\",\"A\",\"B\",\"C\",\"K\",\"L\",\"G\",\"M\",\"N\",\"O\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"FB\",\"ZB\",\"GB\",\"aB\",\"Q\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"bB\",\"R\",\"S\",\"T\",\"iB\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"P\",\"a\",\"H\",\"\"],E:\"Firefox\",F:{0:1450137600,1:1453852800,2:1457395200,3:1461628800,4:1465257600,5:1470096e3,6:1474329600,7:1479168e3,8:1485216e3,9:1488844800,hB:1161648e3,YB:1213660800,jB:124632e4,kB:1264032e3,I:1300752e3,b:1308614400,J:1313452800,D:1317081600,E:1317081600,F:1320710400,A:1324339200,B:1327968e3,C:1331596800,K:1335225600,L:1338854400,G:1342483200,M:1346112e3,N:1349740800,O:1353628800,c:1357603200,d:1361232e3,e:1364860800,f:1368489600,g:1372118400,h:1375747200,i:1379376e3,j:1386633600,k:1391472e3,l:1395100800,m:1398729600,n:1402358400,o:1405987200,p:1409616e3,q:1413244800,r:1417392e3,s:1421107200,t:1424736e3,u:1428278400,v:1431475200,w:1435881600,x:1439251200,y:144288e4,z:1446508800,AB:149256e4,BB:1497312e3,CB:1502150400,DB:1506556800,EB:1510617600,FB:1516665600,ZB:1520985600,GB:1525824e3,aB:1529971200,Q:1536105600,HB:1540252800,IB:1544486400,JB:154872e4,KB:1552953600,LB:1558396800,MB:1562630400,NB:1567468800,OB:1571788800,PB:1575331200,QB:1578355200,RB:1581379200,SB:1583798400,TB:1586304e3,UB:1588636800,VB:1591056e3,bB:1593475200,R:1595894400,S:1598313600,T:1600732800,iB:1603152e3,U:1605571200,V:1607990400,W:1611619200,X:1614038400,Y:1616457600,Z:1618790400,P:1622505600,a:null,H:null}},D:{A:{0:.008402,1:.004465,2:.004642,3:.004891,4:.012603,5:.021005,6:.197447,7:.004201,8:.004201,9:.004201,I:.004706,b:.004879,J:.004879,D:.005591,E:.005591,F:.005591,A:.004534,B:.004464,C:.010424,K:.0083,L:.004706,G:.015087,M:.004393,N:.004393,O:.008652,c:.008542,d:.004393,e:.004317,f:.012603,g:.008786,h:.008408,i:.004461,j:.004201,k:.004326,l:.0047,m:.004538,n:.008542,o:.008596,p:.004566,q:.004204,r:.008402,s:.008402,t:.004335,u:.004464,v:.025206,w:.004464,x:.012603,y:.0236,z:.004403,AB:.025206,BB:.008402,CB:.008402,DB:.04201,EB:.008402,FB:.008402,ZB:.008402,GB:.016804,aB:.088221,Q:.008402,HB:.016804,IB:.029407,JB:.021005,KB:.021005,LB:.021005,MB:.012603,NB:.067216,OB:.063015,PB:.025206,QB:.054613,RB:.016804,SB:.075618,TB:.088221,UB:.063015,VB:.029407,bB:.063015,R:.21005,S:.105025,T:.075618,U:.105025,V:.100824,W:.285668,X:.121829,Y:.273065,Z:.184844,P:.411698,a:3.44902,H:19.459,lB:.029407,mB:.025206,nB:0},B:\"webkit\",C:[\"\",\"\",\"\",\"I\",\"b\",\"J\",\"D\",\"E\",\"F\",\"A\",\"B\",\"C\",\"K\",\"L\",\"G\",\"M\",\"N\",\"O\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"FB\",\"ZB\",\"GB\",\"aB\",\"Q\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"bB\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"P\",\"a\",\"H\",\"lB\",\"mB\",\"nB\"],E:\"Chrome\",F:{0:143208e4,1:1437523200,2:1441152e3,3:1444780800,4:1449014400,5:1453248e3,6:1456963200,7:1460592e3,8:1464134400,9:1469059200,I:1264377600,b:1274745600,J:1283385600,D:1287619200,E:1291248e3,F:1296777600,A:1299542400,B:1303862400,C:1307404800,K:1312243200,L:1316131200,G:1316131200,M:1319500800,N:1323734400,O:1328659200,c:1332892800,d:133704e4,e:1340668800,f:1343692800,g:1348531200,h:1352246400,i:1357862400,j:1361404800,k:1364428800,l:1369094400,m:1374105600,n:1376956800,o:1384214400,p:1389657600,q:1392940800,r:1397001600,s:1400544e3,t:1405468800,u:1409011200,v:141264e4,w:1416268800,x:1421798400,y:1425513600,z:1429401600,AB:1472601600,BB:1476230400,CB:1480550400,DB:1485302400,EB:1489017600,FB:149256e4,ZB:1496707200,GB:1500940800,aB:1504569600,Q:1508198400,HB:1512518400,IB:1516752e3,JB:1520294400,KB:1523923200,LB:1527552e3,MB:1532390400,NB:1536019200,OB:1539648e3,PB:1543968e3,QB:154872e4,RB:1552348800,SB:1555977600,TB:1559606400,UB:1564444800,VB:1568073600,bB:1571702400,R:1575936e3,S:1580860800,T:1586304e3,U:1589846400,V:1594684800,W:1598313600,X:1601942400,Y:1605571200,Z:1611014400,P:1614556800,a:1618272e3,H:1621987200,lB:null,mB:null,nB:null}},E:{A:{I:0,b:.008542,J:.004656,D:.004465,E:.12603,F:.004891,A:.004425,B:.008402,C:.012603,K:.08402,L:1.2729,G:.004201,oB:0,cB:.008692,pB:.105025,qB:.00456,rB:.004283,sB:.025206,dB:.021005,WB:.058814,XB:.088221,tB:.470512,uB:1.72241,vB:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"oB\",\"cB\",\"I\",\"b\",\"pB\",\"J\",\"qB\",\"D\",\"rB\",\"E\",\"F\",\"sB\",\"A\",\"dB\",\"B\",\"WB\",\"C\",\"XB\",\"K\",\"tB\",\"L\",\"uB\",\"G\",\"vB\",\"\"],E:\"Safari\",F:{oB:1205798400,cB:1226534400,I:1244419200,b:1275868800,pB:131112e4,J:1343174400,qB:13824e5,D:13824e5,rB:1410998400,E:1413417600,F:1443657600,sB:1458518400,A:1474329600,dB:1490572800,B:1505779200,WB:1522281600,C:1537142400,XB:1553472e3,K:1568851200,tB:1585008e3,L:1600214400,uB:1619395200,G:null,vB:null}},F:{A:{0:.008542,1:.004227,2:.004725,3:.008402,4:.008942,5:.004707,6:.004827,7:.004707,8:.004707,9:.004326,F:.0082,B:.016581,C:.004317,G:.00685,M:.00685,N:.00685,O:.005014,c:.006015,d:.004879,e:.006597,f:.006597,g:.013434,h:.006702,i:.006015,j:.005595,k:.004393,l:.008652,m:.004879,n:.004879,o:.004201,p:.005152,q:.005014,r:.009758,s:.004879,t:.008402,u:.004283,v:.004367,w:.004534,x:.008402,y:.004227,z:.004418,AB:.008922,BB:.014349,CB:.004425,DB:.00472,EB:.004425,FB:.004425,GB:.00472,Q:.004532,HB:.004566,IB:.02283,JB:.00867,KB:.004656,LB:.004642,MB:.004298,NB:.00944,OB:.00415,PB:.004271,QB:.004298,RB:.096692,SB:.004201,TB:.243658,UB:.46211,VB:.193246,wB:.00685,xB:0,yB:.008392,zB:.004706,WB:.006229,eB:.004879,\"0B\":.008786,XB:.00472},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"F\",\"wB\",\"xB\",\"yB\",\"zB\",\"B\",\"WB\",\"eB\",\"0B\",\"C\",\"XB\",\"G\",\"M\",\"N\",\"O\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"AB\",\"BB\",\"CB\",\"DB\",\"EB\",\"FB\",\"GB\",\"Q\",\"HB\",\"IB\",\"JB\",\"KB\",\"LB\",\"MB\",\"NB\",\"OB\",\"PB\",\"QB\",\"RB\",\"SB\",\"TB\",\"UB\",\"VB\",\"\",\"\",\"\"],E:\"Opera\",F:{0:1486425600,1:1490054400,2:1494374400,3:1498003200,4:1502236800,5:1506470400,6:1510099200,7:1515024e3,8:1517961600,9:1521676800,F:1150761600,wB:1223424e3,xB:1251763200,yB:1267488e3,zB:1277942400,B:1292457600,WB:1302566400,eB:1309219200,\"0B\":1323129600,C:1323129600,XB:1352073600,G:1372723200,M:1377561600,N:1381104e3,O:1386288e3,c:1390867200,d:1393891200,e:1399334400,f:1401753600,g:1405987200,h:1409616e3,i:1413331200,j:1417132800,k:1422316800,l:1425945600,m:1430179200,n:1433808e3,o:1438646400,p:1442448e3,q:1445904e3,r:1449100800,s:1454371200,t:1457308800,u:146232e4,v:1465344e3,w:1470096e3,x:1474329600,y:1477267200,z:1481587200,AB:1525910400,BB:1530144e3,CB:1534982400,DB:1537833600,EB:1543363200,FB:1548201600,GB:1554768e3,Q:1561593600,HB:1566259200,IB:1570406400,JB:1573689600,KB:1578441600,LB:1583971200,MB:1587513600,NB:1592956800,OB:1595894400,PB:1600128e3,QB:1603238400,RB:161352e4,SB:1612224e3,TB:1616544e3,UB:1619568e3,VB:1623715200},D:{F:\"o\",B:\"o\",C:\"o\",wB:\"o\",xB:\"o\",yB:\"o\",zB:\"o\",WB:\"o\",eB:\"o\",\"0B\":\"o\",XB:\"o\"}},G:{A:{E:.00144232,cB:0,\"1B\":0,fB:.00288464,\"2B\":.00865392,\"3B\":.0187502,\"4B\":.0302887,\"5B\":.0201925,\"6B\":.0245194,\"7B\":.145674,\"8B\":.0302887,\"9B\":.147117,AC:.0908662,BC:.0692314,CC:.0750006,DC:.222117,EC:.0605774,FC:.0274041,GC:.160098,HC:.536543,IC:5.13466,JC:6.98371},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"cB\",\"1B\",\"fB\",\"2B\",\"3B\",\"4B\",\"E\",\"5B\",\"6B\",\"7B\",\"8B\",\"9B\",\"AC\",\"BC\",\"CC\",\"DC\",\"EC\",\"FC\",\"GC\",\"HC\",\"IC\",\"JC\",\"\",\"\",\"\"],E:\"Safari on iOS\",F:{cB:1270252800,\"1B\":1283904e3,fB:1299628800,\"2B\":1331078400,\"3B\":1359331200,\"4B\":1394409600,E:1410912e3,\"5B\":1413763200,\"6B\":1442361600,\"7B\":1458518400,\"8B\":1473724800,\"9B\":1490572800,AC:1505779200,BC:1522281600,CC:1537142400,DC:1553472e3,EC:1568851200,FC:1572220800,GC:1580169600,HC:1585008e3,IC:1600214400,JC:1619395200}},H:{A:{KC:1.13096},B:\"o\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"KC\",\"\",\"\",\"\"],E:\"Opera Mini\",F:{KC:1426464e3}},I:{A:{YB:0,I:.0119202,H:0,LC:0,MC:0,NC:0,OC:.0208603,fB:.0655609,PC:0,QC:.330785},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"LC\",\"MC\",\"NC\",\"YB\",\"I\",\"OC\",\"fB\",\"PC\",\"QC\",\"H\",\"\",\"\",\"\"],E:\"Android Browser\",F:{LC:1256515200,MC:1274313600,NC:1291593600,YB:1298332800,I:1318896e3,OC:1341792e3,fB:1374624e3,PC:1386547200,QC:1401667200,H:1621987200}},J:{A:{D:0,A:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"D\",\"A\",\"\",\"\",\"\"],E:\"Blackberry Browser\",F:{D:1325376e3,A:1359504e3}},K:{A:{A:0,B:0,C:0,Q:.0111391,WB:0,eB:0,XB:0},B:\"o\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"A\",\"B\",\"WB\",\"eB\",\"C\",\"XB\",\"Q\",\"\",\"\",\"\"],E:\"Opera Mobile\",F:{A:1287100800,B:1300752e3,WB:1314835200,eB:1318291200,C:1330300800,XB:1349740800,Q:1613433600},D:{Q:\"webkit\"}},L:{A:{H:39.6819},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"H\",\"\",\"\",\"\"],E:\"Chrome for Android\",F:{H:1621987200}},M:{A:{P:.295749},B:\"moz\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"P\",\"\",\"\",\"\"],E:\"Firefox for Android\",F:{P:1622505600}},N:{A:{A:.0115934,B:.022664},B:\"ms\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"A\",\"B\",\"\",\"\",\"\"],E:\"IE Mobile\",F:{A:1340150400,B:1353456e3}},O:{A:{RC:1.33957},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"RC\",\"\",\"\",\"\"],E:\"UC Browser for Android\",F:{RC:1471392e3},D:{RC:\"webkit\"}},P:{A:{I:.31012,SC:.0103543,TC:.010304,UC:.0826988,VC:.0103584,WC:.0620241,dB:.031012,XC:.15506,YC:.0930361,ZC:.299783,aC:2.29489},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"I\",\"SC\",\"TC\",\"UC\",\"VC\",\"WC\",\"dB\",\"XC\",\"YC\",\"ZC\",\"aC\",\"\",\"\",\"\"],E:\"Samsung Internet\",F:{I:1461024e3,SC:1481846400,TC:1509408e3,UC:1528329600,VC:1546128e3,WC:1554163200,dB:1567900800,XC:1582588800,YC:1593475200,ZC:1605657600,aC:1618531200}},Q:{A:{bC:.191367},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"bC\",\"\",\"\",\"\"],E:\"QQ Browser\",F:{bC:1589846400}},R:{A:{cC:0},B:\"webkit\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"cC\",\"\",\"\",\"\"],E:\"Baidu Browser\",F:{cC:1491004800}},S:{A:{dC:.104382},B:\"moz\",C:[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"dC\",\"\",\"\",\"\"],E:\"KaiOS Browser\",F:{dC:1527811200}}}},e=>{e.exports={\"0.20\":\"39\",.21:\"41\",.22:\"41\",.23:\"41\",.24:\"41\",.25:\"42\",.26:\"42\",.27:\"43\",.28:\"43\",.29:\"43\",\"0.30\":\"44\",.31:\"45\",.32:\"45\",.33:\"45\",.34:\"45\",.35:\"45\",.36:\"47\",.37:\"49\",\"1.0\":\"49\",1.1:\"50\",1.2:\"51\",1.3:\"52\",1.4:\"53\",1.5:\"54\",1.6:\"56\",1.7:\"58\",1.8:\"59\",\"2.0\":\"61\",2.1:\"61\",\"3.0\":\"66\",3.1:\"66\",\"4.0\":\"69\",4.1:\"69\",4.2:\"69\",\"5.0\":\"73\",\"6.0\":\"76\",6.1:\"76\",\"7.0\":\"78\",7.1:\"78\",7.2:\"78\",7.3:\"78\",\"8.0\":\"80\",8.1:\"80\",8.2:\"80\",8.3:\"80\",8.4:\"80\",8.5:\"80\",\"9.0\":\"83\",9.1:\"83\",9.2:\"83\",9.3:\"83\",9.4:\"83\",\"10.0\":\"85\",10.1:\"85\",10.2:\"85\",10.3:\"85\",10.4:\"85\",\"11.0\":\"87\",11.1:\"87\",11.2:\"87\",11.3:\"87\",11.4:\"87\",\"12.0\":\"89\",\"13.0\":\"91\",13.1:\"91\",\"14.0\":\"93\"}},(e,t,r)=>{var n=r(151);function s(){}e.exports={loadQueries:function(){throw new n(\"Sharable configs are not supported in client-side build of Browserslist\")},getStat:function(e){return e.stats},loadConfig:function(e){if(e.config)throw new n(\"Browserslist config are not supported in client-side build\")},loadCountry:function(){throw new n(\"Country statistics are not supported in client-side build of Browserslist\")},loadFeature:function(){throw new n(\"Supports queries are not available in client-side build of Browserslist\")},currentNode:function(e,t){return e([\"maintained node versions\"],t)[0]},parseConfig:s,readConfig:s,findConfig:s,clearCaches:s,oldDataWarning:s}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),Object.defineProperty(t,\"OptionValidator\",{enumerable:!0,get:function(){return n.OptionValidator}}),Object.defineProperty(t,\"findSuggestion\",{enumerable:!0,get:function(){return s.findSuggestion}});var n=r(473),s=r(298)},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.findSuggestion=function(e,t){const n=t.map((t=>function(e,t){let n,s,i=[],o=[];const a=e.length,l=t.length;if(!a)return l;if(!l)return a;for(s=0;s<=l;s++)i[s]=s;for(n=1;n<=a;n++){for(o=[n],s=1;s<=l;s++)o[s]=e[n-1]===t[s-1]?i[s-1]:r(i[s-1],i[s],o[s-1])+1;i=o}return o[l]}(t,e)));return t[n.indexOf(r(...n))]};const{min:r}=Math},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.prettifyVersion=i,t.prettifyTargets=function(e){return Object.keys(e).reduce(((t,r)=>{let n=e[r];const o=s.unreleasedLabels[r];return\"string\"==typeof n&&o!==n&&(n=i(n)),t[r]=n,t}),{})};var n=r(28),s=r(153);function i(e){if(\"string\"!=typeof e)return e;const t=[n.major(e)],r=n.minor(e),s=n.patch(e);return(r||s)&&t.push(r),s&&t.push(s),t.join(\".\")}},(e,t,r)=>{\"use strict\";function n(){const e=r(8);return n=function(){return e},e}function s(){const e=r(65);return s=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.buildPresetChain=function*(e,t){const r=yield*f(e,t);return r?{plugins:B(r.plugins),presets:B(r.presets),options:r.options.map((e=>M(e))),files:new Set}:null},t.buildRootChain=function*(e,t){let r,s;const i=new a.ConfigPrinter,c=yield*E({options:e,dirname:t.cwd},t,void 0,i);if(!c)return null;let u;yield*i.output(),\"string\"==typeof e.configFile?u=yield*(0,l.loadConfig)(e.configFile,t.cwd,t.envName,t.caller):!1!==e.configFile&&(u=yield*(0,l.findRootConfig)(t.root,t.envName,t.caller));let{babelrc:p,babelrcRoots:f}=e,d=t.cwd;const h=L(),m=new a.ConfigPrinter;if(u){const e=g(u),n=yield*S(e,t,void 0,m);if(!n)return null;r=yield*m.output(),void 0===p&&(p=e.options.babelrc),void 0===f&&(d=e.dirname,f=e.options.babelrcRoots),j(h,n)}let y,v,x=!1;const T=L();if((!0===p||void 0===p)&&\"string\"==typeof t.filename){const e=yield*(0,l.findPackageData)(t.filename);if(e&&function(e,t,r,s){if(\"boolean\"==typeof r)return r;const i=e.root;if(void 0===r)return-1!==t.directories.indexOf(i);let a=r;return Array.isArray(a)||(a=[a]),a=a.map((e=>\"string\"==typeof e?n().resolve(s,e):e)),1===a.length&&a[0]===i?-1!==t.directories.indexOf(i):a.some((r=>(\"string\"==typeof r&&(r=(0,o.default)(r,s)),t.directories.some((t=>q(r,s,t,e))))))}(t,e,f,d)){if(({ignore:y,config:v}=yield*(0,l.findRelativeConfig)(e,t.envName,t.caller)),y&&T.files.add(y.filepath),y&&U(t,y.ignore,null,y.dirname)&&(x=!0),v&&!x){const e=b(v),r=new a.ConfigPrinter,n=yield*S(e,t,void 0,r);n?(s=yield*r.output(),j(T,n)):x=!0}v&&x&&T.files.add(v.filepath)}}t.showConfig;const w=j(j(j(L(),h),T),c);return{plugins:x?[]:B(w.plugins),presets:x?[]:B(w.presets),options:x?[]:w.options.map((e=>M(e))),fileHandling:x?\"ignored\":\"transpile\",ignore:y||void 0,babelrc:v||void 0,config:u||void 0,files:w.files}},t.buildPresetChainWalker=void 0;var i=r(82),o=r(482),a=r(483),l=r(77),c=r(81),u=r(288);const p=s()(\"babel:config:config-chain\"),f=N({root:e=>d(e),env:(e,t)=>h(e)(t),overrides:(e,t)=>m(e)(t),overridesEnv:(e,t,r)=>y(e)(t)(r),createLogger:()=>()=>{}});t.buildPresetChainWalker=f;const d=(0,c.makeWeakCacheSync)((e=>O(e,e.alias,u.createUncachedDescriptors))),h=(0,c.makeWeakCacheSync)((e=>(0,c.makeStrongCacheSync)((t=>C(e,e.alias,u.createUncachedDescriptors,t))))),m=(0,c.makeWeakCacheSync)((e=>(0,c.makeStrongCacheSync)((t=>I(e,e.alias,u.createUncachedDescriptors,t))))),y=(0,c.makeWeakCacheSync)((e=>(0,c.makeStrongCacheSync)((t=>(0,c.makeStrongCacheSync)((r=>k(e,e.alias,u.createUncachedDescriptors,t,r))))))),g=(0,c.makeWeakCacheSync)((e=>({filepath:e.filepath,dirname:e.dirname,options:(0,i.validate)(\"configfile\",e.options)}))),b=(0,c.makeWeakCacheSync)((e=>({filepath:e.filepath,dirname:e.dirname,options:(0,i.validate)(\"babelrcfile\",e.options)}))),v=(0,c.makeWeakCacheSync)((e=>({filepath:e.filepath,dirname:e.dirname,options:(0,i.validate)(\"extendsfile\",e.options)}))),E=N({root:e=>O(e,\"base\",u.createCachedDescriptors),env:(e,t)=>C(e,\"base\",u.createCachedDescriptors,t),overrides:(e,t)=>I(e,\"base\",u.createCachedDescriptors,t),overridesEnv:(e,t,r)=>k(e,\"base\",u.createCachedDescriptors,t,r),createLogger:(e,t,r)=>function(e,t,r){var n;return r?r.configure(t.showConfig,a.ChainFormatter.Programmatic,{callerName:null==(n=t.caller)?void 0:n.name}):()=>{}}(0,t,r)}),x=N({root:e=>T(e),env:(e,t)=>w(e)(t),overrides:(e,t)=>P(e)(t),overridesEnv:(e,t,r)=>A(e)(t)(r),createLogger:(e,t,r)=>function(e,t,r){return r?r.configure(t.showConfig,a.ChainFormatter.Config,{filepath:e}):()=>{}}(e.filepath,t,r)});function*S(e,t,r,n){const s=yield*x(e,t,r,n);return s&&s.files.add(e.filepath),s}const T=(0,c.makeWeakCacheSync)((e=>O(e,e.filepath,u.createUncachedDescriptors))),w=(0,c.makeWeakCacheSync)((e=>(0,c.makeStrongCacheSync)((t=>C(e,e.filepath,u.createUncachedDescriptors,t))))),P=(0,c.makeWeakCacheSync)((e=>(0,c.makeStrongCacheSync)((t=>I(e,e.filepath,u.createUncachedDescriptors,t))))),A=(0,c.makeWeakCacheSync)((e=>(0,c.makeStrongCacheSync)((t=>(0,c.makeStrongCacheSync)((r=>k(e,e.filepath,u.createUncachedDescriptors,t,r)))))));function O({dirname:e,options:t},r,n){return n(e,t,r)}function C({dirname:e,options:t},r,n,s){const i=t.env&&t.env[s];return i?n(e,i,`${r}.env[\"${s}\"]`):null}function I({dirname:e,options:t},r,n,s){const i=t.overrides&&t.overrides[s];if(!i)throw new Error(\"Assertion failure - missing override\");return n(e,i,`${r}.overrides[${s}]`)}function k({dirname:e,options:t},r,n,s,i){const o=t.overrides&&t.overrides[s];if(!o)throw new Error(\"Assertion failure - missing override\");const a=o.env&&o.env[i];return a?n(e,a,`${r}.overrides[${s}].env[\"${i}\"]`):null}function N({root:e,env:t,overrides:r,overridesEnv:n,createLogger:s}){return function*(i,o,a=new Set,l){const{dirname:c}=i,u=[],p=e(i);if(R(p,c,o)){u.push({config:p,envName:void 0,index:void 0});const e=t(i,o.envName);e&&R(e,c,o)&&u.push({config:e,envName:o.envName,index:void 0}),(p.options.overrides||[]).forEach(((e,t)=>{const s=r(i,t);if(R(s,c,o)){u.push({config:s,index:t,envName:void 0});const e=n(i,t,o.envName);e&&R(e,c,o)&&u.push({config:e,index:t,envName:o.envName})}}))}if(u.some((({config:{options:{ignore:e,only:t}}})=>U(o,e,t,c))))return null;const f=L(),d=s(i,o,l);for(const{config:e,index:t,envName:r}of u){if(!(yield*_(f,e.options,c,o,a,l)))return null;d(e,t,r),yield*D(f,e)}return f}}function*_(e,t,r,n,s,i){if(void 0===t.extends)return!0;const o=yield*(0,l.loadConfig)(t.extends,r,n.envName,n.caller);if(s.has(o))throw new Error(`Configuration cycle detected loading ${o.filepath}.\\nFile already loaded following the config chain:\\n`+Array.from(s,(e=>` - ${e.filepath}`)).join(\"\\n\"));s.add(o);const a=yield*S(v(o),n,s,i);return s.delete(o),!!a&&(j(e,a),!0)}function j(e,t){e.options.push(...t.options),e.plugins.push(...t.plugins),e.presets.push(...t.presets);for(const r of t.files)e.files.add(r);return e}function*D(e,{options:t,plugins:r,presets:n}){return e.options.push(t),e.plugins.push(...yield*r()),e.presets.push(...yield*n()),e}function L(){return{options:[],presets:[],plugins:[],files:new Set}}function M(e){const t=Object.assign({},e);return delete t.extends,delete t.env,delete t.overrides,delete t.plugins,delete t.presets,delete t.passPerPreset,delete t.ignore,delete t.only,delete t.test,delete t.include,delete t.exclude,Object.prototype.hasOwnProperty.call(t,\"sourceMap\")&&(t.sourceMaps=t.sourceMap,delete t.sourceMap),t}function B(e){const t=new Map,r=[];for(const n of e)if(\"function\"==typeof n.value){const e=n.value;let s=t.get(e);s||(s=new Map,t.set(e,s));let i=s.get(n.name);i?i.value=n:(i={value:n},r.push(i),n.ownPass||s.set(n.name,i))}else r.push({value:n});return r.reduce(((e,t)=>(e.push(t.value),e)),[])}function R({options:e},t,r){return(void 0===e.test||F(r,e.test,t))&&(void 0===e.include||F(r,e.include,t))&&(void 0===e.exclude||!F(r,e.exclude,t))}function F(e,t,r){return $(e,Array.isArray(t)?t:[t],r)}function U(e,t,r,n){if(t&&$(e,t,n)){var s;const r=`No config is applied to \"${null!=(s=e.filename)?s:\"(unknown)\"}\" because it matches one of \\`ignore: ${JSON.stringify(t)}\\` from \"${n}\"`;return p(r),e.showConfig,!0}if(r&&!$(e,r,n)){var i;const t=`No config is applied to \"${null!=(i=e.filename)?i:\"(unknown)\"}\" because it fails to match one of \\`only: ${JSON.stringify(r)}\\` from \"${n}\"`;return p(t),e.showConfig,!0}return!1}function $(e,t,r){return t.some((t=>q(t,r,e.filename,e)))}function q(e,t,r,n){if(\"function\"==typeof e)return!!e(r,{dirname:t,envName:n.envName,caller:n.caller});if(\"string\"!=typeof r)throw new Error(\"Configuration contains string/RegExp pattern, but no filename was passed to Babel\");return\"string\"==typeof e&&(e=(0,o.default)(e,t)),e.test(r)}},(e,t,r)=>{\"use strict\";function n(){const e=r(290);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.msg=i,t.access=o,t.assertRootMode=function(e,t){if(void 0!==t&&\"root\"!==t&&\"upward\"!==t&&\"upward-optional\"!==t)throw new Error(`${i(e)} must be a \"root\", \"upward\", \"upward-optional\" or undefined`);return t},t.assertSourceMaps=function(e,t){if(void 0!==t&&\"boolean\"!=typeof t&&\"inline\"!==t&&\"both\"!==t)throw new Error(`${i(e)} must be a boolean, \"inline\", \"both\", or undefined`);return t},t.assertCompact=function(e,t){if(void 0!==t&&\"boolean\"!=typeof t&&\"auto\"!==t)throw new Error(`${i(e)} must be a boolean, \"auto\", or undefined`);return t},t.assertSourceType=function(e,t){if(void 0!==t&&\"module\"!==t&&\"script\"!==t&&\"unambiguous\"!==t)throw new Error(`${i(e)} must be \"module\", \"script\", \"unambiguous\", or undefined`);return t},t.assertCallerMetadata=function(e,t){const r=l(e,t);if(r){if(\"string\"!=typeof r.name)throw new Error(`${i(e)} set but does not contain \"name\" property string`);for(const t of Object.keys(r)){const n=o(e,t),s=r[t];if(null!=s&&\"boolean\"!=typeof s&&\"string\"!=typeof s&&\"number\"!=typeof s)throw new Error(`${i(n)} must be null, undefined, a boolean, a string, or a number.`)}}return t},t.assertInputSourceMap=function(e,t){if(void 0!==t&&\"boolean\"!=typeof t&&(\"object\"!=typeof t||!t))throw new Error(`${i(e)} must be a boolean, object, or undefined`);return t},t.assertString=function(e,t){if(void 0!==t&&\"string\"!=typeof t)throw new Error(`${i(e)} must be a string, or undefined`);return t},t.assertFunction=function(e,t){if(void 0!==t&&\"function\"!=typeof t)throw new Error(`${i(e)} must be a function, or undefined`);return t},t.assertBoolean=a,t.assertObject=l,t.assertArray=c,t.assertIgnoreList=function(e,t){const r=c(e,t);return r&&r.forEach(((t,r)=>function(e,t){if(\"string\"!=typeof t&&\"function\"!=typeof t&&!(t instanceof RegExp))throw new Error(`${i(e)} must be an array of string/Function/RegExp values, or undefined`);return t}(o(e,r),t))),r},t.assertConfigApplicableTest=function(e,t){if(void 0===t)return t;if(Array.isArray(t))t.forEach(((t,r)=>{if(!u(t))throw new Error(`${i(o(e,r))} must be a string/Function/RegExp.`)}));else if(!u(t))throw new Error(`${i(e)} must be a string/Function/RegExp, or an array of those`);return t},t.assertConfigFileSearch=function(e,t){if(void 0!==t&&\"boolean\"!=typeof t&&\"string\"!=typeof t)throw new Error(`${i(e)} must be a undefined, a boolean, a string, got ${JSON.stringify(t)}`);return t},t.assertBabelrcSearch=function(e,t){if(void 0===t||\"boolean\"==typeof t)return t;if(Array.isArray(t))t.forEach(((t,r)=>{if(!u(t))throw new Error(`${i(o(e,r))} must be a string/Function/RegExp.`)}));else if(!u(t))throw new Error(`${i(e)} must be a undefined, a boolean, a string/Function/RegExp or an array of those, got ${JSON.stringify(t)}`);return t},t.assertPluginList=function(e,t){const r=c(e,t);return r&&r.forEach(((t,r)=>function(e,t){if(Array.isArray(t)){if(0===t.length)throw new Error(`${i(e)} must include an object`);if(t.length>3)throw new Error(`${i(e)} may only be a two-tuple or three-tuple`);if(p(o(e,0),t[0]),t.length>1){const r=t[1];if(void 0!==r&&!1!==r&&(\"object\"!=typeof r||Array.isArray(r)||null===r))throw new Error(`${i(o(e,1))} must be an object, false, or undefined`)}if(3===t.length){const r=t[2];if(void 0!==r&&\"string\"!=typeof r)throw new Error(`${i(o(e,2))} must be a string, or undefined`)}}else p(e,t);return t}(o(e,r),t))),r},t.assertTargets=function(e,t){if((0,n().isBrowsersQueryValid)(t))return t;if(\"object\"!=typeof t||!t||Array.isArray(t))throw new Error(`${i(e)} must be a string, an array of strings or an object`);const r=o(e,\"browsers\"),s=o(e,\"esmodules\");f(r,t.browsers),a(s,t.esmodules);for(const r of Object.keys(t)){const s=t[r],l=o(e,r);if(\"esmodules\"===r)a(l,s);else if(\"browsers\"===r)f(l,s);else{if(!Object.hasOwnProperty.call(n().TargetNames,r)){const e=Object.keys(n().TargetNames).join(\", \");throw new Error(`${i(l)} is not a valid target. Supported targets are ${e}`)}d(l,s)}}return t},t.assertAssumptions=function(e,t){if(void 0===t)return;if(\"object\"!=typeof t||null===t)throw new Error(`${i(e)} must be an object or undefined.`);let r=e;do{r=r.parent}while(\"root\"!==r.type);const n=\"preset\"===r.source;for(const r of Object.keys(t)){const a=o(e,r);if(!s.assumptionsNames.has(r))throw new Error(`${i(a)} is not a supported assumption.`);if(\"boolean\"!=typeof t[r])throw new Error(`${i(a)} must be a boolean.`);if(n&&!1===t[r])throw new Error(`${i(a)} cannot be set to 'false' inside presets.`)}return t};var s=r(82);function i(e){switch(e.type){case\"root\":return\"\";case\"env\":return`${i(e.parent)}.env[\"${e.name}\"]`;case\"overrides\":return`${i(e.parent)}.overrides[${e.index}]`;case\"option\":return`${i(e.parent)}.${e.name}`;case\"access\":return`${i(e.parent)}[${JSON.stringify(e.name)}]`;default:throw new Error(`Assertion failure: Unknown type ${e.type}`)}}function o(e,t){return{type:\"access\",name:t,parent:e}}function a(e,t){if(void 0!==t&&\"boolean\"!=typeof t)throw new Error(`${i(e)} must be a boolean, or undefined`);return t}function l(e,t){if(void 0!==t&&(\"object\"!=typeof t||Array.isArray(t)||!t))throw new Error(`${i(e)} must be an object, or undefined`);return t}function c(e,t){if(null!=t&&!Array.isArray(t))throw new Error(`${i(e)} must be an array, or undefined`);return t}function u(e){return\"string\"==typeof e||\"function\"==typeof e||e instanceof RegExp}function p(e,t){if((\"object\"!=typeof t||!t)&&\"string\"!=typeof t&&\"function\"!=typeof t)throw new Error(`${i(e)} must be a string, object, function`);return t}function f(e,t){if(void 0!==t&&!(0,n().isBrowsersQueryValid)(t))throw new Error(`${i(e)} must be undefined, a string or an array of strings`)}function d(e,t){if((\"number\"!=typeof t||Math.round(t)!==t)&&\"string\"!=typeof t)throw new Error(`${i(e)} must be a string or an integer number`)}},()=>{},(e,t,r)=>{\"use strict\";function n(){const e=r(8);return n=function(){return e},e}function s(){const e=r(14);return s=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=d,t.loadPartialConfig=void 0;var i=r(79),o=r(150),a=r(80),l=r(300),c=r(286),u=r(82),p=r(77),f=r(289);function*d(e){if(null!=e&&(\"object\"!=typeof e||Array.isArray(e)))throw new Error(\"Babel options must be an object, null, or undefined\");const t=e?(0,u.validate)(\"arguments\",e):{},{envName:r=(0,c.getEnv)(),cwd:s=\".\",root:i=\".\",rootMode:d=\"root\",caller:h,cloneInputAst:m=!0}=t,y=n().resolve(s),g=function(e,t){switch(t){case\"root\":return e;case\"upward-optional\":{const t=(0,p.findConfigUpwards)(e);return null===t?e:t}case\"upward\":{const t=(0,p.findConfigUpwards)(e);if(null!==t)return t;throw Object.assign(new Error(`Babel was run with rootMode:\"upward\" but a root could not be found when searching upward from \"${e}\".\\nOne of the following config files must be in the directory tree: \"${p.ROOT_CONFIG_FILENAMES.join(\", \")}\".`),{code:\"BABEL_ROOT_NOT_FOUND\",dirname:e})}default:throw new Error(\"Assertion failure - unknown rootMode value.\")}}(n().resolve(y,i),d),b=\"string\"==typeof t.filename?n().resolve(s,t.filename):void 0,v={filename:b,cwd:y,root:g,envName:r,caller:h,showConfig:(yield*(0,p.resolveShowConfigPath)(y))===b},E=yield*(0,l.buildRootChain)(t,v);if(!E)return null;const x={assumptions:{}};return E.options.forEach((e=>{(0,o.mergeOptions)(x,e)})),{options:Object.assign({},x,{targets:(0,f.resolveTargets)(x,g),cloneInputAst:m,babelrc:!1,configFile:!1,browserslistConfigFile:!1,passPerPreset:!1,envName:v.envName,cwd:v.cwd,root:v.root,rootMode:\"root\",filename:\"string\"==typeof v.filename?v.filename:void 0,plugins:E.plugins.map((e=>(0,a.createItemFromDescriptor)(e))),presets:E.presets.map((e=>(0,a.createItemFromDescriptor)(e)))}),context:v,fileHandling:E.fileHandling,ignore:E.ignore,babelrc:E.babelrc,config:E.config,files:E.files}}const h=s()((function*(e){let t=!1;if(\"object\"==typeof e&&null!==e&&!Array.isArray(e)){var r=e;({showIgnoredFiles:t}=r),e=function(e,t){if(null==e)return{};var r,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(s[r]=e[r]);return s}(r,[\"showIgnoredFiles\"])}const n=yield*d(e);if(!n)return null;const{options:s,babelrc:o,ignore:a,config:l,fileHandling:c,files:u}=n;return\"ignored\"!==c||t?((s.plugins||[]).forEach((e=>{if(e.value instanceof i.default)throw new Error(\"Passing cached plugin instances is not supported in babel.loadPartialConfig()\")})),new m(s,o?o.filepath:void 0,a?a.filepath:void 0,l?l.filepath:void 0,c,u)):null}));t.loadPartialConfig=h;class m{constructor(e,t,r,n,s,i){this.options=void 0,this.babelrc=void 0,this.babelignore=void 0,this.config=void 0,this.fileHandling=void 0,this.files=void 0,this.options=e,this.babelignore=r,this.babelrc=t,this.config=n,this.fileHandling=s,this.files=i,Object.freeze(this)}hasFilesystemConfig(){return void 0!==this.babelrc||void 0!==this.config}}Object.freeze(m.prototype)},(e,t,r)=>{\"use strict\";function n(){const e=r(10);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.run=function*(e,t,r){const u=yield*(0,a.default)(e.passes,(0,o.default)(e),t,r),p=u.opts;try{yield*function*(e,t){for(const r of t){const t=[],o=[],a=[];for(const n of r.concat([(0,i.default)()])){const r=new s.default(e,n.key,n.options);t.push([n,r]),o.push(r),a.push(n.visitor)}for(const[r,n]of t){const t=r.pre;if(t){const r=t.call(n,e);if(yield*[],c(r))throw new Error(\"You appear to be using an plugin with an async .pre, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.\")}}const l=n().default.visitors.merge(a,o,e.opts.wrapPluginVisitorMethod);(0,n().default)(e.ast,l,e.scope);for(const[r,n]of t){const t=r.post;if(t){const r=t.call(n,e);if(yield*[],c(r))throw new Error(\"You appear to be using an plugin with an async .post, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.\")}}}}(u,e.passes)}catch(e){var f;throw e.message=`${null!=(f=p.filename)?f:\"unknown\"}: ${e.message}`,e.code||(e.code=\"BABEL_TRANSFORM_ERROR\"),e}let d,h;try{!1!==p.code&&({outputCode:d,outputMap:h}=(0,l.default)(e.passes,u))}catch(e){var m;throw e.message=`${null!=(m=p.filename)?m:\"unknown\"}: ${e.message}`,e.code||(e.code=\"BABEL_GENERATE_ERROR\"),e}return{metadata:u.metadata,options:p,ast:!0===p.ast?u.ast:null,code:void 0===d?null:d,map:void 0===h?null:h,sourceType:u.ast.program.sourceType}};var s=r(487),i=r(488),o=r(305),a=r(489),l=r(494);function c(e){return!(!e||\"object\"!=typeof e&&\"function\"!=typeof e||!e.then||\"function\"!=typeof e.then)}},(e,t,r)=>{\"use strict\";function n(){const e=r(8);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){const{filename:t,cwd:r,filenameRelative:s=(\"string\"==typeof t?n().relative(r,t):\"unknown\"),sourceType:i=\"module\",inputSourceMap:o,sourceMaps:a=!!o,sourceRoot:l=e.options.moduleRoot,sourceFileName:c=n().basename(s),comments:u=!0,compact:p=\"auto\"}=e.options,f=e.options,d=Object.assign({},f,{parserOpts:Object.assign({sourceType:\".mjs\"===n().extname(s)?\"module\":i,sourceFileName:t,plugins:[]},f.parserOpts),generatorOpts:Object.assign({filename:t,auxiliaryCommentBefore:f.auxiliaryCommentBefore,auxiliaryCommentAfter:f.auxiliaryCommentAfter,retainLines:f.retainLines,comments:u,shouldPrintComment:f.shouldPrintComment,compact:p,minified:f.minified,sourceMaps:a,sourceRoot:l,sourceFileName:c},f.generatorOpts)});for(const t of e.passes)for(const e of t)e.manipulateOptions&&e.manipulateOptions(d,d.parserOpts);return d}},(e,t,r)=>{\"use strict\";function n(){const e=r(27);return n=function(){return e},e}function s(){const e=r(39);return s=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function*(e,{parserOpts:t,highlightCode:r=!0,filename:o=\"unknown\"},a){try{const r=[];for(const s of e)for(const e of s){const{parserOverride:s}=e;if(s){const e=s(a,t,n().parse);void 0!==e&&r.push(e)}}if(0===r.length)return(0,n().parse)(a,t);if(1===r.length){if(yield*[],\"function\"==typeof r[0].then)throw new Error(\"You appear to be using an async parser plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.\");return r[0]}throw new Error(\"More than one plugin attempted to override parsing.\")}catch(e){\"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\"===e.code&&(e.message+=\"\\nConsider renaming the file to '.mjs', or setting sourceType:module or sourceType:unambiguous in your Babel config for this file.\");const{loc:t,missingPlugin:n}=e;if(t){const l=(0,s().codeFrameColumns)(a,{start:{line:t.line,column:t.column+1}},{highlightCode:r});e.message=n?`${o}: `+(0,i.default)(n[0],t,l):`${o}: ${e.message}\\n\\n`+l,e.code=\"BABEL_PARSE_ERROR\"}throw e}};var i=r(492)},e=>{\"use strict\";e.exports={isString:function(e){return\"string\"==typeof e},isObject:function(e){return\"object\"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},(e,t,r)=>{\"use strict\";let n=r(156),s=r(87),i=r(35);class o{constructor(e=[]){this.version=\"8.3.5\",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,t={}){return 0!==this.plugins.length||void 0!==t.parser||void 0!==t.stringifier||void 0!==t.syntax||t.hideNothingWarning,new n(this,e,t)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),\"object\"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(\"object\"==typeof r&&r.postcssPlugin)t.push(r);else if(\"function\"==typeof r)t.push(r);else if(\"object\"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+\" is not a PostCSS plugin\");return t}}e.exports=o,o.default=o,i.registerProcessor(o),s.registerProcessor(o)},(e,t,r)=>{\"use strict\";let n=r(47),s=r(163),i=r(49),o=r(88),a=r(90),l=r(35),c=r(89);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:r,...p}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:a.prototype};r.map&&(r.map={...r.map,__proto__:s.prototype}),t.push(r)}}if(p.nodes&&(p.nodes=e.nodes.map((e=>u(e,t)))),p.source){let{inputId:e,...r}=p.source;p.source=r,null!=e&&(p.source.input=t[e])}if(\"root\"===p.type)return new l(p);if(\"decl\"===p.type)return new n(p);if(\"rule\"===p.type)return new c(p);if(\"comment\"===p.type)return new i(p);if(\"atrule\"===p.type)return new o(p);throw new Error(\"Unknown node type: \"+e.type)}e.exports=u,u.default=u},(e,t,r)=>{\"use strict\";var n=r(7),s=f(r(84)),i=f(r(330)),o=f(r(331)),a=f(r(332)),l=f(r(522)),c=f(r(525)),u=f(r(526)),p=r(528);function f(e){return e&&e.__esModule?e:{default:e}}const d=\"postcss-modules\";function h(e){return e.replace(/-+(\\w)/g,((e,t)=>t.toUpperCase()))}e.exports=(e={})=>({postcssPlugin:d,OnceExit(t,{result:r}){return(f=function*(){const f=e.getJSON||u.default,m=t.source.input.file,y=function(e,t){const r=e.globalModulePaths||null,s=e.exportGlobals||!1,i=function(e){return e.scopeBehaviour&&(0,p.isValidBehaviour)(e.scopeBehaviour)?e.scopeBehaviour:p.behaviours.LOCAL}(e),a=function(e){const t=e.generateScopedName||c.default;return\"function\"==typeof t?t:(0,o.default)(t,{context:n.cwd(),hashPrefix:e.hashPrefix})}(e);return r&&function(e,t){return e.some((e=>t.match(e)))}(r,t)?(0,p.getDefaultPlugins)({behaviour:p.behaviours.GLOBAL,generateScopedName:a,exportGlobals:s}):(0,p.getDefaultPlugins)({behaviour:i,generateScopedName:a,exportGlobals:s})}(e,m),g=r.processor.plugins.findIndex((function(e){return function(e){return e.postcssPlugin===d}(e)}));if(-1===g)throw new Error(\"Plugin missing from options.\");const b=[...r.processor.plugins.slice(0,g),...y],v=function(e,t){const r=void 0===e.root?\"/\":e.root;return\"function\"==typeof e.Loader?new e.Loader(r,t):new l.default(r,t)}(e,b),E=new a.default(v.fetch.bind(v));yield(0,s.default)([...y,E.plugin()]).process(t,{from:m});const x=v.finalSource;if(x&&t.prepend(x),e.localsConvention){const t=\"function\"==typeof e.localsConvention;E.exportTokens=Object.entries(E.exportTokens).reduce((function(r,[n,s]){if(t)return r[e.localsConvention(n,s,m)]=s,r;switch(e.localsConvention){case\"camelCase\":r[n]=s,r[(0,i.default)(n)]=s;break;case\"camelCaseOnly\":r[(0,i.default)(n)]=s;break;case\"dashes\":r[n]=s,r[h(n)]=s;break;case\"dashesOnly\":r[h(n)]=s}return r}),{})}return r.messages.push({type:\"export\",plugin:\"postcss-modules\",exportTokens:E.exportTokens}),f(t.source.input.file,E.exportTokens,r.opts.to)},function(){var e=f.apply(this,arguments);return new Promise((function(t,r){return function n(s,i){try{var o=e[s](i),a=o.value}catch(e){return void r(e)}if(!o.done)return Promise.resolve(a).then((function(e){n(\"next\",e)}),(function(e){n(\"throw\",e)}));t(a)}(\"next\")}))})();var f}}),e.exports.postcss=!0},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.hasOwnDecorators=o,t.hasDecorators=function(e){return o(e)||e.body.body.some(o)},t.buildDecoratedClass=function(e,t,r,s){const{node:i,scope:o}=t,a=o.generateUidIdentifier(\"initialize\"),c=i.id&&t.isDeclaration(),p=t.isInStrictMode(),{superClass:f}=i;let d;i.type=\"ClassDeclaration\",i.id||(i.id=n.types.cloneNode(e)),f&&(d=o.generateUidIdentifierBasedOnNode(i.superClass,\"super\"),i.superClass=d);const h=l(i),m=n.types.arrayExpression(r.filter((e=>!e.node.abstract)).map(u.bind(s,i.id,d))),y=n.template.expression.ast`\n    ${function(e){try{return e.addHelper(\"decorate\")}catch(e){throw\"BABEL_HELPER_UNKNOWN\"===e.code&&(e.message+=\"\\n  '@babel/plugin-transform-decorators' in non-legacy mode requires '@babel/core' version ^7.0.2 and you appear to be using an older version.\"),e}}(s)}(\n      ${h||n.types.nullLiteral()},\n      function (${a}, ${f?n.types.cloneNode(d):null}) {\n        ${i}\n        return { F: ${n.types.cloneNode(i.id)}, d: ${m} };\n      },\n      ${f}\n    )\n  `;p||y.arguments[1].body.directives.push(n.types.directive(n.types.directiveLiteral(\"use strict\")));let g=y,b=\"arguments.1.body.body.0\";return c&&(g=n.template.statement.ast`let ${e} = ${y}`,b=\"declarations.0.init.\"+b),{instanceNodes:[n.template.statement.ast`${n.types.cloneNode(a)}(this)`],wrapClass:e=>(e.replaceWith(g),e.get(b))}};var n=r(9),s=r(70),i=r(134);function o(e){return!(!e.decorators||!e.decorators.length)}function a(e,t){return t?n.types.objectProperty(n.types.identifier(e),t):null}function l(e){let t;return e.decorators&&e.decorators.length>0&&(t=n.types.arrayExpression(e.decorators.map((e=>e.expression)))),e.decorators=void 0,t}function c(e){return e.computed?e.key:n.types.isIdentifier(e.key)?n.types.stringLiteral(e.key.name):n.types.stringLiteral(String(e.key.value))}function u(e,t,r){const{node:o,scope:u}=r,p=r.isClassMethod();if(r.isPrivate())throw r.buildCodeFrameError(`Private ${p?\"methods\":\"fields\"} in decorated classes are not supported yet.`);new s.default({methodPath:r,objectRef:e,superRef:t,file:this,refToPreserve:e}).replace();const f=[a(\"kind\",n.types.stringLiteral(p?o.kind:\"field\")),a(\"decorators\",l(o)),a(\"static\",o.static&&n.types.booleanLiteral(!0)),a(\"key\",c(o))].filter(Boolean);if(p){const e=o.computed?null:o.key;n.types.toExpression(o),f.push(a(\"value\",(0,i.default)({node:o,id:e,scope:u})||o))}else o.value?f.push((\"value\",d=n.template.statements.ast`return ${o.value}`,n.types.objectMethod(\"method\",n.types.identifier(\"value\"),[],n.types.blockStatement(d)))):f.push(a(\"value\",u.buildUndefinedNode()));var d;return r.remove(),n.types.objectExpression(f)}},e=>{function t(e){var t=new Error(\"Cannot find module '\"+e+\"'\");throw t.code=\"MODULE_NOT_FOUND\",t}t.keys=()=>[],t.resolve=t,t.id=312,e.exports=t},e=>{e.exports=function(e){\"use strict\";var t=[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"];function r(e,t){var r=e[0],n=e[1],s=e[2],i=e[3];n=((n+=((s=((s+=((i=((i+=((r=((r+=(n&s|~n&i)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&s)+t[1]-389564586|0)<<12|i>>>20)+r|0)&r|~i&n)+t[2]+606105819|0)<<17|s>>>15)+i|0)&i|~s&r)+t[3]-1044525330|0)<<22|n>>>10)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n&s|~n&i)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&s)+t[5]+1200080426|0)<<12|i>>>20)+r|0)&r|~i&n)+t[6]-1473231341|0)<<17|s>>>15)+i|0)&i|~s&r)+t[7]-45705983|0)<<22|n>>>10)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n&s|~n&i)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&s)+t[9]-1958414417|0)<<12|i>>>20)+r|0)&r|~i&n)+t[10]-42063|0)<<17|s>>>15)+i|0)&i|~s&r)+t[11]-1990404162|0)<<22|n>>>10)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n&s|~n&i)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&s)+t[13]-40341101|0)<<12|i>>>20)+r|0)&r|~i&n)+t[14]-1502002290|0)<<17|s>>>15)+i|0)&i|~s&r)+t[15]+1236535329|0)<<22|n>>>10)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n&i|s&~i)+t[1]-165796510|0)<<5|r>>>27)+n|0)&s|n&~s)+t[6]-1069501632|0)<<9|i>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|s>>>18)+i|0)&r|i&~r)+t[0]-373897302|0)<<20|n>>>12)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n&i|s&~i)+t[5]-701558691|0)<<5|r>>>27)+n|0)&s|n&~s)+t[10]+38016083|0)<<9|i>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|s>>>18)+i|0)&r|i&~r)+t[4]-405537848|0)<<20|n>>>12)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n&i|s&~i)+t[9]+568446438|0)<<5|r>>>27)+n|0)&s|n&~s)+t[14]-1019803690|0)<<9|i>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|s>>>18)+i|0)&r|i&~r)+t[8]+1163531501|0)<<20|n>>>12)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n&i|s&~i)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&s|n&~s)+t[2]-51403784|0)<<9|i>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|s>>>18)+i|0)&r|i&~r)+t[12]-1926607734|0)<<20|n>>>12)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n^s^i)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^s)+t[8]-2022574463|0)<<11|i>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|s>>>16)+i|0)^i^r)+t[14]-35309556|0)<<23|n>>>9)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n^s^i)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^s)+t[4]+1272893353|0)<<11|i>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|s>>>16)+i|0)^i^r)+t[10]-1094730640|0)<<23|n>>>9)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n^s^i)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^s)+t[0]-358537222|0)<<11|i>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|s>>>16)+i|0)^i^r)+t[6]+76029189|0)<<23|n>>>9)+s|0,n=((n+=((s=((s+=((i=((i+=((r=((r+=(n^s^i)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^s)+t[12]-421815835|0)<<11|i>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|s>>>16)+i|0)^i^r)+t[2]-995338651|0)<<23|n>>>9)+s|0,n=((n+=((i=((i+=(n^((r=((r+=(s^(n|~i))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~s))+t[7]+1126891415|0)<<10|i>>>22)+r|0)^((s=((s+=(r^(i|~n))+t[14]-1416354905|0)<<15|s>>>17)+i|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+s|0,n=((n+=((i=((i+=(n^((r=((r+=(s^(n|~i))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~s))+t[3]-1894986606|0)<<10|i>>>22)+r|0)^((s=((s+=(r^(i|~n))+t[10]-1051523|0)<<15|s>>>17)+i|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+s|0,n=((n+=((i=((i+=(n^((r=((r+=(s^(n|~i))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~s))+t[15]-30611744|0)<<10|i>>>22)+r|0)^((s=((s+=(r^(i|~n))+t[6]-1560198380|0)<<15|s>>>17)+i|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+s|0,n=((n+=((i=((i+=(n^((r=((r+=(s^(n|~i))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~s))+t[11]-1120210379|0)<<10|i>>>22)+r|0)^((s=((s+=(r^(i|~n))+t[2]+718787259|0)<<15|s>>>17)+i|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+s|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=s+e[2]|0,e[3]=i+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function s(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function i(e){var t,s,i,o,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(u,n(e.substring(t-64,t)));for(s=(e=e.substring(t-64)).length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<s;t+=1)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(r(u,i),t=0;t<16;t+=1)i[t]=0;return o=(o=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(o[2],16),l=parseInt(o[1],16)||0,i[14]=a,i[15]=l,r(u,i),u}function o(e){var r,n=\"\";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=o(e[t]);return e.join(\"\")}function l(e){return/[\\u0080-\\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function u(){this.reset()}return a(i(\"hello\")),\"undefined\"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,r){var n,s,i,o,a=this.byteLength,l=e(t,a),c=a;return undefined!==r&&(c=e(r,a)),l>c?new ArrayBuffer(0):(n=c-l,s=new ArrayBuffer(n),i=new Uint8Array(s),o=new Uint8Array(this,l,n),i.set(o),s)}}(),u.prototype.append=function(e){return this.appendBinary(l(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,s=this._buff.length;for(t=64;t<=s;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},u.prototype.end=function(e){var t,r,n=this._buff,s=n.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<s;t+=1)i[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(i,s),r=a(this._hash),e&&(r=c(r)),this.reset(),r},u.prototype.reset=function(){return this._buff=\"\",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,t){var n,s,i,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(r(this._hash,e),o=0;o<16;o+=1)e[o]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(n[2],16),i=parseInt(n[1],16)||0,e[14]=s,e[15]=i,r(this._hash,e)},u.hash=function(e,t){return u.hashBinary(l(e),t)},u.hashBinary=function(e,t){var r=a(i(e));return t?c(r):r},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var t,n,i,o,a,l=(n=this._buff.buffer,i=e,o=!0,(a=new Uint8Array(n.byteLength+i.byteLength)).set(new Uint8Array(n)),a.set(new Uint8Array(i),n.byteLength),o?a:a.buffer),c=l.length;for(this._length+=e.byteLength,t=64;t<=c;t+=64)r(this._hash,s(l.subarray(t-64,t)));return this._buff=t-64<c?new Uint8Array(l.buffer.slice(t-64)):new Uint8Array(0),this},u.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,s=n.length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<s;t+=1)i[t>>2]|=n[t]<<(t%4<<3);return this._finish(i,s),r=a(this._hash),e&&(r=c(r)),this.reset(),r},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e,t=u.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,s=new ArrayBuffer(n),i=new Uint8Array(s);for(r=0;r<n;r+=1)i[r]=e.charCodeAt(r);return t?i:s}(e.buff,!0),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var n=a(function(e){var t,n,i,o,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(u,s(e.subarray(t-64,t)));for(n=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)i[t>>2]|=e[t]<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(r(u,i),t=0;t<16;t+=1)i[t]=0;return o=(o=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(o[2],16),l=parseInt(o[1],16)||0,i[14]=a,i[15]=l,r(u,i),u}(new Uint8Array(e)));return t?c(n):n},u}()},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(315),s=r(83);const i=Symbol(\"\"),o=Symbol(\"\"),a=Symbol(\"\"),l=Symbol(\"\"),c=Symbol(\"\"),u=Symbol(\"\"),p=Symbol(\"\"),f=Symbol(\"\"),d=Symbol(\"\"),h=Symbol(\"\");n.registerRuntimeHelpers({[i]:\"vModelRadio\",[o]:\"vModelCheckbox\",[a]:\"vModelText\",[l]:\"vModelSelect\",[c]:\"vModelDynamic\",[u]:\"withModifiers\",[p]:\"withKeys\",[f]:\"vShow\",[d]:\"Transition\",[h]:\"TransitionGroup\"});var m={GT:\">\",gt:\">\",LT:\"<\",lt:\"<\",\"ac;\":\"∾\",\"af;\":\"⁡\",AMP:\"&\",amp:\"&\",\"ap;\":\"≈\",\"DD;\":\"ⅅ\",\"dd;\":\"ⅆ\",deg:\"°\",\"ee;\":\"ⅇ\",\"eg;\":\"⪚\",\"el;\":\"⪙\",ETH:\"Ð\",eth:\"ð\",\"gE;\":\"≧\",\"ge;\":\"≥\",\"Gg;\":\"⋙\",\"gg;\":\"≫\",\"gl;\":\"≷\",\"GT;\":\">\",\"Gt;\":\"≫\",\"gt;\":\">\",\"ic;\":\"⁣\",\"ii;\":\"ⅈ\",\"Im;\":\"ℑ\",\"in;\":\"∈\",\"it;\":\"⁢\",\"lE;\":\"≦\",\"le;\":\"≤\",\"lg;\":\"≶\",\"Ll;\":\"⋘\",\"ll;\":\"≪\",\"LT;\":\"<\",\"Lt;\":\"≪\",\"lt;\":\"<\",\"mp;\":\"∓\",\"Mu;\":\"Μ\",\"mu;\":\"μ\",\"ne;\":\"≠\",\"ni;\":\"∋\",not:\"¬\",\"Nu;\":\"Ν\",\"nu;\":\"ν\",\"Or;\":\"⩔\",\"or;\":\"∨\",\"oS;\":\"Ⓢ\",\"Pi;\":\"Π\",\"pi;\":\"π\",\"pm;\":\"±\",\"Pr;\":\"⪻\",\"pr;\":\"≺\",\"Re;\":\"ℜ\",REG:\"®\",reg:\"®\",\"rx;\":\"℞\",\"Sc;\":\"⪼\",\"sc;\":\"≻\",shy:\"­\",uml:\"¨\",\"wp;\":\"℘\",\"wr;\":\"≀\",\"Xi;\":\"Ξ\",\"xi;\":\"ξ\",yen:\"¥\",\"acd;\":\"∿\",\"acE;\":\"∾̳\",\"Acy;\":\"А\",\"acy;\":\"а\",\"Afr;\":\"𝔄\",\"afr;\":\"𝔞\",\"AMP;\":\"&\",\"amp;\":\"&\",\"And;\":\"⩓\",\"and;\":\"∧\",\"ang;\":\"∠\",\"apE;\":\"⩰\",\"ape;\":\"≊\",\"ast;\":\"*\",Auml:\"Ä\",auml:\"ä\",\"Bcy;\":\"Б\",\"bcy;\":\"б\",\"Bfr;\":\"𝔅\",\"bfr;\":\"𝔟\",\"bne;\":\"=⃥\",\"bot;\":\"⊥\",\"Cap;\":\"⋒\",\"cap;\":\"∩\",cent:\"¢\",\"Cfr;\":\"ℭ\",\"cfr;\":\"𝔠\",\"Chi;\":\"Χ\",\"chi;\":\"χ\",\"cir;\":\"○\",COPY:\"©\",copy:\"©\",\"Cup;\":\"⋓\",\"cup;\":\"∪\",\"Dcy;\":\"Д\",\"dcy;\":\"д\",\"deg;\":\"°\",\"Del;\":\"∇\",\"Dfr;\":\"𝔇\",\"dfr;\":\"𝔡\",\"die;\":\"¨\",\"div;\":\"÷\",\"Dot;\":\"¨\",\"dot;\":\"˙\",\"Ecy;\":\"Э\",\"ecy;\":\"э\",\"Efr;\":\"𝔈\",\"efr;\":\"𝔢\",\"egs;\":\"⪖\",\"ell;\":\"ℓ\",\"els;\":\"⪕\",\"ENG;\":\"Ŋ\",\"eng;\":\"ŋ\",\"Eta;\":\"Η\",\"eta;\":\"η\",\"ETH;\":\"Ð\",\"eth;\":\"ð\",Euml:\"Ë\",euml:\"ë\",\"Fcy;\":\"Ф\",\"fcy;\":\"ф\",\"Ffr;\":\"𝔉\",\"ffr;\":\"𝔣\",\"gap;\":\"⪆\",\"Gcy;\":\"Г\",\"gcy;\":\"г\",\"gEl;\":\"⪌\",\"gel;\":\"⋛\",\"geq;\":\"≥\",\"ges;\":\"⩾\",\"Gfr;\":\"𝔊\",\"gfr;\":\"𝔤\",\"ggg;\":\"⋙\",\"gla;\":\"⪥\",\"glE;\":\"⪒\",\"glj;\":\"⪤\",\"gnE;\":\"≩\",\"gne;\":\"⪈\",\"Hat;\":\"^\",\"Hfr;\":\"ℌ\",\"hfr;\":\"𝔥\",\"Icy;\":\"И\",\"icy;\":\"и\",\"iff;\":\"⇔\",\"Ifr;\":\"ℑ\",\"ifr;\":\"𝔦\",\"Int;\":\"∬\",\"int;\":\"∫\",Iuml:\"Ï\",iuml:\"ï\",\"Jcy;\":\"Й\",\"jcy;\":\"й\",\"Jfr;\":\"𝔍\",\"jfr;\":\"𝔧\",\"Kcy;\":\"К\",\"kcy;\":\"к\",\"Kfr;\":\"𝔎\",\"kfr;\":\"𝔨\",\"lap;\":\"⪅\",\"lat;\":\"⪫\",\"Lcy;\":\"Л\",\"lcy;\":\"л\",\"lEg;\":\"⪋\",\"leg;\":\"⋚\",\"leq;\":\"≤\",\"les;\":\"⩽\",\"Lfr;\":\"𝔏\",\"lfr;\":\"𝔩\",\"lgE;\":\"⪑\",\"lnE;\":\"≨\",\"lne;\":\"⪇\",\"loz;\":\"◊\",\"lrm;\":\"‎\",\"Lsh;\":\"↰\",\"lsh;\":\"↰\",macr:\"¯\",\"Map;\":\"⤅\",\"map;\":\"↦\",\"Mcy;\":\"М\",\"mcy;\":\"м\",\"Mfr;\":\"𝔐\",\"mfr;\":\"𝔪\",\"mho;\":\"℧\",\"mid;\":\"∣\",\"nap;\":\"≉\",nbsp:\" \",\"Ncy;\":\"Н\",\"ncy;\":\"н\",\"Nfr;\":\"𝔑\",\"nfr;\":\"𝔫\",\"ngE;\":\"≧̸\",\"nge;\":\"≱\",\"nGg;\":\"⋙̸\",\"nGt;\":\"≫⃒\",\"ngt;\":\"≯\",\"nis;\":\"⋼\",\"niv;\":\"∋\",\"nlE;\":\"≦̸\",\"nle;\":\"≰\",\"nLl;\":\"⋘̸\",\"nLt;\":\"≪⃒\",\"nlt;\":\"≮\",\"Not;\":\"⫬\",\"not;\":\"¬\",\"npr;\":\"⊀\",\"nsc;\":\"⊁\",\"num;\":\"#\",\"Ocy;\":\"О\",\"ocy;\":\"о\",\"Ofr;\":\"𝔒\",\"ofr;\":\"𝔬\",\"ogt;\":\"⧁\",\"ohm;\":\"Ω\",\"olt;\":\"⧀\",\"ord;\":\"⩝\",ordf:\"ª\",ordm:\"º\",\"orv;\":\"⩛\",Ouml:\"Ö\",ouml:\"ö\",\"par;\":\"∥\",para:\"¶\",\"Pcy;\":\"П\",\"pcy;\":\"п\",\"Pfr;\":\"𝔓\",\"pfr;\":\"𝔭\",\"Phi;\":\"Φ\",\"phi;\":\"φ\",\"piv;\":\"ϖ\",\"prE;\":\"⪳\",\"pre;\":\"⪯\",\"Psi;\":\"Ψ\",\"psi;\":\"ψ\",\"Qfr;\":\"𝔔\",\"qfr;\":\"𝔮\",QUOT:'\"',quot:'\"',\"Rcy;\":\"Р\",\"rcy;\":\"р\",\"REG;\":\"®\",\"reg;\":\"®\",\"Rfr;\":\"ℜ\",\"rfr;\":\"𝔯\",\"Rho;\":\"Ρ\",\"rho;\":\"ρ\",\"rlm;\":\"‏\",\"Rsh;\":\"↱\",\"rsh;\":\"↱\",\"scE;\":\"⪴\",\"sce;\":\"⪰\",\"Scy;\":\"С\",\"scy;\":\"с\",sect:\"§\",\"Sfr;\":\"𝔖\",\"sfr;\":\"𝔰\",\"shy;\":\"­\",\"sim;\":\"∼\",\"smt;\":\"⪪\",\"sol;\":\"/\",\"squ;\":\"□\",\"Sub;\":\"⋐\",\"sub;\":\"⊂\",\"Sum;\":\"∑\",\"sum;\":\"∑\",\"Sup;\":\"⋑\",\"sup;\":\"⊃\",sup1:\"¹\",sup2:\"²\",sup3:\"³\",\"Tab;\":\"\\t\",\"Tau;\":\"Τ\",\"tau;\":\"τ\",\"Tcy;\":\"Т\",\"tcy;\":\"т\",\"Tfr;\":\"𝔗\",\"tfr;\":\"𝔱\",\"top;\":\"⊤\",\"Ucy;\":\"У\",\"ucy;\":\"у\",\"Ufr;\":\"𝔘\",\"ufr;\":\"𝔲\",\"uml;\":\"¨\",Uuml:\"Ü\",uuml:\"ü\",\"Vcy;\":\"В\",\"vcy;\":\"в\",\"Vee;\":\"⋁\",\"vee;\":\"∨\",\"Vfr;\":\"𝔙\",\"vfr;\":\"𝔳\",\"Wfr;\":\"𝔚\",\"wfr;\":\"𝔴\",\"Xfr;\":\"𝔛\",\"xfr;\":\"𝔵\",\"Ycy;\":\"Ы\",\"ycy;\":\"ы\",\"yen;\":\"¥\",\"Yfr;\":\"𝔜\",\"yfr;\":\"𝔶\",yuml:\"ÿ\",\"Zcy;\":\"З\",\"zcy;\":\"з\",\"Zfr;\":\"ℨ\",\"zfr;\":\"𝔷\",\"zwj;\":\"‍\",Acirc:\"Â\",acirc:\"â\",acute:\"´\",AElig:\"Æ\",aelig:\"æ\",\"andd;\":\"⩜\",\"andv;\":\"⩚\",\"ange;\":\"⦤\",\"Aopf;\":\"𝔸\",\"aopf;\":\"𝕒\",\"apid;\":\"≋\",\"apos;\":\"'\",Aring:\"Å\",aring:\"å\",\"Ascr;\":\"𝒜\",\"ascr;\":\"𝒶\",\"Auml;\":\"Ä\",\"auml;\":\"ä\",\"Barv;\":\"⫧\",\"bbrk;\":\"⎵\",\"Beta;\":\"Β\",\"beta;\":\"β\",\"beth;\":\"ℶ\",\"bNot;\":\"⫭\",\"bnot;\":\"⌐\",\"Bopf;\":\"𝔹\",\"bopf;\":\"𝕓\",\"boxH;\":\"═\",\"boxh;\":\"─\",\"boxV;\":\"║\",\"boxv;\":\"│\",\"Bscr;\":\"ℬ\",\"bscr;\":\"𝒷\",\"bsim;\":\"∽\",\"bsol;\":\"\\\\\",\"bull;\":\"•\",\"bump;\":\"≎\",\"caps;\":\"∩︀\",\"Cdot;\":\"Ċ\",\"cdot;\":\"ċ\",cedil:\"¸\",\"cent;\":\"¢\",\"CHcy;\":\"Ч\",\"chcy;\":\"ч\",\"circ;\":\"ˆ\",\"cirE;\":\"⧃\",\"cire;\":\"≗\",\"comp;\":\"∁\",\"cong;\":\"≅\",\"Copf;\":\"ℂ\",\"copf;\":\"𝕔\",\"COPY;\":\"©\",\"copy;\":\"©\",\"Cscr;\":\"𝒞\",\"cscr;\":\"𝒸\",\"csub;\":\"⫏\",\"csup;\":\"⫐\",\"cups;\":\"∪︀\",\"Darr;\":\"↡\",\"dArr;\":\"⇓\",\"darr;\":\"↓\",\"dash;\":\"‐\",\"dHar;\":\"⥥\",\"diam;\":\"⋄\",\"DJcy;\":\"Ђ\",\"djcy;\":\"ђ\",\"Dopf;\":\"𝔻\",\"dopf;\":\"𝕕\",\"Dscr;\":\"𝒟\",\"dscr;\":\"𝒹\",\"DScy;\":\"Ѕ\",\"dscy;\":\"ѕ\",\"dsol;\":\"⧶\",\"dtri;\":\"▿\",\"DZcy;\":\"Џ\",\"dzcy;\":\"џ\",\"ecir;\":\"≖\",Ecirc:\"Ê\",ecirc:\"ê\",\"Edot;\":\"Ė\",\"eDot;\":\"≑\",\"edot;\":\"ė\",\"emsp;\":\" \",\"ensp;\":\" \",\"Eopf;\":\"𝔼\",\"eopf;\":\"𝕖\",\"epar;\":\"⋕\",\"epsi;\":\"ε\",\"Escr;\":\"ℰ\",\"escr;\":\"ℯ\",\"Esim;\":\"⩳\",\"esim;\":\"≂\",\"Euml;\":\"Ë\",\"euml;\":\"ë\",\"euro;\":\"€\",\"excl;\":\"!\",\"flat;\":\"♭\",\"fnof;\":\"ƒ\",\"Fopf;\":\"𝔽\",\"fopf;\":\"𝕗\",\"fork;\":\"⋔\",\"Fscr;\":\"ℱ\",\"fscr;\":\"𝒻\",\"Gdot;\":\"Ġ\",\"gdot;\":\"ġ\",\"geqq;\":\"≧\",\"gesl;\":\"⋛︀\",\"GJcy;\":\"Ѓ\",\"gjcy;\":\"ѓ\",\"gnap;\":\"⪊\",\"gneq;\":\"⪈\",\"Gopf;\":\"𝔾\",\"gopf;\":\"𝕘\",\"Gscr;\":\"𝒢\",\"gscr;\":\"ℊ\",\"gsim;\":\"≳\",\"gtcc;\":\"⪧\",\"gvnE;\":\"≩︀\",\"half;\":\"½\",\"hArr;\":\"⇔\",\"harr;\":\"↔\",\"hbar;\":\"ℏ\",\"Hopf;\":\"ℍ\",\"hopf;\":\"𝕙\",\"Hscr;\":\"ℋ\",\"hscr;\":\"𝒽\",Icirc:\"Î\",icirc:\"î\",\"Idot;\":\"İ\",\"IEcy;\":\"Е\",\"iecy;\":\"е\",iexcl:\"¡\",\"imof;\":\"⊷\",\"IOcy;\":\"Ё\",\"iocy;\":\"ё\",\"Iopf;\":\"𝕀\",\"iopf;\":\"𝕚\",\"Iota;\":\"Ι\",\"iota;\":\"ι\",\"Iscr;\":\"ℐ\",\"iscr;\":\"𝒾\",\"isin;\":\"∈\",\"Iuml;\":\"Ï\",\"iuml;\":\"ï\",\"Jopf;\":\"𝕁\",\"jopf;\":\"𝕛\",\"Jscr;\":\"𝒥\",\"jscr;\":\"𝒿\",\"KHcy;\":\"Х\",\"khcy;\":\"х\",\"KJcy;\":\"Ќ\",\"kjcy;\":\"ќ\",\"Kopf;\":\"𝕂\",\"kopf;\":\"𝕜\",\"Kscr;\":\"𝒦\",\"kscr;\":\"𝓀\",\"Lang;\":\"⟪\",\"lang;\":\"⟨\",laquo:\"«\",\"Larr;\":\"↞\",\"lArr;\":\"⇐\",\"larr;\":\"←\",\"late;\":\"⪭\",\"lcub;\":\"{\",\"ldca;\":\"⤶\",\"ldsh;\":\"↲\",\"leqq;\":\"≦\",\"lesg;\":\"⋚︀\",\"lHar;\":\"⥢\",\"LJcy;\":\"Љ\",\"ljcy;\":\"љ\",\"lnap;\":\"⪉\",\"lneq;\":\"⪇\",\"Lopf;\":\"𝕃\",\"lopf;\":\"𝕝\",\"lozf;\":\"⧫\",\"lpar;\":\"(\",\"Lscr;\":\"ℒ\",\"lscr;\":\"𝓁\",\"lsim;\":\"≲\",\"lsqb;\":\"[\",\"ltcc;\":\"⪦\",\"ltri;\":\"◃\",\"lvnE;\":\"≨︀\",\"macr;\":\"¯\",\"male;\":\"♂\",\"malt;\":\"✠\",micro:\"µ\",\"mlcp;\":\"⫛\",\"mldr;\":\"…\",\"Mopf;\":\"𝕄\",\"mopf;\":\"𝕞\",\"Mscr;\":\"ℳ\",\"mscr;\":\"𝓂\",\"nang;\":\"∠⃒\",\"napE;\":\"⩰̸\",\"nbsp;\":\" \",\"ncap;\":\"⩃\",\"ncup;\":\"⩂\",\"ngeq;\":\"≱\",\"nges;\":\"⩾̸\",\"ngtr;\":\"≯\",\"nGtv;\":\"≫̸\",\"nisd;\":\"⋺\",\"NJcy;\":\"Њ\",\"njcy;\":\"њ\",\"nldr;\":\"‥\",\"nleq;\":\"≰\",\"nles;\":\"⩽̸\",\"nLtv;\":\"≪̸\",\"nmid;\":\"∤\",\"Nopf;\":\"ℕ\",\"nopf;\":\"𝕟\",\"npar;\":\"∦\",\"npre;\":\"⪯̸\",\"nsce;\":\"⪰̸\",\"Nscr;\":\"𝒩\",\"nscr;\":\"𝓃\",\"nsim;\":\"≁\",\"nsub;\":\"⊄\",\"nsup;\":\"⊅\",\"ntgl;\":\"≹\",\"ntlg;\":\"≸\",\"nvap;\":\"≍⃒\",\"nvge;\":\"≥⃒\",\"nvgt;\":\">⃒\",\"nvle;\":\"≤⃒\",\"nvlt;\":\"<⃒\",\"oast;\":\"⊛\",\"ocir;\":\"⊚\",Ocirc:\"Ô\",ocirc:\"ô\",\"odiv;\":\"⨸\",\"odot;\":\"⊙\",\"ogon;\":\"˛\",\"oint;\":\"∮\",\"omid;\":\"⦶\",\"Oopf;\":\"𝕆\",\"oopf;\":\"𝕠\",\"opar;\":\"⦷\",\"ordf;\":\"ª\",\"ordm;\":\"º\",\"oror;\":\"⩖\",\"Oscr;\":\"𝒪\",\"oscr;\":\"ℴ\",\"osol;\":\"⊘\",\"Ouml;\":\"Ö\",\"ouml;\":\"ö\",\"para;\":\"¶\",\"part;\":\"∂\",\"perp;\":\"⊥\",\"phiv;\":\"ϕ\",\"plus;\":\"+\",\"Popf;\":\"ℙ\",\"popf;\":\"𝕡\",pound:\"£\",\"prap;\":\"⪷\",\"prec;\":\"≺\",\"prnE;\":\"⪵\",\"prod;\":\"∏\",\"prop;\":\"∝\",\"Pscr;\":\"𝒫\",\"pscr;\":\"𝓅\",\"qint;\":\"⨌\",\"Qopf;\":\"ℚ\",\"qopf;\":\"𝕢\",\"Qscr;\":\"𝒬\",\"qscr;\":\"𝓆\",\"QUOT;\":'\"',\"quot;\":'\"',\"race;\":\"∽̱\",\"Rang;\":\"⟫\",\"rang;\":\"⟩\",raquo:\"»\",\"Rarr;\":\"↠\",\"rArr;\":\"⇒\",\"rarr;\":\"→\",\"rcub;\":\"}\",\"rdca;\":\"⤷\",\"rdsh;\":\"↳\",\"real;\":\"ℜ\",\"rect;\":\"▭\",\"rHar;\":\"⥤\",\"rhov;\":\"ϱ\",\"ring;\":\"˚\",\"Ropf;\":\"ℝ\",\"ropf;\":\"𝕣\",\"rpar;\":\")\",\"Rscr;\":\"ℛ\",\"rscr;\":\"𝓇\",\"rsqb;\":\"]\",\"rtri;\":\"▹\",\"scap;\":\"⪸\",\"scnE;\":\"⪶\",\"sdot;\":\"⋅\",\"sect;\":\"§\",\"semi;\":\";\",\"sext;\":\"✶\",\"SHcy;\":\"Ш\",\"shcy;\":\"ш\",\"sime;\":\"≃\",\"simg;\":\"⪞\",\"siml;\":\"⪝\",\"smid;\":\"∣\",\"smte;\":\"⪬\",\"solb;\":\"⧄\",\"Sopf;\":\"𝕊\",\"sopf;\":\"𝕤\",\"spar;\":\"∥\",\"Sqrt;\":\"√\",\"squf;\":\"▪\",\"Sscr;\":\"𝒮\",\"sscr;\":\"𝓈\",\"Star;\":\"⋆\",\"star;\":\"☆\",\"subE;\":\"⫅\",\"sube;\":\"⊆\",\"succ;\":\"≻\",\"sung;\":\"♪\",\"sup1;\":\"¹\",\"sup2;\":\"²\",\"sup3;\":\"³\",\"supE;\":\"⫆\",\"supe;\":\"⊇\",szlig:\"ß\",\"tbrk;\":\"⎴\",\"tdot;\":\"⃛\",THORN:\"Þ\",thorn:\"þ\",times:\"×\",\"tint;\":\"∭\",\"toea;\":\"⤨\",\"Topf;\":\"𝕋\",\"topf;\":\"𝕥\",\"tosa;\":\"⤩\",\"trie;\":\"≜\",\"Tscr;\":\"𝒯\",\"tscr;\":\"𝓉\",\"TScy;\":\"Ц\",\"tscy;\":\"ц\",\"Uarr;\":\"↟\",\"uArr;\":\"⇑\",\"uarr;\":\"↑\",Ucirc:\"Û\",ucirc:\"û\",\"uHar;\":\"⥣\",\"Uopf;\":\"𝕌\",\"uopf;\":\"𝕦\",\"Upsi;\":\"ϒ\",\"upsi;\":\"υ\",\"Uscr;\":\"𝒰\",\"uscr;\":\"𝓊\",\"utri;\":\"▵\",\"Uuml;\":\"Ü\",\"uuml;\":\"ü\",\"vArr;\":\"⇕\",\"varr;\":\"↕\",\"Vbar;\":\"⫫\",\"vBar;\":\"⫨\",\"Vert;\":\"‖\",\"vert;\":\"|\",\"Vopf;\":\"𝕍\",\"vopf;\":\"𝕧\",\"Vscr;\":\"𝒱\",\"vscr;\":\"𝓋\",\"Wopf;\":\"𝕎\",\"wopf;\":\"𝕨\",\"Wscr;\":\"𝒲\",\"wscr;\":\"𝓌\",\"xcap;\":\"⋂\",\"xcup;\":\"⋃\",\"xmap;\":\"⟼\",\"xnis;\":\"⋻\",\"Xopf;\":\"𝕏\",\"xopf;\":\"𝕩\",\"Xscr;\":\"𝒳\",\"xscr;\":\"𝓍\",\"xvee;\":\"⋁\",\"YAcy;\":\"Я\",\"yacy;\":\"я\",\"YIcy;\":\"Ї\",\"yicy;\":\"ї\",\"Yopf;\":\"𝕐\",\"yopf;\":\"𝕪\",\"Yscr;\":\"𝒴\",\"yscr;\":\"𝓎\",\"YUcy;\":\"Ю\",\"yucy;\":\"ю\",\"Yuml;\":\"Ÿ\",\"yuml;\":\"ÿ\",\"Zdot;\":\"Ż\",\"zdot;\":\"ż\",\"Zeta;\":\"Ζ\",\"zeta;\":\"ζ\",\"ZHcy;\":\"Ж\",\"zhcy;\":\"ж\",\"Zopf;\":\"ℤ\",\"zopf;\":\"𝕫\",\"Zscr;\":\"𝒵\",\"zscr;\":\"𝓏\",\"zwnj;\":\"‌\",Aacute:\"Á\",aacute:\"á\",\"Acirc;\":\"Â\",\"acirc;\":\"â\",\"acute;\":\"´\",\"AElig;\":\"Æ\",\"aelig;\":\"æ\",Agrave:\"À\",agrave:\"à\",\"aleph;\":\"ℵ\",\"Alpha;\":\"Α\",\"alpha;\":\"α\",\"Amacr;\":\"Ā\",\"amacr;\":\"ā\",\"amalg;\":\"⨿\",\"angle;\":\"∠\",\"angrt;\":\"∟\",\"angst;\":\"Å\",\"Aogon;\":\"Ą\",\"aogon;\":\"ą\",\"Aring;\":\"Å\",\"aring;\":\"å\",\"asymp;\":\"≈\",Atilde:\"Ã\",atilde:\"ã\",\"awint;\":\"⨑\",\"bcong;\":\"≌\",\"bdquo;\":\"„\",\"bepsi;\":\"϶\",\"blank;\":\"␣\",\"blk12;\":\"▒\",\"blk14;\":\"░\",\"blk34;\":\"▓\",\"block;\":\"█\",\"boxDL;\":\"╗\",\"boxDl;\":\"╖\",\"boxdL;\":\"╕\",\"boxdl;\":\"┐\",\"boxDR;\":\"╔\",\"boxDr;\":\"╓\",\"boxdR;\":\"╒\",\"boxdr;\":\"┌\",\"boxHD;\":\"╦\",\"boxHd;\":\"╤\",\"boxhD;\":\"╥\",\"boxhd;\":\"┬\",\"boxHU;\":\"╩\",\"boxHu;\":\"╧\",\"boxhU;\":\"╨\",\"boxhu;\":\"┴\",\"boxUL;\":\"╝\",\"boxUl;\":\"╜\",\"boxuL;\":\"╛\",\"boxul;\":\"┘\",\"boxUR;\":\"╚\",\"boxUr;\":\"╙\",\"boxuR;\":\"╘\",\"boxur;\":\"└\",\"boxVH;\":\"╬\",\"boxVh;\":\"╫\",\"boxvH;\":\"╪\",\"boxvh;\":\"┼\",\"boxVL;\":\"╣\",\"boxVl;\":\"╢\",\"boxvL;\":\"╡\",\"boxvl;\":\"┤\",\"boxVR;\":\"╠\",\"boxVr;\":\"╟\",\"boxvR;\":\"╞\",\"boxvr;\":\"├\",\"Breve;\":\"˘\",\"breve;\":\"˘\",brvbar:\"¦\",\"bsemi;\":\"⁏\",\"bsime;\":\"⋍\",\"bsolb;\":\"⧅\",\"bumpE;\":\"⪮\",\"bumpe;\":\"≏\",\"caret;\":\"⁁\",\"caron;\":\"ˇ\",\"ccaps;\":\"⩍\",Ccedil:\"Ç\",ccedil:\"ç\",\"Ccirc;\":\"Ĉ\",\"ccirc;\":\"ĉ\",\"ccups;\":\"⩌\",\"cedil;\":\"¸\",\"check;\":\"✓\",\"clubs;\":\"♣\",\"Colon;\":\"∷\",\"colon;\":\":\",\"comma;\":\",\",\"crarr;\":\"↵\",\"Cross;\":\"⨯\",\"cross;\":\"✗\",\"csube;\":\"⫑\",\"csupe;\":\"⫒\",\"ctdot;\":\"⋯\",\"cuepr;\":\"⋞\",\"cuesc;\":\"⋟\",\"cupor;\":\"⩅\",curren:\"¤\",\"cuvee;\":\"⋎\",\"cuwed;\":\"⋏\",\"cwint;\":\"∱\",\"Dashv;\":\"⫤\",\"dashv;\":\"⊣\",\"dblac;\":\"˝\",\"ddarr;\":\"⇊\",\"Delta;\":\"Δ\",\"delta;\":\"δ\",\"dharl;\":\"⇃\",\"dharr;\":\"⇂\",\"diams;\":\"♦\",\"disin;\":\"⋲\",divide:\"÷\",\"doteq;\":\"≐\",\"dtdot;\":\"⋱\",\"dtrif;\":\"▾\",\"duarr;\":\"⇵\",\"duhar;\":\"⥯\",Eacute:\"É\",eacute:\"é\",\"Ecirc;\":\"Ê\",\"ecirc;\":\"ê\",\"eDDot;\":\"⩷\",\"efDot;\":\"≒\",Egrave:\"È\",egrave:\"è\",\"Emacr;\":\"Ē\",\"emacr;\":\"ē\",\"empty;\":\"∅\",\"Eogon;\":\"Ę\",\"eogon;\":\"ę\",\"eplus;\":\"⩱\",\"epsiv;\":\"ϵ\",\"eqsim;\":\"≂\",\"Equal;\":\"⩵\",\"equiv;\":\"≡\",\"erarr;\":\"⥱\",\"erDot;\":\"≓\",\"esdot;\":\"≐\",\"exist;\":\"∃\",\"fflig;\":\"ﬀ\",\"filig;\":\"ﬁ\",\"fjlig;\":\"fj\",\"fllig;\":\"ﬂ\",\"fltns;\":\"▱\",\"forkv;\":\"⫙\",frac12:\"½\",frac14:\"¼\",frac34:\"¾\",\"frasl;\":\"⁄\",\"frown;\":\"⌢\",\"Gamma;\":\"Γ\",\"gamma;\":\"γ\",\"Gcirc;\":\"Ĝ\",\"gcirc;\":\"ĝ\",\"gescc;\":\"⪩\",\"gimel;\":\"ℷ\",\"gneqq;\":\"≩\",\"gnsim;\":\"⋧\",\"grave;\":\"`\",\"gsime;\":\"⪎\",\"gsiml;\":\"⪐\",\"gtcir;\":\"⩺\",\"gtdot;\":\"⋗\",\"Hacek;\":\"ˇ\",\"harrw;\":\"↭\",\"Hcirc;\":\"Ĥ\",\"hcirc;\":\"ĥ\",\"hoarr;\":\"⇿\",Iacute:\"Í\",iacute:\"í\",\"Icirc;\":\"Î\",\"icirc;\":\"î\",\"iexcl;\":\"¡\",Igrave:\"Ì\",igrave:\"ì\",\"iiint;\":\"∭\",\"iiota;\":\"℩\",\"IJlig;\":\"Ĳ\",\"ijlig;\":\"ĳ\",\"Imacr;\":\"Ī\",\"imacr;\":\"ī\",\"image;\":\"ℑ\",\"imath;\":\"ı\",\"imped;\":\"Ƶ\",\"infin;\":\"∞\",\"Iogon;\":\"Į\",\"iogon;\":\"į\",\"iprod;\":\"⨼\",iquest:\"¿\",\"isinE;\":\"⋹\",\"isins;\":\"⋴\",\"isinv;\":\"∈\",\"Iukcy;\":\"І\",\"iukcy;\":\"і\",\"Jcirc;\":\"Ĵ\",\"jcirc;\":\"ĵ\",\"jmath;\":\"ȷ\",\"Jukcy;\":\"Є\",\"jukcy;\":\"є\",\"Kappa;\":\"Κ\",\"kappa;\":\"κ\",\"lAarr;\":\"⇚\",\"langd;\":\"⦑\",\"laquo;\":\"«\",\"larrb;\":\"⇤\",\"lates;\":\"⪭︀\",\"lBarr;\":\"⤎\",\"lbarr;\":\"⤌\",\"lbbrk;\":\"❲\",\"lbrke;\":\"⦋\",\"lceil;\":\"⌈\",\"ldquo;\":\"“\",\"lescc;\":\"⪨\",\"lhard;\":\"↽\",\"lharu;\":\"↼\",\"lhblk;\":\"▄\",\"llarr;\":\"⇇\",\"lltri;\":\"◺\",\"lneqq;\":\"≨\",\"lnsim;\":\"⋦\",\"loang;\":\"⟬\",\"loarr;\":\"⇽\",\"lobrk;\":\"⟦\",\"lopar;\":\"⦅\",\"lrarr;\":\"⇆\",\"lrhar;\":\"⇋\",\"lrtri;\":\"⊿\",\"lsime;\":\"⪍\",\"lsimg;\":\"⪏\",\"lsquo;\":\"‘\",\"ltcir;\":\"⩹\",\"ltdot;\":\"⋖\",\"ltrie;\":\"⊴\",\"ltrif;\":\"◂\",\"mdash;\":\"—\",\"mDDot;\":\"∺\",\"micro;\":\"µ\",middot:\"·\",\"minus;\":\"−\",\"mumap;\":\"⊸\",\"nabla;\":\"∇\",\"napid;\":\"≋̸\",\"napos;\":\"ŉ\",\"natur;\":\"♮\",\"nbump;\":\"≎̸\",\"ncong;\":\"≇\",\"ndash;\":\"–\",\"neArr;\":\"⇗\",\"nearr;\":\"↗\",\"nedot;\":\"≐̸\",\"nesim;\":\"≂̸\",\"ngeqq;\":\"≧̸\",\"ngsim;\":\"≵\",\"nhArr;\":\"⇎\",\"nharr;\":\"↮\",\"nhpar;\":\"⫲\",\"nlArr;\":\"⇍\",\"nlarr;\":\"↚\",\"nleqq;\":\"≦̸\",\"nless;\":\"≮\",\"nlsim;\":\"≴\",\"nltri;\":\"⋪\",\"notin;\":\"∉\",\"notni;\":\"∌\",\"npart;\":\"∂̸\",\"nprec;\":\"⊀\",\"nrArr;\":\"⇏\",\"nrarr;\":\"↛\",\"nrtri;\":\"⋫\",\"nsime;\":\"≄\",\"nsmid;\":\"∤\",\"nspar;\":\"∦\",\"nsubE;\":\"⫅̸\",\"nsube;\":\"⊈\",\"nsucc;\":\"⊁\",\"nsupE;\":\"⫆̸\",\"nsupe;\":\"⊉\",Ntilde:\"Ñ\",ntilde:\"ñ\",\"numsp;\":\" \",\"nvsim;\":\"∼⃒\",\"nwArr;\":\"⇖\",\"nwarr;\":\"↖\",Oacute:\"Ó\",oacute:\"ó\",\"Ocirc;\":\"Ô\",\"ocirc;\":\"ô\",\"odash;\":\"⊝\",\"OElig;\":\"Œ\",\"oelig;\":\"œ\",\"ofcir;\":\"⦿\",Ograve:\"Ò\",ograve:\"ò\",\"ohbar;\":\"⦵\",\"olarr;\":\"↺\",\"olcir;\":\"⦾\",\"oline;\":\"‾\",\"Omacr;\":\"Ō\",\"omacr;\":\"ō\",\"Omega;\":\"Ω\",\"omega;\":\"ω\",\"operp;\":\"⦹\",\"oplus;\":\"⊕\",\"orarr;\":\"↻\",\"order;\":\"ℴ\",Oslash:\"Ø\",oslash:\"ø\",Otilde:\"Õ\",otilde:\"õ\",\"ovbar;\":\"⌽\",\"parsl;\":\"⫽\",\"phone;\":\"☎\",\"plusb;\":\"⊞\",\"pluse;\":\"⩲\",plusmn:\"±\",\"pound;\":\"£\",\"prcue;\":\"≼\",\"Prime;\":\"″\",\"prime;\":\"′\",\"prnap;\":\"⪹\",\"prsim;\":\"≾\",\"quest;\":\"?\",\"rAarr;\":\"⇛\",\"radic;\":\"√\",\"rangd;\":\"⦒\",\"range;\":\"⦥\",\"raquo;\":\"»\",\"rarrb;\":\"⇥\",\"rarrc;\":\"⤳\",\"rarrw;\":\"↝\",\"ratio;\":\"∶\",\"RBarr;\":\"⤐\",\"rBarr;\":\"⤏\",\"rbarr;\":\"⤍\",\"rbbrk;\":\"❳\",\"rbrke;\":\"⦌\",\"rceil;\":\"⌉\",\"rdquo;\":\"”\",\"reals;\":\"ℝ\",\"rhard;\":\"⇁\",\"rharu;\":\"⇀\",\"rlarr;\":\"⇄\",\"rlhar;\":\"⇌\",\"rnmid;\":\"⫮\",\"roang;\":\"⟭\",\"roarr;\":\"⇾\",\"robrk;\":\"⟧\",\"ropar;\":\"⦆\",\"rrarr;\":\"⇉\",\"rsquo;\":\"’\",\"rtrie;\":\"⊵\",\"rtrif;\":\"▸\",\"sbquo;\":\"‚\",\"sccue;\":\"≽\",\"Scirc;\":\"Ŝ\",\"scirc;\":\"ŝ\",\"scnap;\":\"⪺\",\"scsim;\":\"≿\",\"sdotb;\":\"⊡\",\"sdote;\":\"⩦\",\"seArr;\":\"⇘\",\"searr;\":\"↘\",\"setmn;\":\"∖\",\"sharp;\":\"♯\",\"Sigma;\":\"Σ\",\"sigma;\":\"σ\",\"simeq;\":\"≃\",\"simgE;\":\"⪠\",\"simlE;\":\"⪟\",\"simne;\":\"≆\",\"slarr;\":\"←\",\"smile;\":\"⌣\",\"smtes;\":\"⪬︀\",\"sqcap;\":\"⊓\",\"sqcup;\":\"⊔\",\"sqsub;\":\"⊏\",\"sqsup;\":\"⊐\",\"srarr;\":\"→\",\"starf;\":\"★\",\"strns;\":\"¯\",\"subnE;\":\"⫋\",\"subne;\":\"⊊\",\"supnE;\":\"⫌\",\"supne;\":\"⊋\",\"swArr;\":\"⇙\",\"swarr;\":\"↙\",\"szlig;\":\"ß\",\"Theta;\":\"Θ\",\"theta;\":\"θ\",\"thkap;\":\"≈\",\"THORN;\":\"Þ\",\"thorn;\":\"þ\",\"Tilde;\":\"∼\",\"tilde;\":\"˜\",\"times;\":\"×\",\"TRADE;\":\"™\",\"trade;\":\"™\",\"trisb;\":\"⧍\",\"TSHcy;\":\"Ћ\",\"tshcy;\":\"ћ\",\"twixt;\":\"≬\",Uacute:\"Ú\",uacute:\"ú\",\"Ubrcy;\":\"Ў\",\"ubrcy;\":\"ў\",\"Ucirc;\":\"Û\",\"ucirc;\":\"û\",\"udarr;\":\"⇅\",\"udhar;\":\"⥮\",Ugrave:\"Ù\",ugrave:\"ù\",\"uharl;\":\"↿\",\"uharr;\":\"↾\",\"uhblk;\":\"▀\",\"ultri;\":\"◸\",\"Umacr;\":\"Ū\",\"umacr;\":\"ū\",\"Union;\":\"⋃\",\"Uogon;\":\"Ų\",\"uogon;\":\"ų\",\"uplus;\":\"⊎\",\"upsih;\":\"ϒ\",\"UpTee;\":\"⊥\",\"Uring;\":\"Ů\",\"uring;\":\"ů\",\"urtri;\":\"◹\",\"utdot;\":\"⋰\",\"utrif;\":\"▴\",\"uuarr;\":\"⇈\",\"varpi;\":\"ϖ\",\"vBarv;\":\"⫩\",\"VDash;\":\"⊫\",\"Vdash;\":\"⊩\",\"vDash;\":\"⊨\",\"vdash;\":\"⊢\",\"veeeq;\":\"≚\",\"vltri;\":\"⊲\",\"vnsub;\":\"⊂⃒\",\"vnsup;\":\"⊃⃒\",\"vprop;\":\"∝\",\"vrtri;\":\"⊳\",\"Wcirc;\":\"Ŵ\",\"wcirc;\":\"ŵ\",\"Wedge;\":\"⋀\",\"wedge;\":\"∧\",\"xcirc;\":\"◯\",\"xdtri;\":\"▽\",\"xhArr;\":\"⟺\",\"xharr;\":\"⟷\",\"xlArr;\":\"⟸\",\"xlarr;\":\"⟵\",\"xodot;\":\"⨀\",\"xrArr;\":\"⟹\",\"xrarr;\":\"⟶\",\"xutri;\":\"△\",Yacute:\"Ý\",yacute:\"ý\",\"Ycirc;\":\"Ŷ\",\"ycirc;\":\"ŷ\",\"Aacute;\":\"Á\",\"aacute;\":\"á\",\"Abreve;\":\"Ă\",\"abreve;\":\"ă\",\"Agrave;\":\"À\",\"agrave;\":\"à\",\"andand;\":\"⩕\",\"angmsd;\":\"∡\",\"angsph;\":\"∢\",\"apacir;\":\"⩯\",\"approx;\":\"≈\",\"Assign;\":\"≔\",\"Atilde;\":\"Ã\",\"atilde;\":\"ã\",\"barvee;\":\"⊽\",\"Barwed;\":\"⌆\",\"barwed;\":\"⌅\",\"becaus;\":\"∵\",\"bernou;\":\"ℬ\",\"bigcap;\":\"⋂\",\"bigcup;\":\"⋃\",\"bigvee;\":\"⋁\",\"bkarow;\":\"⤍\",\"bottom;\":\"⊥\",\"bowtie;\":\"⋈\",\"boxbox;\":\"⧉\",\"bprime;\":\"‵\",\"brvbar;\":\"¦\",\"bullet;\":\"•\",\"Bumpeq;\":\"≎\",\"bumpeq;\":\"≏\",\"Cacute;\":\"Ć\",\"cacute;\":\"ć\",\"capand;\":\"⩄\",\"capcap;\":\"⩋\",\"capcup;\":\"⩇\",\"capdot;\":\"⩀\",\"Ccaron;\":\"Č\",\"ccaron;\":\"č\",\"Ccedil;\":\"Ç\",\"ccedil;\":\"ç\",\"circeq;\":\"≗\",\"cirmid;\":\"⫯\",\"Colone;\":\"⩴\",\"colone;\":\"≔\",\"commat;\":\"@\",\"compfn;\":\"∘\",\"Conint;\":\"∯\",\"conint;\":\"∮\",\"coprod;\":\"∐\",\"copysr;\":\"℗\",\"cularr;\":\"↶\",\"CupCap;\":\"≍\",\"cupcap;\":\"⩆\",\"cupcup;\":\"⩊\",\"cupdot;\":\"⊍\",\"curarr;\":\"↷\",\"curren;\":\"¤\",\"cylcty;\":\"⌭\",\"Dagger;\":\"‡\",\"dagger;\":\"†\",\"daleth;\":\"ℸ\",\"Dcaron;\":\"Ď\",\"dcaron;\":\"ď\",\"dfisht;\":\"⥿\",\"divide;\":\"÷\",\"divonx;\":\"⋇\",\"dlcorn;\":\"⌞\",\"dlcrop;\":\"⌍\",\"dollar;\":\"$\",\"DotDot;\":\"⃜\",\"drcorn;\":\"⌟\",\"drcrop;\":\"⌌\",\"Dstrok;\":\"Đ\",\"dstrok;\":\"đ\",\"Eacute;\":\"É\",\"eacute;\":\"é\",\"easter;\":\"⩮\",\"Ecaron;\":\"Ě\",\"ecaron;\":\"ě\",\"ecolon;\":\"≕\",\"Egrave;\":\"È\",\"egrave;\":\"è\",\"egsdot;\":\"⪘\",\"elsdot;\":\"⪗\",\"emptyv;\":\"∅\",\"emsp13;\":\" \",\"emsp14;\":\" \",\"eparsl;\":\"⧣\",\"eqcirc;\":\"≖\",\"equals;\":\"=\",\"equest;\":\"≟\",\"Exists;\":\"∃\",\"female;\":\"♀\",\"ffilig;\":\"ﬃ\",\"ffllig;\":\"ﬄ\",\"ForAll;\":\"∀\",\"forall;\":\"∀\",\"frac12;\":\"½\",\"frac13;\":\"⅓\",\"frac14;\":\"¼\",\"frac15;\":\"⅕\",\"frac16;\":\"⅙\",\"frac18;\":\"⅛\",\"frac23;\":\"⅔\",\"frac25;\":\"⅖\",\"frac34;\":\"¾\",\"frac35;\":\"⅗\",\"frac38;\":\"⅜\",\"frac45;\":\"⅘\",\"frac56;\":\"⅚\",\"frac58;\":\"⅝\",\"frac78;\":\"⅞\",\"gacute;\":\"ǵ\",\"Gammad;\":\"Ϝ\",\"gammad;\":\"ϝ\",\"Gbreve;\":\"Ğ\",\"gbreve;\":\"ğ\",\"Gcedil;\":\"Ģ\",\"gesdot;\":\"⪀\",\"gesles;\":\"⪔\",\"gtlPar;\":\"⦕\",\"gtrarr;\":\"⥸\",\"gtrdot;\":\"⋗\",\"gtrsim;\":\"≳\",\"hairsp;\":\" \",\"hamilt;\":\"ℋ\",\"HARDcy;\":\"Ъ\",\"hardcy;\":\"ъ\",\"hearts;\":\"♥\",\"hellip;\":\"…\",\"hercon;\":\"⊹\",\"homtht;\":\"∻\",\"horbar;\":\"―\",\"hslash;\":\"ℏ\",\"Hstrok;\":\"Ħ\",\"hstrok;\":\"ħ\",\"hybull;\":\"⁃\",\"hyphen;\":\"‐\",\"Iacute;\":\"Í\",\"iacute;\":\"í\",\"Igrave;\":\"Ì\",\"igrave;\":\"ì\",\"iiiint;\":\"⨌\",\"iinfin;\":\"⧜\",\"incare;\":\"℅\",\"inodot;\":\"ı\",\"intcal;\":\"⊺\",\"iquest;\":\"¿\",\"isinsv;\":\"⋳\",\"Itilde;\":\"Ĩ\",\"itilde;\":\"ĩ\",\"Jsercy;\":\"Ј\",\"jsercy;\":\"ј\",\"kappav;\":\"ϰ\",\"Kcedil;\":\"Ķ\",\"kcedil;\":\"ķ\",\"kgreen;\":\"ĸ\",\"Lacute;\":\"Ĺ\",\"lacute;\":\"ĺ\",\"lagran;\":\"ℒ\",\"Lambda;\":\"Λ\",\"lambda;\":\"λ\",\"langle;\":\"⟨\",\"larrfs;\":\"⤝\",\"larrhk;\":\"↩\",\"larrlp;\":\"↫\",\"larrpl;\":\"⤹\",\"larrtl;\":\"↢\",\"lAtail;\":\"⤛\",\"latail;\":\"⤙\",\"lbrace;\":\"{\",\"lbrack;\":\"[\",\"Lcaron;\":\"Ľ\",\"lcaron;\":\"ľ\",\"Lcedil;\":\"Ļ\",\"lcedil;\":\"ļ\",\"ldquor;\":\"„\",\"lesdot;\":\"⩿\",\"lesges;\":\"⪓\",\"lfisht;\":\"⥼\",\"lfloor;\":\"⌊\",\"lharul;\":\"⥪\",\"llhard;\":\"⥫\",\"Lmidot;\":\"Ŀ\",\"lmidot;\":\"ŀ\",\"lmoust;\":\"⎰\",\"loplus;\":\"⨭\",\"lowast;\":\"∗\",\"lowbar;\":\"_\",\"lparlt;\":\"⦓\",\"lrhard;\":\"⥭\",\"lsaquo;\":\"‹\",\"lsquor;\":\"‚\",\"Lstrok;\":\"Ł\",\"lstrok;\":\"ł\",\"lthree;\":\"⋋\",\"ltimes;\":\"⋉\",\"ltlarr;\":\"⥶\",\"ltrPar;\":\"⦖\",\"mapsto;\":\"↦\",\"marker;\":\"▮\",\"mcomma;\":\"⨩\",\"midast;\":\"*\",\"midcir;\":\"⫰\",\"middot;\":\"·\",\"minusb;\":\"⊟\",\"minusd;\":\"∸\",\"mnplus;\":\"∓\",\"models;\":\"⊧\",\"mstpos;\":\"∾\",\"Nacute;\":\"Ń\",\"nacute;\":\"ń\",\"nbumpe;\":\"≏̸\",\"Ncaron;\":\"Ň\",\"ncaron;\":\"ň\",\"Ncedil;\":\"Ņ\",\"ncedil;\":\"ņ\",\"nearhk;\":\"⤤\",\"nequiv;\":\"≢\",\"nesear;\":\"⤨\",\"nexist;\":\"∄\",\"nltrie;\":\"⋬\",\"notinE;\":\"⋹̸\",\"nparsl;\":\"⫽⃥\",\"nprcue;\":\"⋠\",\"nrarrc;\":\"⤳̸\",\"nrarrw;\":\"↝̸\",\"nrtrie;\":\"⋭\",\"nsccue;\":\"⋡\",\"nsimeq;\":\"≄\",\"Ntilde;\":\"Ñ\",\"ntilde;\":\"ñ\",\"numero;\":\"№\",\"nVDash;\":\"⊯\",\"nVdash;\":\"⊮\",\"nvDash;\":\"⊭\",\"nvdash;\":\"⊬\",\"nvHarr;\":\"⤄\",\"nvlArr;\":\"⤂\",\"nvrArr;\":\"⤃\",\"nwarhk;\":\"⤣\",\"nwnear;\":\"⤧\",\"Oacute;\":\"Ó\",\"oacute;\":\"ó\",\"Odblac;\":\"Ő\",\"odblac;\":\"ő\",\"odsold;\":\"⦼\",\"Ograve;\":\"Ò\",\"ograve;\":\"ò\",\"ominus;\":\"⊖\",\"origof;\":\"⊶\",\"Oslash;\":\"Ø\",\"oslash;\":\"ø\",\"Otilde;\":\"Õ\",\"otilde;\":\"õ\",\"Otimes;\":\"⨷\",\"otimes;\":\"⊗\",\"parsim;\":\"⫳\",\"percnt;\":\"%\",\"period;\":\".\",\"permil;\":\"‰\",\"phmmat;\":\"ℳ\",\"planck;\":\"ℏ\",\"plankv;\":\"ℏ\",\"plusdo;\":\"∔\",\"plusdu;\":\"⨥\",\"plusmn;\":\"±\",\"preceq;\":\"⪯\",\"primes;\":\"ℙ\",\"prnsim;\":\"⋨\",\"propto;\":\"∝\",\"prurel;\":\"⊰\",\"puncsp;\":\" \",\"qprime;\":\"⁗\",\"Racute;\":\"Ŕ\",\"racute;\":\"ŕ\",\"rangle;\":\"⟩\",\"rarrap;\":\"⥵\",\"rarrfs;\":\"⤞\",\"rarrhk;\":\"↪\",\"rarrlp;\":\"↬\",\"rarrpl;\":\"⥅\",\"Rarrtl;\":\"⤖\",\"rarrtl;\":\"↣\",\"rAtail;\":\"⤜\",\"ratail;\":\"⤚\",\"rbrace;\":\"}\",\"rbrack;\":\"]\",\"Rcaron;\":\"Ř\",\"rcaron;\":\"ř\",\"Rcedil;\":\"Ŗ\",\"rcedil;\":\"ŗ\",\"rdquor;\":\"”\",\"rfisht;\":\"⥽\",\"rfloor;\":\"⌋\",\"rharul;\":\"⥬\",\"rmoust;\":\"⎱\",\"roplus;\":\"⨮\",\"rpargt;\":\"⦔\",\"rsaquo;\":\"›\",\"rsquor;\":\"’\",\"rthree;\":\"⋌\",\"rtimes;\":\"⋊\",\"Sacute;\":\"Ś\",\"sacute;\":\"ś\",\"Scaron;\":\"Š\",\"scaron;\":\"š\",\"Scedil;\":\"Ş\",\"scedil;\":\"ş\",\"scnsim;\":\"⋩\",\"searhk;\":\"⤥\",\"seswar;\":\"⤩\",\"sfrown;\":\"⌢\",\"SHCHcy;\":\"Щ\",\"shchcy;\":\"щ\",\"sigmaf;\":\"ς\",\"sigmav;\":\"ς\",\"simdot;\":\"⩪\",\"smashp;\":\"⨳\",\"SOFTcy;\":\"Ь\",\"softcy;\":\"ь\",\"solbar;\":\"⌿\",\"spades;\":\"♠\",\"sqcaps;\":\"⊓︀\",\"sqcups;\":\"⊔︀\",\"sqsube;\":\"⊑\",\"sqsupe;\":\"⊒\",\"Square;\":\"□\",\"square;\":\"□\",\"squarf;\":\"▪\",\"ssetmn;\":\"∖\",\"ssmile;\":\"⌣\",\"sstarf;\":\"⋆\",\"subdot;\":\"⪽\",\"Subset;\":\"⋐\",\"subset;\":\"⊂\",\"subsim;\":\"⫇\",\"subsub;\":\"⫕\",\"subsup;\":\"⫓\",\"succeq;\":\"⪰\",\"supdot;\":\"⪾\",\"Supset;\":\"⋑\",\"supset;\":\"⊃\",\"supsim;\":\"⫈\",\"supsub;\":\"⫔\",\"supsup;\":\"⫖\",\"swarhk;\":\"⤦\",\"swnwar;\":\"⤪\",\"target;\":\"⌖\",\"Tcaron;\":\"Ť\",\"tcaron;\":\"ť\",\"Tcedil;\":\"Ţ\",\"tcedil;\":\"ţ\",\"telrec;\":\"⌕\",\"there4;\":\"∴\",\"thetav;\":\"ϑ\",\"thinsp;\":\" \",\"thksim;\":\"∼\",\"timesb;\":\"⊠\",\"timesd;\":\"⨰\",\"topbot;\":\"⌶\",\"topcir;\":\"⫱\",\"tprime;\":\"‴\",\"tridot;\":\"◬\",\"Tstrok;\":\"Ŧ\",\"tstrok;\":\"ŧ\",\"Uacute;\":\"Ú\",\"uacute;\":\"ú\",\"Ubreve;\":\"Ŭ\",\"ubreve;\":\"ŭ\",\"Udblac;\":\"Ű\",\"udblac;\":\"ű\",\"ufisht;\":\"⥾\",\"Ugrave;\":\"Ù\",\"ugrave;\":\"ù\",\"ulcorn;\":\"⌜\",\"ulcrop;\":\"⌏\",\"urcorn;\":\"⌝\",\"urcrop;\":\"⌎\",\"Utilde;\":\"Ũ\",\"utilde;\":\"ũ\",\"vangrt;\":\"⦜\",\"varphi;\":\"ϕ\",\"varrho;\":\"ϱ\",\"Vdashl;\":\"⫦\",\"veebar;\":\"⊻\",\"vellip;\":\"⋮\",\"Verbar;\":\"‖\",\"verbar;\":\"|\",\"vsubnE;\":\"⫋︀\",\"vsubne;\":\"⊊︀\",\"vsupnE;\":\"⫌︀\",\"vsupne;\":\"⊋︀\",\"Vvdash;\":\"⊪\",\"wedbar;\":\"⩟\",\"wedgeq;\":\"≙\",\"weierp;\":\"℘\",\"wreath;\":\"≀\",\"xoplus;\":\"⨁\",\"xotime;\":\"⨂\",\"xsqcup;\":\"⨆\",\"xuplus;\":\"⨄\",\"xwedge;\":\"⋀\",\"Yacute;\":\"Ý\",\"yacute;\":\"ý\",\"Zacute;\":\"Ź\",\"zacute;\":\"ź\",\"Zcaron;\":\"Ž\",\"zcaron;\":\"ž\",\"zeetrf;\":\"ℨ\",\"alefsym;\":\"ℵ\",\"angrtvb;\":\"⊾\",\"angzarr;\":\"⍼\",\"asympeq;\":\"≍\",\"backsim;\":\"∽\",\"Because;\":\"∵\",\"because;\":\"∵\",\"bemptyv;\":\"⦰\",\"between;\":\"≬\",\"bigcirc;\":\"◯\",\"bigodot;\":\"⨀\",\"bigstar;\":\"★\",\"bnequiv;\":\"≡⃥\",\"boxplus;\":\"⊞\",\"Cayleys;\":\"ℭ\",\"Cconint;\":\"∰\",\"ccupssm;\":\"⩐\",\"Cedilla;\":\"¸\",\"cemptyv;\":\"⦲\",\"cirscir;\":\"⧂\",\"coloneq;\":\"≔\",\"congdot;\":\"⩭\",\"cudarrl;\":\"⤸\",\"cudarrr;\":\"⤵\",\"cularrp;\":\"⤽\",\"curarrm;\":\"⤼\",\"dbkarow;\":\"⤏\",\"ddagger;\":\"‡\",\"ddotseq;\":\"⩷\",\"demptyv;\":\"⦱\",\"Diamond;\":\"⋄\",\"diamond;\":\"⋄\",\"digamma;\":\"ϝ\",\"dotplus;\":\"∔\",\"DownTee;\":\"⊤\",\"dwangle;\":\"⦦\",\"Element;\":\"∈\",\"Epsilon;\":\"Ε\",\"epsilon;\":\"ε\",\"eqcolon;\":\"≕\",\"equivDD;\":\"⩸\",\"gesdoto;\":\"⪂\",\"gtquest;\":\"⩼\",\"gtrless;\":\"≷\",\"harrcir;\":\"⥈\",\"Implies;\":\"⇒\",\"intprod;\":\"⨼\",\"isindot;\":\"⋵\",\"larrbfs;\":\"⤟\",\"larrsim;\":\"⥳\",\"lbrksld;\":\"⦏\",\"lbrkslu;\":\"⦍\",\"ldrdhar;\":\"⥧\",\"LeftTee;\":\"⊣\",\"lesdoto;\":\"⪁\",\"lessdot;\":\"⋖\",\"lessgtr;\":\"≶\",\"lesssim;\":\"≲\",\"lotimes;\":\"⨴\",\"lozenge;\":\"◊\",\"ltquest;\":\"⩻\",\"luruhar;\":\"⥦\",\"maltese;\":\"✠\",\"minusdu;\":\"⨪\",\"napprox;\":\"≉\",\"natural;\":\"♮\",\"nearrow;\":\"↗\",\"NewLine;\":\"\\n\",\"nexists;\":\"∄\",\"NoBreak;\":\"⁠\",\"notinva;\":\"∉\",\"notinvb;\":\"⋷\",\"notinvc;\":\"⋶\",\"NotLess;\":\"≮\",\"notniva;\":\"∌\",\"notnivb;\":\"⋾\",\"notnivc;\":\"⋽\",\"npolint;\":\"⨔\",\"npreceq;\":\"⪯̸\",\"nsqsube;\":\"⋢\",\"nsqsupe;\":\"⋣\",\"nsubset;\":\"⊂⃒\",\"nsucceq;\":\"⪰̸\",\"nsupset;\":\"⊃⃒\",\"nvinfin;\":\"⧞\",\"nvltrie;\":\"⊴⃒\",\"nvrtrie;\":\"⊵⃒\",\"nwarrow;\":\"↖\",\"olcross;\":\"⦻\",\"Omicron;\":\"Ο\",\"omicron;\":\"ο\",\"orderof;\":\"ℴ\",\"orslope;\":\"⩗\",\"OverBar;\":\"‾\",\"pertenk;\":\"‱\",\"planckh;\":\"ℎ\",\"pluscir;\":\"⨢\",\"plussim;\":\"⨦\",\"plustwo;\":\"⨧\",\"precsim;\":\"≾\",\"Product;\":\"∏\",\"quatint;\":\"⨖\",\"questeq;\":\"≟\",\"rarrbfs;\":\"⤠\",\"rarrsim;\":\"⥴\",\"rbrksld;\":\"⦎\",\"rbrkslu;\":\"⦐\",\"rdldhar;\":\"⥩\",\"realine;\":\"ℛ\",\"rotimes;\":\"⨵\",\"ruluhar;\":\"⥨\",\"searrow;\":\"↘\",\"simplus;\":\"⨤\",\"simrarr;\":\"⥲\",\"subedot;\":\"⫃\",\"submult;\":\"⫁\",\"subplus;\":\"⪿\",\"subrarr;\":\"⥹\",\"succsim;\":\"≿\",\"supdsub;\":\"⫘\",\"supedot;\":\"⫄\",\"suphsol;\":\"⟉\",\"suphsub;\":\"⫗\",\"suplarr;\":\"⥻\",\"supmult;\":\"⫂\",\"supplus;\":\"⫀\",\"swarrow;\":\"↙\",\"topfork;\":\"⫚\",\"triplus;\":\"⨹\",\"tritime;\":\"⨻\",\"UpArrow;\":\"↑\",\"Uparrow;\":\"⇑\",\"uparrow;\":\"↑\",\"Upsilon;\":\"Υ\",\"upsilon;\":\"υ\",\"uwangle;\":\"⦧\",\"vzigzag;\":\"⦚\",\"zigrarr;\":\"⇝\",\"andslope;\":\"⩘\",\"angmsdaa;\":\"⦨\",\"angmsdab;\":\"⦩\",\"angmsdac;\":\"⦪\",\"angmsdad;\":\"⦫\",\"angmsdae;\":\"⦬\",\"angmsdaf;\":\"⦭\",\"angmsdag;\":\"⦮\",\"angmsdah;\":\"⦯\",\"angrtvbd;\":\"⦝\",\"approxeq;\":\"≊\",\"awconint;\":\"∳\",\"backcong;\":\"≌\",\"barwedge;\":\"⌅\",\"bbrktbrk;\":\"⎶\",\"bigoplus;\":\"⨁\",\"bigsqcup;\":\"⨆\",\"biguplus;\":\"⨄\",\"bigwedge;\":\"⋀\",\"boxminus;\":\"⊟\",\"boxtimes;\":\"⊠\",\"bsolhsub;\":\"⟈\",\"capbrcup;\":\"⩉\",\"circledR;\":\"®\",\"circledS;\":\"Ⓢ\",\"cirfnint;\":\"⨐\",\"clubsuit;\":\"♣\",\"cupbrcap;\":\"⩈\",\"curlyvee;\":\"⋎\",\"cwconint;\":\"∲\",\"DDotrahd;\":\"⤑\",\"doteqdot;\":\"≑\",\"DotEqual;\":\"≐\",\"dotminus;\":\"∸\",\"drbkarow;\":\"⤐\",\"dzigrarr;\":\"⟿\",\"elinters;\":\"⏧\",\"emptyset;\":\"∅\",\"eqvparsl;\":\"⧥\",\"fpartint;\":\"⨍\",\"geqslant;\":\"⩾\",\"gesdotol;\":\"⪄\",\"gnapprox;\":\"⪊\",\"hksearow;\":\"⤥\",\"hkswarow;\":\"⤦\",\"imagline;\":\"ℐ\",\"imagpart;\":\"ℑ\",\"infintie;\":\"⧝\",\"integers;\":\"ℤ\",\"Integral;\":\"∫\",\"intercal;\":\"⊺\",\"intlarhk;\":\"⨗\",\"laemptyv;\":\"⦴\",\"ldrushar;\":\"⥋\",\"leqslant;\":\"⩽\",\"lesdotor;\":\"⪃\",\"LessLess;\":\"⪡\",\"llcorner;\":\"⌞\",\"lnapprox;\":\"⪉\",\"lrcorner;\":\"⌟\",\"lurdshar;\":\"⥊\",\"mapstoup;\":\"↥\",\"multimap;\":\"⊸\",\"naturals;\":\"ℕ\",\"ncongdot;\":\"⩭̸\",\"NotEqual;\":\"≠\",\"notindot;\":\"⋵̸\",\"NotTilde;\":\"≁\",\"otimesas;\":\"⨶\",\"parallel;\":\"∥\",\"PartialD;\":\"∂\",\"plusacir;\":\"⨣\",\"pointint;\":\"⨕\",\"Precedes;\":\"≺\",\"precneqq;\":\"⪵\",\"precnsim;\":\"⋨\",\"profalar;\":\"⌮\",\"profline;\":\"⌒\",\"profsurf;\":\"⌓\",\"raemptyv;\":\"⦳\",\"realpart;\":\"ℜ\",\"RightTee;\":\"⊢\",\"rppolint;\":\"⨒\",\"rtriltri;\":\"⧎\",\"scpolint;\":\"⨓\",\"setminus;\":\"∖\",\"shortmid;\":\"∣\",\"smeparsl;\":\"⧤\",\"sqsubset;\":\"⊏\",\"sqsupset;\":\"⊐\",\"subseteq;\":\"⊆\",\"Succeeds;\":\"≻\",\"succneqq;\":\"⪶\",\"succnsim;\":\"⋩\",\"SuchThat;\":\"∋\",\"Superset;\":\"⊃\",\"supseteq;\":\"⊇\",\"thetasym;\":\"ϑ\",\"thicksim;\":\"∼\",\"timesbar;\":\"⨱\",\"triangle;\":\"▵\",\"triminus;\":\"⨺\",\"trpezium;\":\"⏢\",\"Uarrocir;\":\"⥉\",\"ulcorner;\":\"⌜\",\"UnderBar;\":\"_\",\"urcorner;\":\"⌝\",\"varkappa;\":\"ϰ\",\"varsigma;\":\"ς\",\"vartheta;\":\"ϑ\",\"backprime;\":\"‵\",\"backsimeq;\":\"⋍\",\"Backslash;\":\"∖\",\"bigotimes;\":\"⨂\",\"CenterDot;\":\"·\",\"centerdot;\":\"·\",\"checkmark;\":\"✓\",\"CircleDot;\":\"⊙\",\"complexes;\":\"ℂ\",\"Congruent;\":\"≡\",\"Coproduct;\":\"∐\",\"dotsquare;\":\"⊡\",\"DoubleDot;\":\"¨\",\"DownArrow;\":\"↓\",\"Downarrow;\":\"⇓\",\"downarrow;\":\"↓\",\"DownBreve;\":\"̑\",\"gtrapprox;\":\"⪆\",\"gtreqless;\":\"⋛\",\"gvertneqq;\":\"≩︀\",\"heartsuit;\":\"♥\",\"HumpEqual;\":\"≏\",\"LeftArrow;\":\"←\",\"Leftarrow;\":\"⇐\",\"leftarrow;\":\"←\",\"LeftFloor;\":\"⌊\",\"lesseqgtr;\":\"⋚\",\"LessTilde;\":\"≲\",\"lvertneqq;\":\"≨︀\",\"Mellintrf;\":\"ℳ\",\"MinusPlus;\":\"∓\",\"ngeqslant;\":\"⩾̸\",\"nleqslant;\":\"⩽̸\",\"NotCupCap;\":\"≭\",\"NotExists;\":\"∄\",\"NotSubset;\":\"⊂⃒\",\"nparallel;\":\"∦\",\"nshortmid;\":\"∤\",\"nsubseteq;\":\"⊈\",\"nsupseteq;\":\"⊉\",\"OverBrace;\":\"⏞\",\"pitchfork;\":\"⋔\",\"PlusMinus;\":\"±\",\"rationals;\":\"ℚ\",\"spadesuit;\":\"♠\",\"subseteqq;\":\"⫅\",\"subsetneq;\":\"⊊\",\"supseteqq;\":\"⫆\",\"supsetneq;\":\"⊋\",\"Therefore;\":\"∴\",\"therefore;\":\"∴\",\"ThinSpace;\":\" \",\"triangleq;\":\"≜\",\"TripleDot;\":\"⃛\",\"UnionPlus;\":\"⊎\",\"varpropto;\":\"∝\",\"Bernoullis;\":\"ℬ\",\"circledast;\":\"⊛\",\"CirclePlus;\":\"⊕\",\"complement;\":\"∁\",\"curlywedge;\":\"⋏\",\"eqslantgtr;\":\"⪖\",\"EqualTilde;\":\"≂\",\"Fouriertrf;\":\"ℱ\",\"gtreqqless;\":\"⪌\",\"ImaginaryI;\":\"ⅈ\",\"Laplacetrf;\":\"ℒ\",\"LeftVector;\":\"↼\",\"lessapprox;\":\"⪅\",\"lesseqqgtr;\":\"⪋\",\"Lleftarrow;\":\"⇚\",\"lmoustache;\":\"⎰\",\"longmapsto;\":\"⟼\",\"mapstodown;\":\"↧\",\"mapstoleft;\":\"↤\",\"nLeftarrow;\":\"⇍\",\"nleftarrow;\":\"↚\",\"NotElement;\":\"∉\",\"NotGreater;\":\"≯\",\"nsubseteqq;\":\"⫅̸\",\"nsupseteqq;\":\"⫆̸\",\"precapprox;\":\"⪷\",\"Proportion;\":\"∷\",\"RightArrow;\":\"→\",\"Rightarrow;\":\"⇒\",\"rightarrow;\":\"→\",\"RightFloor;\":\"⌋\",\"rmoustache;\":\"⎱\",\"sqsubseteq;\":\"⊑\",\"sqsupseteq;\":\"⊒\",\"subsetneqq;\":\"⫋\",\"succapprox;\":\"⪸\",\"supsetneqq;\":\"⫌\",\"ThickSpace;\":\"  \",\"TildeEqual;\":\"≃\",\"TildeTilde;\":\"≈\",\"UnderBrace;\":\"⏟\",\"UpArrowBar;\":\"⤒\",\"UpTeeArrow;\":\"↥\",\"upuparrows;\":\"⇈\",\"varepsilon;\":\"ϵ\",\"varnothing;\":\"∅\",\"backepsilon;\":\"϶\",\"blacksquare;\":\"▪\",\"circledcirc;\":\"⊚\",\"circleddash;\":\"⊝\",\"CircleMinus;\":\"⊖\",\"CircleTimes;\":\"⊗\",\"curlyeqprec;\":\"⋞\",\"curlyeqsucc;\":\"⋟\",\"diamondsuit;\":\"♦\",\"eqslantless;\":\"⪕\",\"Equilibrium;\":\"⇌\",\"expectation;\":\"ℰ\",\"GreaterLess;\":\"≷\",\"LeftCeiling;\":\"⌈\",\"LessGreater;\":\"≶\",\"MediumSpace;\":\" \",\"NotLessLess;\":\"≪̸\",\"NotPrecedes;\":\"⊀\",\"NotSucceeds;\":\"⊁\",\"NotSuperset;\":\"⊃⃒\",\"nRightarrow;\":\"⇏\",\"nrightarrow;\":\"↛\",\"OverBracket;\":\"⎴\",\"preccurlyeq;\":\"≼\",\"precnapprox;\":\"⪹\",\"quaternions;\":\"ℍ\",\"RightVector;\":\"⇀\",\"Rrightarrow;\":\"⇛\",\"RuleDelayed;\":\"⧴\",\"SmallCircle;\":\"∘\",\"SquareUnion;\":\"⊔\",\"straightphi;\":\"ϕ\",\"SubsetEqual;\":\"⊆\",\"succcurlyeq;\":\"≽\",\"succnapprox;\":\"⪺\",\"thickapprox;\":\"≈\",\"UpDownArrow;\":\"↕\",\"Updownarrow;\":\"⇕\",\"updownarrow;\":\"↕\",\"VerticalBar;\":\"∣\",\"blacklozenge;\":\"⧫\",\"DownArrowBar;\":\"⤓\",\"DownTeeArrow;\":\"↧\",\"ExponentialE;\":\"ⅇ\",\"exponentiale;\":\"ⅇ\",\"GreaterEqual;\":\"≥\",\"GreaterTilde;\":\"≳\",\"HilbertSpace;\":\"ℋ\",\"HumpDownHump;\":\"≎\",\"Intersection;\":\"⋂\",\"LeftArrowBar;\":\"⇤\",\"LeftTeeArrow;\":\"↤\",\"LeftTriangle;\":\"⊲\",\"LeftUpVector;\":\"↿\",\"NotCongruent;\":\"≢\",\"NotHumpEqual;\":\"≏̸\",\"NotLessEqual;\":\"≰\",\"NotLessTilde;\":\"≴\",\"Proportional;\":\"∝\",\"RightCeiling;\":\"⌉\",\"risingdotseq;\":\"≓\",\"RoundImplies;\":\"⥰\",\"ShortUpArrow;\":\"↑\",\"SquareSubset;\":\"⊏\",\"triangledown;\":\"▿\",\"triangleleft;\":\"◃\",\"UnderBracket;\":\"⎵\",\"varsubsetneq;\":\"⊊︀\",\"varsupsetneq;\":\"⊋︀\",\"VerticalLine;\":\"|\",\"ApplyFunction;\":\"⁡\",\"bigtriangleup;\":\"△\",\"blacktriangle;\":\"▴\",\"DifferentialD;\":\"ⅆ\",\"divideontimes;\":\"⋇\",\"DoubleLeftTee;\":\"⫤\",\"DoubleUpArrow;\":\"⇑\",\"fallingdotseq;\":\"≒\",\"hookleftarrow;\":\"↩\",\"leftarrowtail;\":\"↢\",\"leftharpoonup;\":\"↼\",\"LeftTeeVector;\":\"⥚\",\"LeftVectorBar;\":\"⥒\",\"LessFullEqual;\":\"≦\",\"LongLeftArrow;\":\"⟵\",\"Longleftarrow;\":\"⟸\",\"longleftarrow;\":\"⟵\",\"looparrowleft;\":\"↫\",\"measuredangle;\":\"∡\",\"NotEqualTilde;\":\"≂̸\",\"NotTildeEqual;\":\"≄\",\"NotTildeTilde;\":\"≉\",\"ntriangleleft;\":\"⋪\",\"Poincareplane;\":\"ℌ\",\"PrecedesEqual;\":\"⪯\",\"PrecedesTilde;\":\"≾\",\"RightArrowBar;\":\"⇥\",\"RightTeeArrow;\":\"↦\",\"RightTriangle;\":\"⊳\",\"RightUpVector;\":\"↾\",\"shortparallel;\":\"∥\",\"smallsetminus;\":\"∖\",\"SucceedsEqual;\":\"⪰\",\"SucceedsTilde;\":\"≿\",\"SupersetEqual;\":\"⊇\",\"triangleright;\":\"▹\",\"UpEquilibrium;\":\"⥮\",\"upharpoonleft;\":\"↿\",\"varsubsetneqq;\":\"⫋︀\",\"varsupsetneqq;\":\"⫌︀\",\"VerticalTilde;\":\"≀\",\"VeryThinSpace;\":\" \",\"curvearrowleft;\":\"↶\",\"DiacriticalDot;\":\"˙\",\"doublebarwedge;\":\"⌆\",\"DoubleRightTee;\":\"⊨\",\"downdownarrows;\":\"⇊\",\"DownLeftVector;\":\"↽\",\"GreaterGreater;\":\"⪢\",\"hookrightarrow;\":\"↪\",\"HorizontalLine;\":\"─\",\"InvisibleComma;\":\"⁣\",\"InvisibleTimes;\":\"⁢\",\"LeftDownVector;\":\"⇃\",\"leftleftarrows;\":\"⇇\",\"LeftRightArrow;\":\"↔\",\"Leftrightarrow;\":\"⇔\",\"leftrightarrow;\":\"↔\",\"leftthreetimes;\":\"⋋\",\"LessSlantEqual;\":\"⩽\",\"LongRightArrow;\":\"⟶\",\"Longrightarrow;\":\"⟹\",\"longrightarrow;\":\"⟶\",\"looparrowright;\":\"↬\",\"LowerLeftArrow;\":\"↙\",\"NestedLessLess;\":\"≪\",\"NotGreaterLess;\":\"≹\",\"NotLessGreater;\":\"≸\",\"NotSubsetEqual;\":\"⊈\",\"NotVerticalBar;\":\"∤\",\"nshortparallel;\":\"∦\",\"ntriangleright;\":\"⋫\",\"OpenCurlyQuote;\":\"‘\",\"ReverseElement;\":\"∋\",\"rightarrowtail;\":\"↣\",\"rightharpoonup;\":\"⇀\",\"RightTeeVector;\":\"⥛\",\"RightVectorBar;\":\"⥓\",\"ShortDownArrow;\":\"↓\",\"ShortLeftArrow;\":\"←\",\"SquareSuperset;\":\"⊐\",\"TildeFullEqual;\":\"≅\",\"trianglelefteq;\":\"⊴\",\"upharpoonright;\":\"↾\",\"UpperLeftArrow;\":\"↖\",\"ZeroWidthSpace;\":\"​\",\"bigtriangledown;\":\"▽\",\"circlearrowleft;\":\"↺\",\"CloseCurlyQuote;\":\"’\",\"ContourIntegral;\":\"∮\",\"curvearrowright;\":\"↷\",\"DoubleDownArrow;\":\"⇓\",\"DoubleLeftArrow;\":\"⇐\",\"downharpoonleft;\":\"⇃\",\"DownRightVector;\":\"⇁\",\"leftharpoondown;\":\"↽\",\"leftrightarrows;\":\"⇆\",\"LeftRightVector;\":\"⥎\",\"LeftTriangleBar;\":\"⧏\",\"LeftUpTeeVector;\":\"⥠\",\"LeftUpVectorBar;\":\"⥘\",\"LowerRightArrow;\":\"↘\",\"nLeftrightarrow;\":\"⇎\",\"nleftrightarrow;\":\"↮\",\"NotGreaterEqual;\":\"≱\",\"NotGreaterTilde;\":\"≵\",\"NotHumpDownHump;\":\"≎̸\",\"NotLeftTriangle;\":\"⋪\",\"NotSquareSubset;\":\"⊏̸\",\"ntrianglelefteq;\":\"⋬\",\"OverParenthesis;\":\"⏜\",\"RightDownVector;\":\"⇂\",\"rightleftarrows;\":\"⇄\",\"rightsquigarrow;\":\"↝\",\"rightthreetimes;\":\"⋌\",\"ShortRightArrow;\":\"→\",\"straightepsilon;\":\"ϵ\",\"trianglerighteq;\":\"⊵\",\"UpperRightArrow;\":\"↗\",\"vartriangleleft;\":\"⊲\",\"circlearrowright;\":\"↻\",\"DiacriticalAcute;\":\"´\",\"DiacriticalGrave;\":\"`\",\"DiacriticalTilde;\":\"˜\",\"DoubleRightArrow;\":\"⇒\",\"DownArrowUpArrow;\":\"⇵\",\"downharpoonright;\":\"⇂\",\"EmptySmallSquare;\":\"◻\",\"GreaterEqualLess;\":\"⋛\",\"GreaterFullEqual;\":\"≧\",\"LeftAngleBracket;\":\"⟨\",\"LeftUpDownVector;\":\"⥑\",\"LessEqualGreater;\":\"⋚\",\"NonBreakingSpace;\":\" \",\"NotPrecedesEqual;\":\"⪯̸\",\"NotRightTriangle;\":\"⋫\",\"NotSucceedsEqual;\":\"⪰̸\",\"NotSucceedsTilde;\":\"≿̸\",\"NotSupersetEqual;\":\"⊉\",\"ntrianglerighteq;\":\"⋭\",\"rightharpoondown;\":\"⇁\",\"rightrightarrows;\":\"⇉\",\"RightTriangleBar;\":\"⧐\",\"RightUpTeeVector;\":\"⥜\",\"RightUpVectorBar;\":\"⥔\",\"twoheadleftarrow;\":\"↞\",\"UnderParenthesis;\":\"⏝\",\"UpArrowDownArrow;\":\"⇅\",\"vartriangleright;\":\"⊳\",\"blacktriangledown;\":\"▾\",\"blacktriangleleft;\":\"◂\",\"DoubleUpDownArrow;\":\"⇕\",\"DoubleVerticalBar;\":\"∥\",\"DownLeftTeeVector;\":\"⥞\",\"DownLeftVectorBar;\":\"⥖\",\"FilledSmallSquare;\":\"◼\",\"GreaterSlantEqual;\":\"⩾\",\"LeftDoubleBracket;\":\"⟦\",\"LeftDownTeeVector;\":\"⥡\",\"LeftDownVectorBar;\":\"⥙\",\"leftrightharpoons;\":\"⇋\",\"LeftTriangleEqual;\":\"⊴\",\"NegativeThinSpace;\":\"​\",\"NotGreaterGreater;\":\"≫̸\",\"NotLessSlantEqual;\":\"⩽̸\",\"NotNestedLessLess;\":\"⪡̸\",\"NotReverseElement;\":\"∌\",\"NotSquareSuperset;\":\"⊐̸\",\"NotTildeFullEqual;\":\"≇\",\"RightAngleBracket;\":\"⟩\",\"rightleftharpoons;\":\"⇌\",\"RightUpDownVector;\":\"⥏\",\"SquareSubsetEqual;\":\"⊑\",\"twoheadrightarrow;\":\"↠\",\"VerticalSeparator;\":\"❘\",\"blacktriangleright;\":\"▸\",\"DownRightTeeVector;\":\"⥟\",\"DownRightVectorBar;\":\"⥗\",\"LongLeftRightArrow;\":\"⟷\",\"Longleftrightarrow;\":\"⟺\",\"longleftrightarrow;\":\"⟷\",\"NegativeThickSpace;\":\"​\",\"NotLeftTriangleBar;\":\"⧏̸\",\"PrecedesSlantEqual;\":\"≼\",\"ReverseEquilibrium;\":\"⇋\",\"RightDoubleBracket;\":\"⟧\",\"RightDownTeeVector;\":\"⥝\",\"RightDownVectorBar;\":\"⥕\",\"RightTriangleEqual;\":\"⊵\",\"SquareIntersection;\":\"⊓\",\"SucceedsSlantEqual;\":\"≽\",\"DoubleLongLeftArrow;\":\"⟸\",\"DownLeftRightVector;\":\"⥐\",\"LeftArrowRightArrow;\":\"⇆\",\"leftrightsquigarrow;\":\"↭\",\"NegativeMediumSpace;\":\"​\",\"NotGreaterFullEqual;\":\"≧̸\",\"NotRightTriangleBar;\":\"⧐̸\",\"RightArrowLeftArrow;\":\"⇄\",\"SquareSupersetEqual;\":\"⊒\",\"CapitalDifferentialD;\":\"ⅅ\",\"DoubleLeftRightArrow;\":\"⇔\",\"DoubleLongRightArrow;\":\"⟹\",\"EmptyVerySmallSquare;\":\"▫\",\"NestedGreaterGreater;\":\"≫\",\"NotDoubleVerticalBar;\":\"∦\",\"NotGreaterSlantEqual;\":\"⩾̸\",\"NotLeftTriangleEqual;\":\"⋬\",\"NotSquareSubsetEqual;\":\"⋢\",\"OpenCurlyDoubleQuote;\":\"“\",\"ReverseUpEquilibrium;\":\"⥯\",\"CloseCurlyDoubleQuote;\":\"”\",\"DoubleContourIntegral;\":\"∯\",\"FilledVerySmallSquare;\":\"▪\",\"NegativeVeryThinSpace;\":\"​\",\"NotPrecedesSlantEqual;\":\"⋠\",\"NotRightTriangleEqual;\":\"⋭\",\"NotSucceedsSlantEqual;\":\"⋡\",\"DiacriticalDoubleAcute;\":\"˝\",\"NotSquareSupersetEqual;\":\"⋣\",\"NotNestedGreaterGreater;\":\"⪢̸\",\"ClockwiseContourIntegral;\":\"∲\",\"DoubleLongLeftRightArrow;\":\"⟺\",\"CounterClockwiseContourIntegral;\":\"∳\"};let y;const g={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},b=s.makeMap(\"style,iframe,script,noscript\",!0),v={isVoidTag:s.isVoidTag,isNativeTag:e=>s.isHTMLTag(e)||s.isSVGTag(e),isPreTag:e=>\"pre\"===e,decodeEntities:(e,t)=>{let r=0;const n=e.length;let s=\"\";function i(t){r+=t,e=e.slice(t)}for(;r<n;){const o=/&(?:#x?)?/i.exec(e);if(!o||r+o.index>=n){const t=n-r;s+=e.slice(0,t),i(t);break}if(s+=e.slice(0,o.index),i(o.index),\"&\"===o[0]){let r,n=\"\";if(/[0-9a-z]/i.test(e[1])){y||(y=Object.keys(m).reduce(((e,t)=>Math.max(e,t.length)),0));for(let t=y;!r&&t>0;--t)n=e.substr(1,t),r=m[n];if(r){const o=n.endsWith(\";\");t&&!o&&/[=a-z0-9]/i.test(e[n.length+1]||\"\")?(s+=\"&\"+n,i(1+n.length)):(s+=r,i(1+n.length))}else s+=\"&\"+n,i(1+n.length)}else s+=\"&\",i(1)}else{const t=\"&#x\"===o[0],r=(t?/^&#x([0-9a-f]+);?/i:/^&#([0-9]+);?/).exec(e);if(r){let e=Number.parseInt(r[1],t?16:10);0===e||e>1114111||e>=55296&&e<=57343?e=65533:e>=64976&&e<=65007||65534==(65534&e)||(e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159)&&(e=g[e]||e),s+=String.fromCodePoint(e),i(r[0].length)}else s+=o[0],i(o[0].length)}}return s},isBuiltInComponent:e=>n.isBuiltInType(e,\"Transition\")?d:n.isBuiltInType(e,\"TransitionGroup\")?h:void 0,getNamespace(e,t){let r=t?t.ns:0;if(t&&2===r)if(\"annotation-xml\"===t.tag){if(\"svg\"===e)return 1;t.props.some((e=>6===e.type&&\"encoding\"===e.name&&null!=e.value&&(\"text/html\"===e.value.content||\"application/xhtml+xml\"===e.value.content)))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&\"mglyph\"!==e&&\"malignmark\"!==e&&(r=0);else t&&1===r&&(\"foreignObject\"!==t.tag&&\"desc\"!==t.tag&&\"title\"!==t.tag||(r=0));if(0===r){if(\"svg\"===e)return 1;if(\"math\"===e)return 2}return r},getTextMode({tag:e,ns:t}){if(0===t){if(\"textarea\"===e||\"title\"===e)return 1;if(b(e))return 2}return 0}},E=e=>{1===e.type&&e.props.forEach(((t,r)=>{6===t.type&&\"style\"===t.name&&t.value&&(e.props[r]={type:7,name:\"bind\",arg:n.createSimpleExpression(\"style\",!0,t.loc),exp:x(t.value.content,t.loc),modifiers:[],loc:t.loc})}))},x=(e,t)=>{const r=s.parseStringStyle(e);return n.createSimpleExpression(JSON.stringify(r),!1,t,3)};function S(e,t){return n.createCompilerError(e,t,T)}const T={49:\"v-html is missing expression.\",50:\"v-html will override element children.\",51:\"v-text is missing expression.\",52:\"v-text will override element children.\",53:\"v-model can only be used on <input>, <textarea> and <select> elements.\",54:\"v-model argument is not supported on plain elements.\",55:\"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.\",56:\"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.\",57:\"v-show is missing expression.\",58:\"<Transition> expects exactly one child element or component.\",59:\"Tags with side effect (<script> and <style>) are ignored in client component templates.\"},w=s.makeMap(\"passive,once,capture\"),P=s.makeMap(\"stop,prevent,self,ctrl,shift,alt,meta,exact,middle\"),A=s.makeMap(\"left,right\"),O=s.makeMap(\"onkeyup,onkeydown,onkeypress\",!0),C=(e,t)=>n.isStaticExp(e)&&\"onclick\"===e.content.toLowerCase()?n.createSimpleExpression(t,!0):4!==e.type?n.createCompoundExpression([\"(\",e,`) === \"onClick\" ? \"${t}\" : (`,e,\")\"]):e,I=(e,t,r)=>{if(t.scopes.vSlot>0)return;let s=0,i=0;const o=[],a=r=>{if(s>=20||i>=5){const s=n.createCallExpression(t.helper(n.CREATE_STATIC),[JSON.stringify(o.map((e=>M(e,t))).join(\"\")),String(o.length)]);if(j(o[0],s,t),o.length>1){for(let e=1;e<o.length;e++)j(o[e],null,t);const n=o.length-1;return e.splice(r-o.length+1,n),n}}return 0};let l=0;for(;l<e.length;l++){const t=e[l];if(k(t)){const e=t,r=L(e);if(r){s+=r[0],i+=r[1],o.push(e);continue}}l-=a(l),s=0,i=0,o.length=0}a(l)},k=e=>(1===e.type&&0===e.tagType||12==e.type)&&e.codegenNode&&4===e.codegenNode.type&&e.codegenNode.hoisted,N=/^(data|aria)-/,_=e=>s.isKnownAttr(e)||N.test(e),j=(e,t,r)=>{const n=e.codegenNode.hoisted;r.hoists[r.hoists.indexOf(n)]=t},D=s.makeMap(\"caption,thead,tr,th,tbody,td,tfoot,colgroup,col\");function L(e){if(1===e.type&&D(e.tag))return!1;if(12===e.type)return[1,0];let t=1,r=e.props.length>0?1:0,n=!1;const s=()=>(n=!0,!1);return!!function e(i){for(let e=0;e<i.props.length;e++){const t=i.props[e];if(6===t.type&&!_(t.name))return s();if(7===t.type&&\"bind\"===t.name&&t.arg&&(8===t.arg.type||t.arg.isStatic&&!_(t.arg.content)))return s()}for(let s=0;s<i.children.length;s++){t++;const o=i.children[s];if(1===o.type&&(o.props.length>0&&r++,e(o),n))return!1}return!0}(e)&&[t,r]}function M(e,t){if(s.isString(e))return e;if(s.isSymbol(e))return\"\";switch(e.type){case 1:return function(e,t){let r=`<${e.tag}`;for(let t=0;t<e.props.length;t++){const n=e.props[t];if(6===n.type)r+=` ${n.name}`,n.value&&(r+=`=\"${s.escapeHtml(n.value.content)}\"`);else if(7===n.type&&\"bind\"===n.name){let e=B(n.exp);if(null!=e){const t=n.arg&&n.arg.content;\"class\"===t?e=s.normalizeClass(e):\"style\"===t&&(e=s.stringifyStyle(s.normalizeStyle(e))),r+=` ${n.arg.content}=\"${s.escapeHtml(e)}\"`}}}t.scopeId&&(r+=` ${t.scopeId}`),r+=\">\";for(let n=0;n<e.children.length;n++)r+=M(e.children[n],t);return s.isVoidTag(e.tag)||(r+=`</${e.tag}>`),r}(e,t);case 2:return s.escapeHtml(e.content);case 3:return`\\x3c!--${s.escapeHtml(e.content)}--\\x3e`;case 5:return s.escapeHtml(s.toDisplayString(B(e.content)));case 8:return s.escapeHtml(B(e));case 12:return M(e.content,t);default:return\"\"}}function B(e){if(4===e.type)return new Function(`return ${e.content}`)();{let t=\"\";return e.children.forEach((e=>{s.isString(e)||s.isSymbol(e)||(2===e.type?t+=e.content:5===e.type?t+=s.toDisplayString(B(e.content)):t+=B(e))})),t}}const R=(e,t)=>{1!==e.type||0!==e.tagType||\"script\"!==e.tag&&\"style\"!==e.tag||(t.onError(S(59,e.loc)),t.removeNode())},F=[E],U={cloak:n.noopDirectiveTransform,html:(e,t,r)=>{const{exp:s,loc:i}=e;return s||r.onError(S(49,i)),t.children.length&&(r.onError(S(50,i)),t.children.length=0),{props:[n.createObjectProperty(n.createSimpleExpression(\"innerHTML\",!0,i),s||n.createSimpleExpression(\"\",!0))]}},text:(e,t,r)=>{const{exp:s,loc:i}=e;return s||r.onError(S(51,i)),t.children.length&&(r.onError(S(52,i)),t.children.length=0),{props:[n.createObjectProperty(n.createSimpleExpression(\"textContent\",!0),s?n.createCallExpression(r.helperString(n.TO_DISPLAY_STRING),[s],i):n.createSimpleExpression(\"\",!0))]}},model:(e,t,r)=>{const s=n.transformModel(e,t,r);if(!s.props.length||1===t.tagType)return s;e.arg&&r.onError(S(54,e.arg.loc));const{tag:u}=t,p=r.isCustomElement(u);if(\"input\"===u||\"textarea\"===u||\"select\"===u||p){let f=a,d=!1;if(\"input\"===u||p){const s=n.findProp(t,\"type\");if(s){if(7===s.type)f=c;else if(s.value)switch(s.value.content){case\"radio\":f=i;break;case\"checkbox\":f=o;break;case\"file\":d=!0,r.onError(S(55,e.loc))}}else n.hasDynamicKeyVBind(t)&&(f=c)}else\"select\"===u&&(f=l);d||(s.needRuntime=r.helper(f))}else r.onError(S(53,e.loc));return s.props=s.props.filter((e=>!(4===e.key.type&&\"modelValue\"===e.key.content))),s},on:(e,t,r)=>n.transformOn(e,t,r,(t=>{const{modifiers:i}=e;if(!i.length)return t;let{key:o,value:a}=t.props[0];const{keyModifiers:l,nonKeyModifiers:c,eventOptionModifiers:f}=((e,t,r,s)=>{const i=[],o=[],a=[];for(let l=0;l<t.length;l++){const c=t[l];\"native\"===c&&n.checkCompatEnabled(\"COMPILER_V_ON_NATIVE\",r,s)||w(c)?a.push(c):A(c)?n.isStaticExp(e)?O(e.content)?i.push(c):o.push(c):(i.push(c),o.push(c)):P(c)?o.push(c):i.push(c)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:a}})(o,i,r,e.loc);if(c.includes(\"right\")&&(o=C(o,\"onContextmenu\")),c.includes(\"middle\")&&(o=C(o,\"onMouseup\")),c.length&&(a=n.createCallExpression(r.helper(u),[a,JSON.stringify(c)])),!l.length||n.isStaticExp(o)&&!O(o.content)||(a=n.createCallExpression(r.helper(p),[a,JSON.stringify(l)])),f.length){const e=f.map(s.capitalize).join(\"\");o=n.isStaticExp(o)?n.createSimpleExpression(`${o.content}${e}`,!0):n.createCompoundExpression([\"(\",o,`) + \"${e}\"`])}return{props:[n.createObjectProperty(o,a)]}})),show:(e,t,r)=>{const{exp:n,loc:s}=e;return n||r.onError(S(57,s)),{props:[],needRuntime:r.helper(f)}}};Object.keys(n).forEach((function(e){\"default\"!==e&&(t[e]=n[e])})),t.DOMDirectiveTransforms=U,t.DOMNodeTransforms=F,t.TRANSITION=d,t.TRANSITION_GROUP=h,t.V_MODEL_CHECKBOX=o,t.V_MODEL_DYNAMIC=c,t.V_MODEL_RADIO=i,t.V_MODEL_SELECT=l,t.V_MODEL_TEXT=a,t.V_ON_WITH_KEYS=p,t.V_ON_WITH_MODIFIERS=u,t.V_SHOW=f,t.compile=function(e,t={}){return n.baseCompile(e,s.extend({},v,t,{nodeTransforms:[R,...F,...t.nodeTransforms||[]],directiveTransforms:s.extend({},U,t.directiveTransforms||{}),transformHoist:I}))},t.createDOMCompilerError=S,t.parse=function(e,t={}){return n.baseParse(e,s.extend({},v,t))},t.parserOptions=v,t.transformStyle=E},(e,t,r)=>{\"use strict\";e.exports=r(506)},e=>{\"use strict\";function t(e,t){var r,n;if(0===t.length)return e;for(r=0,n=t.length;r<n;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return e<0?-2*e:e}function r(e,n,s,i){var o,a=t(t(t(e,s),(o=n,Object.prototype.toString.call(o))),typeof n);if(null===n)return t(a,\"null\");if(void 0===n)return t(a,\"undefined\");if(\"object\"==typeof n||\"function\"==typeof n){if(-1!==i.indexOf(n))return t(a,\"[Circular]\"+s);i.push(n);var l=function(e,t,n){return Object.keys(t).sort().reduce((function(e,s){return r(e,t[s],s,n)}),e)}(a,n,i);if(!(\"valueOf\"in n)||\"function\"!=typeof n.valueOf)return l;try{return t(l,String(n.valueOf()))}catch(e){return t(l,\"[valueOf exception]\"+(e.stack||e.message))}}return t(a,n.toString())}e.exports=function(e){return function(e,t){for(;e.length<8;)e=\"0\"+e;return e}(r(0,e,\"\",[]).toString(16))}},e=>{\"use strict\";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,s){r=r||\"&\",n=n||\"=\";var i={};if(\"string\"!=typeof e||0===e.length)return i;var o=/\\+/g;e=e.split(r);var a=1e3;s&&\"number\"==typeof s.maxKeys&&(a=s.maxKeys);var l=e.length;a>0&&l>a&&(l=a);for(var c=0;c<l;++c){var u,p,f,d,h=e[c].replace(o,\"%20\"),m=h.indexOf(n);m>=0?(u=h.substr(0,m),p=h.substr(m+1)):(u=h,p=\"\"),f=decodeURIComponent(u),d=decodeURIComponent(p),t(i,f)?Array.isArray(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i}},e=>{\"use strict\";var t=function(e){switch(typeof e){case\"string\":return e;case\"boolean\":return e?\"true\":\"false\";case\"number\":return isFinite(e)?e:\"\";default:return\"\"}};e.exports=function(e,r,n,s){return r=r||\"&\",n=n||\"=\",null===e&&(e=void 0),\"object\"==typeof e?Object.keys(e).map((function(s){var i=encodeURIComponent(t(s))+n;return Array.isArray(e[s])?e[s].map((function(e){return i+encodeURIComponent(t(e))})).join(r):i+encodeURIComponent(t(e[s]))})).join(r):s?encodeURIComponent(t(s))+n+encodeURIComponent(t(e)):\"\"}},()=>{},(e,t,r)=>{\"use strict\";var n=r(37).Buffer;let{SourceMapConsumer:s,SourceMapGenerator:i}=r(157),{dirname:o,resolve:a,relative:l,sep:c}=r(158),{pathToFileURL:u}=r(321),p=Boolean(s&&i),f=Boolean(o&&a&&l&&c);e.exports=class{constructor(e,t,r){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){return this.previousMaps||(this.previousMaps=[],this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}))),this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}clearAnnotation(){if(!1===this.mapOpts.annotation)return;let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],\"comment\"===e.type&&0===e.text.indexOf(\"# sourceMappingURL=\")&&this.root.removeChild(t)}setSourcesContent(){let e={};this.root.walk((t=>{if(t.source){let r=t.source.input.from;r&&!e[r]&&(e[r]=!0,this.map.setSourceContent(this.toUrl(this.path(r)),t.source.input.css))}}))}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new s(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}toBase64(e){return n?n.from(e).toString(\"base64\"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?\"data:application/json;base64,\"+this.toBase64(this.map.toString()):\"string\"==typeof this.mapOpts.annotation?this.mapOpts.annotation:\"function\"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+\".map\";let t=\"\\n\";this.css.includes(\"\\r\\n\")&&(t=\"\\r\\n\"),this.css+=t+\"/*# sourceMappingURL=\"+e+\" */\"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):\"to.css\"}generateMap(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf(\"<\"))return e;if(/^\\w+:\\/\\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?o(this.opts.to):\".\";return\"string\"==typeof this.mapOpts.annotation&&(t=o(a(t,this.mapOpts.annotation))),l(t,e)}toUrl(e){return\"\\\\\"===c&&(e=e.replace(/\\\\/g,\"/\")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(u)return u(e.source.input.from).toString();throw new Error(\"`map.absolute` option is not available in this PostCSS build\")}return this.toUrl(this.path(e.source.input.from))}generateString(){this.css=\"\",this.map=new i({file:this.outputFile()});let e,t,r=1,n=1,s=\"<no source>\",o={source:\"\",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&\"end\"!==l&&(o.generated.line=r,o.generated.column=n-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=s,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\\n/g),e?(r+=e.length,t=i.lastIndexOf(\"\\n\"),n=i.length-t):n+=i.length,a&&\"start\"!==l){let e=a.parent||{raws:{}};(\"decl\"!==a.type||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=n-2,this.map.addMapping(o)):(o.source=s,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=n-1,this.map.addMapping(o)))}}))}generate(){if(this.clearAnnotation(),f&&p&&this.isMap())return this.generateMap();let e=\"\";return this.stringify(this.root,(t=>{e+=t})),[e]}}},()=>{},e=>{\"use strict\";let t={};e.exports=function(e){t[e]||(t[e]=!0,\"undefined\"!=typeof console&&console.warn)}},(e,t,r)=>{\"use strict\";let n=r(47),s=r(324),i=r(49),o=r(88),a=r(35),l=r(89);e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces=\"\",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=s(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case\"space\":this.spaces+=e[1];break;case\";\":this.freeSemicolon(e);break;case\"}\":this.end(e);break;case\"comment\":this.comment(e);break;case\"at-word\":this.atrule(e);break;case\"{\":this.emptyRule(e);break;default:this.other(e)}this.endFile()}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]);let r=e[1].slice(2,-2);if(/^\\s*$/.test(r))t.text=\"\",t.raws.left=r,t.raws.right=\"\";else{let e=r.match(/^(\\s*)([^]*\\S)(\\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector=\"\",t.raws.between=\"\",this.current=t}other(e){let t=!1,r=null,n=!1,s=null,i=[],o=e[1].startsWith(\"--\"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),\"(\"===r||\"[\"===r)s||(s=l),i.push(\"(\"===r?\")\":\"]\");else if(o&&n&&\"{\"===r)s||(s=l),i.push(\"}\");else if(0===i.length){if(\";\"===r){if(n)return void this.decl(a,o);break}if(\"{\"===r)return void this.rule(a);if(\"}\"===r){this.tokenizer.back(a.pop()),t=!0;break}\":\"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(s),t&&n){for(;a.length&&(l=a[a.length-1][0],\"space\"===l||\"comment\"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,\"selector\",e),this.current=t}decl(e,t){let r=new n;this.init(r,e[0][2]);let s,i=e[e.length-1];for(\";\"===i[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]);\"word\"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop=\"\";e.length;){let t=e[0][0];if(\":\"===t||\"space\"===t||\"comment\"===t)break;r.prop+=e.shift()[1]}for(r.raws.between=\"\";e.length;){if(s=e.shift(),\":\"===s[0]){r.raws.between+=s[1];break}\"word\"===s[0]&&/\\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1]}\"_\"!==r.prop[0]&&\"*\"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],\"!important\"===s[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n,\" !important\"!==n&&(r.raws.important=n);break}if(\"important\"===s[1].toLowerCase()){let n=e.slice(0),s=\"\";for(let e=t;e>0;e--){let t=n[e][0];if(0===s.trim().indexOf(\"!\")&&\"space\"!==t)break;s=n.pop()[1]+s}0===s.trim().indexOf(\"!\")&&(r.important=!0,r.raws.important=s,e=n)}if(\"space\"!==s[0]&&\"comment\"!==s[0])break}let a=e.some((e=>\"space\"!==e[0]&&\"comment\"!==e[0]));this.raw(r,\"value\",e),a?r.raws.between+=o:r.value=o+r.value,r.value.includes(\":\")&&!t&&this.checkMissedSemicolon(e)}atrule(e){let t,r,n,s=new o;s.name=e[1].slice(1),\"\"===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],\"(\"===t||\"[\"===t?c.push(\"(\"===t?\")\":\"]\"):\"{\"===t&&c.length>0?c.push(\"}\"):t===c[c.length-1]&&c.pop(),0===c.length){if(\";\"===t){s.source.end=this.getPosition(e[2]),this.semicolon=!0;break}if(\"{\"===t){a=!0;break}if(\"}\"===t){if(l.length>0){for(n=l.length-1,r=l[n];r&&\"space\"===r[0];)r=l[--n];r&&(s.source.end=this.getPosition(r[3]||r[2]))}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(s.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(s,\"params\",l),i&&(e=l[l.length-1],s.source.end=this.getPosition(e[3]||e[2]),this.spaces=s.raws.between,s.raws.between=\"\")):(s.raws.afterName=\"\",s.params=\"\"),a&&(s.nodes=[],this.current=s)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||\"\")+this.spaces,this.spaces=\"\",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||\"\")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&\"rule\"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=\"\")}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e),e.source={start:this.getPosition(t),input:this.input},e.raws.before=this.spaces,this.spaces=\"\",\"comment\"!==e.type&&(this.semicolon=!1)}raw(e,t,r){let n,s,i,o,a=r.length,l=\"\",c=!0,u=/^([#.|])?(\\w)+/i;for(let t=0;t<a;t+=1)n=r[t],s=n[0],\"comment\"!==s||\"rule\"!==e.type?\"comment\"===s||\"space\"===s&&t===a-1?c=!1:l+=n[1]:(o=r[t-1],i=r[t+1],\"space\"!==o[0]&&\"space\"!==i[0]&&u.test(o[1])&&u.test(i[1])?l+=n[1]:c=!1);if(!c){let n=r.reduce(((e,t)=>e+t[1]),\"\");e.raws[t]={value:l,raw:n}}e[t]=l}spacesAndCommentsFromEnd(e){let t,r=\"\";for(;e.length&&(t=e[e.length-1][0],\"space\"===t||\"comment\"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r=\"\";for(;e.length&&(t=e[0][0],\"space\"===t||\"comment\"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r=\"\";for(;e.length&&(t=e[e.length-1][0],\"space\"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r=\"\";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}colon(e){let t,r,n,s=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],\"(\"===r&&(s+=1),\")\"===r&&(s-=1),0===s&&\":\"===r){if(n){if(\"word\"===n[0]&&\"progid\"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}unclosedBracket(e){throw this.input.error(\"Unclosed bracket\",e[2])}unknownWord(e){throw this.input.error(\"Unknown word\",e[0][2])}unexpectedClose(e){throw this.input.error(\"Unexpected }\",e[2])}unclosedBlock(){let e=this.current.source.start;throw this.input.error(\"Unclosed block\",e.line,e.column)}doubleColon(e){throw this.input.error(\"Double colon\",e[2])}unnamedAtrule(e,t){throw this.input.error(\"At-rule without name\",t[2])}precheckMissedSemicolon(){}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],\"space\"===r[0]||(n+=1,2!==n));s--);throw this.input.error(\"Missed semicolon\",r[2])}}},e=>{\"use strict\";const t=\"'\".charCodeAt(0),r='\"'.charCodeAt(0),n=\"\\\\\".charCodeAt(0),s=\"/\".charCodeAt(0),i=\"\\n\".charCodeAt(0),o=\" \".charCodeAt(0),a=\"\\f\".charCodeAt(0),l=\"\\t\".charCodeAt(0),c=\"\\r\".charCodeAt(0),u=\"[\".charCodeAt(0),p=\"]\".charCodeAt(0),f=\"(\".charCodeAt(0),d=\")\".charCodeAt(0),h=\"{\".charCodeAt(0),m=\"}\".charCodeAt(0),y=\";\".charCodeAt(0),g=\"*\".charCodeAt(0),b=\":\".charCodeAt(0),v=\"@\".charCodeAt(0),E=/[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g,x=/[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g,S=/.[\\n\"'(/\\\\]/,T=/[\\da-f]/i;e.exports=function(e,w={}){let P,A,O,C,I,k,N,_,j,D,L=e.css.valueOf(),M=w.ignoreErrors,B=L.length,R=0,F=[],U=[];function $(t){throw e.error(\"Unclosed \"+t,R)}return{back:function(e){U.push(e)},nextToken:function(e){if(U.length)return U.pop();if(R>=B)return;let w=!!e&&e.ignoreUnclosed;switch(P=L.charCodeAt(R),P){case i:case o:case l:case c:case a:A=R;do{A+=1,P=L.charCodeAt(A)}while(P===o||P===i||P===l||P===c||P===a);D=[\"space\",L.slice(R,A)],R=A-1;break;case u:case p:case h:case m:case b:case y:case d:{let e=String.fromCharCode(P);D=[e,e,R];break}case f:if(_=F.length?F.pop()[1]:\"\",j=L.charCodeAt(R+1),\"url\"===_&&j!==t&&j!==r&&j!==o&&j!==i&&j!==l&&j!==a&&j!==c){A=R;do{if(k=!1,A=L.indexOf(\")\",A+1),-1===A){if(M||w){A=R;break}$(\"bracket\")}for(N=A;L.charCodeAt(N-1)===n;)N-=1,k=!k}while(k);D=[\"brackets\",L.slice(R,A+1),R,A],R=A}else A=L.indexOf(\")\",R+1),C=L.slice(R,A+1),-1===A||S.test(C)?D=[\"(\",\"(\",R]:(D=[\"brackets\",C,R,A],R=A);break;case t:case r:O=P===t?\"'\":'\"',A=R;do{if(k=!1,A=L.indexOf(O,A+1),-1===A){if(M||w){A=R+1;break}$(\"string\")}for(N=A;L.charCodeAt(N-1)===n;)N-=1,k=!k}while(k);D=[\"string\",L.slice(R,A+1),R,A],R=A;break;case v:E.lastIndex=R+1,E.test(L),A=0===E.lastIndex?L.length-1:E.lastIndex-2,D=[\"at-word\",L.slice(R,A+1),R,A],R=A;break;case n:for(A=R,I=!0;L.charCodeAt(A+1)===n;)A+=1,I=!I;if(P=L.charCodeAt(A+1),I&&P!==s&&P!==o&&P!==i&&P!==l&&P!==c&&P!==a&&(A+=1,T.test(L.charAt(A)))){for(;T.test(L.charAt(A+1));)A+=1;L.charCodeAt(A+1)===o&&(A+=1)}D=[\"word\",L.slice(R,A+1),R,A],R=A;break;default:P===s&&L.charCodeAt(R+1)===g?(A=L.indexOf(\"*/\",R+2)+1,0===A&&(M||w?A=L.length:$(\"comment\")),D=[\"comment\",L.slice(R,A+1),R,A],R=A):(x.lastIndex=R+1,x.test(L),A=0===x.lastIndex?L.length-1:x.lastIndex-2,D=[\"word\",L.slice(R,A+1),R,A],F.push(D),R=A)}return R++,D},endOfFile:function(){return 0===U.length&&R>=B},position:function(){return R}}}},e=>{e.exports={nanoid:(e=21)=>{let t=\"\",r=e;for(;r--;)t+=\"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW\"[64*Math.random()|0];return t},customAlphabet:(e,t)=>()=>{let r=\"\",n=t;for(;n--;)r+=e[Math.random()*e.length|0];return r}}},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.unescapeValue=y,t.default=void 0;var n,s=l(r(92)),i=l(r(98)),o=l(r(53)),a=r(5);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=r(327),f=/^('|\")([^]*)\\1$/,d=p((function(){}),\"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.\"),h=p((function(){}),\"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.\"),m=p((function(){}),\"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.\");function y(e){var t=!1,r=null,n=e,s=n.match(f);return s&&(r=s[1],n=s[2]),(n=(0,i.default)(n))!==e&&(t=!0),{deprecatedUsage:t,unescaped:n,quoteMark:r}}var g=function(e){var t,r;function n(t){var r;return void 0===t&&(t={}),(r=e.call(this,function(e){if(void 0!==e.quoteMark)return e;if(void 0===e.value)return e;m();var t=y(e.value),r=t.quoteMark,n=t.unescaped;return e.raws||(e.raws={}),void 0===e.raws.value&&(e.raws.value=e.value),e.value=n,e.quoteMark=r,e}(t))||this).type=a.ATTRIBUTE,r.raws=r.raws||{},Object.defineProperty(r.raws,\"unquoted\",{get:p((function(){return r.value}),\"attr.raws.unquoted is deprecated. Call attr.value instead.\"),set:p((function(){return r.value}),\"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.\")}),r._constructed=!0,r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,u(t,r);var i,o,l=n.prototype;return l.getQuotedValue=function(e){void 0===e&&(e={});var t=this._determineQuoteMark(e),r=b[t];return(0,s.default)(this._value,r)},l._determineQuoteMark=function(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)},l.setValue=function(e,t){void 0===t&&(t={}),this._value=e,this._quoteMark=this._determineQuoteMark(t),this._syncRawValue()},l.smartQuoteMark=function(e){var t=this.value,r=t.replace(/[^']/g,\"\").length,i=t.replace(/[^\"]/g,\"\").length;if(r+i===0){var o=(0,s.default)(t,{isIdentifier:!0});if(o===t)return n.NO_QUOTE;var a=this.preferredQuoteMark(e);if(a===n.NO_QUOTE){var l=this.quoteMark||e.quoteMark||n.DOUBLE_QUOTE,c=b[l];if((0,s.default)(t,c).length<o.length)return l}return a}return i===r?this.preferredQuoteMark(e):i<r?n.DOUBLE_QUOTE:n.SINGLE_QUOTE},l.preferredQuoteMark=function(e){var t=e.preferCurrentQuoteMark?this.quoteMark:e.quoteMark;return void 0===t&&(t=e.preferCurrentQuoteMark?e.quoteMark:this.quoteMark),void 0===t&&(t=n.DOUBLE_QUOTE),t},l._syncRawValue=function(){var e=(0,s.default)(this._value,b[this.quoteMark]);e===this._value?this.raws&&delete this.raws.value:this.raws.value=e},l._handleEscapes=function(e,t){if(this._constructed){var r=(0,s.default)(t,{isIdentifier:!0});r!==t?this.raws[e]=r:delete this.raws[e]}},l._spacesFor=function(e){var t=this.spaces[e]||{},r=this.raws.spaces&&this.raws.spaces[e]||{};return Object.assign({before:\"\",after:\"\"},t,r)},l._stringFor=function(e,t,r){void 0===t&&(t=e),void 0===r&&(r=v);var n=this._spacesFor(t);return r(this.stringifyProperty(e),n)},l.offsetOf=function(e){var t=1,r=this._spacesFor(\"attribute\");if(t+=r.before.length,\"namespace\"===e||\"ns\"===e)return this.namespace?t:-1;if(\"attributeNS\"===e)return t;if(t+=this.namespaceString.length,this.namespace&&(t+=1),\"attribute\"===e)return t;t+=this.stringifyProperty(\"attribute\").length,t+=r.after.length;var n=this._spacesFor(\"operator\");t+=n.before.length;var s=this.stringifyProperty(\"operator\");if(\"operator\"===e)return s?t:-1;t+=s.length,t+=n.after.length;var i=this._spacesFor(\"value\");t+=i.before.length;var o=this.stringifyProperty(\"value\");return\"value\"===e?o?t:-1:(t+=o.length,t+=i.after.length,t+=this._spacesFor(\"insensitive\").before.length,\"insensitive\"===e&&this.insensitive?t:-1)},l.toString=function(){var e=this,t=[this.rawSpaceBefore,\"[\"];return t.push(this._stringFor(\"qualifiedAttribute\",\"attribute\")),this.operator&&(this.value||\"\"===this.value)&&(t.push(this._stringFor(\"operator\")),t.push(this._stringFor(\"value\")),t.push(this._stringFor(\"insensitiveFlag\",\"insensitive\",(function(t,r){return!(t.length>0)||e.quoted||0!==r.before.length||e.spaces.value&&e.spaces.value.after||(r.before=\" \"),v(t,r)})))),t.push(\"]\"),t.push(this.rawSpaceAfter),t.join(\"\")},i=n,(o=[{key:\"quoted\",get:function(){var e=this.quoteMark;return\"'\"===e||'\"'===e},set:function(e){h()}},{key:\"quoteMark\",get:function(){return this._quoteMark},set:function(e){this._constructed?this._quoteMark!==e&&(this._quoteMark=e,this._syncRawValue()):this._quoteMark=e}},{key:\"qualifiedAttribute\",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:\"insensitiveFlag\",get:function(){return this.insensitive?\"i\":\"\"}},{key:\"value\",get:function(){return this._value},set:function(e){if(this._constructed){var t=y(e),r=t.deprecatedUsage,n=t.unescaped,s=t.quoteMark;if(r&&d(),n===this._value&&s===this._quoteMark)return;this._value=n,this._quoteMark=s,this._syncRawValue()}else this._value=e}},{key:\"attribute\",get:function(){return this._attribute},set:function(e){this._handleEscapes(\"attribute\",e),this._attribute=e}}])&&c(i.prototype,o),n}(o.default);t.default=g,g.NO_QUOTE=null,g.SINGLE_QUOTE=\"'\",g.DOUBLE_QUOTE='\"';var b=((n={\"'\":{quotes:\"single\",wrap:!0},'\"':{quotes:\"double\",wrap:!0}}).null={isIdentifier:!0},n);function v(e,t){return\"\"+t.before+e+t.after}},(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&\"true\"===String(t).toLowerCase()}e.exports=function(e,t){if(n(\"noDeprecation\"))return e;var r=!1;return function(){if(!r){if(n(\"throwDeprecation\"))throw new Error(t);n(\"traceDeprecation\"),r=!0}return e.apply(this,arguments)}}},(e,t)=>{\"use strict\";t.__esModule=!0,t.combinator=t.word=t.comment=t.str=t.tab=t.newline=t.feed=t.cr=t.backslash=t.bang=t.slash=t.doubleQuote=t.singleQuote=t.space=t.greaterThan=t.pipe=t.equals=t.plus=t.caret=t.tilde=t.dollar=t.closeSquare=t.openSquare=t.closeParenthesis=t.openParenthesis=t.semicolon=t.colon=t.comma=t.at=t.asterisk=t.ampersand=void 0,t.ampersand=38,t.asterisk=42,t.at=64,t.comma=44,t.colon=58,t.semicolon=59,t.openParenthesis=40,t.closeParenthesis=41,t.openSquare=91,t.closeSquare=93,t.dollar=36,t.tilde=126,t.caret=94,t.plus=43,t.equals=61,t.pipe=124,t.greaterThan=62,t.space=32,t.singleQuote=39,t.doubleQuote=34,t.slash=47,t.bang=33,t.backslash=92,t.cr=13,t.feed=12,t.newline=10,t.tab=9,t.str=39,t.comment=-1,t.word=-2,t.combinator=-3},(e,t,r)=>{\"use strict\";var n=r(37).Buffer,s=r(178),i=function e(t){this.bits=t instanceof e?t.bits.slice():[]};i.prototype.add=function(e){this.bits[e>>5]|=1<<(31&e)},i.prototype.has=function(e){return!!(this.bits[e>>5]&1<<(31&e))};var o=function(e,t,r){this.start=e,this.end=t,this.original=r,this.intro=\"\",this.outro=\"\",this.content=r,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})};o.prototype.appendLeft=function(e){this.outro+=e},o.prototype.appendRight=function(e){this.intro=this.intro+e},o.prototype.clone=function(){var e=new o(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e},o.prototype.contains=function(e){return this.start<e&&e<this.end},o.prototype.eachNext=function(e){for(var t=this;t;)e(t),t=t.next},o.prototype.eachPrevious=function(e){for(var t=this;t;)e(t),t=t.previous},o.prototype.edit=function(e,t,r){return this.content=e,r||(this.intro=\"\",this.outro=\"\"),this.storeName=t,this.edited=!0,this},o.prototype.prependLeft=function(e){this.outro=e+this.outro},o.prototype.prependRight=function(e){this.intro=e+this.intro},o.prototype.split=function(e){var t=e-this.start,r=this.original.slice(0,t),n=this.original.slice(t);this.original=r;var s=new o(e,this.end,n);return s.outro=this.outro,this.outro=\"\",this.end=e,this.edited?(s.edit(\"\",!1),this.content=\"\"):this.content=r,s.next=this.next,s.next&&(s.next.previous=s),s.previous=this,this.next=s,s},o.prototype.toString=function(){return this.intro+this.content+this.outro},o.prototype.trimEnd=function(e){if(this.outro=this.outro.replace(e,\"\"),this.outro.length)return!0;var t=this.content.replace(e,\"\");return t.length?(t!==this.content&&this.split(this.start+t.length).edit(\"\",void 0,!0),!0):(this.edit(\"\",void 0,!0),this.intro=this.intro.replace(e,\"\"),!!this.intro.length||void 0)},o.prototype.trimStart=function(e){if(this.intro=this.intro.replace(e,\"\"),this.intro.length)return!0;var t=this.content.replace(e,\"\");return t.length?(t!==this.content&&(this.split(this.end-t.length),this.edit(\"\",void 0,!0)),!0):(this.edit(\"\",void 0,!0),this.outro=this.outro.replace(e,\"\"),!!this.outro.length||void 0)};var a=function(){throw new Error(\"Unsupported environment: `window.btoa` or `Buffer` should be supported.\")};\"undefined\"!=typeof window&&\"function\"==typeof window.btoa?a=function(e){return window.btoa(unescape(encodeURIComponent(e)))}:\"function\"==typeof n&&(a=function(e){return n.from(e,\"utf-8\").toString(\"base64\")});var l=function(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=s.encode(e.mappings)};function c(e){var t=e.split(\"\\n\"),r=t.filter((function(e){return/^\\t+/.test(e)})),n=t.filter((function(e){return/^ {2,}/.test(e)}));if(0===r.length&&0===n.length)return null;if(r.length>=n.length)return\"\\t\";var s=n.reduce((function(e,t){var r=/^ +/.exec(t)[0].length;return Math.min(r,e)}),1/0);return new Array(s+1).join(\" \")}function u(e,t){var r=e.split(/[/\\\\]/),n=t.split(/[/\\\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length)for(var s=r.length;s--;)r[s]=\"..\";return r.concat(n).join(\"/\")}l.prototype.toString=function(){return JSON.stringify(this)},l.prototype.toUrl=function(){return\"data:application/json;charset=utf-8;base64,\"+a(this.toString())};var p=Object.prototype.toString;function f(e){return\"[object Object]\"===p.call(e)}function d(e){for(var t=e.split(\"\\n\"),r=[],n=0,s=0;n<t.length;n++)r.push(s),s+=t[n].length+1;return function(e){for(var t=0,n=r.length;t<n;){var s=t+n>>1;e<r[s]?n=s:t=s+1}var i=t-1;return{line:i,column:e-r[i]}}}var h=function(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null};h.prototype.addEdit=function(e,t,r,n){if(t.length){var s=[this.generatedCodeColumn,e,r.line,r.column];n>=0&&s.push(n),this.rawSegments.push(s)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null},h.prototype.addUneditedChunk=function(e,t,r,n,s){for(var i=t.start,o=!0;i<t.end;)(this.hires||o||s.has(i))&&this.rawSegments.push([this.generatedCodeColumn,e,n.line,n.column]),\"\\n\"===r[i]?(n.line+=1,n.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0):(n.column+=1,this.generatedCodeColumn+=1,o=!1),i+=1;this.pending=null},h.prototype.advance=function(e){if(e){var t=e.split(\"\\n\");if(t.length>1){for(var r=0;r<t.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}};var m=\"\\n\",y={insertLeft:!1,insertRight:!1,storeName:!1},g=function(e,t){void 0===t&&(t={});var r=new o(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:\"\"},intro:{writable:!0,value:\"\"},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new i},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:c(e)}}),this.byStart[0]=r,this.byEnd[e.length]=r};g.prototype.addSourcemapLocation=function(e){this.sourcemapLocations.add(e)},g.prototype.append=function(e){if(\"string\"!=typeof e)throw new TypeError(\"outro content must be a string\");return this.outro+=e,this},g.prototype.appendLeft=function(e,t){if(\"string\"!=typeof t)throw new TypeError(\"inserted content must be a string\");this._split(e);var r=this.byEnd[e];return r?r.appendLeft(t):this.intro+=t,this},g.prototype.appendRight=function(e,t){if(\"string\"!=typeof t)throw new TypeError(\"inserted content must be a string\");this._split(e);var r=this.byStart[e];return r?r.appendRight(t):this.outro+=t,this},g.prototype.clone=function(){for(var e=new g(this.original,{filename:this.filename}),t=this.firstChunk,r=e.firstChunk=e.lastSearchedChunk=t.clone();t;){e.byStart[r.start]=r,e.byEnd[r.end]=r;var n=t.next,s=n&&n.clone();s&&(r.next=s,s.previous=r,r=s),t=n}return e.lastChunk=r,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new i(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e},g.prototype.generateDecodedMap=function(e){var t=this;e=e||{};var r=Object.keys(this.storedNames),n=new h(e.hires),s=d(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext((function(e){var i=s(e.start);e.intro.length&&n.advance(e.intro),e.edited?n.addEdit(0,e.content,i,e.storeName?r.indexOf(e.original):-1):n.addUneditedChunk(0,e,t.original,i,t.sourcemapLocations),e.outro.length&&n.advance(e.outro)})),{file:e.file?e.file.split(/[/\\\\]/).pop():null,sources:[e.source?u(e.file||\"\",e.source):null],sourcesContent:e.includeContent?[this.original]:[null],names:r,mappings:n.raw}},g.prototype.generateMap=function(e){return new l(this.generateDecodedMap(e))},g.prototype.getIndentString=function(){return null===this.indentStr?\"\\t\":this.indentStr},g.prototype.indent=function(e,t){var r=/^[^\\r\\n]/gm;if(f(e)&&(t=e,e=void 0),\"\"===(e=void 0!==e?e:this.indentStr||\"\\t\"))return this;var n={};(t=t||{}).exclude&&(\"number\"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((function(e){for(var t=e[0];t<e[1];t+=1)n[t]=!0}));var s=!1!==t.indentStart,i=function(t){return s?\"\"+e+t:(s=!0,t)};this.intro=this.intro.replace(r,i);for(var o=0,a=this.firstChunk;a;){var l=a.end;if(a.edited)n[o]||(a.content=a.content.replace(r,i),a.content.length&&(s=\"\\n\"===a.content[a.content.length-1]));else for(o=a.start;o<l;){if(!n[o]){var c=this.original[o];\"\\n\"===c?s=!0:\"\\r\"!==c&&s&&(s=!1,o===a.start?a.prependRight(e):(this._splitChunk(a,o),(a=a.next).prependRight(e)))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(r,i),this},g.prototype.insert=function(){throw new Error(\"magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)\")},g.prototype.insertLeft=function(e,t){return y.insertLeft||(y.insertLeft=!0),this.appendLeft(e,t)},g.prototype.insertRight=function(e,t){return y.insertRight||(y.insertRight=!0),this.prependRight(e,t)},g.prototype.move=function(e,t,r){if(r>=e&&r<=t)throw new Error(\"Cannot move a selection inside itself\");this._split(e),this._split(t),this._split(r);var n=this.byStart[e],s=this.byEnd[t],i=n.previous,o=s.next,a=this.byStart[r];if(!a&&s===this.lastChunk)return this;var l=a?a.previous:this.lastChunk;return i&&(i.next=o),o&&(o.previous=i),l&&(l.next=n),a&&(a.previous=s),n.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=n.previous,this.lastChunk.next=null),n.previous=l,s.next=a||null,l||(this.firstChunk=n),a||(this.lastChunk=s),this},g.prototype.overwrite=function(e,t,r,n){if(\"string\"!=typeof r)throw new TypeError(\"replacement content must be a string\");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error(\"end is out of bounds\");if(e===t)throw new Error(\"Cannot overwrite a zero-length range – use appendLeft or prependRight instead\");this._split(e),this._split(t),!0===n&&(y.storeName||(y.storeName=!0),n={storeName:!0});var s=void 0!==n&&n.storeName,i=void 0!==n&&n.contentOnly;if(s){var a=this.original.slice(e,t);this.storedNames[a]=!0}var l=this.byStart[e],c=this.byEnd[t];if(l){if(t>l.end&&l.next!==this.byStart[l.end])throw new Error(\"Cannot overwrite across a split point\");if(l.edit(r,s,i),l!==c){for(var u=l.next;u!==c;)u.edit(\"\",!1),u=u.next;u.edit(\"\",!1)}}else{var p=new o(e,t,\"\").edit(r,s);c.next=p,p.previous=c}return this},g.prototype.prepend=function(e){if(\"string\"!=typeof e)throw new TypeError(\"outro content must be a string\");return this.intro=e+this.intro,this},g.prototype.prependLeft=function(e,t){if(\"string\"!=typeof t)throw new TypeError(\"inserted content must be a string\");this._split(e);var r=this.byEnd[e];return r?r.prependLeft(t):this.intro=t+this.intro,this},g.prototype.prependRight=function(e,t){if(\"string\"!=typeof t)throw new TypeError(\"inserted content must be a string\");this._split(e);var r=this.byStart[e];return r?r.prependRight(t):this.outro=t+this.outro,this},g.prototype.remove=function(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error(\"Character is out of bounds\");if(e>t)throw new Error(\"end must be greater than start\");this._split(e),this._split(t);for(var r=this.byStart[e];r;)r.intro=\"\",r.outro=\"\",r.edit(\"\"),r=t>r.end?this.byStart[r.end]:null;return this},g.prototype.lastChar=function(){if(this.outro.length)return this.outro[this.outro.length-1];var e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:\"\"},g.prototype.lastLine=function(){var e=this.outro.lastIndexOf(m);if(-1!==e)return this.outro.substr(e+1);var t=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(-1!==(e=r.outro.lastIndexOf(m)))return r.outro.substr(e+1)+t;t=r.outro+t}if(r.content.length>0){if(-1!==(e=r.content.lastIndexOf(m)))return r.content.substr(e+1)+t;t=r.content+t}if(r.intro.length>0){if(-1!==(e=r.intro.lastIndexOf(m)))return r.intro.substr(e+1)+t;t=r.intro+t}}while(r=r.previous);return-1!==(e=this.intro.lastIndexOf(m))?this.intro.substr(e+1)+t:this.intro+t},g.prototype.slice=function(e,t){for(void 0===e&&(e=0),void 0===t&&(t=this.original.length);e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;for(var r=\"\",n=this.firstChunk;n&&(n.start>e||n.end<=e);){if(n.start<t&&n.end>=t)return r;n=n.next}if(n&&n.edited&&n.start!==e)throw new Error(\"Cannot use replaced character \"+e+\" as slice start anchor.\");for(var s=n;n;){!n.intro||s===n&&n.start!==e||(r+=n.intro);var i=n.start<t&&n.end>=t;if(i&&n.edited&&n.end!==t)throw new Error(\"Cannot use replaced character \"+t+\" as slice end anchor.\");var o=s===n?e-n.start:0,a=i?n.content.length+t-n.end:n.content.length;if(r+=n.content.slice(o,a),!n.outro||i&&n.end!==t||(r+=n.outro),i)break;n=n.next}return r},g.prototype.snip=function(e,t){var r=this.clone();return r.remove(0,e),r.remove(t,r.original.length),r},g.prototype._split=function(e){if(!this.byStart[e]&&!this.byEnd[e])for(var t=this.lastSearchedChunk,r=e>t.end;t;){if(t.contains(e))return this._splitChunk(t,e);t=r?this.byStart[t.end]:this.byEnd[t.start]}},g.prototype._splitChunk=function(e,t){if(e.edited&&e.content.length){var r=d(this.original)(t);throw new Error(\"Cannot split a chunk that has already been edited (\"+r.line+\":\"+r.column+' – \"'+e.original+'\")')}var n=e.split(t);return this.byEnd[t]=e,this.byStart[t]=n,this.byEnd[n.end]=n,e===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=e,!0},g.prototype.toString=function(){for(var e=this.intro,t=this.firstChunk;t;)e+=t.toString(),t=t.next;return e+this.outro},g.prototype.isEmpty=function(){var e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0},g.prototype.length=function(){var e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t},g.prototype.trimLines=function(){return this.trim(\"[\\\\r\\\\n]\")},g.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},g.prototype.trimEndAborted=function(e){var t=new RegExp((e||\"\\\\s\")+\"+$\");if(this.outro=this.outro.replace(t,\"\"),this.outro.length)return!0;var r=this.lastChunk;do{var n=r.end,s=r.trimEnd(t);if(r.end!==n&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return!0;r=r.previous}while(r);return!1},g.prototype.trimEnd=function(e){return this.trimEndAborted(e),this},g.prototype.trimStartAborted=function(e){var t=new RegExp(\"^\"+(e||\"\\\\s\")+\"+\");if(this.intro=this.intro.replace(t,\"\"),this.intro.length)return!0;var r=this.firstChunk;do{var n=r.end,s=r.trimStart(t);if(r.end!==n&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return!0;r=r.next}while(r);return!1},g.prototype.trimStart=function(e){return this.trimStartAborted(e),this};var b=Object.prototype.hasOwnProperty,v=function(e){void 0===e&&(e={}),this.intro=e.intro||\"\",this.separator=void 0!==e.separator?e.separator:\"\\n\",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}};v.prototype.addSource=function(e){if(e instanceof g)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!f(e)||!e.content)throw new Error(\"bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`\");if([\"filename\",\"indentExclusionRanges\",\"separator\"].forEach((function(t){b.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(b.call(this.uniqueSourceIndexByFilename,e.filename)){var t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error(\"Illegal source: same filename (\"+e.filename+\"), different contents\")}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this},v.prototype.append=function(e,t){return this.addSource({content:new g(e),separator:t&&t.separator||\"\"}),this},v.prototype.clone=function(){var e=new v({intro:this.intro,separator:this.separator});return this.sources.forEach((function(t){e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})})),e},v.prototype.generateDecodedMap=function(e){var t=this;void 0===e&&(e={});var r=[];this.sources.forEach((function(e){Object.keys(e.content.storedNames).forEach((function(e){~r.indexOf(e)||r.push(e)}))}));var n=new h(e.hires);return this.intro&&n.advance(this.intro),this.sources.forEach((function(e,s){s>0&&n.advance(t.separator);var i=e.filename?t.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=d(o.original);o.intro&&n.advance(o.intro),o.firstChunk.eachNext((function(t){var s=a(t.start);t.intro.length&&n.advance(t.intro),e.filename?t.edited?n.addEdit(i,t.content,s,t.storeName?r.indexOf(t.original):-1):n.addUneditedChunk(i,t,o.original,s,o.sourcemapLocations):n.advance(t.content),t.outro.length&&n.advance(t.outro)})),o.outro&&n.advance(o.outro)})),{file:e.file?e.file.split(/[/\\\\]/).pop():null,sources:this.uniqueSources.map((function(t){return e.file?u(e.file,t.filename):t.filename})),sourcesContent:this.uniqueSources.map((function(t){return e.includeContent?t.content:null})),names:r,mappings:n.raw}},v.prototype.generateMap=function(e){return new l(this.generateDecodedMap(e))},v.prototype.getIndentString=function(){var e={};return this.sources.forEach((function(t){var r=t.content.indentStr;null!==r&&(e[r]||(e[r]=0),e[r]+=1)})),Object.keys(e).sort((function(t,r){return e[t]-e[r]}))[0]||\"\\t\"},v.prototype.indent=function(e){var t=this;if(arguments.length||(e=this.getIndentString()),\"\"===e)return this;var r=!this.intro||\"\\n\"===this.intro.slice(-1);return this.sources.forEach((function(n,s){var i=void 0!==n.separator?n.separator:t.separator,o=r||s>0&&/\\r?\\n$/.test(i);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:o}),r=\"\\n\"===n.content.lastChar()})),this.intro&&(this.intro=e+this.intro.replace(/^[^\\n]/gm,(function(t,r){return r>0?e+t:t}))),this},v.prototype.prepend=function(e){return this.intro=e+this.intro,this},v.prototype.toString=function(){var e=this,t=this.sources.map((function(t,r){var n=void 0!==t.separator?t.separator:e.separator;return(r>0?n:\"\")+t.content.toString()})).join(\"\");return this.intro+t},v.prototype.isEmpty=function(){return!(this.intro.length&&this.intro.trim()||this.sources.some((function(e){return!e.content.isEmpty()})))},v.prototype.length=function(){return this.sources.reduce((function(e,t){return e+t.content.length()}),this.intro.length)},v.prototype.trimLines=function(){return this.trim(\"[\\\\r\\\\n]\")},v.prototype.trim=function(e){return this.trimStart(e).trimEnd(e)},v.prototype.trimStart=function(e){var t=new RegExp(\"^\"+(e||\"\\\\s\")+\"+\");if(this.intro=this.intro.replace(t,\"\"),!this.intro){var r,n=0;do{if(!(r=this.sources[n++]))break}while(!r.content.trimStartAborted(e))}return this},v.prototype.trimEnd=function(e){var t,r=new RegExp((e||\"\\\\s\")+\"+$\"),n=this.sources.length-1;do{if(!(t=this.sources[n--])){this.intro=this.intro.replace(r,\"\");break}}while(!t.content.trimEndAborted(e));return this},g.Bundle=v,g.SourceMap=l,g.default=g,e.exports=g},(e,t,r)=>{var n,s=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,i=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,o=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",a=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",l=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",c=\"[\"+l+\"]\",u=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe23\\\\u20d0-\\\\u20f0]\",p=\"\\\\d+\",f=\"[\"+o+\"]\",d=\"[^\\\\ud800-\\\\udfff\"+l+p+\"\\\\u2700-\\\\u27bf\"+o+a+\"]\",h=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",m=\"[^\\\\ud800-\\\\udfff]\",y=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",g=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",b=\"[\"+a+\"]\",v=\"(?:\"+f+\"|\"+d+\")\",E=\"(?:\"+b+\"|\"+d+\")\",x=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",S=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",T=\"(?:\"+u+\"|\"+h+\")?\",w=\"[\\\\ufe0e\\\\ufe0f]?\",P=w+T+\"(?:\\\\u200d(?:\"+[m,y,g].join(\"|\")+\")\"+w+T+\")*\",A=\"(?:\"+[\"[\\\\u2700-\\\\u27bf]\",y,g].join(\"|\")+\")\"+P,O=\"(?:\"+[m+u+\"?\",u,y,g,\"[\\\\ud800-\\\\udfff]\"].join(\"|\")+\")\",C=RegExp(\"['’]\",\"g\"),I=RegExp(u,\"g\"),k=RegExp(h+\"(?=\"+h+\")|\"+O+P,\"g\"),N=RegExp([b+\"?\"+f+\"+\"+x+\"(?=\"+[c,b,\"$\"].join(\"|\")+\")\",E+\"+\"+S+\"(?=\"+[c,b+v,\"$\"].join(\"|\")+\")\",b+\"?\"+v+\"+\"+x,b+\"+\"+S,p,A].join(\"|\"),\"g\"),_=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe23\\\\u20d0-\\\\u20f0\\\\ufe0e\\\\ufe0f]\"),j=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,D=\"object\"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,L=\"object\"==typeof self&&self&&self.Object===Object&&self,M=D||L||Function(\"return this\")(),B=(n={À:\"A\",Á:\"A\",Â:\"A\",Ã:\"A\",Ä:\"A\",Å:\"A\",à:\"a\",á:\"a\",â:\"a\",ã:\"a\",ä:\"a\",å:\"a\",Ç:\"C\",ç:\"c\",Ð:\"D\",ð:\"d\",È:\"E\",É:\"E\",Ê:\"E\",Ë:\"E\",è:\"e\",é:\"e\",ê:\"e\",ë:\"e\",Ì:\"I\",Í:\"I\",Î:\"I\",Ï:\"I\",ì:\"i\",í:\"i\",î:\"i\",ï:\"i\",Ñ:\"N\",ñ:\"n\",Ò:\"O\",Ó:\"O\",Ô:\"O\",Õ:\"O\",Ö:\"O\",Ø:\"O\",ò:\"o\",ó:\"o\",ô:\"o\",õ:\"o\",ö:\"o\",ø:\"o\",Ù:\"U\",Ú:\"U\",Û:\"U\",Ü:\"U\",ù:\"u\",ú:\"u\",û:\"u\",ü:\"u\",Ý:\"Y\",ý:\"y\",ÿ:\"y\",Æ:\"Ae\",æ:\"ae\",Þ:\"Th\",þ:\"th\",ß:\"ss\",Ā:\"A\",Ă:\"A\",Ą:\"A\",ā:\"a\",ă:\"a\",ą:\"a\",Ć:\"C\",Ĉ:\"C\",Ċ:\"C\",Č:\"C\",ć:\"c\",ĉ:\"c\",ċ:\"c\",č:\"c\",Ď:\"D\",Đ:\"D\",ď:\"d\",đ:\"d\",Ē:\"E\",Ĕ:\"E\",Ė:\"E\",Ę:\"E\",Ě:\"E\",ē:\"e\",ĕ:\"e\",ė:\"e\",ę:\"e\",ě:\"e\",Ĝ:\"G\",Ğ:\"G\",Ġ:\"G\",Ģ:\"G\",ĝ:\"g\",ğ:\"g\",ġ:\"g\",ģ:\"g\",Ĥ:\"H\",Ħ:\"H\",ĥ:\"h\",ħ:\"h\",Ĩ:\"I\",Ī:\"I\",Ĭ:\"I\",Į:\"I\",İ:\"I\",ĩ:\"i\",ī:\"i\",ĭ:\"i\",į:\"i\",ı:\"i\",Ĵ:\"J\",ĵ:\"j\",Ķ:\"K\",ķ:\"k\",ĸ:\"k\",Ĺ:\"L\",Ļ:\"L\",Ľ:\"L\",Ŀ:\"L\",Ł:\"L\",ĺ:\"l\",ļ:\"l\",ľ:\"l\",ŀ:\"l\",ł:\"l\",Ń:\"N\",Ņ:\"N\",Ň:\"N\",Ŋ:\"N\",ń:\"n\",ņ:\"n\",ň:\"n\",ŋ:\"n\",Ō:\"O\",Ŏ:\"O\",Ő:\"O\",ō:\"o\",ŏ:\"o\",ő:\"o\",Ŕ:\"R\",Ŗ:\"R\",Ř:\"R\",ŕ:\"r\",ŗ:\"r\",ř:\"r\",Ś:\"S\",Ŝ:\"S\",Ş:\"S\",Š:\"S\",ś:\"s\",ŝ:\"s\",ş:\"s\",š:\"s\",Ţ:\"T\",Ť:\"T\",Ŧ:\"T\",ţ:\"t\",ť:\"t\",ŧ:\"t\",Ũ:\"U\",Ū:\"U\",Ŭ:\"U\",Ů:\"U\",Ű:\"U\",Ų:\"U\",ũ:\"u\",ū:\"u\",ŭ:\"u\",ů:\"u\",ű:\"u\",ų:\"u\",Ŵ:\"W\",ŵ:\"w\",Ŷ:\"Y\",ŷ:\"y\",Ÿ:\"Y\",Ź:\"Z\",Ż:\"Z\",Ž:\"Z\",ź:\"z\",ż:\"z\",ž:\"z\",Ĳ:\"IJ\",ĳ:\"ij\",Œ:\"Oe\",œ:\"oe\",ŉ:\"'n\",ſ:\"ss\"},function(e){return null==n?void 0:n[e]});function R(e){return _.test(e)}var F=Object.prototype.toString,U=M.Symbol,$=U?U.prototype:void 0,q=$?$.toString:void 0;function V(e){return null==e?\"\":function(e){if(\"string\"==typeof e)return e;if(function(e){return\"symbol\"==typeof e||function(e){return!!e&&\"object\"==typeof e}(e)&&\"[object Symbol]\"==F.call(e)}(e))return q?q.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-1/0?\"-0\":t}(e)}var W,K=(W=function(e,t,r){return t=t.toLowerCase(),e+(r?G(V(t).toLowerCase()):t)},function(e){return function(e,t,r,n){for(var s=-1,i=e?e.length:0;++s<i;)r=t(r,e[s],s,e);return r}(function(e,t,r){return e=V(e),void 0===(t=t)?function(e){return j.test(e)}(e)?function(e){return e.match(N)||[]}(e):function(e){return e.match(s)||[]}(e):e.match(t)||[]}(function(e){return(e=V(e))&&e.replace(i,B).replace(I,\"\")}(e).replace(C,\"\")),W,\"\")}),G=(\"toUpperCase\",function(e){var t,r,n,s,i=R(e=V(e))?function(e){return R(e)?function(e){return e.match(k)||[]}(e):function(e){return e.split(\"\")}(e)}(e):void 0,o=i?i[0]:e.charAt(0),a=i?(t=i,r=1,s=t.length,n=void 0===n?s:n,!r&&n>=s?t:function(e,t,r){var n=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(r=r>s?s:r)<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(s);++n<s;)i[n]=e[n+t];return i}(t,r,n)).join(\"\"):e.slice(1);return o.toUpperCase()+a});e.exports=K},(e,t,r)=>{\"use strict\";var n=r(7),s=r(520).interpolateName,i=r(8);e.exports=function(e,t){var r=(t=t||{})&&\"string\"==typeof t.context?t.context:n.cwd(),o=t&&\"string\"==typeof t.hashPrefix?t.hashPrefix:\"\";return function(t,n){var a=e.replace(/\\[local\\]/gi,t),l={resourcePath:n},c={content:o+i.relative(r,n).replace(/\\\\/g,\"/\")+\"+\"+t,context:r};return s(l,a,c).replace(new RegExp(\"[^a-zA-Z0-9\\\\-_ -￿]\",\"g\"),\"-\").replace(/^((-?[0-9])|--)/,\"_$1\")}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n,s=(n=r(521))&&n.__esModule?n:{default:n};const i=/^:import\\((.+)\\)$/;t.default=class{constructor(e,t){this.pathFetcher=e,this.plugin=this.plugin.bind(this),this.exportTokens={},this.translations={},this.trace=t}plugin(){const e=this;return{postcssPlugin:\"css-modules-parser\",OnceExit:t=>Promise.all(e.fetchAllImports(t)).then((()=>e.linkImportedSymbols(t))).then((()=>e.extractExports(t)))}}fetchAllImports(e){let t=[];return e.each((r=>{\"rule\"==r.type&&r.selector.match(i)&&t.push(this.fetchImport(r,e.source.input.from,t.length))})),t}linkImportedSymbols(e){(0,s.default)(e,this.translations)}extractExports(e){e.each((e=>{\"rule\"==e.type&&\":export\"==e.selector&&this.handleExport(e)}))}handleExport(e){e.each((e=>{\"decl\"==e.type&&(Object.keys(this.translations).forEach((t=>{e.value=e.value.replace(t,this.translations[t])})),this.exportTokens[e.prop]=e.value)})),e.remove()}fetchImport(e,t,r){let n=e.selector.match(i)[1],s=this.trace+String.fromCharCode(r);return this.pathFetcher(n,t,s).then((t=>{e.each((e=>{\"decl\"==e.type&&(this.translations[e.prop]=t[e.value])})),e.remove()}),(e=>{}))}}},e=>{\"use strict\";e.exports=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0}},(e,t,r)=>{\"use strict\";const n=r(96),s=r(335),{extractICSS:i}=r(340),o=e=>\"combinator\"===e.type&&\" \"===e.value;function a(e){const t=[];return e.forEach((e=>{Array.isArray(e)?a(e).forEach((e=>{t.push(e)})):e&&t.push(e)})),t.length>0&&o(t[t.length-1])&&t.pop(),t}function l(e,t){switch(e.type){case\"word\":t.localizeNextItem&&(t.localAliasMap.has(e.value)||(e.value=\":local(\"+e.value+\")\",t.localizeNextItem=!1));break;case\"function\":t.options&&t.options.rewriteUrl&&\"url\"===e.value.toLowerCase()&&e.nodes.map((e=>{if(\"string\"!==e.type&&\"word\"!==e.type)return;let r=t.options.rewriteUrl(t.global,e.value);switch(e.type){case\"string\":\"'\"===e.quote&&(r=r.replace(/(\\\\)/g,\"\\\\$1\").replace(/'/g,\"\\\\'\")),'\"'===e.quote&&(r=r.replace(/(\\\\)/g,\"\\\\$1\").replace(/\"/g,'\\\\\"'));break;case\"word\":r=r.replace(/(\"|'|\\)|\\\\)/g,\"\\\\$1\")}e.value=r}))}return e}function c(e,t,r){const n=s(t.value);n.walk(((t,n,s)=>{const i={options:r.options,global:r.global,localizeNextItem:e&&!r.global,localAliasMap:r.localAliasMap};s[n]=l(t,i)})),t.value=n.toString()}function u(e,t){if(!/animation$/i.test(e.prop))return/animation(-name)?$/i.test(e.prop)?c(!0,e,t):/url\\(/i.test(e.value)?c(!1,e,t):void 0;{const r=/^-?[_a-z][_a-z0-9-]*$/i,n={$alternate:1,\"$alternate-reverse\":1,$backwards:1,$both:1,$ease:1,\"$ease-in\":1,\"$ease-in-out\":1,\"$ease-out\":1,$forwards:1,$infinite:1,$linear:1,$none:1/0,$normal:1,$paused:1,$reverse:1,$running:1,\"$step-end\":1,\"$step-start\":1,$initial:1/0,$inherit:1/0,$unset:1/0},i=!1;let o={},a=null;const c=s(e.value).walk((e=>{\"div\"===e.type&&(o={}),\"function\"===e.type&&\"steps\"===e.value.toLowerCase()&&(a=e);const s=\"word\"!==e.type||(c=e,(u=a)&&u.nodes.some((e=>e.sourceIndex===c.sourceIndex)))?null:e.value.toLowerCase();var c,u;let p=!1;return!i&&s&&r.test(s)&&(\"$\"+s in n?(o[\"$\"+s]=\"$\"+s in o?o[\"$\"+s]+1:0,p=o[\"$\"+s]>=n[\"$\"+s]):p=!0),l(e,{options:t.options,global:t.global,localizeNextItem:p&&!t.global,localAliasMap:t.localAliasMap})}));e.value=c.toString()}}e.exports=(e={})=>{if(e&&e.mode&&\"global\"!==e.mode&&\"local\"!==e.mode&&\"pure\"!==e.mode)throw new Error('options.mode must be either \"global\", \"local\" or \"pure\" (default \"local\")');const t=e&&\"pure\"===e.mode,r=e&&\"global\"===e.mode;return{postcssPlugin:\"postcss-modules-local-by-default\",prepare(){const s=new Map;return{Once(l){const{icssImports:c}=i(l,!1);Object.keys(c).forEach((e=>{Object.keys(c[e]).forEach((t=>{s.set(t,c[e][t])}))})),l.walkAtRules((n=>{if(/keyframes$/i.test(n.name)){const i=/^\\s*:global\\s*\\((.+)\\)\\s*$/.exec(n.params),o=/^\\s*:local\\s*\\((.+)\\)\\s*$/.exec(n.params);let a=r;if(i){if(t)throw n.error(\"@keyframes :global(...) is not allowed in pure mode\");n.params=i[1],a=!0}else o?(n.params=o[0],a=!1):r||n.params&&!s.has(n.params)&&(n.params=\":local(\"+n.params+\")\");n.walkDecls((t=>{u(t,{localAliasMap:s,options:e,global:a})}))}else n.nodes&&n.nodes.forEach((t=>{\"decl\"===t.type&&u(t,{localAliasMap:s,options:e,global:r})}))})),l.walkRules((r=>{if(r.parent&&\"atrule\"===r.parent.type&&/keyframes$/i.test(r.parent.name))return;const i=function(e,t,r){const s=(e,t)=>{if(t.ignoreNextSpacing&&!o(e))throw new Error(\"Missing whitespace after \"+t.ignoreNextSpacing);if(t.enforceNoSpacing&&o(e))throw new Error(\"Missing whitespace before \"+t.enforceNoSpacing);let i;switch(e.type){case\"root\":{let r;t.hasPureGlobals=!1,i=e.nodes.map((n=>{const i={global:t.global,lastWasSpacing:!0,hasLocals:!1,explicit:!1};if(n=s(n,i),void 0===r)r=i.global;else if(r!==i.global)throw new Error('Inconsistent rule global/local result in rule \"'+e+'\" (multiple selectors must result in the same mode for the rule)');return i.hasLocals||(t.hasPureGlobals=!0),n})),t.global=r,e.nodes=a(i);break}case\"selector\":i=e.map((e=>s(e,t))),(e=e.clone()).nodes=a(i);break;case\"combinator\":if(o(e))return t.ignoreNextSpacing?(t.ignoreNextSpacing=!1,t.lastWasSpacing=!1,t.enforceNoSpacing=!1,null):(t.lastWasSpacing=!0,e);break;case\"pseudo\":{let r;const o=!!e.length,l=\":local\"===e.value||\":global\"===e.value;if(\":import\"===e.value||\":export\"===e.value)t.hasLocals=!0;else{if(o){if(l){if(0===e.nodes.length)throw new Error(`${e.value}() can't be empty`);if(t.inside)throw new Error(`A ${e.value} is not allowed inside of a ${t.inside}(...)`);if(r={global:\":global\"===e.value,inside:e.value,hasLocals:!1,explicit:!0},i=e.map((e=>s(e,r))).reduce(((e,t)=>e.concat(t.nodes)),[]),i.length){const{before:t,after:r}=e.spaces,n=i[0],s=i[i.length-1];n.spaces={before:t,after:n.spaces.after},s.spaces={before:s.spaces.before,after:r}}e=i;break}r={global:t.global,inside:t.inside,lastWasSpacing:!0,hasLocals:!1,explicit:t.explicit},i=e.map((e=>s(e,r))),(e=e.clone()).nodes=a(i),r.hasLocals&&(t.hasLocals=!0);break}if(l){if(t.inside)throw new Error(`A ${e.value} is not allowed inside of a ${t.inside}(...)`);const r=!!e.spaces.before;return t.ignoreNextSpacing=!!t.lastWasSpacing&&e.value,t.enforceNoSpacing=!t.lastWasSpacing&&e.value,t.global=\":global\"===e.value,t.explicit=!0,r?n.combinator({value:\" \"}):null}}break}case\"id\":case\"class\":{if(!e.value)throw new Error(\"Invalid class or id selector syntax\");if(t.global)break;const s=r.has(e.value),i=s&&t.explicit;if(!s||i){const r=e.clone();r.spaces={before:\"\",after:\"\"},e=n.pseudo({value:\":local\",nodes:[r],spaces:e.spaces}),t.hasLocals=!0}break}}return t.lastWasSpacing=!1,t.ignoreNextSpacing=!1,t.enforceNoSpacing=!1,e},i={global:\"global\"===t,hasPureGlobals:!1};return i.selector=n((e=>{s(e,i)})).processSync(e,{updateSelector:!1,lossless:!0}),i}(r,e.mode,s);if(i.options=e,i.localAliasMap=s,t&&i.hasPureGlobals)throw r.error('Selector \"'+r.selector+'\" is not pure (pure selectors must contain at least one local class or id)');r.selector=i.selector,r.nodes&&r.nodes.forEach((e=>u(e,i)))}))}}}}},e.exports.postcss=!0},(e,t,r)=>{var n=r(336),s=r(337),i=r(338);function o(e){return this instanceof o?(this.nodes=n(e),this):new o(e)}o.prototype.toString=function(){return Array.isArray(this.nodes)?i(this.nodes):\"\"},o.prototype.walk=function(e,t){return s(this.nodes,e,t),this},o.unit=r(339),o.walk=s,o.stringify=i,e.exports=o},e=>{var t=\"(\".charCodeAt(0),r=\")\".charCodeAt(0),n=\"'\".charCodeAt(0),s='\"'.charCodeAt(0),i=\"\\\\\".charCodeAt(0),o=\"/\".charCodeAt(0),a=\",\".charCodeAt(0),l=\":\".charCodeAt(0),c=\"*\".charCodeAt(0),u=\"u\".charCodeAt(0),p=\"U\".charCodeAt(0),f=\"+\".charCodeAt(0),d=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var h,m,y,g,b,v,E,x,S,T=[],w=e,P=0,A=w.charCodeAt(P),O=w.length,C=[{nodes:T}],I=0,k=\"\",N=\"\",_=\"\";P<O;)if(A<=32){h=P;do{h+=1,A=w.charCodeAt(h)}while(A<=32);g=w.slice(P,h),y=T[T.length-1],A===r&&I?_=g:y&&\"div\"===y.type?y.after=g:A===a||A===l||A===o&&w.charCodeAt(h+1)!==c&&(!S||S&&\"function\"===S.type&&\"calc\"!==S.value)?N=g:T.push({type:\"space\",sourceIndex:P,value:g}),P=h}else if(A===n||A===s){h=P,g={type:\"string\",sourceIndex:P,quote:m=A===n?\"'\":'\"'};do{if(b=!1,~(h=w.indexOf(m,h+1)))for(v=h;w.charCodeAt(v-1)===i;)v-=1,b=!b;else h=(w+=m).length-1,g.unclosed=!0}while(b);g.value=w.slice(P+1,h),T.push(g),P=h+1,A=w.charCodeAt(P)}else if(A===o&&w.charCodeAt(P+1)===c)g={type:\"comment\",sourceIndex:P},-1===(h=w.indexOf(\"*/\",P))&&(g.unclosed=!0,h=w.length),g.value=w.slice(P+2,h),T.push(g),P=h+2,A=w.charCodeAt(P);else if(A!==o&&A!==c||!S||\"function\"!==S.type||\"calc\"!==S.value)if(A===o||A===a||A===l)g=w[P],T.push({type:\"div\",sourceIndex:P-N.length,value:g,before:N,after:\"\"}),N=\"\",P+=1,A=w.charCodeAt(P);else if(t===A){h=P;do{h+=1,A=w.charCodeAt(h)}while(A<=32);if(x=P,g={type:\"function\",sourceIndex:P-k.length,value:k,before:w.slice(x+1,h)},P=h,\"url\"===k&&A!==n&&A!==s){h-=1;do{if(b=!1,~(h=w.indexOf(\")\",h+1)))for(v=h;w.charCodeAt(v-1)===i;)v-=1,b=!b;else h=(w+=\")\").length-1,g.unclosed=!0}while(b);E=h;do{E-=1,A=w.charCodeAt(E)}while(A<=32);x<E?(g.nodes=P!==E+1?[{type:\"word\",sourceIndex:P,value:w.slice(P,E+1)}]:[],g.unclosed&&E+1!==h?(g.after=\"\",g.nodes.push({type:\"space\",sourceIndex:E+1,value:w.slice(E+1,h)})):g.after=w.slice(E+1,h)):(g.after=\"\",g.nodes=[]),P=h+1,A=w.charCodeAt(P),T.push(g)}else I+=1,g.after=\"\",T.push(g),C.push(g),T=g.nodes=[],S=g;k=\"\"}else if(r===A&&I)P+=1,A=w.charCodeAt(P),S.after=_,_=\"\",I-=1,C.pop(),T=(S=C[I]).nodes;else{h=P;do{A===i&&(h+=1),h+=1,A=w.charCodeAt(h)}while(h<O&&!(A<=32||A===n||A===s||A===a||A===l||A===o||A===t||A===c&&S&&\"function\"===S.type&&\"calc\"===S.value||A===o&&\"function\"===S.type&&\"calc\"===S.value||A===r&&I));g=w.slice(P,h),t===A?k=g:u!==g.charCodeAt(0)&&p!==g.charCodeAt(0)||f!==g.charCodeAt(1)||!d.test(g.slice(2))?T.push({type:\"word\",sourceIndex:P,value:g}):T.push({type:\"unicode-range\",sourceIndex:P,value:g}),P=h}else g=w[P],T.push({type:\"word\",sourceIndex:P-N.length,value:g}),P+=1,A=w.charCodeAt(P);for(P=C.length-1;P;P-=1)C[P].unclosed=!0;return C[0].nodes}},e=>{e.exports=function e(t,r,n){var s,i,o,a;for(s=0,i=t.length;s<i;s+=1)o=t[s],n||(a=r(o,s,t)),!1!==a&&\"function\"===o.type&&Array.isArray(o.nodes)&&e(o.nodes,r,n),n&&r(o,s,t)}},e=>{function t(e,t){var n,s,i=e.type,o=e.value;return t&&void 0!==(s=t(e))?s:\"word\"===i||\"space\"===i?o:\"string\"===i?(n=e.quote||\"\")+o+(e.unclosed?\"\":n):\"comment\"===i?\"/*\"+o+(e.unclosed?\"\":\"*/\"):\"div\"===i?(e.before||\"\")+o+(e.after||\"\"):Array.isArray(e.nodes)?(n=r(e.nodes,t),\"function\"!==i?n:o+\"(\"+(e.before||\"\")+n+(e.after||\"\")+(e.unclosed?\"\":\")\")):o}function r(e,r){var n,s;if(Array.isArray(e)){for(n=\"\",s=e.length-1;~s;s-=1)n=t(e[s],r)+n;return n}return t(e,r)}e.exports=r},e=>{var t=\"-\".charCodeAt(0),r=\"+\".charCodeAt(0),n=\".\".charCodeAt(0),s=\"e\".charCodeAt(0),i=\"E\".charCodeAt(0);e.exports=function(e){var o,a,l,c=0,u=e.length;if(0===u||!function(e){var s,i=e.charCodeAt(0);if(i===r||i===t){if((s=e.charCodeAt(1))>=48&&s<=57)return!0;var o=e.charCodeAt(2);return s===n&&o>=48&&o<=57}return i===n?(s=e.charCodeAt(1))>=48&&s<=57:i>=48&&i<=57}(e))return!1;for((o=e.charCodeAt(c))!==r&&o!==t||c++;c<u&&!((o=e.charCodeAt(c))<48||o>57);)c+=1;if(o=e.charCodeAt(c),a=e.charCodeAt(c+1),o===n&&a>=48&&a<=57)for(c+=2;c<u&&!((o=e.charCodeAt(c))<48||o>57);)c+=1;if(o=e.charCodeAt(c),a=e.charCodeAt(c+1),l=e.charCodeAt(c+2),(o===s||o===i)&&(a>=48&&a<=57||(a===r||a===t)&&l>=48&&l<=57))for(c+=a===r||a===t?3:2;c<u&&!((o=e.charCodeAt(c))<48||o>57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},(e,t,r)=>{const n=r(164),s=r(341),i=r(342),o=r(343);e.exports={replaceValueSymbols:n,replaceSymbols:s,extractICSS:i,createICSSRules:o}},(e,t,r)=>{const n=r(164);e.exports=(e,t)=>{e.walk((e=>{\"decl\"===e.type&&e.value?e.value=n(e.value.toString(),t):\"rule\"===e.type&&e.selector?e.selector=n(e.selector.toString(),t):\"atrule\"===e.type&&e.params&&(e.params=n(e.params.toString(),t))}))}},e=>{const t=/^:import\\((\"[^\"]*\"|'[^']*'|[^\"']+)\\)$/,r=/^(\"[^\"]*\"|'[^']*'|[^\"']+)$/,n=e=>{const t={};return e.walkDecls((e=>{const r=e.raws.before?e.raws.before.trim():\"\";t[r+e.prop]=e.value})),t};e.exports=(e,s=!0,i=\"auto\")=>{const o={},a={};function l(e,t){const r=t.replace(/'|\"/g,\"\");o[r]=Object.assign(o[r]||{},n(e)),s&&e.remove()}function c(e){Object.assign(a,n(e)),s&&e.remove()}return e.each((e=>{if(\"rule\"===e.type&&\"at-rule\"!==i){if(\":import\"===e.selector.slice(0,7)){const r=t.exec(e.selector);r&&l(e,r[1])}\":export\"===e.selector&&c(e)}if(\"atrule\"===e.type&&\"rule\"!==i){if(\"icss-import\"===e.name){const t=r.exec(e.params);t&&l(e,t[1])}\"icss-export\"===e.name&&c(e)}})),{icssImports:o,icssExports:a}}},e=>{const t=(e,t,r=\"rule\")=>Object.keys(e).map((n=>{const s=e[n],i=Object.keys(s).map((e=>t.decl({prop:e,value:s[e],raws:{before:\"\\n  \"}}))),o=i.length>0,a=\"rule\"===r?t.rule({selector:`:import('${n}')`,raws:{after:o?\"\\n\":\"\"}}):t.atRule({name:\"icss-import\",params:`'${n}'`,raws:{after:o?\"\\n\":\"\"}});return o&&a.append(i),a})),r=(e,t,r=\"rule\")=>{const n=Object.keys(e).map((r=>t.decl({prop:r,value:e[r],raws:{before:\"\\n  \"}})));if(0===n.length)return[];const s=\"rule\"===r?t.rule({selector:\":export\",raws:{after:\"\\n\"}}):t.atRule({name:\"icss-export\",raws:{after:\"\\n\"}});return s.append(n),[s]};e.exports=(e,n,s,i)=>[...t(e,s,i),...r(n,s,i)]},(e,t,r)=>{const n=r(345),s=/^(.+?)\\s+from\\s+(?:\"([^\"]+)\"|'([^']+)'|(global))$/,i=/^:import\\((?:\"([^\"]+)\"|'([^']+)')\\)/;function o(e,t,r,n){const s=t+\"_siblings\",i=t+\"_\"+e;if(1!==n[i]){Array.isArray(n[s])||(n[s]=[]);const t=n[s];Array.isArray(r[e])?r[e]=r[e].concat(t):r[e]=t.slice(),n[i]=1,t.push(e)}}e.exports=(e={})=>{let t=0;const r=\"function\"!=typeof e.createImportedName?e=>`i__imported_${e.replace(/\\W/g,\"_\")}_${t++}`:e.createImportedName,a=e.failOnWrongOrder;return{postcssPlugin:\"postcss-modules-extract-imports\",prepare(){const e={},t={},l={},c={},u={};return{Once(p,f){p.walkRules((r=>{const n=i.exec(r.selector);if(n){const[,s,i]=n,a=s||i;o(a,\"root\",e,t),l[a]=r}})),p.walkDecls(/^composes$/,(n=>{const i=n.value.match(s);if(!i)return;let a,[,l,p,f,d]=i;if(d)a=l.split(/\\s+/).map((e=>`global(${e})`));else{const s=p||f;let i=n.parent,d=\"\";for(;\"root\"!==i.type;)d=i.parent.index(i)+\"_\"+d,i=i.parent;const{selector:h}=n.parent;o(s,`_${d}${h}`,e,t),c[s]=n,u[s]=u[s]||{},a=l.split(/\\s+/).map((e=>(u[s][e]||(u[s][e]=r(e,s)),u[s][e])))}n.value=a.join(\" \")}));const d=n(e,a);if(d instanceof Error){const e=d.nodes.find((e=>c.hasOwnProperty(e)));throw c[e].error(\"Failed to resolve order of composed modules \"+d.nodes.map((e=>\"`\"+e+\"`\")).join(\", \")+\".\",{plugin:\"postcss-modules-extract-imports\",word:\"composes\"})}let h;d.forEach((e=>{const t=u[e];let r=l[e];!r&&t&&(r=f.rule({selector:`:import(\"${e}\")`,raws:{after:\"\\n\"}}),h?p.insertAfter(h,r):p.prepend(r)),h=r,t&&Object.keys(t).forEach((e=>{r.append(f.decl({value:e,prop:t[e],raws:{before:\"\\n  \"}}))}))}))}}}}},e.exports.postcss=!0},e=>{function t(e,r,n,s,i){if(2===n[e])return;if(1===n[e])return i?function(e,t){const r=new Error(\"Nondeterministic import's order\"),n=t[e].find((r=>t[r].indexOf(e)>-1));return r.nodes=[e,n],r}(e,r):void 0;n[e]=1;const o=r[e],a=o.length;for(let e=0;e<a;++e){const a=t(o[e],r,n,s,i);if(a instanceof Error)return a}n[e]=2,s.push(e)}e.exports=function(e,r){const n=[],s={},i=Object.keys(e),o=i.length;for(let a=0;a<o;++a){const o=t(i[a],e,s,n,r);if(o instanceof Error)return o}return n}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(4),s=r(536),i=r(93);function o(e,t){let r,n=1;do{r=e._generateUid(\"\",n),n++}while(t.has(r));return r}var a=(0,n.declare)((({types:e,template:t,assertVersion:r})=>(r(\"^7.12.0\"),{name:\"proposal-class-static-block\",inherits:s.default,pre(){(0,i.enableFeature)(this.file,i.FEATURES.staticBlocks,!1)},visitor:{ClassBody(r){const{scope:n}=r,s=new Set,i=r.get(\"body\");for(const e of i)e.isPrivate()&&s.add(e.get(\"key.id\").node.name);for(const r of i){if(!r.isStaticBlock())continue;const i=o(n,s);s.add(i);const a=e.privateName(e.identifier(i));r.replaceWith(e.classPrivateProperty(a,t.expression.ast`(() => { ${r.node.body} })()`,[],!0))}}}})));t.default=a},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){const t=e.node||e;(({leadingComments:e})=>!!e&&e.some((e=>/[@#]__PURE__/.test(e.value))))(t)||n.addComment(t,\"leading\",\"#__PURE__\")};var n=r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(4),s=r(541),i=r(93),o=r(347),a=(0,n.declare)((({assertVersion:e,types:t,template:r},{loose:n})=>{e(7);const a=new WeakMap;function l(e,r,n=!1){e.node.value?n?e.get(\"value\").insertBefore(r):e.get(\"value\").insertAfter(r):e.set(\"value\",t.unaryExpression(\"void\",r))}function c(e,r){let n,s;for(const t of e.get(\"body.body\")){if((t.isClassProperty()||t.isClassPrivateProperty())&&!t.node.static){n=t;break}!s&&t.isClassMethod({kind:\"constructor\"})&&(s=t)}n?l(n,r,!0):(0,i.injectInitialization)(e,s,[t.expressionStatement(r)])}function u(e,n,s,i=\"\",l){let c=a.get(s.node);if(!c){c=n.scope.generateUidIdentifier(`${i||\"\"} brandCheck`),a.set(s.node,c),l(s,r.expression.ast`${t.cloneNode(c)}.add(this)`);const e=t.newExpression(t.identifier(\"WeakSet\"),[]);(0,o.default)(e),n.insertBefore(r.ast`var ${c} = ${e}`)}return t.cloneNode(c)}return new WeakMap,{name:\"proposal-private-property-in-object\",inherits:s.default,pre(){(0,i.enableFeature)(this.file,i.FEATURES.privateIn,n)},visitor:{BinaryExpression(e){const{node:n}=e;if(\"in\"!==n.operator)return;if(!t.isPrivateName(n.left))return;const{name:s}=n.left.id;let i;const o=e.findParent((e=>!!e.isClass()&&(i=e.get(\"body.body\").find((({node:e})=>t.isPrivate(e)&&e.key.id.name===s)),!!i)));if(o.parentPath.scope.path.isPattern())o.replaceWith(r.ast`(() => ${o.node})()`);else if(i.isMethod())if(i.node.static)o.node.id?function(e,t,r){for(;r!==t;)r.hasOwnBinding(e)&&r.rename(e),r=r.parent}(o.node.id.name,o.scope,e.scope):o.set(\"id\",e.scope.generateUidIdentifier(\"class\")),e.replaceWith(r.expression.ast`\n                ${t.cloneNode(o.node.id)} === ${e.node.right}\n              `);else{var a;const t=u(0,o,o,null==(a=o.node.id)?void 0:a.name,c);e.replaceWith(r.expression.ast`${t}.has(${e.node.right})`)}else{const t=u(0,o,i,i.node.key.id.name,l);e.replaceWith(r.expression.ast`${t}.has(${e.node.right})`)}}}}}));t.default=a},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(4),s=r(93),i=(0,n.declare)(((e,t)=>(e.assertVersion(7),(0,s.createClassFeaturePlugin)({name:\"proposal-class-properties\",api:e,feature:s.FEATURES.fields,loose:t.loose,manipulateOptions(e,t){t.plugins.push(\"classProperties\",\"classPrivateProperties\")}}))));t.default=i},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(4),s=r(93),i=(0,n.declare)(((e,t)=>(e.assertVersion(7),(0,s.createClassFeaturePlugin)({name:\"proposal-private-methods\",api:e,feature:s.FEATURES.privateMethods,loose:t.loose,manipulateOptions(e,t){t.plugins.push(\"classPrivateMethods\")}}))));t.default=i},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(4),s=r(542),i=r(9),o=(0,n.declare)((e=>(e.assertVersion(7),{name:\"proposal-logical-assignment-operators\",inherits:s.default,visitor:{AssignmentExpression(e){const{node:t,scope:r}=e,{operator:n,left:s,right:o}=t,a=n.slice(0,-1);if(!i.types.LOGICAL_OPERATORS.includes(a))return;const l=i.types.cloneNode(s);if(i.types.isMemberExpression(s)){const{object:e,property:t,computed:n}=s,o=r.maybeGenerateMemoised(e);if(o&&(s.object=o,l.object=i.types.assignmentExpression(\"=\",i.types.cloneNode(o),e)),n){const e=r.maybeGenerateMemoised(t);e&&(s.property=e,l.property=i.types.assignmentExpression(\"=\",i.types.cloneNode(e),t))}}e.replaceWith(i.types.logicalExpression(a,l,i.types.assignmentExpression(\"=\",s,o)))}}})));t.default=o},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(4),s=r(543),i=r(9),o=(0,n.declare)(((e,{loose:t=!1})=>{var r;e.assertVersion(7);const n=null!=(r=e.assumption(\"noDocumentAll\"))?r:t;return{name:\"proposal-nullish-coalescing-operator\",inherits:s.default,visitor:{LogicalExpression(e){const{node:t,scope:r}=e;if(\"??\"!==t.operator)return;let s,o;if(r.isStatic(t.left))s=t.left,o=i.types.cloneNode(t.left);else{if(r.path.isPattern())return void e.replaceWith(i.template.ast`(() => ${e.node})()`);s=r.generateUidIdentifierBasedOnNode(t.left),r.push({id:i.types.cloneNode(s)}),o=i.types.assignmentExpression(\"=\",s,t.left)}e.replaceWith(i.types.conditionalExpression(n?i.types.binaryExpression(\"!=\",o,i.types.nullLiteral()):i.types.logicalExpression(\"&&\",i.types.binaryExpression(\"!==\",o,i.types.nullLiteral()),i.types.binaryExpression(\"!==\",i.types.cloneNode(s),r.buildUndefinedNode())),i.types.cloneNode(s),t.right))}}}}));t.default=o},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(4),s=r(544),i=r(9),o=r(545);function a(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var l=a(s);function c(e){const t=u(e),{node:r,parentPath:n}=t;if(n.isLogicalExpression()){const{operator:e,right:t}=n.node;if(\"&&\"===e||\"||\"===e||\"??\"===e&&r===t)return c(n)}if(n.isSequenceExpression()){const{expressions:e}=n.node;return e[e.length-1]!==r||c(n)}return n.isConditional({test:r})||n.isUnaryExpression({operator:\"!\"})||n.isLoop({test:r})}function u(e){let t=e;return e.findParent((e=>{if(!o.isTransparentExprWrapper(e))return!0;t=e})),t}const{ast:p}=i.template.expression;function f(e){return e=o.skipTransparentExprWrappers(e),i.types.isIdentifier(e)||i.types.isSuper(e)||i.types.isMemberExpression(e)&&!e.computed&&f(e.object)}function d(e,{pureGetters:t,noDocumentAll:r}){const{scope:n}=e,s=u(e),{parentPath:a}=s,l=c(s);let d=!1;const h=a.isCallExpression({callee:s.node})&&e.isOptionalMemberExpression(),m=[];let y=e;if(n.path.isPattern()&&function(e){let t=e;const{scope:r}=e;for(;t.isOptionalMemberExpression()||t.isOptionalCallExpression();){const{node:e}=t,n=t.isOptionalMemberExpression()?\"object\":\"callee\",s=o.skipTransparentExprWrappers(t.get(n));if(e.optional)return!r.isStatic(s.node);t=s}}(y))return void e.replaceWith(i.template.ast`(() => ${e.node})()`);for(;y.isOptionalMemberExpression()||y.isOptionalCallExpression();){const{node:e}=y;e.optional&&m.push(e),y.isOptionalMemberExpression()?(y.node.type=\"MemberExpression\",y=o.skipTransparentExprWrappers(y.get(\"object\"))):y.isOptionalCallExpression()&&(y.node.type=\"CallExpression\",y=o.skipTransparentExprWrappers(y.get(\"callee\")))}let g=e;a.isUnaryExpression({operator:\"delete\"})&&(g=a,d=!0);for(let e=m.length-1;e>=0;e--){const s=m[e],a=i.types.isCallExpression(s),c=a?\"callee\":\"object\",u=s[c];let y,v,E=u;for(;o.isTransparentExprWrapper(E);)E=E.expression;if(a&&i.types.isIdentifier(E,{name:\"eval\"})?(v=y=E,s[c]=i.types.sequenceExpression([i.types.numericLiteral(0),y])):t&&a&&f(E)?v=y=u:(y=n.maybeGenerateMemoised(E),y?(v=i.types.assignmentExpression(\"=\",i.types.cloneNode(y),u),s[c]=y):v=y=u),a&&i.types.isMemberExpression(E))if(t&&f(E))s.callee=u;else{const{object:e}=E;let t=n.maybeGenerateMemoised(e);t?E.object=i.types.assignmentExpression(\"=\",t,e):t=i.types.isSuper(e)?i.types.thisExpression():e,s.arguments.unshift(i.types.cloneNode(t)),s.callee=i.types.memberExpression(s.callee,i.types.identifier(\"call\"))}let x=g.node;if(0===e&&h){var b;const e=o.skipTransparentExprWrappers(g.get(\"object\")).node;let r;t&&f(e)||(r=n.maybeGenerateMemoised(e),r&&(x.object=i.types.assignmentExpression(\"=\",r,e))),x=i.types.callExpression(i.types.memberExpression(x,i.types.identifier(\"bind\")),[i.types.cloneNode(null!=(b=r)?b:e)])}if(l){const e=r?p`${i.types.cloneNode(v)} != null`:p`\n            ${i.types.cloneNode(v)} !== null && ${i.types.cloneNode(y)} !== void 0`;g.replaceWith(i.types.logicalExpression(\"&&\",e,x)),g=o.skipTransparentExprWrappers(g.get(\"right\"))}else{const e=r?p`${i.types.cloneNode(v)} == null`:p`\n            ${i.types.cloneNode(v)} === null || ${i.types.cloneNode(y)} === void 0`,t=d?p`true`:p`void 0`;g.replaceWith(i.types.conditionalExpression(e,t,x)),g=o.skipTransparentExprWrappers(g.get(\"alternate\"))}}}var h=n.declare(((e,t)=>{var r,n;e.assertVersion(7);const{loose:s=!1}=t,i=null!=(r=e.assumption(\"noDocumentAll\"))?r:s,o=null!=(n=e.assumption(\"pureGetters\"))?n:s;return{name:\"proposal-optional-chaining\",inherits:l.default.default,visitor:{\"OptionalCallExpression|OptionalMemberExpression\"(e){d(e,{noDocumentAll:i,pureGetters:o})}}}}));t.default=h,t.transform=d},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(4),s=r(546),i=r(9),o=(0,n.declare)((e=>(e.assertVersion(7),{name:\"proposal-export-namespace-from\",inherits:s.default,visitor:{ExportNamedDeclaration(e){var t;const{node:r,scope:n}=e,{specifiers:s}=r,o=i.types.isExportDefaultSpecifier(s[0])?1:0;if(!i.types.isExportNamespaceSpecifier(s[o]))return;const a=[];1===o&&a.push(i.types.exportNamedDeclaration(null,[s.shift()],r.source));const l=s.shift(),{exported:c}=l,u=n.generateUidIdentifier(null!=(t=c.name)?t:c.value);a.push(i.types.importDeclaration([i.types.importNamespaceSpecifier(u)],i.types.cloneNode(r.source)),i.types.exportNamedDeclaration(null,[i.types.exportSpecifier(i.types.cloneNode(u),c)])),r.specifiers.length>=1&&a.push(r);const[p]=e.replaceWithMultiple(a);e.scope.registerDeclaration(p)}}})));t.default=o},(e,t,r)=>{\"use strict\";if(r(356),r(357),!(\"sticky\"in r.g.RegExp.prototype)){const e=r.g.RegExp,t=e.prototype.exec;function n(t,r){const n=null!=r?r.indexOf(\"y\"):-1,s=new e(t,-1===n?r:r.slice(0,n)+r.slice(n+1)+(-1===r.indexOf(\"g\")?\"g\":\"\"));return s._sticky=-1!==n,s}e.prototype.exec=function(e){const r=this.lastIndex,n=t.call(this,e);return this._sticky&&null!=n&&this.lastIndex-n[0].length!==r?(this.lastIndex=0,null):n},e.prototype.test=function(e){return!!this.exec(e)},n.prototype=e.prototype,r.g.RegExp=n}for(let e of[\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"])r.g[e]&&!(Symbol.toStringTag in r.g[e].prototype)&&Object.defineProperty(r.g[e].prototype,Symbol.toStringTag,{value:e})},(e,t,r)=>{\"use strict\";var n=r(179),s=r(2),i=r(16),o=r(123),a=r(124),l=r(192),c=r(193),u=r(194),p=r(118),f=r(195),d=n.aTypedArray,h=n.exportTypedArrayMethod,m=s.Uint16Array,y=m&&m.prototype.sort,g=!!y&&!i((function(){var e=new m(2);e.sort(null),e.sort({})})),b=!!y&&!i((function(){if(p)return p<74;if(c)return c<67;if(u)return!0;if(f)return f<602;var e,t,r=new m(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(r.sort((function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));h(\"sort\",(function(e){var t=this;if(void 0!==e&&o(e),b)return y.call(t,e);d(t);var r,n=a(t.length),s=Array(n);for(r=0;r<n;r++)s[r]=t[r];for(s=l(t,function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e)),r=0;r<n;r++)t[r]=s[r];return t}),!b||g)},(e,t,r)=>{var n=r(196),s=r(2),i=r(206);n({global:!0,bind:!0,enumerable:!0,forced:!s.setImmediate||!s.clearImmediate},{setImmediate:i.set,clearImmediate:i.clear})},(e,t)=>{\"use strict\";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,s=n&&!r.call({1:2},1);t.f=s?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},(e,t,r)=>{var n=r(201),s=r(204).concat(\"length\",\"prototype\");t.f=Object.getOwnPropertyNames||function(e){return n(e,s)}},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{\"use strict\";r.r(t),r.d(t,{buildTemplateProcessor:()=>D,createCJSModule:()=>A,loadModule:()=>j,version:()=>I,vueVersion:()=>m.a});var n=r(8),s=r(9),i=r(27),o=r(39),a=r(501),l=r(313),c=r(504),u=r(83),p=r(505),f=r(314),d=r(18),h=r.n(d);const m={a:\"3.1.4\"},y=E(...Object.keys({\"proposal-class-static-block\":r(346),\"proposal-private-property-in-object\":r(348),\"proposal-class-properties\":r(349),\"proposal-private-methods\":r(350),\"proposal-logical-assignment-operators\":r(351),\"proposal-nullish-coalescing-operator\":r(352),\"proposal-optional-chaining\":r(353),\"proposal-export-namespace-from\":r(354)})),g=!0;function b(e,t,r){return t+\"\\n\"+e}function v(e,t,r,n,s){if(!n)return b(e,t);const i={start:{line:n,column:s}};return b((0,o.codeFrameColumns)(r,i,{message:e}),t)}function E(...e){return e.reduce(((e,t)=>e.append(String(t))),new l).end().slice(0,8)}async function x(e,t,r){let n=!1;const s={preventCache:()=>n=!0};if(!e)return await r(s);const i=E(...t),o=await e.get(i);if(o)return JSON.parse(o);const a=await r(s);return n||await e.set(i,JSON.stringify(a)),a}class S{constructor(e){var t,r;r=void 0,(t=\"promise\")in this?Object.defineProperty(this,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[t]=r,this.promise=e}}const T={\"proposal-class-static-block\":r(346),\"proposal-private-property-in-object\":r(348),\"proposal-class-properties\":r(349),\"proposal-private-methods\":r(350),\"proposal-logical-assignment-operators\":r(351),\"proposal-nullish-coalescing-operator\":r(352),\"proposal-optional-chaining\":r(353),\"proposal-export-namespace-from\":r(354)};async function w(e,t,r,n,o,l){let c;try{c=(0,i.parse)(e,{sourceType:t?\"module\":\"script\",sourceFilename:r.toString(),plugins:[...void 0!==n?n:[]]})}catch(t){throw null==l||l(\"error\",\"parse script\",v(t.message,r.toString(),e,t.loc.line,t.loc.column+1)),t}var u;return u=c,(0,s.traverse)(u,{CallExpression(e){s.types.isImport(e.node.callee)&&e.replaceWith(s.types.callExpression(s.types.identifier(\"import__\"),e.node.arguments))}}),[function(e){const t=[];return(0,s.traverse)(e,{ImportDeclaration(e){t.push(e.node.source.value)},CallExpression(e){\"require\"===e.node.callee.name&&1===e.node.arguments.length&&s.types.isStringLiteral(e.node.arguments[0])&&t.push(e.node.arguments[0].value)}}),t}(c),(await(0,s.transformFromAstAsync)(c,e,{sourceMaps:!1,plugins:[...t?[a.a]:[],...Object.values(T),...void 0!==o?Object.values(o):[]],babelrc:!1,configFile:!1,highlightCode:!1,compact:!0,comments:!1})).code]}async function P(e,t){const{moduleCache:r,loadModule:n,handleModule:s}=t,{id:i,path:o,getContent:a}=t.getResource(e,t);return i in r?r[i]instanceof S?await r[i].promise:r[i]:(r[i]=new S((async()=>{if(n){const e=await n(i,t);if(void 0!==e)return r[i]=e}const{getContentData:e,type:l}=await a();let d;if(void 0!==s&&(d=await s(l,e,o,t)),void 0===d&&(d=await async function(e,t,r,n){switch(e){case\".vue\":return async function(e,t,r){const n=t.toString(),s={},{delimiters:i,moduleCache:o,compiledCache:a,getResource:l,addStyle:d,log:m,additionalBabelParserPlugins:S=[],additionalBabelPlugins:T={},customBlockHandler:O}=r,{descriptor:I,errors:k}=(0,c.d)(e,{filename:n,sourceMap:!1}),N=void 0!==O?await Promise.all(I.customBlocks.map((e=>O(e,t,r)))):[],_=E(n,\"0.8.4\",y),j=`data-v-${_}`,D=I.styles.some((e=>e.scoped));D&&(s.__scopeId=j),I.template&&I.template.lang&&await P({refPath:t,relPath:I.template.lang},r);const L=I.template?{compiler:{...p,compile:(e,t)=>f.compile(e,{...t,sourceMap:!1})},source:I.template.src?await(await l({refPath:t,relPath:I.template.src},r).getContent()).getContentData(!1):I.template.content,filename:I.filename,isProd:g,scoped:D,id:j,slotted:I.slotted,compilerOptions:{delimiters:i,scopeId:D?j:void 0,mode:\"module\"},preprocessLang:I.template.lang,preprocessCustomRequire:e=>o[e]}:null;if(I.script||I.scriptSetup){var M,B,R;null!==(M=I.script)&&void 0!==M&&M.src&&(I.script.content=await(await l({refPath:t,relPath:I.script.src},r).getContent()).getContentData(!1));const[e,i]=await x(a,[_,null===(B=I.script)||void 0===B?void 0:B.content,null===(R=I.scriptSetup)||void 0===R?void 0:R.content,S,Object.keys(T)],(async({preventCache:e})=>{const t=(0,c.a)(I,{isProd:g,id:j,babelParserPlugins:S,inlineTemplate:!1,templateOptions:L});return null!==L&&(L.compilerOptions.bindingMetadata=t.bindings),await w(t.content,!0,n,[...S,...u.babelParserDefaultPlugins,\"jsx\"],{...T,jsx:h()},m)}));await C(t,e,r),Object.assign(s,(F=A(t,i,r).exports,F&&F.__esModule?F:{default:F}).default)}var F;if(null!==I.template){const[i,o]=await x(a,[_,L.source],(async({preventCache:t})=>{const r=(0,c.c)(L);if(r.errors.length){t();for(const t of r.errors)\"object\"==typeof t?t.loc?null==m||m(\"error\",\"SFC template\",v(t.message,n,e,t.loc.start.line+I.template.loc.start.line-1,t.loc.start.column)):null==m||m(\"error\",\"SFC template\",b(t.message,n)):null==m||m(\"error\",\"SFC template\",b(t,n))}for(const e of r.tips)null==m||m(\"info\",\"SFC template\",e);return await w(r.code,!0,I.filename,S,T,m)}));await C(t,i,r),Object.assign(s,A(t,o,r).exports)}for(const n of I.styles){n.lang&&await P({refPath:t,relPath:n.lang},r);const s=n.src?await(await l({refPath:t,relPath:n.src},r).getContent()).getContentData(!1):n.content;d(await x(a,[_,s],(async({preventCache:r})=>{const i=await(0,c.b)({filename:I.filename,source:s,isProd:g,id:j,scoped:n.scoped,trim:!0,preprocessLang:n.lang,preprocessCustomRequire:e=>o[e]});if(i.errors.length){r();for(const r of i.errors)null==m||m(\"error\",\"SFC style\",v(r.message,t,e,r.line+n.loc.start.line-1,r.column))}return i.code})),n.scoped?j:void 0)}return void 0!==O&&await Promise.all(N.map((e=>null==e?void 0:e(s)))),s}(await t(!1),r,n);case\".js\":return O(await t(!1),!1,r,n);case\".mjs\":return O(await t(!1),!0,r,n)}}(l,e,o,t)),void 0===d)throw new TypeError(`Unable to handle ${l} files (${o})`);return r[i]=d})()),await r[i].promise)}function A(e,t,r){const{moduleCache:n,pathResolve:s,getResource:i}=r,o={exports:{}};return Function(\"exports\",\"require\",\"module\",\"__filename\",\"__dirname\",\"import__\",t).call(o.exports,o.exports,(function(t){const{id:s}=i({refPath:e,relPath:t},r);if(s in n)return n[s];throw new Error(`require(${JSON.stringify(s)}) failed. module not found in moduleCache`)}),o,e,s({refPath:e,relPath:\".\"}),(async function(t){return await P({refPath:e,relPath:t},r)})),o}async function O(e,t,r,n){const{compiledCache:s,additionalBabelParserPlugins:i,additionalBabelPlugins:o,log:a}=n,[l,c]=await x(s,[\"0.8.4\",e,r],(async()=>await w(e,t,r,i,o,a)));return await C(r,l,n),A(r,c,n).exports}async function C(e,t,r){await Promise.all(t.map((t=>P({refPath:e,relPath:t},r))))}const I=\"0.8.4\";function k(e){throw new ReferenceError(`${e} is not defined`)}const N=({refPath:e,relPath:t})=>{if(void 0===e)return t;const r=t.toString();return\".\"!==r[0]?t:n.posix.normalize(n.posix.join(n.posix.dirname(e.toString()),r))};function _(e,t){const{pathResolve:r,getFile:s,log:i}=t,o=r(e),a=o.toString();return{id:a,path:o,getContent:async()=>{const e=await s(o);return\"string\"==typeof e||e instanceof ArrayBuffer?{type:n.posix.extname(a),getContentData:async t=>(e instanceof ArrayBuffer!==t&&(null==i||i(\"warn\",`unexpected data type. ${t?\"binary\":\"string\"} is expected for \"${o}\"`)),e)}:{type:e.type??n.posix.extname(a),getContentData:e.getContentData}}}}async function j(e,t=k(\"options\")){const{moduleCache:r=k(\"options.moduleCache\"),getFile:n=k(\"options.getFile()\"),addStyle:s=k(\"options.addStyle()\"),pathResolve:i=N,getResource:o=_}=t;r instanceof Object&&Object.setPrototypeOf(r,null);const a={moduleCache:r,pathResolve:i,getResource:o,...t};return await P({refPath:void 0,relPath:e},a)}function D(e){return{render:(t,r,n)=>{try{const s=e(t,r);\"string\"==typeof s?n(null,s):(s.then((e=>{n(null,e)})),s.catch((e=>{n(e,null)})))}catch(e){n(e,null)}}}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(19),s=r(0);t.default=class{constructor(e,t,r,n){this.queue=null,this.priorityQueue=null,this.parentPath=n,this.scope=e,this.state=r,this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;const r=s.VISITOR_KEYS[e.type];if(null==r||!r.length)return!1;for(const t of r)if(e[t])return!0;return!1}create(e,t,r,s){return n.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:s})}maybeQueue(e,t){this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,t,r){if(0===e.length)return!1;const n=[];for(let s=0;s<e.length;s++){const i=e[s];i&&this.shouldVisit(i)&&n.push(this.create(t,e,s,r))}return this.visitQueue(n)}visitSingle(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])}visitQueue(e){this.queue=e,this.priorityQueue=[];const t=new WeakSet;let r=!1;for(const n of e){if(n.resync(),0!==n.contexts.length&&n.contexts[n.contexts.length-1]===this||n.pushContext(this),null===n.key)continue;const{node:s}=n;if(!t.has(s)){if(s&&t.add(s),n.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(const t of e)t.popContext();return this.queue=null,r}visit(e,t){const r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=(0,r(213).default)(\"React.Component\");t.default=n},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return!!e&&/^[a-z]/.test(e)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){const t=[];for(let r=0;r<e.children.length;r++){let i=e.children[r];(0,n.isJSXText)(i)?(0,s.default)(i,t):((0,n.isJSXExpressionContainer)(i)&&(i=i.expression),(0,n.isJSXEmptyExpression)(i)||t.push(i))}return t};var n=r(1),s=r(366)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){const r=e.value.split(/\\r\\n|\\n|\\r/);let s=0;for(let e=0;e<r.length;e++)r[e].match(/[^ \\t]/)&&(s=e);let i=\"\";for(let e=0;e<r.length;e++){const t=r[e],n=0===e,o=e===r.length-1,a=e===s;let l=t.replace(/\\t/g,\" \");n||(l=l.replace(/^[ ]+/,\"\")),o||(l=l.replace(/[ ]+$/,\"\")),l&&(a||(l+=\" \"),i+=l)}i&&t.push((0,n.stringLiteral)(i))};var n=r(6)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,...t){const r=n.BUILDER_KEYS[e],i=t.length;if(i>r.length)throw new Error(`${e}: Too many arguments passed. Received ${i} but can receive no more than ${r.length}`);const o={type:e};let a=0;r.forEach((r=>{const s=n.NODE_FIELDS[e][r];let l;a<i&&(l=t[a]),void 0===l&&(l=Array.isArray(s.default)?[]:s.default),o[r]=l,a++}));for(const e of Object.keys(o))(0,s.default)(o,e,o[e]);return o};var n=r(11),s=r(130)},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.isIdentifierStart=c,t.isIdentifierChar=u,t.isIdentifierName=function(e){let t=!0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(55296==(64512&n)&&r+1<e.length){const t=e.charCodeAt(++r);56320==(64512&t)&&(n=65536+((1023&n)<<10)+(1023&t))}if(t){if(t=!1,!c(n))return!1}else if(!u(n))return!1}return!t};let r=\"ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ\",n=\"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏０-９＿\";const s=new RegExp(\"[\"+r+\"]\"),i=new RegExp(\"[\"+r+n+\"]\");r=n=null;const o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],a=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function l(e,t){let r=65536;for(let n=0,s=t.length;n<s;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function c(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&s.test(String.fromCharCode(e)):l(e,o)))}function u(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&i.test(String.fromCharCode(e)):l(e,o)||l(e,a))))}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.isReservedWord=i,t.isStrictReservedWord=o,t.isStrictBindOnlyReservedWord=a,t.isStrictBindReservedWord=function(e,t){return o(e,t)||a(e)},t.isKeyword=function(e){return r.has(e)};const r=new Set([\"break\",\"case\",\"catch\",\"continue\",\"debugger\",\"default\",\"do\",\"else\",\"finally\",\"for\",\"function\",\"if\",\"return\",\"switch\",\"throw\",\"try\",\"var\",\"const\",\"while\",\"with\",\"new\",\"this\",\"super\",\"class\",\"extends\",\"export\",\"import\",\"null\",\"true\",\"false\",\"in\",\"instanceof\",\"typeof\",\"void\",\"delete\"]),n=new Set([\"implements\",\"interface\",\"let\",\"package\",\"private\",\"protected\",\"public\",\"static\",\"yield\"]),s=new Set([\"eval\",\"arguments\"]);function i(e,t){return t&&\"await\"===e||\"enum\"===e}function o(e,t){return i(e,t)||n.has(e)}function a(e){return s.has(e)}},(e,t,r)=>{\"use strict\";var n=r(20);const s=(e,t=\"TypeParameterDeclaration\")=>{(0,n.default)(e,{builder:[\"id\",\"typeParameters\",\"extends\",\"body\"],visitor:[\"id\",\"typeParameters\",\"extends\",\"mixins\",\"implements\",\"body\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{id:(0,n.validateType)(\"Identifier\"),typeParameters:(0,n.validateOptionalType)(t),extends:(0,n.validateOptional)((0,n.arrayOfType)(\"InterfaceExtends\")),mixins:(0,n.validateOptional)((0,n.arrayOfType)(\"InterfaceExtends\")),implements:(0,n.validateOptional)((0,n.arrayOfType)(\"ClassImplements\")),body:(0,n.validateType)(\"ObjectTypeAnnotation\")}})};(0,n.default)(\"AnyTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"ArrayTypeAnnotation\",{visitor:[\"elementType\"],aliases:[\"Flow\",\"FlowType\"],fields:{elementType:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"BooleanTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"BooleanLiteralTypeAnnotation\",{builder:[\"value\"],aliases:[\"Flow\",\"FlowType\"],fields:{value:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"NullLiteralTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"ClassImplements\",{visitor:[\"id\",\"typeParameters\"],aliases:[\"Flow\"],fields:{id:(0,n.validateType)(\"Identifier\"),typeParameters:(0,n.validateOptionalType)(\"TypeParameterInstantiation\")}}),s(\"DeclareClass\"),(0,n.default)(\"DeclareFunction\",{visitor:[\"id\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{id:(0,n.validateType)(\"Identifier\"),predicate:(0,n.validateOptionalType)(\"DeclaredPredicate\")}}),s(\"DeclareInterface\"),(0,n.default)(\"DeclareModule\",{builder:[\"id\",\"body\",\"kind\"],visitor:[\"id\",\"body\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{id:(0,n.validateType)([\"Identifier\",\"StringLiteral\"]),body:(0,n.validateType)(\"BlockStatement\"),kind:(0,n.validateOptional)((0,n.assertOneOf)(\"CommonJS\",\"ES\"))}}),(0,n.default)(\"DeclareModuleExports\",{visitor:[\"typeAnnotation\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{typeAnnotation:(0,n.validateType)(\"TypeAnnotation\")}}),(0,n.default)(\"DeclareTypeAlias\",{visitor:[\"id\",\"typeParameters\",\"right\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{id:(0,n.validateType)(\"Identifier\"),typeParameters:(0,n.validateOptionalType)(\"TypeParameterDeclaration\"),right:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"DeclareOpaqueType\",{visitor:[\"id\",\"typeParameters\",\"supertype\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{id:(0,n.validateType)(\"Identifier\"),typeParameters:(0,n.validateOptionalType)(\"TypeParameterDeclaration\"),supertype:(0,n.validateOptionalType)(\"FlowType\")}}),(0,n.default)(\"DeclareVariable\",{visitor:[\"id\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{id:(0,n.validateType)(\"Identifier\")}}),(0,n.default)(\"DeclareExportDeclaration\",{visitor:[\"declaration\",\"specifiers\",\"source\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{declaration:(0,n.validateOptionalType)(\"Flow\"),specifiers:(0,n.validateOptional)((0,n.arrayOfType)([\"ExportSpecifier\",\"ExportNamespaceSpecifier\"])),source:(0,n.validateOptionalType)(\"StringLiteral\"),default:(0,n.validateOptional)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"DeclareExportAllDeclaration\",{visitor:[\"source\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{source:(0,n.validateType)(\"StringLiteral\"),exportKind:(0,n.validateOptional)((0,n.assertOneOf)(\"type\",\"value\"))}}),(0,n.default)(\"DeclaredPredicate\",{visitor:[\"value\"],aliases:[\"Flow\",\"FlowPredicate\"],fields:{value:(0,n.validateType)(\"Flow\")}}),(0,n.default)(\"ExistsTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\"]}),(0,n.default)(\"FunctionTypeAnnotation\",{visitor:[\"typeParameters\",\"params\",\"rest\",\"returnType\"],aliases:[\"Flow\",\"FlowType\"],fields:{typeParameters:(0,n.validateOptionalType)(\"TypeParameterDeclaration\"),params:(0,n.validate)((0,n.arrayOfType)(\"FunctionTypeParam\")),rest:(0,n.validateOptionalType)(\"FunctionTypeParam\"),this:(0,n.validateOptionalType)(\"FunctionTypeParam\"),returnType:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"FunctionTypeParam\",{visitor:[\"name\",\"typeAnnotation\"],aliases:[\"Flow\"],fields:{name:(0,n.validateOptionalType)(\"Identifier\"),typeAnnotation:(0,n.validateType)(\"FlowType\"),optional:(0,n.validateOptional)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"GenericTypeAnnotation\",{visitor:[\"id\",\"typeParameters\"],aliases:[\"Flow\",\"FlowType\"],fields:{id:(0,n.validateType)([\"Identifier\",\"QualifiedTypeIdentifier\"]),typeParameters:(0,n.validateOptionalType)(\"TypeParameterInstantiation\")}}),(0,n.default)(\"InferredPredicate\",{aliases:[\"Flow\",\"FlowPredicate\"]}),(0,n.default)(\"InterfaceExtends\",{visitor:[\"id\",\"typeParameters\"],aliases:[\"Flow\"],fields:{id:(0,n.validateType)([\"Identifier\",\"QualifiedTypeIdentifier\"]),typeParameters:(0,n.validateOptionalType)(\"TypeParameterInstantiation\")}}),s(\"InterfaceDeclaration\"),(0,n.default)(\"InterfaceTypeAnnotation\",{visitor:[\"extends\",\"body\"],aliases:[\"Flow\",\"FlowType\"],fields:{extends:(0,n.validateOptional)((0,n.arrayOfType)(\"InterfaceExtends\")),body:(0,n.validateType)(\"ObjectTypeAnnotation\")}}),(0,n.default)(\"IntersectionTypeAnnotation\",{visitor:[\"types\"],aliases:[\"Flow\",\"FlowType\"],fields:{types:(0,n.validate)((0,n.arrayOfType)(\"FlowType\"))}}),(0,n.default)(\"MixedTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"EmptyTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"NullableTypeAnnotation\",{visitor:[\"typeAnnotation\"],aliases:[\"Flow\",\"FlowType\"],fields:{typeAnnotation:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"NumberLiteralTypeAnnotation\",{builder:[\"value\"],aliases:[\"Flow\",\"FlowType\"],fields:{value:(0,n.validate)((0,n.assertValueType)(\"number\"))}}),(0,n.default)(\"NumberTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"ObjectTypeAnnotation\",{visitor:[\"properties\",\"indexers\",\"callProperties\",\"internalSlots\"],aliases:[\"Flow\",\"FlowType\"],builder:[\"properties\",\"indexers\",\"callProperties\",\"internalSlots\",\"exact\"],fields:{properties:(0,n.validate)((0,n.arrayOfType)([\"ObjectTypeProperty\",\"ObjectTypeSpreadProperty\"])),indexers:(0,n.validateOptional)((0,n.arrayOfType)(\"ObjectTypeIndexer\")),callProperties:(0,n.validateOptional)((0,n.arrayOfType)(\"ObjectTypeCallProperty\")),internalSlots:(0,n.validateOptional)((0,n.arrayOfType)(\"ObjectTypeInternalSlot\")),exact:{validate:(0,n.assertValueType)(\"boolean\"),default:!1},inexact:(0,n.validateOptional)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"ObjectTypeInternalSlot\",{visitor:[\"id\",\"value\",\"optional\",\"static\",\"method\"],aliases:[\"Flow\",\"UserWhitespacable\"],fields:{id:(0,n.validateType)(\"Identifier\"),value:(0,n.validateType)(\"FlowType\"),optional:(0,n.validate)((0,n.assertValueType)(\"boolean\")),static:(0,n.validate)((0,n.assertValueType)(\"boolean\")),method:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"ObjectTypeCallProperty\",{visitor:[\"value\"],aliases:[\"Flow\",\"UserWhitespacable\"],fields:{value:(0,n.validateType)(\"FlowType\"),static:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"ObjectTypeIndexer\",{visitor:[\"id\",\"key\",\"value\",\"variance\"],aliases:[\"Flow\",\"UserWhitespacable\"],fields:{id:(0,n.validateOptionalType)(\"Identifier\"),key:(0,n.validateType)(\"FlowType\"),value:(0,n.validateType)(\"FlowType\"),static:(0,n.validate)((0,n.assertValueType)(\"boolean\")),variance:(0,n.validateOptionalType)(\"Variance\")}}),(0,n.default)(\"ObjectTypeProperty\",{visitor:[\"key\",\"value\",\"variance\"],aliases:[\"Flow\",\"UserWhitespacable\"],fields:{key:(0,n.validateType)([\"Identifier\",\"StringLiteral\"]),value:(0,n.validateType)(\"FlowType\"),kind:(0,n.validate)((0,n.assertOneOf)(\"init\",\"get\",\"set\")),static:(0,n.validate)((0,n.assertValueType)(\"boolean\")),proto:(0,n.validate)((0,n.assertValueType)(\"boolean\")),optional:(0,n.validate)((0,n.assertValueType)(\"boolean\")),variance:(0,n.validateOptionalType)(\"Variance\"),method:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"ObjectTypeSpreadProperty\",{visitor:[\"argument\"],aliases:[\"Flow\",\"UserWhitespacable\"],fields:{argument:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"OpaqueType\",{visitor:[\"id\",\"typeParameters\",\"supertype\",\"impltype\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{id:(0,n.validateType)(\"Identifier\"),typeParameters:(0,n.validateOptionalType)(\"TypeParameterDeclaration\"),supertype:(0,n.validateOptionalType)(\"FlowType\"),impltype:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"QualifiedTypeIdentifier\",{visitor:[\"id\",\"qualification\"],aliases:[\"Flow\"],fields:{id:(0,n.validateType)(\"Identifier\"),qualification:(0,n.validateType)([\"Identifier\",\"QualifiedTypeIdentifier\"])}}),(0,n.default)(\"StringLiteralTypeAnnotation\",{builder:[\"value\"],aliases:[\"Flow\",\"FlowType\"],fields:{value:(0,n.validate)((0,n.assertValueType)(\"string\"))}}),(0,n.default)(\"StringTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"SymbolTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"ThisTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"TupleTypeAnnotation\",{visitor:[\"types\"],aliases:[\"Flow\",\"FlowType\"],fields:{types:(0,n.validate)((0,n.arrayOfType)(\"FlowType\"))}}),(0,n.default)(\"TypeofTypeAnnotation\",{visitor:[\"argument\"],aliases:[\"Flow\",\"FlowType\"],fields:{argument:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"TypeAlias\",{visitor:[\"id\",\"typeParameters\",\"right\"],aliases:[\"Flow\",\"FlowDeclaration\",\"Statement\",\"Declaration\"],fields:{id:(0,n.validateType)(\"Identifier\"),typeParameters:(0,n.validateOptionalType)(\"TypeParameterDeclaration\"),right:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"TypeAnnotation\",{aliases:[\"Flow\"],visitor:[\"typeAnnotation\"],fields:{typeAnnotation:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"TypeCastExpression\",{visitor:[\"expression\",\"typeAnnotation\"],aliases:[\"Flow\",\"ExpressionWrapper\",\"Expression\"],fields:{expression:(0,n.validateType)(\"Expression\"),typeAnnotation:(0,n.validateType)(\"TypeAnnotation\")}}),(0,n.default)(\"TypeParameter\",{aliases:[\"Flow\"],visitor:[\"bound\",\"default\",\"variance\"],fields:{name:(0,n.validate)((0,n.assertValueType)(\"string\")),bound:(0,n.validateOptionalType)(\"TypeAnnotation\"),default:(0,n.validateOptionalType)(\"FlowType\"),variance:(0,n.validateOptionalType)(\"Variance\")}}),(0,n.default)(\"TypeParameterDeclaration\",{aliases:[\"Flow\"],visitor:[\"params\"],fields:{params:(0,n.validate)((0,n.arrayOfType)(\"TypeParameter\"))}}),(0,n.default)(\"TypeParameterInstantiation\",{aliases:[\"Flow\"],visitor:[\"params\"],fields:{params:(0,n.validate)((0,n.arrayOfType)(\"FlowType\"))}}),(0,n.default)(\"UnionTypeAnnotation\",{visitor:[\"types\"],aliases:[\"Flow\",\"FlowType\"],fields:{types:(0,n.validate)((0,n.arrayOfType)(\"FlowType\"))}}),(0,n.default)(\"Variance\",{aliases:[\"Flow\"],builder:[\"kind\"],fields:{kind:(0,n.validate)((0,n.assertOneOf)(\"minus\",\"plus\"))}}),(0,n.default)(\"VoidTypeAnnotation\",{aliases:[\"Flow\",\"FlowType\",\"FlowBaseAnnotation\"]}),(0,n.default)(\"EnumDeclaration\",{aliases:[\"Statement\",\"Declaration\"],visitor:[\"id\",\"body\"],fields:{id:(0,n.validateType)(\"Identifier\"),body:(0,n.validateType)([\"EnumBooleanBody\",\"EnumNumberBody\",\"EnumStringBody\",\"EnumSymbolBody\"])}}),(0,n.default)(\"EnumBooleanBody\",{aliases:[\"EnumBody\"],visitor:[\"members\"],fields:{explicitType:(0,n.validate)((0,n.assertValueType)(\"boolean\")),members:(0,n.validateArrayOfType)(\"EnumBooleanMember\"),hasUnknownMembers:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"EnumNumberBody\",{aliases:[\"EnumBody\"],visitor:[\"members\"],fields:{explicitType:(0,n.validate)((0,n.assertValueType)(\"boolean\")),members:(0,n.validateArrayOfType)(\"EnumNumberMember\"),hasUnknownMembers:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"EnumStringBody\",{aliases:[\"EnumBody\"],visitor:[\"members\"],fields:{explicitType:(0,n.validate)((0,n.assertValueType)(\"boolean\")),members:(0,n.validateArrayOfType)([\"EnumStringMember\",\"EnumDefaultedMember\"]),hasUnknownMembers:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"EnumSymbolBody\",{aliases:[\"EnumBody\"],visitor:[\"members\"],fields:{members:(0,n.validateArrayOfType)(\"EnumDefaultedMember\"),hasUnknownMembers:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}}),(0,n.default)(\"EnumBooleanMember\",{aliases:[\"EnumMember\"],visitor:[\"id\"],fields:{id:(0,n.validateType)(\"Identifier\"),init:(0,n.validateType)(\"BooleanLiteral\")}}),(0,n.default)(\"EnumNumberMember\",{aliases:[\"EnumMember\"],visitor:[\"id\",\"init\"],fields:{id:(0,n.validateType)(\"Identifier\"),init:(0,n.validateType)(\"NumericLiteral\")}}),(0,n.default)(\"EnumStringMember\",{aliases:[\"EnumMember\"],visitor:[\"id\",\"init\"],fields:{id:(0,n.validateType)(\"Identifier\"),init:(0,n.validateType)(\"StringLiteral\")}}),(0,n.default)(\"EnumDefaultedMember\",{aliases:[\"EnumMember\"],visitor:[\"id\"],fields:{id:(0,n.validateType)(\"Identifier\")}}),(0,n.default)(\"IndexedAccessType\",{visitor:[\"objectType\",\"indexType\"],aliases:[\"Flow\",\"FlowType\"],fields:{objectType:(0,n.validateType)(\"FlowType\"),indexType:(0,n.validateType)(\"FlowType\")}}),(0,n.default)(\"OptionalIndexedAccessType\",{visitor:[\"objectType\",\"indexType\"],aliases:[\"Flow\",\"FlowType\"],fields:{objectType:(0,n.validateType)(\"FlowType\"),indexType:(0,n.validateType)(\"FlowType\"),optional:(0,n.validate)((0,n.assertValueType)(\"boolean\"))}})},(e,t,r)=>{\"use strict\";var n=r(20);(0,n.default)(\"JSXAttribute\",{visitor:[\"name\",\"value\"],aliases:[\"JSX\",\"Immutable\"],fields:{name:{validate:(0,n.assertNodeType)(\"JSXIdentifier\",\"JSXNamespacedName\")},value:{optional:!0,validate:(0,n.assertNodeType)(\"JSXElement\",\"JSXFragment\",\"StringLiteral\",\"JSXExpressionContainer\")}}}),(0,n.default)(\"JSXClosingElement\",{visitor:[\"name\"],aliases:[\"JSX\",\"Immutable\"],fields:{name:{validate:(0,n.assertNodeType)(\"JSXIdentifier\",\"JSXMemberExpression\",\"JSXNamespacedName\")}}}),(0,n.default)(\"JSXElement\",{builder:[\"openingElement\",\"closingElement\",\"children\",\"selfClosing\"],visitor:[\"openingElement\",\"children\",\"closingElement\"],aliases:[\"JSX\",\"Immutable\",\"Expression\"],fields:{openingElement:{validate:(0,n.assertNodeType)(\"JSXOpeningElement\")},closingElement:{optional:!0,validate:(0,n.assertNodeType)(\"JSXClosingElement\")},children:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"JSXText\",\"JSXExpressionContainer\",\"JSXSpreadChild\",\"JSXElement\",\"JSXFragment\")))},selfClosing:{validate:(0,n.assertValueType)(\"boolean\"),optional:!0}}}),(0,n.default)(\"JSXEmptyExpression\",{aliases:[\"JSX\"]}),(0,n.default)(\"JSXExpressionContainer\",{visitor:[\"expression\"],aliases:[\"JSX\",\"Immutable\"],fields:{expression:{validate:(0,n.assertNodeType)(\"Expression\",\"JSXEmptyExpression\")}}}),(0,n.default)(\"JSXSpreadChild\",{visitor:[\"expression\"],aliases:[\"JSX\",\"Immutable\"],fields:{expression:{validate:(0,n.assertNodeType)(\"Expression\")}}}),(0,n.default)(\"JSXIdentifier\",{builder:[\"name\"],aliases:[\"JSX\"],fields:{name:{validate:(0,n.assertValueType)(\"string\")}}}),(0,n.default)(\"JSXMemberExpression\",{visitor:[\"object\",\"property\"],aliases:[\"JSX\"],fields:{object:{validate:(0,n.assertNodeType)(\"JSXMemberExpression\",\"JSXIdentifier\")},property:{validate:(0,n.assertNodeType)(\"JSXIdentifier\")}}}),(0,n.default)(\"JSXNamespacedName\",{visitor:[\"namespace\",\"name\"],aliases:[\"JSX\"],fields:{namespace:{validate:(0,n.assertNodeType)(\"JSXIdentifier\")},name:{validate:(0,n.assertNodeType)(\"JSXIdentifier\")}}}),(0,n.default)(\"JSXOpeningElement\",{builder:[\"name\",\"attributes\",\"selfClosing\"],visitor:[\"name\",\"attributes\"],aliases:[\"JSX\",\"Immutable\"],fields:{name:{validate:(0,n.assertNodeType)(\"JSXIdentifier\",\"JSXMemberExpression\",\"JSXNamespacedName\")},selfClosing:{default:!1},attributes:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"JSXAttribute\",\"JSXSpreadAttribute\")))},typeParameters:{validate:(0,n.assertNodeType)(\"TypeParameterInstantiation\",\"TSTypeParameterInstantiation\"),optional:!0}}}),(0,n.default)(\"JSXSpreadAttribute\",{visitor:[\"argument\"],aliases:[\"JSX\"],fields:{argument:{validate:(0,n.assertNodeType)(\"Expression\")}}}),(0,n.default)(\"JSXText\",{aliases:[\"JSX\",\"Immutable\"],builder:[\"value\"],fields:{value:{validate:(0,n.assertValueType)(\"string\")}}}),(0,n.default)(\"JSXFragment\",{builder:[\"openingFragment\",\"closingFragment\",\"children\"],visitor:[\"openingFragment\",\"children\",\"closingFragment\"],aliases:[\"JSX\",\"Immutable\",\"Expression\"],fields:{openingFragment:{validate:(0,n.assertNodeType)(\"JSXOpeningFragment\")},closingFragment:{validate:(0,n.assertNodeType)(\"JSXClosingFragment\")},children:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"JSXText\",\"JSXExpressionContainer\",\"JSXSpreadChild\",\"JSXElement\",\"JSXFragment\")))}}}),(0,n.default)(\"JSXOpeningFragment\",{aliases:[\"JSX\",\"Immutable\"]}),(0,n.default)(\"JSXClosingFragment\",{aliases:[\"JSX\",\"Immutable\"]})},(e,t,r)=>{\"use strict\";var n=r(20),s=r(217);(0,n.default)(\"Noop\",{visitor:[]}),(0,n.default)(\"Placeholder\",{visitor:[],builder:[\"expectedNode\",\"name\"],fields:{name:{validate:(0,n.assertNodeType)(\"Identifier\")},expectedNode:{validate:(0,n.assertOneOf)(...s.PLACEHOLDERS)}}}),(0,n.default)(\"V8IntrinsicIdentifier\",{builder:[\"name\"],fields:{name:{validate:(0,n.assertValueType)(\"string\")}}})},(e,t,r)=>{\"use strict\";var n=r(20),s=r(128);(0,n.default)(\"ArgumentPlaceholder\",{}),(0,n.default)(\"BindExpression\",{visitor:[\"object\",\"callee\"],aliases:[\"Expression\"],fields:{object:{validate:Object.assign((()=>{}),{oneOfNodeTypes:[\"Expression\"]})},callee:{validate:Object.assign((()=>{}),{oneOfNodeTypes:[\"Expression\"]})}}}),(0,n.default)(\"ClassProperty\",{visitor:[\"key\",\"value\",\"typeAnnotation\",\"decorators\"],builder:[\"key\",\"value\",\"typeAnnotation\",\"decorators\",\"computed\",\"static\"],aliases:[\"Property\"],fields:Object.assign({},s.classMethodOrPropertyCommon,{value:{validate:(0,n.assertNodeType)(\"Expression\"),optional:!0},definite:{validate:(0,n.assertValueType)(\"boolean\"),optional:!0},typeAnnotation:{validate:(0,n.assertNodeType)(\"TypeAnnotation\",\"TSTypeAnnotation\",\"Noop\"),optional:!0},decorators:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"Decorator\"))),optional:!0},readonly:{validate:(0,n.assertValueType)(\"boolean\"),optional:!0},declare:{validate:(0,n.assertValueType)(\"boolean\"),optional:!0}})}),(0,n.default)(\"PipelineTopicExpression\",{builder:[\"expression\"],visitor:[\"expression\"],fields:{expression:{validate:(0,n.assertNodeType)(\"Expression\")}}}),(0,n.default)(\"PipelineBareFunction\",{builder:[\"callee\"],visitor:[\"callee\"],fields:{callee:{validate:(0,n.assertNodeType)(\"Expression\")}}}),(0,n.default)(\"PipelinePrimaryTopicReference\",{aliases:[\"Expression\"]}),(0,n.default)(\"ClassPrivateProperty\",{visitor:[\"key\",\"value\",\"decorators\"],builder:[\"key\",\"value\",\"decorators\",\"static\"],aliases:[\"Property\",\"Private\"],fields:{key:{validate:(0,n.assertNodeType)(\"PrivateName\")},value:{validate:(0,n.assertNodeType)(\"Expression\"),optional:!0},typeAnnotation:{validate:(0,n.assertNodeType)(\"TypeAnnotation\",\"TSTypeAnnotation\",\"Noop\"),optional:!0},decorators:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"Decorator\"))),optional:!0}}}),(0,n.default)(\"ClassPrivateMethod\",{builder:[\"kind\",\"key\",\"params\",\"body\",\"static\"],visitor:[\"key\",\"params\",\"body\",\"decorators\",\"returnType\",\"typeParameters\"],aliases:[\"Function\",\"Scopable\",\"BlockParent\",\"FunctionParent\",\"Method\",\"Private\"],fields:Object.assign({},s.classMethodOrDeclareMethodCommon,s.functionTypeAnnotationCommon,{key:{validate:(0,n.assertNodeType)(\"PrivateName\")},body:{validate:(0,n.assertNodeType)(\"BlockStatement\")}})}),(0,n.default)(\"ImportAttribute\",{visitor:[\"key\",\"value\"],fields:{key:{validate:(0,n.assertNodeType)(\"Identifier\",\"StringLiteral\")},value:{validate:(0,n.assertNodeType)(\"StringLiteral\")}}}),(0,n.default)(\"Decorator\",{visitor:[\"expression\"],fields:{expression:{validate:(0,n.assertNodeType)(\"Expression\")}}}),(0,n.default)(\"DoExpression\",{visitor:[\"body\"],builder:[\"body\",\"async\"],aliases:[\"Expression\"],fields:{body:{validate:(0,n.assertNodeType)(\"BlockStatement\")},async:{validate:(0,n.assertValueType)(\"boolean\"),default:!1}}}),(0,n.default)(\"ExportDefaultSpecifier\",{visitor:[\"exported\"],aliases:[\"ModuleSpecifier\"],fields:{exported:{validate:(0,n.assertNodeType)(\"Identifier\")}}}),(0,n.default)(\"PrivateName\",{visitor:[\"id\"],aliases:[\"Private\"],fields:{id:{validate:(0,n.assertNodeType)(\"Identifier\")}}}),(0,n.default)(\"RecordExpression\",{visitor:[\"properties\"],aliases:[\"Expression\"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"ObjectProperty\",\"SpreadElement\")))}}}),(0,n.default)(\"TupleExpression\",{fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"Expression\",\"SpreadElement\"))),default:[]}},visitor:[\"elements\"],aliases:[\"Expression\"]}),(0,n.default)(\"DecimalLiteral\",{builder:[\"value\"],fields:{value:{validate:(0,n.assertValueType)(\"string\")}},aliases:[\"Expression\",\"Pureish\",\"Literal\",\"Immutable\"]}),(0,n.default)(\"StaticBlock\",{visitor:[\"body\"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"Statement\")))}},aliases:[\"Scopable\",\"BlockParent\"]}),(0,n.default)(\"ModuleExpression\",{visitor:[\"body\"],fields:{body:{validate:(0,n.assertNodeType)(\"Program\")}},aliases:[\"Expression\"]})},(e,t,r)=>{\"use strict\";var n=r(20),s=r(128);const i=(0,n.assertValueType)(\"boolean\"),o={returnType:{validate:(0,n.assertNodeType)(\"TSTypeAnnotation\",\"Noop\"),optional:!0},typeParameters:{validate:(0,n.assertNodeType)(\"TSTypeParameterDeclaration\",\"Noop\"),optional:!0}};(0,n.default)(\"TSParameterProperty\",{aliases:[\"LVal\"],visitor:[\"parameter\"],fields:{accessibility:{validate:(0,n.assertOneOf)(\"public\",\"private\",\"protected\"),optional:!0},readonly:{validate:(0,n.assertValueType)(\"boolean\"),optional:!0},parameter:{validate:(0,n.assertNodeType)(\"Identifier\",\"AssignmentPattern\")}}}),(0,n.default)(\"TSDeclareFunction\",{aliases:[\"Statement\",\"Declaration\"],visitor:[\"id\",\"typeParameters\",\"params\",\"returnType\"],fields:Object.assign({},s.functionDeclarationCommon,o)}),(0,n.default)(\"TSDeclareMethod\",{visitor:[\"decorators\",\"key\",\"typeParameters\",\"params\",\"returnType\"],fields:Object.assign({},s.classMethodOrDeclareMethodCommon,o)}),(0,n.default)(\"TSQualifiedName\",{aliases:[\"TSEntityName\"],visitor:[\"left\",\"right\"],fields:{left:(0,n.validateType)(\"TSEntityName\"),right:(0,n.validateType)(\"Identifier\")}});const a={typeParameters:(0,n.validateOptionalType)(\"TSTypeParameterDeclaration\"),parameters:(0,n.validateArrayOfType)([\"Identifier\",\"RestElement\"]),typeAnnotation:(0,n.validateOptionalType)(\"TSTypeAnnotation\")},l={aliases:[\"TSTypeElement\"],visitor:[\"typeParameters\",\"parameters\",\"typeAnnotation\"],fields:a};(0,n.default)(\"TSCallSignatureDeclaration\",l),(0,n.default)(\"TSConstructSignatureDeclaration\",l);const c={key:(0,n.validateType)(\"Expression\"),computed:(0,n.validate)(i),optional:(0,n.validateOptional)(i)};(0,n.default)(\"TSPropertySignature\",{aliases:[\"TSTypeElement\"],visitor:[\"key\",\"typeAnnotation\",\"initializer\"],fields:Object.assign({},c,{readonly:(0,n.validateOptional)(i),typeAnnotation:(0,n.validateOptionalType)(\"TSTypeAnnotation\"),initializer:(0,n.validateOptionalType)(\"Expression\")})}),(0,n.default)(\"TSMethodSignature\",{aliases:[\"TSTypeElement\"],visitor:[\"key\",\"typeParameters\",\"parameters\",\"typeAnnotation\"],fields:Object.assign({},a,c,{kind:{validate:(0,n.assertOneOf)(\"method\",\"get\",\"set\")}})}),(0,n.default)(\"TSIndexSignature\",{aliases:[\"TSTypeElement\"],visitor:[\"parameters\",\"typeAnnotation\"],fields:{readonly:(0,n.validateOptional)(i),static:(0,n.validateOptional)(i),parameters:(0,n.validateArrayOfType)(\"Identifier\"),typeAnnotation:(0,n.validateOptionalType)(\"TSTypeAnnotation\")}});const u=[\"TSAnyKeyword\",\"TSBooleanKeyword\",\"TSBigIntKeyword\",\"TSIntrinsicKeyword\",\"TSNeverKeyword\",\"TSNullKeyword\",\"TSNumberKeyword\",\"TSObjectKeyword\",\"TSStringKeyword\",\"TSSymbolKeyword\",\"TSUndefinedKeyword\",\"TSUnknownKeyword\",\"TSVoidKeyword\"];for(const e of u)(0,n.default)(e,{aliases:[\"TSType\",\"TSBaseType\"],visitor:[],fields:{}});(0,n.default)(\"TSThisType\",{aliases:[\"TSType\",\"TSBaseType\"],visitor:[],fields:{}});const p={aliases:[\"TSType\"],visitor:[\"typeParameters\",\"parameters\",\"typeAnnotation\"]};(0,n.default)(\"TSFunctionType\",Object.assign({},p,{fields:a})),(0,n.default)(\"TSConstructorType\",Object.assign({},p,{fields:Object.assign({},a,{abstract:(0,n.validateOptional)(i)})})),(0,n.default)(\"TSTypeReference\",{aliases:[\"TSType\"],visitor:[\"typeName\",\"typeParameters\"],fields:{typeName:(0,n.validateType)(\"TSEntityName\"),typeParameters:(0,n.validateOptionalType)(\"TSTypeParameterInstantiation\")}}),(0,n.default)(\"TSTypePredicate\",{aliases:[\"TSType\"],visitor:[\"parameterName\",\"typeAnnotation\"],builder:[\"parameterName\",\"typeAnnotation\",\"asserts\"],fields:{parameterName:(0,n.validateType)([\"Identifier\",\"TSThisType\"]),typeAnnotation:(0,n.validateOptionalType)(\"TSTypeAnnotation\"),asserts:(0,n.validateOptional)(i)}}),(0,n.default)(\"TSTypeQuery\",{aliases:[\"TSType\"],visitor:[\"exprName\"],fields:{exprName:(0,n.validateType)([\"TSEntityName\",\"TSImportType\"])}}),(0,n.default)(\"TSTypeLiteral\",{aliases:[\"TSType\"],visitor:[\"members\"],fields:{members:(0,n.validateArrayOfType)(\"TSTypeElement\")}}),(0,n.default)(\"TSArrayType\",{aliases:[\"TSType\"],visitor:[\"elementType\"],fields:{elementType:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSTupleType\",{aliases:[\"TSType\"],visitor:[\"elementTypes\"],fields:{elementTypes:(0,n.validateArrayOfType)([\"TSType\",\"TSNamedTupleMember\"])}}),(0,n.default)(\"TSOptionalType\",{aliases:[\"TSType\"],visitor:[\"typeAnnotation\"],fields:{typeAnnotation:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSRestType\",{aliases:[\"TSType\"],visitor:[\"typeAnnotation\"],fields:{typeAnnotation:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSNamedTupleMember\",{visitor:[\"label\",\"elementType\"],builder:[\"label\",\"elementType\",\"optional\"],fields:{label:(0,n.validateType)(\"Identifier\"),optional:{validate:i,default:!1},elementType:(0,n.validateType)(\"TSType\")}});const f={aliases:[\"TSType\"],visitor:[\"types\"],fields:{types:(0,n.validateArrayOfType)(\"TSType\")}};(0,n.default)(\"TSUnionType\",f),(0,n.default)(\"TSIntersectionType\",f),(0,n.default)(\"TSConditionalType\",{aliases:[\"TSType\"],visitor:[\"checkType\",\"extendsType\",\"trueType\",\"falseType\"],fields:{checkType:(0,n.validateType)(\"TSType\"),extendsType:(0,n.validateType)(\"TSType\"),trueType:(0,n.validateType)(\"TSType\"),falseType:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSInferType\",{aliases:[\"TSType\"],visitor:[\"typeParameter\"],fields:{typeParameter:(0,n.validateType)(\"TSTypeParameter\")}}),(0,n.default)(\"TSParenthesizedType\",{aliases:[\"TSType\"],visitor:[\"typeAnnotation\"],fields:{typeAnnotation:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSTypeOperator\",{aliases:[\"TSType\"],visitor:[\"typeAnnotation\"],fields:{operator:(0,n.validate)((0,n.assertValueType)(\"string\")),typeAnnotation:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSIndexedAccessType\",{aliases:[\"TSType\"],visitor:[\"objectType\",\"indexType\"],fields:{objectType:(0,n.validateType)(\"TSType\"),indexType:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSMappedType\",{aliases:[\"TSType\"],visitor:[\"typeParameter\",\"typeAnnotation\",\"nameType\"],fields:{readonly:(0,n.validateOptional)(i),typeParameter:(0,n.validateType)(\"TSTypeParameter\"),optional:(0,n.validateOptional)(i),typeAnnotation:(0,n.validateOptionalType)(\"TSType\"),nameType:(0,n.validateOptionalType)(\"TSType\")}}),(0,n.default)(\"TSLiteralType\",{aliases:[\"TSType\",\"TSBaseType\"],visitor:[\"literal\"],fields:{literal:(0,n.validateType)([\"NumericLiteral\",\"StringLiteral\",\"BooleanLiteral\",\"BigIntLiteral\"])}}),(0,n.default)(\"TSExpressionWithTypeArguments\",{aliases:[\"TSType\"],visitor:[\"expression\",\"typeParameters\"],fields:{expression:(0,n.validateType)(\"TSEntityName\"),typeParameters:(0,n.validateOptionalType)(\"TSTypeParameterInstantiation\")}}),(0,n.default)(\"TSInterfaceDeclaration\",{aliases:[\"Statement\",\"Declaration\"],visitor:[\"id\",\"typeParameters\",\"extends\",\"body\"],fields:{declare:(0,n.validateOptional)(i),id:(0,n.validateType)(\"Identifier\"),typeParameters:(0,n.validateOptionalType)(\"TSTypeParameterDeclaration\"),extends:(0,n.validateOptional)((0,n.arrayOfType)(\"TSExpressionWithTypeArguments\")),body:(0,n.validateType)(\"TSInterfaceBody\")}}),(0,n.default)(\"TSInterfaceBody\",{visitor:[\"body\"],fields:{body:(0,n.validateArrayOfType)(\"TSTypeElement\")}}),(0,n.default)(\"TSTypeAliasDeclaration\",{aliases:[\"Statement\",\"Declaration\"],visitor:[\"id\",\"typeParameters\",\"typeAnnotation\"],fields:{declare:(0,n.validateOptional)(i),id:(0,n.validateType)(\"Identifier\"),typeParameters:(0,n.validateOptionalType)(\"TSTypeParameterDeclaration\"),typeAnnotation:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSAsExpression\",{aliases:[\"Expression\"],visitor:[\"expression\",\"typeAnnotation\"],fields:{expression:(0,n.validateType)(\"Expression\"),typeAnnotation:(0,n.validateType)(\"TSType\")}}),(0,n.default)(\"TSTypeAssertion\",{aliases:[\"Expression\"],visitor:[\"typeAnnotation\",\"expression\"],fields:{typeAnnotation:(0,n.validateType)(\"TSType\"),expression:(0,n.validateType)(\"Expression\")}}),(0,n.default)(\"TSEnumDeclaration\",{aliases:[\"Statement\",\"Declaration\"],visitor:[\"id\",\"members\"],fields:{declare:(0,n.validateOptional)(i),const:(0,n.validateOptional)(i),id:(0,n.validateType)(\"Identifier\"),members:(0,n.validateArrayOfType)(\"TSEnumMember\"),initializer:(0,n.validateOptionalType)(\"Expression\")}}),(0,n.default)(\"TSEnumMember\",{visitor:[\"id\",\"initializer\"],fields:{id:(0,n.validateType)([\"Identifier\",\"StringLiteral\"]),initializer:(0,n.validateOptionalType)(\"Expression\")}}),(0,n.default)(\"TSModuleDeclaration\",{aliases:[\"Statement\",\"Declaration\"],visitor:[\"id\",\"body\"],fields:{declare:(0,n.validateOptional)(i),global:(0,n.validateOptional)(i),id:(0,n.validateType)([\"Identifier\",\"StringLiteral\"]),body:(0,n.validateType)([\"TSModuleBlock\",\"TSModuleDeclaration\"])}}),(0,n.default)(\"TSModuleBlock\",{aliases:[\"Scopable\",\"Block\",\"BlockParent\"],visitor:[\"body\"],fields:{body:(0,n.validateArrayOfType)(\"Statement\")}}),(0,n.default)(\"TSImportType\",{aliases:[\"TSType\"],visitor:[\"argument\",\"qualifier\",\"typeParameters\"],fields:{argument:(0,n.validateType)(\"StringLiteral\"),qualifier:(0,n.validateOptionalType)(\"TSEntityName\"),typeParameters:(0,n.validateOptionalType)(\"TSTypeParameterInstantiation\")}}),(0,n.default)(\"TSImportEqualsDeclaration\",{aliases:[\"Statement\"],visitor:[\"id\",\"moduleReference\"],fields:{isExport:(0,n.validate)(i),id:(0,n.validateType)(\"Identifier\"),moduleReference:(0,n.validateType)([\"TSEntityName\",\"TSExternalModuleReference\"])}}),(0,n.default)(\"TSExternalModuleReference\",{visitor:[\"expression\"],fields:{expression:(0,n.validateType)(\"StringLiteral\")}}),(0,n.default)(\"TSNonNullExpression\",{aliases:[\"Expression\"],visitor:[\"expression\"],fields:{expression:(0,n.validateType)(\"Expression\")}}),(0,n.default)(\"TSExportAssignment\",{aliases:[\"Statement\"],visitor:[\"expression\"],fields:{expression:(0,n.validateType)(\"Expression\")}}),(0,n.default)(\"TSNamespaceExportDeclaration\",{aliases:[\"Statement\"],visitor:[\"id\"],fields:{id:(0,n.validateType)(\"Identifier\")}}),(0,n.default)(\"TSTypeAnnotation\",{visitor:[\"typeAnnotation\"],fields:{typeAnnotation:{validate:(0,n.assertNodeType)(\"TSType\")}}}),(0,n.default)(\"TSTypeParameterInstantiation\",{visitor:[\"params\"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"TSType\")))}}}),(0,n.default)(\"TSTypeParameterDeclaration\",{visitor:[\"params\"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)(\"array\"),(0,n.assertEach)((0,n.assertNodeType)(\"TSTypeParameter\")))}}}),(0,n.default)(\"TSTypeParameter\",{builder:[\"constraint\",\"default\",\"name\"],visitor:[\"constraint\",\"default\"],fields:{name:{validate:(0,n.assertValueType)(\"string\")},constraint:{validate:(0,n.assertNodeType)(\"TSType\"),optional:!0},default:{validate:(0,n.assertNodeType)(\"TSType\"),optional:!0}}})},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if(!(0,n.default)(e)){var t;const r=null!=(t=null==e?void 0:e.type)?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type \"${r}\"`)}};var n=r(218)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.assertArrayExpression=function(e,t){s(\"ArrayExpression\",e,t)},t.assertAssignmentExpression=function(e,t){s(\"AssignmentExpression\",e,t)},t.assertBinaryExpression=function(e,t){s(\"BinaryExpression\",e,t)},t.assertInterpreterDirective=function(e,t){s(\"InterpreterDirective\",e,t)},t.assertDirective=function(e,t){s(\"Directive\",e,t)},t.assertDirectiveLiteral=function(e,t){s(\"DirectiveLiteral\",e,t)},t.assertBlockStatement=function(e,t){s(\"BlockStatement\",e,t)},t.assertBreakStatement=function(e,t){s(\"BreakStatement\",e,t)},t.assertCallExpression=function(e,t){s(\"CallExpression\",e,t)},t.assertCatchClause=function(e,t){s(\"CatchClause\",e,t)},t.assertConditionalExpression=function(e,t){s(\"ConditionalExpression\",e,t)},t.assertContinueStatement=function(e,t){s(\"ContinueStatement\",e,t)},t.assertDebuggerStatement=function(e,t){s(\"DebuggerStatement\",e,t)},t.assertDoWhileStatement=function(e,t){s(\"DoWhileStatement\",e,t)},t.assertEmptyStatement=function(e,t){s(\"EmptyStatement\",e,t)},t.assertExpressionStatement=function(e,t){s(\"ExpressionStatement\",e,t)},t.assertFile=function(e,t){s(\"File\",e,t)},t.assertForInStatement=function(e,t){s(\"ForInStatement\",e,t)},t.assertForStatement=function(e,t){s(\"ForStatement\",e,t)},t.assertFunctionDeclaration=function(e,t){s(\"FunctionDeclaration\",e,t)},t.assertFunctionExpression=function(e,t){s(\"FunctionExpression\",e,t)},t.assertIdentifier=function(e,t){s(\"Identifier\",e,t)},t.assertIfStatement=function(e,t){s(\"IfStatement\",e,t)},t.assertLabeledStatement=function(e,t){s(\"LabeledStatement\",e,t)},t.assertStringLiteral=function(e,t){s(\"StringLiteral\",e,t)},t.assertNumericLiteral=function(e,t){s(\"NumericLiteral\",e,t)},t.assertNullLiteral=function(e,t){s(\"NullLiteral\",e,t)},t.assertBooleanLiteral=function(e,t){s(\"BooleanLiteral\",e,t)},t.assertRegExpLiteral=function(e,t){s(\"RegExpLiteral\",e,t)},t.assertLogicalExpression=function(e,t){s(\"LogicalExpression\",e,t)},t.assertMemberExpression=function(e,t){s(\"MemberExpression\",e,t)},t.assertNewExpression=function(e,t){s(\"NewExpression\",e,t)},t.assertProgram=function(e,t){s(\"Program\",e,t)},t.assertObjectExpression=function(e,t){s(\"ObjectExpression\",e,t)},t.assertObjectMethod=function(e,t){s(\"ObjectMethod\",e,t)},t.assertObjectProperty=function(e,t){s(\"ObjectProperty\",e,t)},t.assertRestElement=function(e,t){s(\"RestElement\",e,t)},t.assertReturnStatement=function(e,t){s(\"ReturnStatement\",e,t)},t.assertSequenceExpression=function(e,t){s(\"SequenceExpression\",e,t)},t.assertParenthesizedExpression=function(e,t){s(\"ParenthesizedExpression\",e,t)},t.assertSwitchCase=function(e,t){s(\"SwitchCase\",e,t)},t.assertSwitchStatement=function(e,t){s(\"SwitchStatement\",e,t)},t.assertThisExpression=function(e,t){s(\"ThisExpression\",e,t)},t.assertThrowStatement=function(e,t){s(\"ThrowStatement\",e,t)},t.assertTryStatement=function(e,t){s(\"TryStatement\",e,t)},t.assertUnaryExpression=function(e,t){s(\"UnaryExpression\",e,t)},t.assertUpdateExpression=function(e,t){s(\"UpdateExpression\",e,t)},t.assertVariableDeclaration=function(e,t){s(\"VariableDeclaration\",e,t)},t.assertVariableDeclarator=function(e,t){s(\"VariableDeclarator\",e,t)},t.assertWhileStatement=function(e,t){s(\"WhileStatement\",e,t)},t.assertWithStatement=function(e,t){s(\"WithStatement\",e,t)},t.assertAssignmentPattern=function(e,t){s(\"AssignmentPattern\",e,t)},t.assertArrayPattern=function(e,t){s(\"ArrayPattern\",e,t)},t.assertArrowFunctionExpression=function(e,t){s(\"ArrowFunctionExpression\",e,t)},t.assertClassBody=function(e,t){s(\"ClassBody\",e,t)},t.assertClassExpression=function(e,t){s(\"ClassExpression\",e,t)},t.assertClassDeclaration=function(e,t){s(\"ClassDeclaration\",e,t)},t.assertExportAllDeclaration=function(e,t){s(\"ExportAllDeclaration\",e,t)},t.assertExportDefaultDeclaration=function(e,t){s(\"ExportDefaultDeclaration\",e,t)},t.assertExportNamedDeclaration=function(e,t){s(\"ExportNamedDeclaration\",e,t)},t.assertExportSpecifier=function(e,t){s(\"ExportSpecifier\",e,t)},t.assertForOfStatement=function(e,t){s(\"ForOfStatement\",e,t)},t.assertImportDeclaration=function(e,t){s(\"ImportDeclaration\",e,t)},t.assertImportDefaultSpecifier=function(e,t){s(\"ImportDefaultSpecifier\",e,t)},t.assertImportNamespaceSpecifier=function(e,t){s(\"ImportNamespaceSpecifier\",e,t)},t.assertImportSpecifier=function(e,t){s(\"ImportSpecifier\",e,t)},t.assertMetaProperty=function(e,t){s(\"MetaProperty\",e,t)},t.assertClassMethod=function(e,t){s(\"ClassMethod\",e,t)},t.assertObjectPattern=function(e,t){s(\"ObjectPattern\",e,t)},t.assertSpreadElement=function(e,t){s(\"SpreadElement\",e,t)},t.assertSuper=function(e,t){s(\"Super\",e,t)},t.assertTaggedTemplateExpression=function(e,t){s(\"TaggedTemplateExpression\",e,t)},t.assertTemplateElement=function(e,t){s(\"TemplateElement\",e,t)},t.assertTemplateLiteral=function(e,t){s(\"TemplateLiteral\",e,t)},t.assertYieldExpression=function(e,t){s(\"YieldExpression\",e,t)},t.assertAwaitExpression=function(e,t){s(\"AwaitExpression\",e,t)},t.assertImport=function(e,t){s(\"Import\",e,t)},t.assertBigIntLiteral=function(e,t){s(\"BigIntLiteral\",e,t)},t.assertExportNamespaceSpecifier=function(e,t){s(\"ExportNamespaceSpecifier\",e,t)},t.assertOptionalMemberExpression=function(e,t){s(\"OptionalMemberExpression\",e,t)},t.assertOptionalCallExpression=function(e,t){s(\"OptionalCallExpression\",e,t)},t.assertAnyTypeAnnotation=function(e,t){s(\"AnyTypeAnnotation\",e,t)},t.assertArrayTypeAnnotation=function(e,t){s(\"ArrayTypeAnnotation\",e,t)},t.assertBooleanTypeAnnotation=function(e,t){s(\"BooleanTypeAnnotation\",e,t)},t.assertBooleanLiteralTypeAnnotation=function(e,t){s(\"BooleanLiteralTypeAnnotation\",e,t)},t.assertNullLiteralTypeAnnotation=function(e,t){s(\"NullLiteralTypeAnnotation\",e,t)},t.assertClassImplements=function(e,t){s(\"ClassImplements\",e,t)},t.assertDeclareClass=function(e,t){s(\"DeclareClass\",e,t)},t.assertDeclareFunction=function(e,t){s(\"DeclareFunction\",e,t)},t.assertDeclareInterface=function(e,t){s(\"DeclareInterface\",e,t)},t.assertDeclareModule=function(e,t){s(\"DeclareModule\",e,t)},t.assertDeclareModuleExports=function(e,t){s(\"DeclareModuleExports\",e,t)},t.assertDeclareTypeAlias=function(e,t){s(\"DeclareTypeAlias\",e,t)},t.assertDeclareOpaqueType=function(e,t){s(\"DeclareOpaqueType\",e,t)},t.assertDeclareVariable=function(e,t){s(\"DeclareVariable\",e,t)},t.assertDeclareExportDeclaration=function(e,t){s(\"DeclareExportDeclaration\",e,t)},t.assertDeclareExportAllDeclaration=function(e,t){s(\"DeclareExportAllDeclaration\",e,t)},t.assertDeclaredPredicate=function(e,t){s(\"DeclaredPredicate\",e,t)},t.assertExistsTypeAnnotation=function(e,t){s(\"ExistsTypeAnnotation\",e,t)},t.assertFunctionTypeAnnotation=function(e,t){s(\"FunctionTypeAnnotation\",e,t)},t.assertFunctionTypeParam=function(e,t){s(\"FunctionTypeParam\",e,t)},t.assertGenericTypeAnnotation=function(e,t){s(\"GenericTypeAnnotation\",e,t)},t.assertInferredPredicate=function(e,t){s(\"InferredPredicate\",e,t)},t.assertInterfaceExtends=function(e,t){s(\"InterfaceExtends\",e,t)},t.assertInterfaceDeclaration=function(e,t){s(\"InterfaceDeclaration\",e,t)},t.assertInterfaceTypeAnnotation=function(e,t){s(\"InterfaceTypeAnnotation\",e,t)},t.assertIntersectionTypeAnnotation=function(e,t){s(\"IntersectionTypeAnnotation\",e,t)},t.assertMixedTypeAnnotation=function(e,t){s(\"MixedTypeAnnotation\",e,t)},t.assertEmptyTypeAnnotation=function(e,t){s(\"EmptyTypeAnnotation\",e,t)},t.assertNullableTypeAnnotation=function(e,t){s(\"NullableTypeAnnotation\",e,t)},t.assertNumberLiteralTypeAnnotation=function(e,t){s(\"NumberLiteralTypeAnnotation\",e,t)},t.assertNumberTypeAnnotation=function(e,t){s(\"NumberTypeAnnotation\",e,t)},t.assertObjectTypeAnnotation=function(e,t){s(\"ObjectTypeAnnotation\",e,t)},t.assertObjectTypeInternalSlot=function(e,t){s(\"ObjectTypeInternalSlot\",e,t)},t.assertObjectTypeCallProperty=function(e,t){s(\"ObjectTypeCallProperty\",e,t)},t.assertObjectTypeIndexer=function(e,t){s(\"ObjectTypeIndexer\",e,t)},t.assertObjectTypeProperty=function(e,t){s(\"ObjectTypeProperty\",e,t)},t.assertObjectTypeSpreadProperty=function(e,t){s(\"ObjectTypeSpreadProperty\",e,t)},t.assertOpaqueType=function(e,t){s(\"OpaqueType\",e,t)},t.assertQualifiedTypeIdentifier=function(e,t){s(\"QualifiedTypeIdentifier\",e,t)},t.assertStringLiteralTypeAnnotation=function(e,t){s(\"StringLiteralTypeAnnotation\",e,t)},t.assertStringTypeAnnotation=function(e,t){s(\"StringTypeAnnotation\",e,t)},t.assertSymbolTypeAnnotation=function(e,t){s(\"SymbolTypeAnnotation\",e,t)},t.assertThisTypeAnnotation=function(e,t){s(\"ThisTypeAnnotation\",e,t)},t.assertTupleTypeAnnotation=function(e,t){s(\"TupleTypeAnnotation\",e,t)},t.assertTypeofTypeAnnotation=function(e,t){s(\"TypeofTypeAnnotation\",e,t)},t.assertTypeAlias=function(e,t){s(\"TypeAlias\",e,t)},t.assertTypeAnnotation=function(e,t){s(\"TypeAnnotation\",e,t)},t.assertTypeCastExpression=function(e,t){s(\"TypeCastExpression\",e,t)},t.assertTypeParameter=function(e,t){s(\"TypeParameter\",e,t)},t.assertTypeParameterDeclaration=function(e,t){s(\"TypeParameterDeclaration\",e,t)},t.assertTypeParameterInstantiation=function(e,t){s(\"TypeParameterInstantiation\",e,t)},t.assertUnionTypeAnnotation=function(e,t){s(\"UnionTypeAnnotation\",e,t)},t.assertVariance=function(e,t){s(\"Variance\",e,t)},t.assertVoidTypeAnnotation=function(e,t){s(\"VoidTypeAnnotation\",e,t)},t.assertEnumDeclaration=function(e,t){s(\"EnumDeclaration\",e,t)},t.assertEnumBooleanBody=function(e,t){s(\"EnumBooleanBody\",e,t)},t.assertEnumNumberBody=function(e,t){s(\"EnumNumberBody\",e,t)},t.assertEnumStringBody=function(e,t){s(\"EnumStringBody\",e,t)},t.assertEnumSymbolBody=function(e,t){s(\"EnumSymbolBody\",e,t)},t.assertEnumBooleanMember=function(e,t){s(\"EnumBooleanMember\",e,t)},t.assertEnumNumberMember=function(e,t){s(\"EnumNumberMember\",e,t)},t.assertEnumStringMember=function(e,t){s(\"EnumStringMember\",e,t)},t.assertEnumDefaultedMember=function(e,t){s(\"EnumDefaultedMember\",e,t)},t.assertIndexedAccessType=function(e,t){s(\"IndexedAccessType\",e,t)},t.assertOptionalIndexedAccessType=function(e,t){s(\"OptionalIndexedAccessType\",e,t)},t.assertJSXAttribute=function(e,t){s(\"JSXAttribute\",e,t)},t.assertJSXClosingElement=function(e,t){s(\"JSXClosingElement\",e,t)},t.assertJSXElement=function(e,t){s(\"JSXElement\",e,t)},t.assertJSXEmptyExpression=function(e,t){s(\"JSXEmptyExpression\",e,t)},t.assertJSXExpressionContainer=function(e,t){s(\"JSXExpressionContainer\",e,t)},t.assertJSXSpreadChild=function(e,t){s(\"JSXSpreadChild\",e,t)},t.assertJSXIdentifier=function(e,t){s(\"JSXIdentifier\",e,t)},t.assertJSXMemberExpression=function(e,t){s(\"JSXMemberExpression\",e,t)},t.assertJSXNamespacedName=function(e,t){s(\"JSXNamespacedName\",e,t)},t.assertJSXOpeningElement=function(e,t){s(\"JSXOpeningElement\",e,t)},t.assertJSXSpreadAttribute=function(e,t){s(\"JSXSpreadAttribute\",e,t)},t.assertJSXText=function(e,t){s(\"JSXText\",e,t)},t.assertJSXFragment=function(e,t){s(\"JSXFragment\",e,t)},t.assertJSXOpeningFragment=function(e,t){s(\"JSXOpeningFragment\",e,t)},t.assertJSXClosingFragment=function(e,t){s(\"JSXClosingFragment\",e,t)},t.assertNoop=function(e,t){s(\"Noop\",e,t)},t.assertPlaceholder=function(e,t){s(\"Placeholder\",e,t)},t.assertV8IntrinsicIdentifier=function(e,t){s(\"V8IntrinsicIdentifier\",e,t)},t.assertArgumentPlaceholder=function(e,t){s(\"ArgumentPlaceholder\",e,t)},t.assertBindExpression=function(e,t){s(\"BindExpression\",e,t)},t.assertClassProperty=function(e,t){s(\"ClassProperty\",e,t)},t.assertPipelineTopicExpression=function(e,t){s(\"PipelineTopicExpression\",e,t)},t.assertPipelineBareFunction=function(e,t){s(\"PipelineBareFunction\",e,t)},t.assertPipelinePrimaryTopicReference=function(e,t){s(\"PipelinePrimaryTopicReference\",e,t)},t.assertClassPrivateProperty=function(e,t){s(\"ClassPrivateProperty\",e,t)},t.assertClassPrivateMethod=function(e,t){s(\"ClassPrivateMethod\",e,t)},t.assertImportAttribute=function(e,t){s(\"ImportAttribute\",e,t)},t.assertDecorator=function(e,t){s(\"Decorator\",e,t)},t.assertDoExpression=function(e,t){s(\"DoExpression\",e,t)},t.assertExportDefaultSpecifier=function(e,t){s(\"ExportDefaultSpecifier\",e,t)},t.assertPrivateName=function(e,t){s(\"PrivateName\",e,t)},t.assertRecordExpression=function(e,t){s(\"RecordExpression\",e,t)},t.assertTupleExpression=function(e,t){s(\"TupleExpression\",e,t)},t.assertDecimalLiteral=function(e,t){s(\"DecimalLiteral\",e,t)},t.assertStaticBlock=function(e,t){s(\"StaticBlock\",e,t)},t.assertModuleExpression=function(e,t){s(\"ModuleExpression\",e,t)},t.assertTSParameterProperty=function(e,t){s(\"TSParameterProperty\",e,t)},t.assertTSDeclareFunction=function(e,t){s(\"TSDeclareFunction\",e,t)},t.assertTSDeclareMethod=function(e,t){s(\"TSDeclareMethod\",e,t)},t.assertTSQualifiedName=function(e,t){s(\"TSQualifiedName\",e,t)},t.assertTSCallSignatureDeclaration=function(e,t){s(\"TSCallSignatureDeclaration\",e,t)},t.assertTSConstructSignatureDeclaration=function(e,t){s(\"TSConstructSignatureDeclaration\",e,t)},t.assertTSPropertySignature=function(e,t){s(\"TSPropertySignature\",e,t)},t.assertTSMethodSignature=function(e,t){s(\"TSMethodSignature\",e,t)},t.assertTSIndexSignature=function(e,t){s(\"TSIndexSignature\",e,t)},t.assertTSAnyKeyword=function(e,t){s(\"TSAnyKeyword\",e,t)},t.assertTSBooleanKeyword=function(e,t){s(\"TSBooleanKeyword\",e,t)},t.assertTSBigIntKeyword=function(e,t){s(\"TSBigIntKeyword\",e,t)},t.assertTSIntrinsicKeyword=function(e,t){s(\"TSIntrinsicKeyword\",e,t)},t.assertTSNeverKeyword=function(e,t){s(\"TSNeverKeyword\",e,t)},t.assertTSNullKeyword=function(e,t){s(\"TSNullKeyword\",e,t)},t.assertTSNumberKeyword=function(e,t){s(\"TSNumberKeyword\",e,t)},t.assertTSObjectKeyword=function(e,t){s(\"TSObjectKeyword\",e,t)},t.assertTSStringKeyword=function(e,t){s(\"TSStringKeyword\",e,t)},t.assertTSSymbolKeyword=function(e,t){s(\"TSSymbolKeyword\",e,t)},t.assertTSUndefinedKeyword=function(e,t){s(\"TSUndefinedKeyword\",e,t)},t.assertTSUnknownKeyword=function(e,t){s(\"TSUnknownKeyword\",e,t)},t.assertTSVoidKeyword=function(e,t){s(\"TSVoidKeyword\",e,t)},t.assertTSThisType=function(e,t){s(\"TSThisType\",e,t)},t.assertTSFunctionType=function(e,t){s(\"TSFunctionType\",e,t)},t.assertTSConstructorType=function(e,t){s(\"TSConstructorType\",e,t)},t.assertTSTypeReference=function(e,t){s(\"TSTypeReference\",e,t)},t.assertTSTypePredicate=function(e,t){s(\"TSTypePredicate\",e,t)},t.assertTSTypeQuery=function(e,t){s(\"TSTypeQuery\",e,t)},t.assertTSTypeLiteral=function(e,t){s(\"TSTypeLiteral\",e,t)},t.assertTSArrayType=function(e,t){s(\"TSArrayType\",e,t)},t.assertTSTupleType=function(e,t){s(\"TSTupleType\",e,t)},t.assertTSOptionalType=function(e,t){s(\"TSOptionalType\",e,t)},t.assertTSRestType=function(e,t){s(\"TSRestType\",e,t)},t.assertTSNamedTupleMember=function(e,t){s(\"TSNamedTupleMember\",e,t)},t.assertTSUnionType=function(e,t){s(\"TSUnionType\",e,t)},t.assertTSIntersectionType=function(e,t){s(\"TSIntersectionType\",e,t)},t.assertTSConditionalType=function(e,t){s(\"TSConditionalType\",e,t)},t.assertTSInferType=function(e,t){s(\"TSInferType\",e,t)},t.assertTSParenthesizedType=function(e,t){s(\"TSParenthesizedType\",e,t)},t.assertTSTypeOperator=function(e,t){s(\"TSTypeOperator\",e,t)},t.assertTSIndexedAccessType=function(e,t){s(\"TSIndexedAccessType\",e,t)},t.assertTSMappedType=function(e,t){s(\"TSMappedType\",e,t)},t.assertTSLiteralType=function(e,t){s(\"TSLiteralType\",e,t)},t.assertTSExpressionWithTypeArguments=function(e,t){s(\"TSExpressionWithTypeArguments\",e,t)},t.assertTSInterfaceDeclaration=function(e,t){s(\"TSInterfaceDeclaration\",e,t)},t.assertTSInterfaceBody=function(e,t){s(\"TSInterfaceBody\",e,t)},t.assertTSTypeAliasDeclaration=function(e,t){s(\"TSTypeAliasDeclaration\",e,t)},t.assertTSAsExpression=function(e,t){s(\"TSAsExpression\",e,t)},t.assertTSTypeAssertion=function(e,t){s(\"TSTypeAssertion\",e,t)},t.assertTSEnumDeclaration=function(e,t){s(\"TSEnumDeclaration\",e,t)},t.assertTSEnumMember=function(e,t){s(\"TSEnumMember\",e,t)},t.assertTSModuleDeclaration=function(e,t){s(\"TSModuleDeclaration\",e,t)},t.assertTSModuleBlock=function(e,t){s(\"TSModuleBlock\",e,t)},t.assertTSImportType=function(e,t){s(\"TSImportType\",e,t)},t.assertTSImportEqualsDeclaration=function(e,t){s(\"TSImportEqualsDeclaration\",e,t)},t.assertTSExternalModuleReference=function(e,t){s(\"TSExternalModuleReference\",e,t)},t.assertTSNonNullExpression=function(e,t){s(\"TSNonNullExpression\",e,t)},t.assertTSExportAssignment=function(e,t){s(\"TSExportAssignment\",e,t)},t.assertTSNamespaceExportDeclaration=function(e,t){s(\"TSNamespaceExportDeclaration\",e,t)},t.assertTSTypeAnnotation=function(e,t){s(\"TSTypeAnnotation\",e,t)},t.assertTSTypeParameterInstantiation=function(e,t){s(\"TSTypeParameterInstantiation\",e,t)},t.assertTSTypeParameterDeclaration=function(e,t){s(\"TSTypeParameterDeclaration\",e,t)},t.assertTSTypeParameter=function(e,t){s(\"TSTypeParameter\",e,t)},t.assertExpression=function(e,t){s(\"Expression\",e,t)},t.assertBinary=function(e,t){s(\"Binary\",e,t)},t.assertScopable=function(e,t){s(\"Scopable\",e,t)},t.assertBlockParent=function(e,t){s(\"BlockParent\",e,t)},t.assertBlock=function(e,t){s(\"Block\",e,t)},t.assertStatement=function(e,t){s(\"Statement\",e,t)},t.assertTerminatorless=function(e,t){s(\"Terminatorless\",e,t)},t.assertCompletionStatement=function(e,t){s(\"CompletionStatement\",e,t)},t.assertConditional=function(e,t){s(\"Conditional\",e,t)},t.assertLoop=function(e,t){s(\"Loop\",e,t)},t.assertWhile=function(e,t){s(\"While\",e,t)},t.assertExpressionWrapper=function(e,t){s(\"ExpressionWrapper\",e,t)},t.assertFor=function(e,t){s(\"For\",e,t)},t.assertForXStatement=function(e,t){s(\"ForXStatement\",e,t)},t.assertFunction=function(e,t){s(\"Function\",e,t)},t.assertFunctionParent=function(e,t){s(\"FunctionParent\",e,t)},t.assertPureish=function(e,t){s(\"Pureish\",e,t)},t.assertDeclaration=function(e,t){s(\"Declaration\",e,t)},t.assertPatternLike=function(e,t){s(\"PatternLike\",e,t)},t.assertLVal=function(e,t){s(\"LVal\",e,t)},t.assertTSEntityName=function(e,t){s(\"TSEntityName\",e,t)},t.assertLiteral=function(e,t){s(\"Literal\",e,t)},t.assertImmutable=function(e,t){s(\"Immutable\",e,t)},t.assertUserWhitespacable=function(e,t){s(\"UserWhitespacable\",e,t)},t.assertMethod=function(e,t){s(\"Method\",e,t)},t.assertObjectMember=function(e,t){s(\"ObjectMember\",e,t)},t.assertProperty=function(e,t){s(\"Property\",e,t)},t.assertUnaryLike=function(e,t){s(\"UnaryLike\",e,t)},t.assertPattern=function(e,t){s(\"Pattern\",e,t)},t.assertClass=function(e,t){s(\"Class\",e,t)},t.assertModuleDeclaration=function(e,t){s(\"ModuleDeclaration\",e,t)},t.assertExportDeclaration=function(e,t){s(\"ExportDeclaration\",e,t)},t.assertModuleSpecifier=function(e,t){s(\"ModuleSpecifier\",e,t)},t.assertFlow=function(e,t){s(\"Flow\",e,t)},t.assertFlowType=function(e,t){s(\"FlowType\",e,t)},t.assertFlowBaseAnnotation=function(e,t){s(\"FlowBaseAnnotation\",e,t)},t.assertFlowDeclaration=function(e,t){s(\"FlowDeclaration\",e,t)},t.assertFlowPredicate=function(e,t){s(\"FlowPredicate\",e,t)},t.assertEnumBody=function(e,t){s(\"EnumBody\",e,t)},t.assertEnumMember=function(e,t){s(\"EnumMember\",e,t)},t.assertJSX=function(e,t){s(\"JSX\",e,t)},t.assertPrivate=function(e,t){s(\"Private\",e,t)},t.assertTSTypeElement=function(e,t){s(\"TSTypeElement\",e,t)},t.assertTSType=function(e,t){s(\"TSType\",e,t)},t.assertTSBaseType=function(e,t){s(\"TSBaseType\",e,t)},t.assertNumberLiteral=function(e,t){s(\"NumberLiteral\",e,t)},t.assertRegexLiteral=function(e,t){s(\"RegexLiteral\",e,t)},t.assertRestProperty=function(e,t){s(\"RestProperty\",e,t)},t.assertSpreadProperty=function(e,t){s(\"SpreadProperty\",e,t)};var n=r(62);function s(e,t,r){if(!(0,n.default)(e,t,r))throw new Error(`Expected type \"${e}\" with option ${JSON.stringify(r)}, but instead got \"${t.type}\".`)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if(\"string\"===e)return(0,n.stringTypeAnnotation)();if(\"number\"===e)return(0,n.numberTypeAnnotation)();if(\"undefined\"===e)return(0,n.voidTypeAnnotation)();if(\"boolean\"===e)return(0,n.booleanTypeAnnotation)();if(\"function\"===e)return(0,n.genericTypeAnnotation)((0,n.identifier)(\"Function\"));if(\"object\"===e)return(0,n.genericTypeAnnotation)((0,n.identifier)(\"Object\"));if(\"symbol\"===e)return(0,n.genericTypeAnnotation)((0,n.identifier)(\"Symbol\"));if(\"bigint\"===e)return(0,n.anyTypeAnnotation)();throw new Error(\"Invalid typeof value: \"+e)};var n=r(6)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){const t=(0,s.default)(e);return 1===t.length?t[0]:(0,n.unionTypeAnnotation)(t)};var n=r(6),s=r(219)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){const t=e.map((e=>e.typeAnnotation)),r=(0,s.default)(t);return 1===r.length?r[0]:(0,n.tsUnionType)(r)};var n=r(6),s=r(380)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){const t={},r={},s=[],i=[];for(let t=0;t<e.length;t++){const o=e[t];if(o&&!(i.indexOf(o)>=0)){if((0,n.isTSAnyKeyword)(o))return[o];(0,n.isTSBaseType)(o)?r[o.type]=o:(0,n.isTSUnionType)(o)?s.indexOf(o.types)<0&&(e=e.concat(o.types),s.push(o.types)):i.push(o)}}for(const e of Object.keys(r))i.push(r[e]);for(const e of Object.keys(t))i.push(t[e]);return i};var n=r(1)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),Object.defineProperty(t,\"ArrayExpression\",{enumerable:!0,get:function(){return n.arrayExpression}}),Object.defineProperty(t,\"AssignmentExpression\",{enumerable:!0,get:function(){return n.assignmentExpression}}),Object.defineProperty(t,\"BinaryExpression\",{enumerable:!0,get:function(){return n.binaryExpression}}),Object.defineProperty(t,\"InterpreterDirective\",{enumerable:!0,get:function(){return n.interpreterDirective}}),Object.defineProperty(t,\"Directive\",{enumerable:!0,get:function(){return n.directive}}),Object.defineProperty(t,\"DirectiveLiteral\",{enumerable:!0,get:function(){return n.directiveLiteral}}),Object.defineProperty(t,\"BlockStatement\",{enumerable:!0,get:function(){return n.blockStatement}}),Object.defineProperty(t,\"BreakStatement\",{enumerable:!0,get:function(){return n.breakStatement}}),Object.defineProperty(t,\"CallExpression\",{enumerable:!0,get:function(){return n.callExpression}}),Object.defineProperty(t,\"CatchClause\",{enumerable:!0,get:function(){return n.catchClause}}),Object.defineProperty(t,\"ConditionalExpression\",{enumerable:!0,get:function(){return n.conditionalExpression}}),Object.defineProperty(t,\"ContinueStatement\",{enumerable:!0,get:function(){return n.continueStatement}}),Object.defineProperty(t,\"DebuggerStatement\",{enumerable:!0,get:function(){return n.debuggerStatement}}),Object.defineProperty(t,\"DoWhileStatement\",{enumerable:!0,get:function(){return n.doWhileStatement}}),Object.defineProperty(t,\"EmptyStatement\",{enumerable:!0,get:function(){return n.emptyStatement}}),Object.defineProperty(t,\"ExpressionStatement\",{enumerable:!0,get:function(){return n.expressionStatement}}),Object.defineProperty(t,\"File\",{enumerable:!0,get:function(){return n.file}}),Object.defineProperty(t,\"ForInStatement\",{enumerable:!0,get:function(){return n.forInStatement}}),Object.defineProperty(t,\"ForStatement\",{enumerable:!0,get:function(){return n.forStatement}}),Object.defineProperty(t,\"FunctionDeclaration\",{enumerable:!0,get:function(){return n.functionDeclaration}}),Object.defineProperty(t,\"FunctionExpression\",{enumerable:!0,get:function(){return n.functionExpression}}),Object.defineProperty(t,\"Identifier\",{enumerable:!0,get:function(){return n.identifier}}),Object.defineProperty(t,\"IfStatement\",{enumerable:!0,get:function(){return n.ifStatement}}),Object.defineProperty(t,\"LabeledStatement\",{enumerable:!0,get:function(){return n.labeledStatement}}),Object.defineProperty(t,\"StringLiteral\",{enumerable:!0,get:function(){return n.stringLiteral}}),Object.defineProperty(t,\"NumericLiteral\",{enumerable:!0,get:function(){return n.numericLiteral}}),Object.defineProperty(t,\"NullLiteral\",{enumerable:!0,get:function(){return n.nullLiteral}}),Object.defineProperty(t,\"BooleanLiteral\",{enumerable:!0,get:function(){return n.booleanLiteral}}),Object.defineProperty(t,\"RegExpLiteral\",{enumerable:!0,get:function(){return n.regExpLiteral}}),Object.defineProperty(t,\"LogicalExpression\",{enumerable:!0,get:function(){return n.logicalExpression}}),Object.defineProperty(t,\"MemberExpression\",{enumerable:!0,get:function(){return n.memberExpression}}),Object.defineProperty(t,\"NewExpression\",{enumerable:!0,get:function(){return n.newExpression}}),Object.defineProperty(t,\"Program\",{enumerable:!0,get:function(){return n.program}}),Object.defineProperty(t,\"ObjectExpression\",{enumerable:!0,get:function(){return n.objectExpression}}),Object.defineProperty(t,\"ObjectMethod\",{enumerable:!0,get:function(){return n.objectMethod}}),Object.defineProperty(t,\"ObjectProperty\",{enumerable:!0,get:function(){return n.objectProperty}}),Object.defineProperty(t,\"RestElement\",{enumerable:!0,get:function(){return n.restElement}}),Object.defineProperty(t,\"ReturnStatement\",{enumerable:!0,get:function(){return n.returnStatement}}),Object.defineProperty(t,\"SequenceExpression\",{enumerable:!0,get:function(){return n.sequenceExpression}}),Object.defineProperty(t,\"ParenthesizedExpression\",{enumerable:!0,get:function(){return n.parenthesizedExpression}}),Object.defineProperty(t,\"SwitchCase\",{enumerable:!0,get:function(){return n.switchCase}}),Object.defineProperty(t,\"SwitchStatement\",{enumerable:!0,get:function(){return n.switchStatement}}),Object.defineProperty(t,\"ThisExpression\",{enumerable:!0,get:function(){return n.thisExpression}}),Object.defineProperty(t,\"ThrowStatement\",{enumerable:!0,get:function(){return n.throwStatement}}),Object.defineProperty(t,\"TryStatement\",{enumerable:!0,get:function(){return n.tryStatement}}),Object.defineProperty(t,\"UnaryExpression\",{enumerable:!0,get:function(){return n.unaryExpression}}),Object.defineProperty(t,\"UpdateExpression\",{enumerable:!0,get:function(){return n.updateExpression}}),Object.defineProperty(t,\"VariableDeclaration\",{enumerable:!0,get:function(){return n.variableDeclaration}}),Object.defineProperty(t,\"VariableDeclarator\",{enumerable:!0,get:function(){return n.variableDeclarator}}),Object.defineProperty(t,\"WhileStatement\",{enumerable:!0,get:function(){return n.whileStatement}}),Object.defineProperty(t,\"WithStatement\",{enumerable:!0,get:function(){return n.withStatement}}),Object.defineProperty(t,\"AssignmentPattern\",{enumerable:!0,get:function(){return n.assignmentPattern}}),Object.defineProperty(t,\"ArrayPattern\",{enumerable:!0,get:function(){return n.arrayPattern}}),Object.defineProperty(t,\"ArrowFunctionExpression\",{enumerable:!0,get:function(){return n.arrowFunctionExpression}}),Object.defineProperty(t,\"ClassBody\",{enumerable:!0,get:function(){return n.classBody}}),Object.defineProperty(t,\"ClassExpression\",{enumerable:!0,get:function(){return n.classExpression}}),Object.defineProperty(t,\"ClassDeclaration\",{enumerable:!0,get:function(){return n.classDeclaration}}),Object.defineProperty(t,\"ExportAllDeclaration\",{enumerable:!0,get:function(){return n.exportAllDeclaration}}),Object.defineProperty(t,\"ExportDefaultDeclaration\",{enumerable:!0,get:function(){return n.exportDefaultDeclaration}}),Object.defineProperty(t,\"ExportNamedDeclaration\",{enumerable:!0,get:function(){return n.exportNamedDeclaration}}),Object.defineProperty(t,\"ExportSpecifier\",{enumerable:!0,get:function(){return n.exportSpecifier}}),Object.defineProperty(t,\"ForOfStatement\",{enumerable:!0,get:function(){return n.forOfStatement}}),Object.defineProperty(t,\"ImportDeclaration\",{enumerable:!0,get:function(){return n.importDeclaration}}),Object.defineProperty(t,\"ImportDefaultSpecifier\",{enumerable:!0,get:function(){return n.importDefaultSpecifier}}),Object.defineProperty(t,\"ImportNamespaceSpecifier\",{enumerable:!0,get:function(){return n.importNamespaceSpecifier}}),Object.defineProperty(t,\"ImportSpecifier\",{enumerable:!0,get:function(){return n.importSpecifier}}),Object.defineProperty(t,\"MetaProperty\",{enumerable:!0,get:function(){return n.metaProperty}}),Object.defineProperty(t,\"ClassMethod\",{enumerable:!0,get:function(){return n.classMethod}}),Object.defineProperty(t,\"ObjectPattern\",{enumerable:!0,get:function(){return n.objectPattern}}),Object.defineProperty(t,\"SpreadElement\",{enumerable:!0,get:function(){return n.spreadElement}}),Object.defineProperty(t,\"Super\",{enumerable:!0,get:function(){return n.super}}),Object.defineProperty(t,\"TaggedTemplateExpression\",{enumerable:!0,get:function(){return n.taggedTemplateExpression}}),Object.defineProperty(t,\"TemplateElement\",{enumerable:!0,get:function(){return n.templateElement}}),Object.defineProperty(t,\"TemplateLiteral\",{enumerable:!0,get:function(){return n.templateLiteral}}),Object.defineProperty(t,\"YieldExpression\",{enumerable:!0,get:function(){return n.yieldExpression}}),Object.defineProperty(t,\"AwaitExpression\",{enumerable:!0,get:function(){return n.awaitExpression}}),Object.defineProperty(t,\"Import\",{enumerable:!0,get:function(){return n.import}}),Object.defineProperty(t,\"BigIntLiteral\",{enumerable:!0,get:function(){return n.bigIntLiteral}}),Object.defineProperty(t,\"ExportNamespaceSpecifier\",{enumerable:!0,get:function(){return n.exportNamespaceSpecifier}}),Object.defineProperty(t,\"OptionalMemberExpression\",{enumerable:!0,get:function(){return n.optionalMemberExpression}}),Object.defineProperty(t,\"OptionalCallExpression\",{enumerable:!0,get:function(){return n.optionalCallExpression}}),Object.defineProperty(t,\"AnyTypeAnnotation\",{enumerable:!0,get:function(){return n.anyTypeAnnotation}}),Object.defineProperty(t,\"ArrayTypeAnnotation\",{enumerable:!0,get:function(){return n.arrayTypeAnnotation}}),Object.defineProperty(t,\"BooleanTypeAnnotation\",{enumerable:!0,get:function(){return n.booleanTypeAnnotation}}),Object.defineProperty(t,\"BooleanLiteralTypeAnnotation\",{enumerable:!0,get:function(){return n.booleanLiteralTypeAnnotation}}),Object.defineProperty(t,\"NullLiteralTypeAnnotation\",{enumerable:!0,get:function(){return n.nullLiteralTypeAnnotation}}),Object.defineProperty(t,\"ClassImplements\",{enumerable:!0,get:function(){return n.classImplements}}),Object.defineProperty(t,\"DeclareClass\",{enumerable:!0,get:function(){return n.declareClass}}),Object.defineProperty(t,\"DeclareFunction\",{enumerable:!0,get:function(){return n.declareFunction}}),Object.defineProperty(t,\"DeclareInterface\",{enumerable:!0,get:function(){return n.declareInterface}}),Object.defineProperty(t,\"DeclareModule\",{enumerable:!0,get:function(){return n.declareModule}}),Object.defineProperty(t,\"DeclareModuleExports\",{enumerable:!0,get:function(){return n.declareModuleExports}}),Object.defineProperty(t,\"DeclareTypeAlias\",{enumerable:!0,get:function(){return n.declareTypeAlias}}),Object.defineProperty(t,\"DeclareOpaqueType\",{enumerable:!0,get:function(){return n.declareOpaqueType}}),Object.defineProperty(t,\"DeclareVariable\",{enumerable:!0,get:function(){return n.declareVariable}}),Object.defineProperty(t,\"DeclareExportDeclaration\",{enumerable:!0,get:function(){return n.declareExportDeclaration}}),Object.defineProperty(t,\"DeclareExportAllDeclaration\",{enumerable:!0,get:function(){return n.declareExportAllDeclaration}}),Object.defineProperty(t,\"DeclaredPredicate\",{enumerable:!0,get:function(){return n.declaredPredicate}}),Object.defineProperty(t,\"ExistsTypeAnnotation\",{enumerable:!0,get:function(){return n.existsTypeAnnotation}}),Object.defineProperty(t,\"FunctionTypeAnnotation\",{enumerable:!0,get:function(){return n.functionTypeAnnotation}}),Object.defineProperty(t,\"FunctionTypeParam\",{enumerable:!0,get:function(){return n.functionTypeParam}}),Object.defineProperty(t,\"GenericTypeAnnotation\",{enumerable:!0,get:function(){return n.genericTypeAnnotation}}),Object.defineProperty(t,\"InferredPredicate\",{enumerable:!0,get:function(){return n.inferredPredicate}}),Object.defineProperty(t,\"InterfaceExtends\",{enumerable:!0,get:function(){return n.interfaceExtends}}),Object.defineProperty(t,\"InterfaceDeclaration\",{enumerable:!0,get:function(){return n.interfaceDeclaration}}),Object.defineProperty(t,\"InterfaceTypeAnnotation\",{enumerable:!0,get:function(){return n.interfaceTypeAnnotation}}),Object.defineProperty(t,\"IntersectionTypeAnnotation\",{enumerable:!0,get:function(){return n.intersectionTypeAnnotation}}),Object.defineProperty(t,\"MixedTypeAnnotation\",{enumerable:!0,get:function(){return n.mixedTypeAnnotation}}),Object.defineProperty(t,\"EmptyTypeAnnotation\",{enumerable:!0,get:function(){return n.emptyTypeAnnotation}}),Object.defineProperty(t,\"NullableTypeAnnotation\",{enumerable:!0,get:function(){return n.nullableTypeAnnotation}}),Object.defineProperty(t,\"NumberLiteralTypeAnnotation\",{enumerable:!0,get:function(){return n.numberLiteralTypeAnnotation}}),Object.defineProperty(t,\"NumberTypeAnnotation\",{enumerable:!0,get:function(){return n.numberTypeAnnotation}}),Object.defineProperty(t,\"ObjectTypeAnnotation\",{enumerable:!0,get:function(){return n.objectTypeAnnotation}}),Object.defineProperty(t,\"ObjectTypeInternalSlot\",{enumerable:!0,get:function(){return n.objectTypeInternalSlot}}),Object.defineProperty(t,\"ObjectTypeCallProperty\",{enumerable:!0,get:function(){return n.objectTypeCallProperty}}),Object.defineProperty(t,\"ObjectTypeIndexer\",{enumerable:!0,get:function(){return n.objectTypeIndexer}}),Object.defineProperty(t,\"ObjectTypeProperty\",{enumerable:!0,get:function(){return n.objectTypeProperty}}),Object.defineProperty(t,\"ObjectTypeSpreadProperty\",{enumerable:!0,get:function(){return n.objectTypeSpreadProperty}}),Object.defineProperty(t,\"OpaqueType\",{enumerable:!0,get:function(){return n.opaqueType}}),Object.defineProperty(t,\"QualifiedTypeIdentifier\",{enumerable:!0,get:function(){return n.qualifiedTypeIdentifier}}),Object.defineProperty(t,\"StringLiteralTypeAnnotation\",{enumerable:!0,get:function(){return n.stringLiteralTypeAnnotation}}),Object.defineProperty(t,\"StringTypeAnnotation\",{enumerable:!0,get:function(){return n.stringTypeAnnotation}}),Object.defineProperty(t,\"SymbolTypeAnnotation\",{enumerable:!0,get:function(){return n.symbolTypeAnnotation}}),Object.defineProperty(t,\"ThisTypeAnnotation\",{enumerable:!0,get:function(){return n.thisTypeAnnotation}}),Object.defineProperty(t,\"TupleTypeAnnotation\",{enumerable:!0,get:function(){return n.tupleTypeAnnotation}}),Object.defineProperty(t,\"TypeofTypeAnnotation\",{enumerable:!0,get:function(){return n.typeofTypeAnnotation}}),Object.defineProperty(t,\"TypeAlias\",{enumerable:!0,get:function(){return n.typeAlias}}),Object.defineProperty(t,\"TypeAnnotation\",{enumerable:!0,get:function(){return n.typeAnnotation}}),Object.defineProperty(t,\"TypeCastExpression\",{enumerable:!0,get:function(){return n.typeCastExpression}}),Object.defineProperty(t,\"TypeParameter\",{enumerable:!0,get:function(){return n.typeParameter}}),Object.defineProperty(t,\"TypeParameterDeclaration\",{enumerable:!0,get:function(){return n.typeParameterDeclaration}}),Object.defineProperty(t,\"TypeParameterInstantiation\",{enumerable:!0,get:function(){return n.typeParameterInstantiation}}),Object.defineProperty(t,\"UnionTypeAnnotation\",{enumerable:!0,get:function(){return n.unionTypeAnnotation}}),Object.defineProperty(t,\"Variance\",{enumerable:!0,get:function(){return n.variance}}),Object.defineProperty(t,\"VoidTypeAnnotation\",{enumerable:!0,get:function(){return n.voidTypeAnnotation}}),Object.defineProperty(t,\"EnumDeclaration\",{enumerable:!0,get:function(){return n.enumDeclaration}}),Object.defineProperty(t,\"EnumBooleanBody\",{enumerable:!0,get:function(){return n.enumBooleanBody}}),Object.defineProperty(t,\"EnumNumberBody\",{enumerable:!0,get:function(){return n.enumNumberBody}}),Object.defineProperty(t,\"EnumStringBody\",{enumerable:!0,get:function(){return n.enumStringBody}}),Object.defineProperty(t,\"EnumSymbolBody\",{enumerable:!0,get:function(){return n.enumSymbolBody}}),Object.defineProperty(t,\"EnumBooleanMember\",{enumerable:!0,get:function(){return n.enumBooleanMember}}),Object.defineProperty(t,\"EnumNumberMember\",{enumerable:!0,get:function(){return n.enumNumberMember}}),Object.defineProperty(t,\"EnumStringMember\",{enumerable:!0,get:function(){return n.enumStringMember}}),Object.defineProperty(t,\"EnumDefaultedMember\",{enumerable:!0,get:function(){return n.enumDefaultedMember}}),Object.defineProperty(t,\"IndexedAccessType\",{enumerable:!0,get:function(){return n.indexedAccessType}}),Object.defineProperty(t,\"OptionalIndexedAccessType\",{enumerable:!0,get:function(){return n.optionalIndexedAccessType}}),Object.defineProperty(t,\"JSXAttribute\",{enumerable:!0,get:function(){return n.jsxAttribute}}),Object.defineProperty(t,\"JSXClosingElement\",{enumerable:!0,get:function(){return n.jsxClosingElement}}),Object.defineProperty(t,\"JSXElement\",{enumerable:!0,get:function(){return n.jsxElement}}),Object.defineProperty(t,\"JSXEmptyExpression\",{enumerable:!0,get:function(){return n.jsxEmptyExpression}}),Object.defineProperty(t,\"JSXExpressionContainer\",{enumerable:!0,get:function(){return n.jsxExpressionContainer}}),Object.defineProperty(t,\"JSXSpreadChild\",{enumerable:!0,get:function(){return n.jsxSpreadChild}}),Object.defineProperty(t,\"JSXIdentifier\",{enumerable:!0,get:function(){return n.jsxIdentifier}}),Object.defineProperty(t,\"JSXMemberExpression\",{enumerable:!0,get:function(){return n.jsxMemberExpression}}),Object.defineProperty(t,\"JSXNamespacedName\",{enumerable:!0,get:function(){return n.jsxNamespacedName}}),Object.defineProperty(t,\"JSXOpeningElement\",{enumerable:!0,get:function(){return n.jsxOpeningElement}}),Object.defineProperty(t,\"JSXSpreadAttribute\",{enumerable:!0,get:function(){return n.jsxSpreadAttribute}}),Object.defineProperty(t,\"JSXText\",{enumerable:!0,get:function(){return n.jsxText}}),Object.defineProperty(t,\"JSXFragment\",{enumerable:!0,get:function(){return n.jsxFragment}}),Object.defineProperty(t,\"JSXOpeningFragment\",{enumerable:!0,get:function(){return n.jsxOpeningFragment}}),Object.defineProperty(t,\"JSXClosingFragment\",{enumerable:!0,get:function(){return n.jsxClosingFragment}}),Object.defineProperty(t,\"Noop\",{enumerable:!0,get:function(){return n.noop}}),Object.defineProperty(t,\"Placeholder\",{enumerable:!0,get:function(){return n.placeholder}}),Object.defineProperty(t,\"V8IntrinsicIdentifier\",{enumerable:!0,get:function(){return n.v8IntrinsicIdentifier}}),Object.defineProperty(t,\"ArgumentPlaceholder\",{enumerable:!0,get:function(){return n.argumentPlaceholder}}),Object.defineProperty(t,\"BindExpression\",{enumerable:!0,get:function(){return n.bindExpression}}),Object.defineProperty(t,\"ClassProperty\",{enumerable:!0,get:function(){return n.classProperty}}),Object.defineProperty(t,\"PipelineTopicExpression\",{enumerable:!0,get:function(){return n.pipelineTopicExpression}}),Object.defineProperty(t,\"PipelineBareFunction\",{enumerable:!0,get:function(){return n.pipelineBareFunction}}),Object.defineProperty(t,\"PipelinePrimaryTopicReference\",{enumerable:!0,get:function(){return n.pipelinePrimaryTopicReference}}),Object.defineProperty(t,\"ClassPrivateProperty\",{enumerable:!0,get:function(){return n.classPrivateProperty}}),Object.defineProperty(t,\"ClassPrivateMethod\",{enumerable:!0,get:function(){return n.classPrivateMethod}}),Object.defineProperty(t,\"ImportAttribute\",{enumerable:!0,get:function(){return n.importAttribute}}),Object.defineProperty(t,\"Decorator\",{enumerable:!0,get:function(){return n.decorator}}),Object.defineProperty(t,\"DoExpression\",{enumerable:!0,get:function(){return n.doExpression}}),Object.defineProperty(t,\"ExportDefaultSpecifier\",{enumerable:!0,get:function(){return n.exportDefaultSpecifier}}),Object.defineProperty(t,\"PrivateName\",{enumerable:!0,get:function(){return n.privateName}}),Object.defineProperty(t,\"RecordExpression\",{enumerable:!0,get:function(){return n.recordExpression}}),Object.defineProperty(t,\"TupleExpression\",{enumerable:!0,get:function(){return n.tupleExpression}}),Object.defineProperty(t,\"DecimalLiteral\",{enumerable:!0,get:function(){return n.decimalLiteral}}),Object.defineProperty(t,\"StaticBlock\",{enumerable:!0,get:function(){return n.staticBlock}}),Object.defineProperty(t,\"ModuleExpression\",{enumerable:!0,get:function(){return n.moduleExpression}}),Object.defineProperty(t,\"TSParameterProperty\",{enumerable:!0,get:function(){return n.tsParameterProperty}}),Object.defineProperty(t,\"TSDeclareFunction\",{enumerable:!0,get:function(){return n.tsDeclareFunction}}),Object.defineProperty(t,\"TSDeclareMethod\",{enumerable:!0,get:function(){return n.tsDeclareMethod}}),Object.defineProperty(t,\"TSQualifiedName\",{enumerable:!0,get:function(){return n.tsQualifiedName}}),Object.defineProperty(t,\"TSCallSignatureDeclaration\",{enumerable:!0,get:function(){return n.tsCallSignatureDeclaration}}),Object.defineProperty(t,\"TSConstructSignatureDeclaration\",{enumerable:!0,get:function(){return n.tsConstructSignatureDeclaration}}),Object.defineProperty(t,\"TSPropertySignature\",{enumerable:!0,get:function(){return n.tsPropertySignature}}),Object.defineProperty(t,\"TSMethodSignature\",{enumerable:!0,get:function(){return n.tsMethodSignature}}),Object.defineProperty(t,\"TSIndexSignature\",{enumerable:!0,get:function(){return n.tsIndexSignature}}),Object.defineProperty(t,\"TSAnyKeyword\",{enumerable:!0,get:function(){return n.tsAnyKeyword}}),Object.defineProperty(t,\"TSBooleanKeyword\",{enumerable:!0,get:function(){return n.tsBooleanKeyword}}),Object.defineProperty(t,\"TSBigIntKeyword\",{enumerable:!0,get:function(){return n.tsBigIntKeyword}}),Object.defineProperty(t,\"TSIntrinsicKeyword\",{enumerable:!0,get:function(){return n.tsIntrinsicKeyword}}),Object.defineProperty(t,\"TSNeverKeyword\",{enumerable:!0,get:function(){return n.tsNeverKeyword}}),Object.defineProperty(t,\"TSNullKeyword\",{enumerable:!0,get:function(){return n.tsNullKeyword}}),Object.defineProperty(t,\"TSNumberKeyword\",{enumerable:!0,get:function(){return n.tsNumberKeyword}}),Object.defineProperty(t,\"TSObjectKeyword\",{enumerable:!0,get:function(){return n.tsObjectKeyword}}),Object.defineProperty(t,\"TSStringKeyword\",{enumerable:!0,get:function(){return n.tsStringKeyword}}),Object.defineProperty(t,\"TSSymbolKeyword\",{enumerable:!0,get:function(){return n.tsSymbolKeyword}}),Object.defineProperty(t,\"TSUndefinedKeyword\",{enumerable:!0,get:function(){return n.tsUndefinedKeyword}}),Object.defineProperty(t,\"TSUnknownKeyword\",{enumerable:!0,get:function(){return n.tsUnknownKeyword}}),Object.defineProperty(t,\"TSVoidKeyword\",{enumerable:!0,get:function(){return n.tsVoidKeyword}}),Object.defineProperty(t,\"TSThisType\",{enumerable:!0,get:function(){return n.tsThisType}}),Object.defineProperty(t,\"TSFunctionType\",{enumerable:!0,get:function(){return n.tsFunctionType}}),Object.defineProperty(t,\"TSConstructorType\",{enumerable:!0,get:function(){return n.tsConstructorType}}),Object.defineProperty(t,\"TSTypeReference\",{enumerable:!0,get:function(){return n.tsTypeReference}}),Object.defineProperty(t,\"TSTypePredicate\",{enumerable:!0,get:function(){return n.tsTypePredicate}}),Object.defineProperty(t,\"TSTypeQuery\",{enumerable:!0,get:function(){return n.tsTypeQuery}}),Object.defineProperty(t,\"TSTypeLiteral\",{enumerable:!0,get:function(){return n.tsTypeLiteral}}),Object.defineProperty(t,\"TSArrayType\",{enumerable:!0,get:function(){return n.tsArrayType}}),Object.defineProperty(t,\"TSTupleType\",{enumerable:!0,get:function(){return n.tsTupleType}}),Object.defineProperty(t,\"TSOptionalType\",{enumerable:!0,get:function(){return n.tsOptionalType}}),Object.defineProperty(t,\"TSRestType\",{enumerable:!0,get:function(){return n.tsRestType}}),Object.defineProperty(t,\"TSNamedTupleMember\",{enumerable:!0,get:function(){return n.tsNamedTupleMember}}),Object.defineProperty(t,\"TSUnionType\",{enumerable:!0,get:function(){return n.tsUnionType}}),Object.defineProperty(t,\"TSIntersectionType\",{enumerable:!0,get:function(){return n.tsIntersectionType}}),Object.defineProperty(t,\"TSConditionalType\",{enumerable:!0,get:function(){return n.tsConditionalType}}),Object.defineProperty(t,\"TSInferType\",{enumerable:!0,get:function(){return n.tsInferType}}),Object.defineProperty(t,\"TSParenthesizedType\",{enumerable:!0,get:function(){return n.tsParenthesizedType}}),Object.defineProperty(t,\"TSTypeOperator\",{enumerable:!0,get:function(){return n.tsTypeOperator}}),Object.defineProperty(t,\"TSIndexedAccessType\",{enumerable:!0,get:function(){return n.tsIndexedAccessType}}),Object.defineProperty(t,\"TSMappedType\",{enumerable:!0,get:function(){return n.tsMappedType}}),Object.defineProperty(t,\"TSLiteralType\",{enumerable:!0,get:function(){return n.tsLiteralType}}),Object.defineProperty(t,\"TSExpressionWithTypeArguments\",{enumerable:!0,get:function(){return n.tsExpressionWithTypeArguments}}),Object.defineProperty(t,\"TSInterfaceDeclaration\",{enumerable:!0,get:function(){return n.tsInterfaceDeclaration}}),Object.defineProperty(t,\"TSInterfaceBody\",{enumerable:!0,get:function(){return n.tsInterfaceBody}}),Object.defineProperty(t,\"TSTypeAliasDeclaration\",{enumerable:!0,get:function(){return n.tsTypeAliasDeclaration}}),Object.defineProperty(t,\"TSAsExpression\",{enumerable:!0,get:function(){return n.tsAsExpression}}),Object.defineProperty(t,\"TSTypeAssertion\",{enumerable:!0,get:function(){return n.tsTypeAssertion}}),Object.defineProperty(t,\"TSEnumDeclaration\",{enumerable:!0,get:function(){return n.tsEnumDeclaration}}),Object.defineProperty(t,\"TSEnumMember\",{enumerable:!0,get:function(){return n.tsEnumMember}}),Object.defineProperty(t,\"TSModuleDeclaration\",{enumerable:!0,get:function(){return n.tsModuleDeclaration}}),Object.defineProperty(t,\"TSModuleBlock\",{enumerable:!0,get:function(){return n.tsModuleBlock}}),Object.defineProperty(t,\"TSImportType\",{enumerable:!0,get:function(){return n.tsImportType}}),Object.defineProperty(t,\"TSImportEqualsDeclaration\",{enumerable:!0,get:function(){return n.tsImportEqualsDeclaration}}),Object.defineProperty(t,\"TSExternalModuleReference\",{enumerable:!0,get:function(){return n.tsExternalModuleReference}}),Object.defineProperty(t,\"TSNonNullExpression\",{enumerable:!0,get:function(){return n.tsNonNullExpression}}),Object.defineProperty(t,\"TSExportAssignment\",{enumerable:!0,get:function(){return n.tsExportAssignment}}),Object.defineProperty(t,\"TSNamespaceExportDeclaration\",{enumerable:!0,get:function(){return n.tsNamespaceExportDeclaration}}),Object.defineProperty(t,\"TSTypeAnnotation\",{enumerable:!0,get:function(){return n.tsTypeAnnotation}}),Object.defineProperty(t,\"TSTypeParameterInstantiation\",{enumerable:!0,get:function(){return n.tsTypeParameterInstantiation}}),Object.defineProperty(t,\"TSTypeParameterDeclaration\",{enumerable:!0,get:function(){return n.tsTypeParameterDeclaration}}),Object.defineProperty(t,\"TSTypeParameter\",{enumerable:!0,get:function(){return n.tsTypeParameter}}),Object.defineProperty(t,\"NumberLiteral\",{enumerable:!0,get:function(){return n.numberLiteral}}),Object.defineProperty(t,\"RegexLiteral\",{enumerable:!0,get:function(){return n.regexLiteral}}),Object.defineProperty(t,\"RestProperty\",{enumerable:!0,get:function(){return n.restProperty}}),Object.defineProperty(t,\"SpreadProperty\",{enumerable:!0,get:function(){return n.spreadProperty}});var n=r(6)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e,!1)};var n=r(26)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e)};var n=r(26)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e,!0,!0)};var n=r(26)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e,!1,!0)};var n=r(26)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r,s){return(0,n.default)(e,t,[{type:s?\"CommentLine\":\"CommentBlock\",value:r}])};var n=r(220)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return n.COMMENT_KEYS.forEach((t=>{e[t]=null})),e};var n=r(25)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.TSBASETYPE_TYPES=t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.PRIVATE_TYPES=t.JSX_TYPES=t.ENUMMEMBER_TYPES=t.ENUMBODY_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.FLOWTYPE_TYPES=t.FLOW_TYPES=t.MODULESPECIFIER_TYPES=t.EXPORTDECLARATION_TYPES=t.MODULEDECLARATION_TYPES=t.CLASS_TYPES=t.PATTERN_TYPES=t.UNARYLIKE_TYPES=t.PROPERTY_TYPES=t.OBJECTMEMBER_TYPES=t.METHOD_TYPES=t.USERWHITESPACABLE_TYPES=t.IMMUTABLE_TYPES=t.LITERAL_TYPES=t.TSENTITYNAME_TYPES=t.LVAL_TYPES=t.PATTERNLIKE_TYPES=t.DECLARATION_TYPES=t.PUREISH_TYPES=t.FUNCTIONPARENT_TYPES=t.FUNCTION_TYPES=t.FORXSTATEMENT_TYPES=t.FOR_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.WHILE_TYPES=t.LOOP_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.SCOPABLE_TYPES=t.BINARY_TYPES=t.EXPRESSION_TYPES=void 0;var n=r(11);const s=n.FLIPPED_ALIAS_KEYS.Expression;t.EXPRESSION_TYPES=s;const i=n.FLIPPED_ALIAS_KEYS.Binary;t.BINARY_TYPES=i;const o=n.FLIPPED_ALIAS_KEYS.Scopable;t.SCOPABLE_TYPES=o;const a=n.FLIPPED_ALIAS_KEYS.BlockParent;t.BLOCKPARENT_TYPES=a;const l=n.FLIPPED_ALIAS_KEYS.Block;t.BLOCK_TYPES=l;const c=n.FLIPPED_ALIAS_KEYS.Statement;t.STATEMENT_TYPES=c;const u=n.FLIPPED_ALIAS_KEYS.Terminatorless;t.TERMINATORLESS_TYPES=u;const p=n.FLIPPED_ALIAS_KEYS.CompletionStatement;t.COMPLETIONSTATEMENT_TYPES=p;const f=n.FLIPPED_ALIAS_KEYS.Conditional;t.CONDITIONAL_TYPES=f;const d=n.FLIPPED_ALIAS_KEYS.Loop;t.LOOP_TYPES=d;const h=n.FLIPPED_ALIAS_KEYS.While;t.WHILE_TYPES=h;const m=n.FLIPPED_ALIAS_KEYS.ExpressionWrapper;t.EXPRESSIONWRAPPER_TYPES=m;const y=n.FLIPPED_ALIAS_KEYS.For;t.FOR_TYPES=y;const g=n.FLIPPED_ALIAS_KEYS.ForXStatement;t.FORXSTATEMENT_TYPES=g;const b=n.FLIPPED_ALIAS_KEYS.Function;t.FUNCTION_TYPES=b;const v=n.FLIPPED_ALIAS_KEYS.FunctionParent;t.FUNCTIONPARENT_TYPES=v;const E=n.FLIPPED_ALIAS_KEYS.Pureish;t.PUREISH_TYPES=E;const x=n.FLIPPED_ALIAS_KEYS.Declaration;t.DECLARATION_TYPES=x;const S=n.FLIPPED_ALIAS_KEYS.PatternLike;t.PATTERNLIKE_TYPES=S;const T=n.FLIPPED_ALIAS_KEYS.LVal;t.LVAL_TYPES=T;const w=n.FLIPPED_ALIAS_KEYS.TSEntityName;t.TSENTITYNAME_TYPES=w;const P=n.FLIPPED_ALIAS_KEYS.Literal;t.LITERAL_TYPES=P;const A=n.FLIPPED_ALIAS_KEYS.Immutable;t.IMMUTABLE_TYPES=A;const O=n.FLIPPED_ALIAS_KEYS.UserWhitespacable;t.USERWHITESPACABLE_TYPES=O;const C=n.FLIPPED_ALIAS_KEYS.Method;t.METHOD_TYPES=C;const I=n.FLIPPED_ALIAS_KEYS.ObjectMember;t.OBJECTMEMBER_TYPES=I;const k=n.FLIPPED_ALIAS_KEYS.Property;t.PROPERTY_TYPES=k;const N=n.FLIPPED_ALIAS_KEYS.UnaryLike;t.UNARYLIKE_TYPES=N;const _=n.FLIPPED_ALIAS_KEYS.Pattern;t.PATTERN_TYPES=_;const j=n.FLIPPED_ALIAS_KEYS.Class;t.CLASS_TYPES=j;const D=n.FLIPPED_ALIAS_KEYS.ModuleDeclaration;t.MODULEDECLARATION_TYPES=D;const L=n.FLIPPED_ALIAS_KEYS.ExportDeclaration;t.EXPORTDECLARATION_TYPES=L;const M=n.FLIPPED_ALIAS_KEYS.ModuleSpecifier;t.MODULESPECIFIER_TYPES=M;const B=n.FLIPPED_ALIAS_KEYS.Flow;t.FLOW_TYPES=B;const R=n.FLIPPED_ALIAS_KEYS.FlowType;t.FLOWTYPE_TYPES=R;const F=n.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation;t.FLOWBASEANNOTATION_TYPES=F;const U=n.FLIPPED_ALIAS_KEYS.FlowDeclaration;t.FLOWDECLARATION_TYPES=U;const $=n.FLIPPED_ALIAS_KEYS.FlowPredicate;t.FLOWPREDICATE_TYPES=$;const q=n.FLIPPED_ALIAS_KEYS.EnumBody;t.ENUMBODY_TYPES=q;const V=n.FLIPPED_ALIAS_KEYS.EnumMember;t.ENUMMEMBER_TYPES=V;const W=n.FLIPPED_ALIAS_KEYS.JSX;t.JSX_TYPES=W;const K=n.FLIPPED_ALIAS_KEYS.Private;t.PRIVATE_TYPES=K;const G=n.FLIPPED_ALIAS_KEYS.TSTypeElement;t.TSTYPEELEMENT_TYPES=G;const H=n.FLIPPED_ALIAS_KEYS.TSType;t.TSTYPE_TYPES=H;const J=n.FLIPPED_ALIAS_KEYS.TSBaseType;t.TSBASETYPE_TYPES=J},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t=\"body\"){return e[t]=(0,n.default)(e[t],e)};var n=r(225)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return\"eval\"!==(e=(0,n.default)(e))&&\"arguments\"!==e||(e=\"_\"+e),e};var n=r(226)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t=e.key||e.property){return!e.computed&&(0,n.isIdentifier)(t)&&(t=(0,s.stringLiteral)(t.name)),t};var n=r(1),s=r(6)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(1);t.default=function(e){if((0,n.isExpressionStatement)(e)&&(e=e.expression),(0,n.isExpression)(e))return e;if((0,n.isClass)(e)?e.type=\"ClassExpression\":(0,n.isFunction)(e)&&(e.type=\"FunctionExpression\"),!(0,n.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=o;var n=r(1),s=r(26),i=r(227);function o(e,t=e.key){let r;return\"method\"===e.kind?o.increment()+\"\":(r=(0,n.isIdentifier)(t)?t.name:(0,n.isStringLiteral)(t)?JSON.stringify(t.value):JSON.stringify((0,i.default)((0,s.default)(t))),e.computed&&(r=`[${r}]`),e.static&&(r=`static:${r}`),r)}o.uid=0,o.increment=function(){return o.uid>=Number.MAX_SAFE_INTEGER?o.uid=0:o.uid++}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if(null==e||!e.length)return;const r=[],s=(0,n.default)(e,t,r);if(s){for(const e of r)t.push(e);return s}};var n=r(395)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t,r,a){const l=[];let c=!0;for(const u of t)if((0,s.isEmptyStatement)(u)||(c=!1),(0,s.isExpression)(u))l.push(u);else if((0,s.isExpressionStatement)(u))l.push(u.expression);else if((0,s.isVariableDeclaration)(u)){if(\"var\"!==u.kind)return;for(const e of u.declarations){const t=(0,n.default)(e);for(const e of Object.keys(t))a.push({kind:u.kind,id:(0,o.default)(t[e])});e.init&&l.push((0,i.assignmentExpression)(\"=\",e.id,e.init))}c=!0}else if((0,s.isIfStatement)(u)){const t=u.consequent?e([u.consequent],r,a):r.buildUndefinedNode(),n=u.alternate?e([u.alternate],r,a):r.buildUndefinedNode();if(!t||!n)return;l.push((0,i.conditionalExpression)(u.test,t,n))}else if((0,s.isBlockStatement)(u)){const t=e(u.body,r,a);if(!t)return;l.push(t)}else{if(!(0,s.isEmptyStatement)(u))return;0===t.indexOf(u)&&(c=!0)}return c&&l.push(r.buildUndefinedNode()),1===l.length?l[0]:(0,i.sequenceExpression)(l)};var n=r(64),s=r(1),i=r(6),o=r(26)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(1),s=r(6);t.default=function(e,t){if((0,n.isStatement)(e))return e;let r,i=!1;if((0,n.isClass)(e))i=!0,r=\"ClassDeclaration\";else if((0,n.isFunction)(e))i=!0,r=\"FunctionDeclaration\";else if((0,n.isAssignmentExpression)(e))return(0,s.expressionStatement)(e);if(i&&!e.id&&(r=!1),!r){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=r,e}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(38),s=r(6);t.default=function e(t){if(void 0===t)return(0,s.identifier)(\"undefined\");if(!0===t||!1===t)return(0,s.booleanLiteral)(t);if(null===t)return(0,s.nullLiteral)();if(\"string\"==typeof t)return(0,s.stringLiteral)(t);if(\"number\"==typeof t){let e;if(Number.isFinite(t))e=(0,s.numericLiteral)(Math.abs(t));else{let r;r=Number.isNaN(t)?(0,s.numericLiteral)(0):(0,s.numericLiteral)(1),e=(0,s.binaryExpression)(\"/\",r,(0,s.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,s.unaryExpression)(\"-\",e)),e}if(function(e){return\"[object RegExp]\"===i(e)}(t)){const e=t.source,r=t.toString().match(/\\/([a-z]+|)$/)[1];return(0,s.regExpLiteral)(e,r)}if(Array.isArray(t))return(0,s.arrayExpression)(t.map(e));if(function(e){if(\"object\"!=typeof e||null===e||\"[object Object]\"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(t)){const r=[];for(const i of Object.keys(t)){let o;o=(0,n.default)(i)?(0,s.identifier)(i):(0,s.stringLiteral)(i),r.push((0,s.objectProperty)(o,e(t[i])))}return(0,s.objectExpression)(r)}throw new Error(\"don't know how to turn this value into a node\")};const i=Function.call.bind(Object.prototype.toString)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r=!1){return e.object=(0,n.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e};var n=r(6)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if(!e||!t)return e;for(const r of n.INHERIT_KEYS.optional)null==e[r]&&(e[r]=t[r]);for(const r of Object.keys(t))\"_\"===r[0]&&\"__clone\"!==r&&(e[r]=t[r]);for(const r of n.INHERIT_KEYS.force)e[r]=t[r];return(0,s.default)(e,t),e};var n=r(25),s=r(223)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return e.object=(0,n.memberExpression)(t,e.object),e};var n=r(6)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(64);t.default=function(e,t){return(0,n.default)(e,t,!0)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){\"function\"==typeof t&&(t={enter:t});const{enter:n,exit:i}=t;s(e,n,i,r,[])};var n=r(11);function s(e,t,r,i,o){const a=n.VISITOR_KEYS[e.type];if(a){t&&t(e,o,i);for(const n of a){const a=e[n];if(Array.isArray(a))for(let l=0;l<a.length;l++){const c=a[l];c&&(o.push({node:e,key:n,index:l}),s(c,t,r,i,o),o.pop())}else a&&(o.push({node:e,key:n}),s(a,t,r,i,o),o.pop())}r&&r(e,o,i)}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){if(r&&\"Identifier\"===e.type&&\"ObjectProperty\"===t.type&&\"ObjectExpression\"===r.type)return!1;const s=n.default.keys[t.type];if(s)for(let r=0;r<s.length;r++){const n=t[s[r]];if(Array.isArray(n)){if(n.indexOf(e)>=0)return!0}else if(n===e)return!0}return!1};var n=r(64)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.isFunctionDeclaration)(e)||(0,n.isClassDeclaration)(e)||(0,s.default)(e)};var n=r(1),s=r(230)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return!!(0,n.default)(e.type,\"Immutable\")||!!(0,s.isIdentifier)(e)&&\"undefined\"===e.name};var n=r(129),s=r(1)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t,r){if(\"object\"!=typeof t||\"object\"!=typeof r||null==t||null==r)return t===r;if(t.type!==r.type)return!1;const s=Object.keys(n.NODE_FIELDS[t.type]||t.type),i=n.VISITOR_KEYS[t.type];for(const n of s){if(typeof t[n]!=typeof r[n])return!1;if(null!=t[n]||null!=r[n]){if(null==t[n]||null==r[n])return!1;if(Array.isArray(t[n])){if(!Array.isArray(r[n]))return!1;if(t[n].length!==r[n].length)return!1;for(let s=0;s<t[n].length;s++)if(!e(t[n][s],r[n][s]))return!1}else if(\"object\"!=typeof t[n]||null!=i&&i.includes(n)){if(!e(t[n],r[n]))return!1}else for(const e of Object.keys(t[n]))if(t[n][e]!==r[n][e])return!1}}return!0};var n=r(11)},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){switch(t.type){case\"MemberExpression\":case\"JSXMemberExpression\":case\"OptionalMemberExpression\":return t.property===e?!!t.computed:t.object===e;case\"VariableDeclarator\":return t.init===e;case\"ArrowFunctionExpression\":return t.body===e;case\"PrivateName\":return!1;case\"ClassMethod\":case\"ClassPrivateMethod\":case\"ObjectMethod\":if(t.params.includes(e))return!1;case\"ObjectProperty\":case\"ClassProperty\":case\"ClassPrivateProperty\":return t.key===e?!!t.computed:t.value!==e||!r||\"ObjectPattern\"!==r.type;case\"ClassDeclaration\":case\"ClassExpression\":return t.superClass===e;case\"AssignmentExpression\":case\"AssignmentPattern\":return t.right===e;case\"LabeledStatement\":case\"CatchClause\":case\"RestElement\":return!1;case\"BreakStatement\":case\"ContinueStatement\":return!1;case\"FunctionDeclaration\":case\"FunctionExpression\":return!1;case\"ExportNamespaceSpecifier\":case\"ExportDefaultSpecifier\":return!1;case\"ExportSpecifier\":return(null==r||!r.source)&&t.local===e;case\"ImportDefaultSpecifier\":case\"ImportNamespaceSpecifier\":case\"ImportSpecifier\":case\"JSXAttribute\":return!1;case\"ObjectPattern\":case\"ArrayPattern\":case\"MetaProperty\":return!1;case\"ObjectTypeProperty\":return t.key!==e;case\"TSEnumMember\":return t.id!==e;case\"TSPropertySignature\":return t.key!==e||!!t.computed}return!0}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(!(0,n.isBlockStatement)(e)||!(0,n.isFunction)(t)&&!(0,n.isCatchClause)(t))&&(!(!(0,n.isPattern)(e)||!(0,n.isFunction)(t)&&!(0,n.isCatchClause)(t))||(0,n.isScopable)(e))};var n=r(1)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.isImportDefaultSpecifier)(e)||(0,n.isIdentifier)(e.imported||e.exported,{name:\"default\"})};var n=r(1)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e)&&!s.has(e)};var n=r(38);const s=new Set([\"abstract\",\"boolean\",\"byte\",\"char\",\"double\",\"enum\",\"final\",\"float\",\"goto\",\"implements\",\"int\",\"interface\",\"long\",\"native\",\"package\",\"private\",\"protected\",\"public\",\"short\",\"static\",\"synchronized\",\"throws\",\"transient\",\"volatile\"])},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.isVariableDeclaration)(e,{kind:\"var\"})&&!e[s.BLOCK_SCOPED_SYMBOL]};var n=r(1),s=r(25)},()=>{},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0,r(232);var n=r(132),s=r(0);const i={ReferencedIdentifier({node:e},t){e.name===t.oldName&&(e.name=t.newName)},Scope(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||function(e){if(!e.isMethod()||!e.node.computed)return void e.skip();const t=s.VISITOR_KEYS[e.type];for(const r of t)\"key\"!==r&&e.skipKey(r)}(e)},\"AssignmentExpression|Declaration|VariableDeclarator\"(e,t){if(e.isVariableDeclaration())return;const r=e.getOuterBindingIdentifiers();for(const e in r)e===t.oldName&&(r[e].name=t.newName)}};t.default=class{constructor(e,t,r){this.newName=r,this.oldName=t,this.binding=e}maybeConvertFromExportDeclaration(e){const t=e.parentPath;t.isExportDeclaration()&&(t.isExportDefaultDeclaration()&&!t.get(\"declaration\").node.id||(0,n.default)(t))}maybeConvertFromClassFunctionDeclaration(e){}maybeConvertFromClassFunctionExpression(e){}rename(e){const{binding:t,oldName:r,newName:n}=this,{scope:s,path:o}=t,a=o.find((e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression()));a&&a.getOuterBindingIdentifiers()[r]===t.identifier&&this.maybeConvertFromExportDeclaration(a);const l=e||s.block;\"SwitchStatement\"===(null==l?void 0:l.type)?l.cases.forEach((e=>{s.traverse(e,i,this)})):s.traverse(l,i,this),e||(s.removeOwnBinding(r),s.bindings[n]=t,this.binding.identifier.name=n),a&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))}}},(e,t,r)=>{\"use strict\";e.exports=r(415)},e=>{\"use strict\";e.exports=JSON.parse('{\"builtin\":{\"Array\":false,\"ArrayBuffer\":false,\"Atomics\":false,\"BigInt\":false,\"BigInt64Array\":false,\"BigUint64Array\":false,\"Boolean\":false,\"constructor\":false,\"DataView\":false,\"Date\":false,\"decodeURI\":false,\"decodeURIComponent\":false,\"encodeURI\":false,\"encodeURIComponent\":false,\"Error\":false,\"escape\":false,\"eval\":false,\"EvalError\":false,\"Float32Array\":false,\"Float64Array\":false,\"Function\":false,\"globalThis\":false,\"hasOwnProperty\":false,\"Infinity\":false,\"Int16Array\":false,\"Int32Array\":false,\"Int8Array\":false,\"isFinite\":false,\"isNaN\":false,\"isPrototypeOf\":false,\"JSON\":false,\"Map\":false,\"Math\":false,\"NaN\":false,\"Number\":false,\"Object\":false,\"parseFloat\":false,\"parseInt\":false,\"Promise\":false,\"propertyIsEnumerable\":false,\"Proxy\":false,\"RangeError\":false,\"ReferenceError\":false,\"Reflect\":false,\"RegExp\":false,\"Set\":false,\"SharedArrayBuffer\":false,\"String\":false,\"Symbol\":false,\"SyntaxError\":false,\"toLocaleString\":false,\"toString\":false,\"TypeError\":false,\"Uint16Array\":false,\"Uint32Array\":false,\"Uint8Array\":false,\"Uint8ClampedArray\":false,\"undefined\":false,\"unescape\":false,\"URIError\":false,\"valueOf\":false,\"WeakMap\":false,\"WeakSet\":false},\"es5\":{\"Array\":false,\"Boolean\":false,\"constructor\":false,\"Date\":false,\"decodeURI\":false,\"decodeURIComponent\":false,\"encodeURI\":false,\"encodeURIComponent\":false,\"Error\":false,\"escape\":false,\"eval\":false,\"EvalError\":false,\"Function\":false,\"hasOwnProperty\":false,\"Infinity\":false,\"isFinite\":false,\"isNaN\":false,\"isPrototypeOf\":false,\"JSON\":false,\"Math\":false,\"NaN\":false,\"Number\":false,\"Object\":false,\"parseFloat\":false,\"parseInt\":false,\"propertyIsEnumerable\":false,\"RangeError\":false,\"ReferenceError\":false,\"RegExp\":false,\"String\":false,\"SyntaxError\":false,\"toLocaleString\":false,\"toString\":false,\"TypeError\":false,\"undefined\":false,\"unescape\":false,\"URIError\":false,\"valueOf\":false},\"es2015\":{\"Array\":false,\"ArrayBuffer\":false,\"Boolean\":false,\"constructor\":false,\"DataView\":false,\"Date\":false,\"decodeURI\":false,\"decodeURIComponent\":false,\"encodeURI\":false,\"encodeURIComponent\":false,\"Error\":false,\"escape\":false,\"eval\":false,\"EvalError\":false,\"Float32Array\":false,\"Float64Array\":false,\"Function\":false,\"hasOwnProperty\":false,\"Infinity\":false,\"Int16Array\":false,\"Int32Array\":false,\"Int8Array\":false,\"isFinite\":false,\"isNaN\":false,\"isPrototypeOf\":false,\"JSON\":false,\"Map\":false,\"Math\":false,\"NaN\":false,\"Number\":false,\"Object\":false,\"parseFloat\":false,\"parseInt\":false,\"Promise\":false,\"propertyIsEnumerable\":false,\"Proxy\":false,\"RangeError\":false,\"ReferenceError\":false,\"Reflect\":false,\"RegExp\":false,\"Set\":false,\"String\":false,\"Symbol\":false,\"SyntaxError\":false,\"toLocaleString\":false,\"toString\":false,\"TypeError\":false,\"Uint16Array\":false,\"Uint32Array\":false,\"Uint8Array\":false,\"Uint8ClampedArray\":false,\"undefined\":false,\"unescape\":false,\"URIError\":false,\"valueOf\":false,\"WeakMap\":false,\"WeakSet\":false},\"es2017\":{\"Array\":false,\"ArrayBuffer\":false,\"Atomics\":false,\"Boolean\":false,\"constructor\":false,\"DataView\":false,\"Date\":false,\"decodeURI\":false,\"decodeURIComponent\":false,\"encodeURI\":false,\"encodeURIComponent\":false,\"Error\":false,\"escape\":false,\"eval\":false,\"EvalError\":false,\"Float32Array\":false,\"Float64Array\":false,\"Function\":false,\"hasOwnProperty\":false,\"Infinity\":false,\"Int16Array\":false,\"Int32Array\":false,\"Int8Array\":false,\"isFinite\":false,\"isNaN\":false,\"isPrototypeOf\":false,\"JSON\":false,\"Map\":false,\"Math\":false,\"NaN\":false,\"Number\":false,\"Object\":false,\"parseFloat\":false,\"parseInt\":false,\"Promise\":false,\"propertyIsEnumerable\":false,\"Proxy\":false,\"RangeError\":false,\"ReferenceError\":false,\"Reflect\":false,\"RegExp\":false,\"Set\":false,\"SharedArrayBuffer\":false,\"String\":false,\"Symbol\":false,\"SyntaxError\":false,\"toLocaleString\":false,\"toString\":false,\"TypeError\":false,\"Uint16Array\":false,\"Uint32Array\":false,\"Uint8Array\":false,\"Uint8ClampedArray\":false,\"undefined\":false,\"unescape\":false,\"URIError\":false,\"valueOf\":false,\"WeakMap\":false,\"WeakSet\":false},\"browser\":{\"AbortController\":false,\"AbortSignal\":false,\"addEventListener\":false,\"alert\":false,\"AnalyserNode\":false,\"Animation\":false,\"AnimationEffectReadOnly\":false,\"AnimationEffectTiming\":false,\"AnimationEffectTimingReadOnly\":false,\"AnimationEvent\":false,\"AnimationPlaybackEvent\":false,\"AnimationTimeline\":false,\"applicationCache\":false,\"ApplicationCache\":false,\"ApplicationCacheErrorEvent\":false,\"atob\":false,\"Attr\":false,\"Audio\":false,\"AudioBuffer\":false,\"AudioBufferSourceNode\":false,\"AudioContext\":false,\"AudioDestinationNode\":false,\"AudioListener\":false,\"AudioNode\":false,\"AudioParam\":false,\"AudioProcessingEvent\":false,\"AudioScheduledSourceNode\":false,\"AudioWorkletGlobalScope \":false,\"AudioWorkletNode\":false,\"AudioWorkletProcessor\":false,\"BarProp\":false,\"BaseAudioContext\":false,\"BatteryManager\":false,\"BeforeUnloadEvent\":false,\"BiquadFilterNode\":false,\"Blob\":false,\"BlobEvent\":false,\"blur\":false,\"BroadcastChannel\":false,\"btoa\":false,\"BudgetService\":false,\"ByteLengthQueuingStrategy\":false,\"Cache\":false,\"caches\":false,\"CacheStorage\":false,\"cancelAnimationFrame\":false,\"cancelIdleCallback\":false,\"CanvasCaptureMediaStreamTrack\":false,\"CanvasGradient\":false,\"CanvasPattern\":false,\"CanvasRenderingContext2D\":false,\"ChannelMergerNode\":false,\"ChannelSplitterNode\":false,\"CharacterData\":false,\"clearInterval\":false,\"clearTimeout\":false,\"clientInformation\":false,\"ClipboardEvent\":false,\"close\":false,\"closed\":false,\"CloseEvent\":false,\"Comment\":false,\"CompositionEvent\":false,\"confirm\":false,\"console\":false,\"ConstantSourceNode\":false,\"ConvolverNode\":false,\"CountQueuingStrategy\":false,\"createImageBitmap\":false,\"Credential\":false,\"CredentialsContainer\":false,\"crypto\":false,\"Crypto\":false,\"CryptoKey\":false,\"CSS\":false,\"CSSConditionRule\":false,\"CSSFontFaceRule\":false,\"CSSGroupingRule\":false,\"CSSImportRule\":false,\"CSSKeyframeRule\":false,\"CSSKeyframesRule\":false,\"CSSMediaRule\":false,\"CSSNamespaceRule\":false,\"CSSPageRule\":false,\"CSSRule\":false,\"CSSRuleList\":false,\"CSSStyleDeclaration\":false,\"CSSStyleRule\":false,\"CSSStyleSheet\":false,\"CSSSupportsRule\":false,\"CustomElementRegistry\":false,\"customElements\":false,\"CustomEvent\":false,\"DataTransfer\":false,\"DataTransferItem\":false,\"DataTransferItemList\":false,\"defaultstatus\":false,\"defaultStatus\":false,\"DelayNode\":false,\"DeviceMotionEvent\":false,\"DeviceOrientationEvent\":false,\"devicePixelRatio\":false,\"dispatchEvent\":false,\"document\":false,\"Document\":false,\"DocumentFragment\":false,\"DocumentType\":false,\"DOMError\":false,\"DOMException\":false,\"DOMImplementation\":false,\"DOMMatrix\":false,\"DOMMatrixReadOnly\":false,\"DOMParser\":false,\"DOMPoint\":false,\"DOMPointReadOnly\":false,\"DOMQuad\":false,\"DOMRect\":false,\"DOMRectReadOnly\":false,\"DOMStringList\":false,\"DOMStringMap\":false,\"DOMTokenList\":false,\"DragEvent\":false,\"DynamicsCompressorNode\":false,\"Element\":false,\"ErrorEvent\":false,\"event\":false,\"Event\":false,\"EventSource\":false,\"EventTarget\":false,\"external\":false,\"fetch\":false,\"File\":false,\"FileList\":false,\"FileReader\":false,\"find\":false,\"focus\":false,\"FocusEvent\":false,\"FontFace\":false,\"FontFaceSetLoadEvent\":false,\"FormData\":false,\"frameElement\":false,\"frames\":false,\"GainNode\":false,\"Gamepad\":false,\"GamepadButton\":false,\"GamepadEvent\":false,\"getComputedStyle\":false,\"getSelection\":false,\"HashChangeEvent\":false,\"Headers\":false,\"history\":false,\"History\":false,\"HTMLAllCollection\":false,\"HTMLAnchorElement\":false,\"HTMLAreaElement\":false,\"HTMLAudioElement\":false,\"HTMLBaseElement\":false,\"HTMLBodyElement\":false,\"HTMLBRElement\":false,\"HTMLButtonElement\":false,\"HTMLCanvasElement\":false,\"HTMLCollection\":false,\"HTMLContentElement\":false,\"HTMLDataElement\":false,\"HTMLDataListElement\":false,\"HTMLDetailsElement\":false,\"HTMLDialogElement\":false,\"HTMLDirectoryElement\":false,\"HTMLDivElement\":false,\"HTMLDListElement\":false,\"HTMLDocument\":false,\"HTMLElement\":false,\"HTMLEmbedElement\":false,\"HTMLFieldSetElement\":false,\"HTMLFontElement\":false,\"HTMLFormControlsCollection\":false,\"HTMLFormElement\":false,\"HTMLFrameElement\":false,\"HTMLFrameSetElement\":false,\"HTMLHeadElement\":false,\"HTMLHeadingElement\":false,\"HTMLHRElement\":false,\"HTMLHtmlElement\":false,\"HTMLIFrameElement\":false,\"HTMLImageElement\":false,\"HTMLInputElement\":false,\"HTMLLabelElement\":false,\"HTMLLegendElement\":false,\"HTMLLIElement\":false,\"HTMLLinkElement\":false,\"HTMLMapElement\":false,\"HTMLMarqueeElement\":false,\"HTMLMediaElement\":false,\"HTMLMenuElement\":false,\"HTMLMetaElement\":false,\"HTMLMeterElement\":false,\"HTMLModElement\":false,\"HTMLObjectElement\":false,\"HTMLOListElement\":false,\"HTMLOptGroupElement\":false,\"HTMLOptionElement\":false,\"HTMLOptionsCollection\":false,\"HTMLOutputElement\":false,\"HTMLParagraphElement\":false,\"HTMLParamElement\":false,\"HTMLPictureElement\":false,\"HTMLPreElement\":false,\"HTMLProgressElement\":false,\"HTMLQuoteElement\":false,\"HTMLScriptElement\":false,\"HTMLSelectElement\":false,\"HTMLShadowElement\":false,\"HTMLSlotElement\":false,\"HTMLSourceElement\":false,\"HTMLSpanElement\":false,\"HTMLStyleElement\":false,\"HTMLTableCaptionElement\":false,\"HTMLTableCellElement\":false,\"HTMLTableColElement\":false,\"HTMLTableElement\":false,\"HTMLTableRowElement\":false,\"HTMLTableSectionElement\":false,\"HTMLTemplateElement\":false,\"HTMLTextAreaElement\":false,\"HTMLTimeElement\":false,\"HTMLTitleElement\":false,\"HTMLTrackElement\":false,\"HTMLUListElement\":false,\"HTMLUnknownElement\":false,\"HTMLVideoElement\":false,\"IDBCursor\":false,\"IDBCursorWithValue\":false,\"IDBDatabase\":false,\"IDBFactory\":false,\"IDBIndex\":false,\"IDBKeyRange\":false,\"IDBObjectStore\":false,\"IDBOpenDBRequest\":false,\"IDBRequest\":false,\"IDBTransaction\":false,\"IDBVersionChangeEvent\":false,\"IdleDeadline\":false,\"IIRFilterNode\":false,\"Image\":false,\"ImageBitmap\":false,\"ImageBitmapRenderingContext\":false,\"ImageCapture\":false,\"ImageData\":false,\"indexedDB\":false,\"innerHeight\":false,\"innerWidth\":false,\"InputEvent\":false,\"IntersectionObserver\":false,\"IntersectionObserverEntry\":false,\"Intl\":false,\"isSecureContext\":false,\"KeyboardEvent\":false,\"KeyframeEffect\":false,\"KeyframeEffectReadOnly\":false,\"length\":false,\"localStorage\":false,\"location\":true,\"Location\":false,\"locationbar\":false,\"matchMedia\":false,\"MediaDeviceInfo\":false,\"MediaDevices\":false,\"MediaElementAudioSourceNode\":false,\"MediaEncryptedEvent\":false,\"MediaError\":false,\"MediaKeyMessageEvent\":false,\"MediaKeySession\":false,\"MediaKeyStatusMap\":false,\"MediaKeySystemAccess\":false,\"MediaList\":false,\"MediaQueryList\":false,\"MediaQueryListEvent\":false,\"MediaRecorder\":false,\"MediaSettingsRange\":false,\"MediaSource\":false,\"MediaStream\":false,\"MediaStreamAudioDestinationNode\":false,\"MediaStreamAudioSourceNode\":false,\"MediaStreamEvent\":false,\"MediaStreamTrack\":false,\"MediaStreamTrackEvent\":false,\"menubar\":false,\"MessageChannel\":false,\"MessageEvent\":false,\"MessagePort\":false,\"MIDIAccess\":false,\"MIDIConnectionEvent\":false,\"MIDIInput\":false,\"MIDIInputMap\":false,\"MIDIMessageEvent\":false,\"MIDIOutput\":false,\"MIDIOutputMap\":false,\"MIDIPort\":false,\"MimeType\":false,\"MimeTypeArray\":false,\"MouseEvent\":false,\"moveBy\":false,\"moveTo\":false,\"MutationEvent\":false,\"MutationObserver\":false,\"MutationRecord\":false,\"name\":false,\"NamedNodeMap\":false,\"NavigationPreloadManager\":false,\"navigator\":false,\"Navigator\":false,\"NetworkInformation\":false,\"Node\":false,\"NodeFilter\":false,\"NodeIterator\":false,\"NodeList\":false,\"Notification\":false,\"OfflineAudioCompletionEvent\":false,\"OfflineAudioContext\":false,\"offscreenBuffering\":false,\"OffscreenCanvas\":true,\"onabort\":true,\"onafterprint\":true,\"onanimationend\":true,\"onanimationiteration\":true,\"onanimationstart\":true,\"onappinstalled\":true,\"onauxclick\":true,\"onbeforeinstallprompt\":true,\"onbeforeprint\":true,\"onbeforeunload\":true,\"onblur\":true,\"oncancel\":true,\"oncanplay\":true,\"oncanplaythrough\":true,\"onchange\":true,\"onclick\":true,\"onclose\":true,\"oncontextmenu\":true,\"oncuechange\":true,\"ondblclick\":true,\"ondevicemotion\":true,\"ondeviceorientation\":true,\"ondeviceorientationabsolute\":true,\"ondrag\":true,\"ondragend\":true,\"ondragenter\":true,\"ondragleave\":true,\"ondragover\":true,\"ondragstart\":true,\"ondrop\":true,\"ondurationchange\":true,\"onemptied\":true,\"onended\":true,\"onerror\":true,\"onfocus\":true,\"ongotpointercapture\":true,\"onhashchange\":true,\"oninput\":true,\"oninvalid\":true,\"onkeydown\":true,\"onkeypress\":true,\"onkeyup\":true,\"onlanguagechange\":true,\"onload\":true,\"onloadeddata\":true,\"onloadedmetadata\":true,\"onloadstart\":true,\"onlostpointercapture\":true,\"onmessage\":true,\"onmessageerror\":true,\"onmousedown\":true,\"onmouseenter\":true,\"onmouseleave\":true,\"onmousemove\":true,\"onmouseout\":true,\"onmouseover\":true,\"onmouseup\":true,\"onmousewheel\":true,\"onoffline\":true,\"ononline\":true,\"onpagehide\":true,\"onpageshow\":true,\"onpause\":true,\"onplay\":true,\"onplaying\":true,\"onpointercancel\":true,\"onpointerdown\":true,\"onpointerenter\":true,\"onpointerleave\":true,\"onpointermove\":true,\"onpointerout\":true,\"onpointerover\":true,\"onpointerup\":true,\"onpopstate\":true,\"onprogress\":true,\"onratechange\":true,\"onrejectionhandled\":true,\"onreset\":true,\"onresize\":true,\"onscroll\":true,\"onsearch\":true,\"onseeked\":true,\"onseeking\":true,\"onselect\":true,\"onstalled\":true,\"onstorage\":true,\"onsubmit\":true,\"onsuspend\":true,\"ontimeupdate\":true,\"ontoggle\":true,\"ontransitionend\":true,\"onunhandledrejection\":true,\"onunload\":true,\"onvolumechange\":true,\"onwaiting\":true,\"onwheel\":true,\"open\":false,\"openDatabase\":false,\"opener\":false,\"Option\":false,\"origin\":false,\"OscillatorNode\":false,\"outerHeight\":false,\"outerWidth\":false,\"PageTransitionEvent\":false,\"pageXOffset\":false,\"pageYOffset\":false,\"PannerNode\":false,\"parent\":false,\"Path2D\":false,\"PaymentAddress\":false,\"PaymentRequest\":false,\"PaymentRequestUpdateEvent\":false,\"PaymentResponse\":false,\"performance\":false,\"Performance\":false,\"PerformanceEntry\":false,\"PerformanceLongTaskTiming\":false,\"PerformanceMark\":false,\"PerformanceMeasure\":false,\"PerformanceNavigation\":false,\"PerformanceNavigationTiming\":false,\"PerformanceObserver\":false,\"PerformanceObserverEntryList\":false,\"PerformancePaintTiming\":false,\"PerformanceResourceTiming\":false,\"PerformanceTiming\":false,\"PeriodicWave\":false,\"Permissions\":false,\"PermissionStatus\":false,\"personalbar\":false,\"PhotoCapabilities\":false,\"Plugin\":false,\"PluginArray\":false,\"PointerEvent\":false,\"PopStateEvent\":false,\"postMessage\":false,\"Presentation\":false,\"PresentationAvailability\":false,\"PresentationConnection\":false,\"PresentationConnectionAvailableEvent\":false,\"PresentationConnectionCloseEvent\":false,\"PresentationConnectionList\":false,\"PresentationReceiver\":false,\"PresentationRequest\":false,\"print\":false,\"ProcessingInstruction\":false,\"ProgressEvent\":false,\"PromiseRejectionEvent\":false,\"prompt\":false,\"PushManager\":false,\"PushSubscription\":false,\"PushSubscriptionOptions\":false,\"queueMicrotask\":false,\"RadioNodeList\":false,\"Range\":false,\"ReadableStream\":false,\"registerProcessor\":false,\"RemotePlayback\":false,\"removeEventListener\":false,\"Request\":false,\"requestAnimationFrame\":false,\"requestIdleCallback\":false,\"resizeBy\":false,\"ResizeObserver\":false,\"ResizeObserverEntry\":false,\"resizeTo\":false,\"Response\":false,\"RTCCertificate\":false,\"RTCDataChannel\":false,\"RTCDataChannelEvent\":false,\"RTCDtlsTransport\":false,\"RTCIceCandidate\":false,\"RTCIceGatherer\":false,\"RTCIceTransport\":false,\"RTCPeerConnection\":false,\"RTCPeerConnectionIceEvent\":false,\"RTCRtpContributingSource\":false,\"RTCRtpReceiver\":false,\"RTCRtpSender\":false,\"RTCSctpTransport\":false,\"RTCSessionDescription\":false,\"RTCStatsReport\":false,\"RTCTrackEvent\":false,\"screen\":false,\"Screen\":false,\"screenLeft\":false,\"ScreenOrientation\":false,\"screenTop\":false,\"screenX\":false,\"screenY\":false,\"ScriptProcessorNode\":false,\"scroll\":false,\"scrollbars\":false,\"scrollBy\":false,\"scrollTo\":false,\"scrollX\":false,\"scrollY\":false,\"SecurityPolicyViolationEvent\":false,\"Selection\":false,\"self\":false,\"ServiceWorker\":false,\"ServiceWorkerContainer\":false,\"ServiceWorkerRegistration\":false,\"sessionStorage\":false,\"setInterval\":false,\"setTimeout\":false,\"ShadowRoot\":false,\"SharedWorker\":false,\"SourceBuffer\":false,\"SourceBufferList\":false,\"speechSynthesis\":false,\"SpeechSynthesisEvent\":false,\"SpeechSynthesisUtterance\":false,\"StaticRange\":false,\"status\":false,\"statusbar\":false,\"StereoPannerNode\":false,\"stop\":false,\"Storage\":false,\"StorageEvent\":false,\"StorageManager\":false,\"styleMedia\":false,\"StyleSheet\":false,\"StyleSheetList\":false,\"SubtleCrypto\":false,\"SVGAElement\":false,\"SVGAngle\":false,\"SVGAnimatedAngle\":false,\"SVGAnimatedBoolean\":false,\"SVGAnimatedEnumeration\":false,\"SVGAnimatedInteger\":false,\"SVGAnimatedLength\":false,\"SVGAnimatedLengthList\":false,\"SVGAnimatedNumber\":false,\"SVGAnimatedNumberList\":false,\"SVGAnimatedPreserveAspectRatio\":false,\"SVGAnimatedRect\":false,\"SVGAnimatedString\":false,\"SVGAnimatedTransformList\":false,\"SVGAnimateElement\":false,\"SVGAnimateMotionElement\":false,\"SVGAnimateTransformElement\":false,\"SVGAnimationElement\":false,\"SVGCircleElement\":false,\"SVGClipPathElement\":false,\"SVGComponentTransferFunctionElement\":false,\"SVGDefsElement\":false,\"SVGDescElement\":false,\"SVGDiscardElement\":false,\"SVGElement\":false,\"SVGEllipseElement\":false,\"SVGFEBlendElement\":false,\"SVGFEColorMatrixElement\":false,\"SVGFEComponentTransferElement\":false,\"SVGFECompositeElement\":false,\"SVGFEConvolveMatrixElement\":false,\"SVGFEDiffuseLightingElement\":false,\"SVGFEDisplacementMapElement\":false,\"SVGFEDistantLightElement\":false,\"SVGFEDropShadowElement\":false,\"SVGFEFloodElement\":false,\"SVGFEFuncAElement\":false,\"SVGFEFuncBElement\":false,\"SVGFEFuncGElement\":false,\"SVGFEFuncRElement\":false,\"SVGFEGaussianBlurElement\":false,\"SVGFEImageElement\":false,\"SVGFEMergeElement\":false,\"SVGFEMergeNodeElement\":false,\"SVGFEMorphologyElement\":false,\"SVGFEOffsetElement\":false,\"SVGFEPointLightElement\":false,\"SVGFESpecularLightingElement\":false,\"SVGFESpotLightElement\":false,\"SVGFETileElement\":false,\"SVGFETurbulenceElement\":false,\"SVGFilterElement\":false,\"SVGForeignObjectElement\":false,\"SVGGElement\":false,\"SVGGeometryElement\":false,\"SVGGradientElement\":false,\"SVGGraphicsElement\":false,\"SVGImageElement\":false,\"SVGLength\":false,\"SVGLengthList\":false,\"SVGLinearGradientElement\":false,\"SVGLineElement\":false,\"SVGMarkerElement\":false,\"SVGMaskElement\":false,\"SVGMatrix\":false,\"SVGMetadataElement\":false,\"SVGMPathElement\":false,\"SVGNumber\":false,\"SVGNumberList\":false,\"SVGPathElement\":false,\"SVGPatternElement\":false,\"SVGPoint\":false,\"SVGPointList\":false,\"SVGPolygonElement\":false,\"SVGPolylineElement\":false,\"SVGPreserveAspectRatio\":false,\"SVGRadialGradientElement\":false,\"SVGRect\":false,\"SVGRectElement\":false,\"SVGScriptElement\":false,\"SVGSetElement\":false,\"SVGStopElement\":false,\"SVGStringList\":false,\"SVGStyleElement\":false,\"SVGSVGElement\":false,\"SVGSwitchElement\":false,\"SVGSymbolElement\":false,\"SVGTextContentElement\":false,\"SVGTextElement\":false,\"SVGTextPathElement\":false,\"SVGTextPositioningElement\":false,\"SVGTitleElement\":false,\"SVGTransform\":false,\"SVGTransformList\":false,\"SVGTSpanElement\":false,\"SVGUnitTypes\":false,\"SVGUseElement\":false,\"SVGViewElement\":false,\"TaskAttributionTiming\":false,\"Text\":false,\"TextDecoder\":false,\"TextEncoder\":false,\"TextEvent\":false,\"TextMetrics\":false,\"TextTrack\":false,\"TextTrackCue\":false,\"TextTrackCueList\":false,\"TextTrackList\":false,\"TimeRanges\":false,\"toolbar\":false,\"top\":false,\"Touch\":false,\"TouchEvent\":false,\"TouchList\":false,\"TrackEvent\":false,\"TransitionEvent\":false,\"TreeWalker\":false,\"UIEvent\":false,\"URL\":false,\"URLSearchParams\":false,\"ValidityState\":false,\"visualViewport\":false,\"VisualViewport\":false,\"VTTCue\":false,\"WaveShaperNode\":false,\"WebAssembly\":false,\"WebGL2RenderingContext\":false,\"WebGLActiveInfo\":false,\"WebGLBuffer\":false,\"WebGLContextEvent\":false,\"WebGLFramebuffer\":false,\"WebGLProgram\":false,\"WebGLQuery\":false,\"WebGLRenderbuffer\":false,\"WebGLRenderingContext\":false,\"WebGLSampler\":false,\"WebGLShader\":false,\"WebGLShaderPrecisionFormat\":false,\"WebGLSync\":false,\"WebGLTexture\":false,\"WebGLTransformFeedback\":false,\"WebGLUniformLocation\":false,\"WebGLVertexArrayObject\":false,\"WebSocket\":false,\"WheelEvent\":false,\"window\":false,\"Window\":false,\"Worker\":false,\"WritableStream\":false,\"XMLDocument\":false,\"XMLHttpRequest\":false,\"XMLHttpRequestEventTarget\":false,\"XMLHttpRequestUpload\":false,\"XMLSerializer\":false,\"XPathEvaluator\":false,\"XPathExpression\":false,\"XPathResult\":false,\"XSLTProcessor\":false},\"worker\":{\"addEventListener\":false,\"applicationCache\":false,\"atob\":false,\"Blob\":false,\"BroadcastChannel\":false,\"btoa\":false,\"Cache\":false,\"caches\":false,\"clearInterval\":false,\"clearTimeout\":false,\"close\":true,\"console\":false,\"fetch\":false,\"FileReaderSync\":false,\"FormData\":false,\"Headers\":false,\"IDBCursor\":false,\"IDBCursorWithValue\":false,\"IDBDatabase\":false,\"IDBFactory\":false,\"IDBIndex\":false,\"IDBKeyRange\":false,\"IDBObjectStore\":false,\"IDBOpenDBRequest\":false,\"IDBRequest\":false,\"IDBTransaction\":false,\"IDBVersionChangeEvent\":false,\"ImageData\":false,\"importScripts\":true,\"indexedDB\":false,\"location\":false,\"MessageChannel\":false,\"MessagePort\":false,\"name\":false,\"navigator\":false,\"Notification\":false,\"onclose\":true,\"onconnect\":true,\"onerror\":true,\"onlanguagechange\":true,\"onmessage\":true,\"onoffline\":true,\"ononline\":true,\"onrejectionhandled\":true,\"onunhandledrejection\":true,\"performance\":false,\"Performance\":false,\"PerformanceEntry\":false,\"PerformanceMark\":false,\"PerformanceMeasure\":false,\"PerformanceNavigation\":false,\"PerformanceResourceTiming\":false,\"PerformanceTiming\":false,\"postMessage\":true,\"Promise\":false,\"queueMicrotask\":false,\"removeEventListener\":false,\"Request\":false,\"Response\":false,\"self\":true,\"ServiceWorkerRegistration\":false,\"setInterval\":false,\"setTimeout\":false,\"TextDecoder\":false,\"TextEncoder\":false,\"URL\":false,\"URLSearchParams\":false,\"WebSocket\":false,\"Worker\":false,\"WorkerGlobalScope\":false,\"XMLHttpRequest\":false},\"node\":{\"__dirname\":false,\"__filename\":false,\"Buffer\":false,\"clearImmediate\":false,\"clearInterval\":false,\"clearTimeout\":false,\"console\":false,\"exports\":true,\"global\":false,\"Intl\":false,\"module\":false,\"process\":false,\"queueMicrotask\":false,\"require\":false,\"setImmediate\":false,\"setInterval\":false,\"setTimeout\":false,\"TextDecoder\":false,\"TextEncoder\":false,\"URL\":false,\"URLSearchParams\":false},\"commonjs\":{\"exports\":true,\"global\":false,\"module\":false,\"require\":false},\"amd\":{\"define\":false,\"require\":false},\"mocha\":{\"after\":false,\"afterEach\":false,\"before\":false,\"beforeEach\":false,\"context\":false,\"describe\":false,\"it\":false,\"mocha\":false,\"run\":false,\"setup\":false,\"specify\":false,\"suite\":false,\"suiteSetup\":false,\"suiteTeardown\":false,\"teardown\":false,\"test\":false,\"xcontext\":false,\"xdescribe\":false,\"xit\":false,\"xspecify\":false},\"jasmine\":{\"afterAll\":false,\"afterEach\":false,\"beforeAll\":false,\"beforeEach\":false,\"describe\":false,\"expect\":false,\"fail\":false,\"fdescribe\":false,\"fit\":false,\"it\":false,\"jasmine\":false,\"pending\":false,\"runs\":false,\"spyOn\":false,\"spyOnProperty\":false,\"waits\":false,\"waitsFor\":false,\"xdescribe\":false,\"xit\":false},\"jest\":{\"afterAll\":false,\"afterEach\":false,\"beforeAll\":false,\"beforeEach\":false,\"describe\":false,\"expect\":false,\"fdescribe\":false,\"fit\":false,\"it\":false,\"jest\":false,\"pit\":false,\"require\":false,\"test\":false,\"xdescribe\":false,\"xit\":false,\"xtest\":false},\"qunit\":{\"asyncTest\":false,\"deepEqual\":false,\"equal\":false,\"expect\":false,\"module\":false,\"notDeepEqual\":false,\"notEqual\":false,\"notOk\":false,\"notPropEqual\":false,\"notStrictEqual\":false,\"ok\":false,\"propEqual\":false,\"QUnit\":false,\"raises\":false,\"start\":false,\"stop\":false,\"strictEqual\":false,\"test\":false,\"throws\":false},\"phantomjs\":{\"console\":true,\"exports\":true,\"phantom\":true,\"require\":true,\"WebPage\":true},\"couch\":{\"emit\":false,\"exports\":false,\"getRow\":false,\"log\":false,\"module\":false,\"provides\":false,\"require\":false,\"respond\":false,\"send\":false,\"start\":false,\"sum\":false},\"rhino\":{\"defineClass\":false,\"deserialize\":false,\"gc\":false,\"help\":false,\"importClass\":false,\"importPackage\":false,\"java\":false,\"load\":false,\"loadClass\":false,\"Packages\":false,\"print\":false,\"quit\":false,\"readFile\":false,\"readUrl\":false,\"runCommand\":false,\"seal\":false,\"serialize\":false,\"spawn\":false,\"sync\":false,\"toint32\":false,\"version\":false},\"nashorn\":{\"__DIR__\":false,\"__FILE__\":false,\"__LINE__\":false,\"com\":false,\"edu\":false,\"exit\":false,\"java\":false,\"Java\":false,\"javafx\":false,\"JavaImporter\":false,\"javax\":false,\"JSAdapter\":false,\"load\":false,\"loadWithNewGlobal\":false,\"org\":false,\"Packages\":false,\"print\":false,\"quit\":false},\"wsh\":{\"ActiveXObject\":true,\"Enumerator\":true,\"GetObject\":true,\"ScriptEngine\":true,\"ScriptEngineBuildVersion\":true,\"ScriptEngineMajorVersion\":true,\"ScriptEngineMinorVersion\":true,\"VBArray\":true,\"WScript\":true,\"WSH\":true,\"XDomainRequest\":true},\"jquery\":{\"$\":false,\"jQuery\":false},\"yui\":{\"YAHOO\":false,\"YAHOO_config\":false,\"YUI\":false,\"YUI_config\":false},\"shelljs\":{\"cat\":false,\"cd\":false,\"chmod\":false,\"config\":false,\"cp\":false,\"dirs\":false,\"echo\":false,\"env\":false,\"error\":false,\"exec\":false,\"exit\":false,\"find\":false,\"grep\":false,\"ln\":false,\"ls\":false,\"mkdir\":false,\"mv\":false,\"popd\":false,\"pushd\":false,\"pwd\":false,\"rm\":false,\"sed\":false,\"set\":false,\"target\":false,\"tempdir\":false,\"test\":false,\"touch\":false,\"which\":false},\"prototypejs\":{\"$\":false,\"$$\":false,\"$A\":false,\"$break\":false,\"$continue\":false,\"$F\":false,\"$H\":false,\"$R\":false,\"$w\":false,\"Abstract\":false,\"Ajax\":false,\"Autocompleter\":false,\"Builder\":false,\"Class\":false,\"Control\":false,\"Draggable\":false,\"Draggables\":false,\"Droppables\":false,\"Effect\":false,\"Element\":false,\"Enumerable\":false,\"Event\":false,\"Field\":false,\"Form\":false,\"Hash\":false,\"Insertion\":false,\"ObjectRange\":false,\"PeriodicalExecuter\":false,\"Position\":false,\"Prototype\":false,\"Scriptaculous\":false,\"Selector\":false,\"Sortable\":false,\"SortableObserver\":false,\"Sound\":false,\"Template\":false,\"Toggle\":false,\"Try\":false},\"meteor\":{\"_\":false,\"$\":false,\"Accounts\":false,\"AccountsClient\":false,\"AccountsCommon\":false,\"AccountsServer\":false,\"App\":false,\"Assets\":false,\"Blaze\":false,\"check\":false,\"Cordova\":false,\"DDP\":false,\"DDPRateLimiter\":false,\"DDPServer\":false,\"Deps\":false,\"EJSON\":false,\"Email\":false,\"HTTP\":false,\"Log\":false,\"Match\":false,\"Meteor\":false,\"Mongo\":false,\"MongoInternals\":false,\"Npm\":false,\"Package\":false,\"Plugin\":false,\"process\":false,\"Random\":false,\"ReactiveDict\":false,\"ReactiveVar\":false,\"Router\":false,\"ServiceConfiguration\":false,\"Session\":false,\"share\":false,\"Spacebars\":false,\"Template\":false,\"Tinytest\":false,\"Tracker\":false,\"UI\":false,\"Utils\":false,\"WebApp\":false,\"WebAppInternals\":false},\"mongo\":{\"_isWindows\":false,\"_rand\":false,\"BulkWriteResult\":false,\"cat\":false,\"cd\":false,\"connect\":false,\"db\":false,\"getHostName\":false,\"getMemInfo\":false,\"hostname\":false,\"ISODate\":false,\"listFiles\":false,\"load\":false,\"ls\":false,\"md5sumFile\":false,\"mkdir\":false,\"Mongo\":false,\"NumberInt\":false,\"NumberLong\":false,\"ObjectId\":false,\"PlanCache\":false,\"print\":false,\"printjson\":false,\"pwd\":false,\"quit\":false,\"removeFile\":false,\"rs\":false,\"sh\":false,\"UUID\":false,\"version\":false,\"WriteResult\":false},\"applescript\":{\"$\":false,\"Application\":false,\"Automation\":false,\"console\":false,\"delay\":false,\"Library\":false,\"ObjC\":false,\"ObjectSpecifier\":false,\"Path\":false,\"Progress\":false,\"Ref\":false},\"serviceworker\":{\"addEventListener\":false,\"applicationCache\":false,\"atob\":false,\"Blob\":false,\"BroadcastChannel\":false,\"btoa\":false,\"Cache\":false,\"caches\":false,\"CacheStorage\":false,\"clearInterval\":false,\"clearTimeout\":false,\"Client\":false,\"clients\":false,\"Clients\":false,\"close\":true,\"console\":false,\"ExtendableEvent\":false,\"ExtendableMessageEvent\":false,\"fetch\":false,\"FetchEvent\":false,\"FileReaderSync\":false,\"FormData\":false,\"Headers\":false,\"IDBCursor\":false,\"IDBCursorWithValue\":false,\"IDBDatabase\":false,\"IDBFactory\":false,\"IDBIndex\":false,\"IDBKeyRange\":false,\"IDBObjectStore\":false,\"IDBOpenDBRequest\":false,\"IDBRequest\":false,\"IDBTransaction\":false,\"IDBVersionChangeEvent\":false,\"ImageData\":false,\"importScripts\":false,\"indexedDB\":false,\"location\":false,\"MessageChannel\":false,\"MessagePort\":false,\"name\":false,\"navigator\":false,\"Notification\":false,\"onclose\":true,\"onconnect\":true,\"onerror\":true,\"onfetch\":true,\"oninstall\":true,\"onlanguagechange\":true,\"onmessage\":true,\"onmessageerror\":true,\"onnotificationclick\":true,\"onnotificationclose\":true,\"onoffline\":true,\"ononline\":true,\"onpush\":true,\"onpushsubscriptionchange\":true,\"onrejectionhandled\":true,\"onsync\":true,\"onunhandledrejection\":true,\"performance\":false,\"Performance\":false,\"PerformanceEntry\":false,\"PerformanceMark\":false,\"PerformanceMeasure\":false,\"PerformanceNavigation\":false,\"PerformanceResourceTiming\":false,\"PerformanceTiming\":false,\"postMessage\":true,\"Promise\":false,\"queueMicrotask\":false,\"registration\":false,\"removeEventListener\":false,\"Request\":false,\"Response\":false,\"self\":false,\"ServiceWorker\":false,\"ServiceWorkerContainer\":false,\"ServiceWorkerGlobalScope\":false,\"ServiceWorkerMessageEvent\":false,\"ServiceWorkerRegistration\":false,\"setInterval\":false,\"setTimeout\":false,\"skipWaiting\":false,\"TextDecoder\":false,\"TextEncoder\":false,\"URL\":false,\"URLSearchParams\":false,\"WebSocket\":false,\"WindowClient\":false,\"Worker\":false,\"WorkerGlobalScope\":false,\"XMLHttpRequest\":false},\"atomtest\":{\"advanceClock\":false,\"fakeClearInterval\":false,\"fakeClearTimeout\":false,\"fakeSetInterval\":false,\"fakeSetTimeout\":false,\"resetTimeouts\":false,\"waitsForPromise\":false},\"embertest\":{\"andThen\":false,\"click\":false,\"currentPath\":false,\"currentRouteName\":false,\"currentURL\":false,\"fillIn\":false,\"find\":false,\"findAll\":false,\"findWithAssert\":false,\"keyEvent\":false,\"pauseTest\":false,\"resumeTest\":false,\"triggerEvent\":false,\"visit\":false,\"wait\":false},\"protractor\":{\"$\":false,\"$$\":false,\"browser\":false,\"by\":false,\"By\":false,\"DartObject\":false,\"element\":false,\"protractor\":false},\"shared-node-browser\":{\"clearInterval\":false,\"clearTimeout\":false,\"console\":false,\"setInterval\":false,\"setTimeout\":false,\"URL\":false,\"URLSearchParams\":false},\"webextensions\":{\"browser\":false,\"chrome\":false,\"opr\":false},\"greasemonkey\":{\"cloneInto\":false,\"createObjectIn\":false,\"exportFunction\":false,\"GM\":false,\"GM_addStyle\":false,\"GM_deleteValue\":false,\"GM_getResourceText\":false,\"GM_getResourceURL\":false,\"GM_getValue\":false,\"GM_info\":false,\"GM_listValues\":false,\"GM_log\":false,\"GM_openInTab\":false,\"GM_registerMenuCommand\":false,\"GM_setClipboard\":false,\"GM_setValue\":false,\"GM_xmlhttpRequest\":false,\"unsafeWindow\":false},\"devtools\":{\"$\":false,\"$_\":false,\"$$\":false,\"$0\":false,\"$1\":false,\"$2\":false,\"$3\":false,\"$4\":false,\"$x\":false,\"chrome\":false,\"clear\":false,\"copy\":false,\"debug\":false,\"dir\":false,\"dirxml\":false,\"getEventListeners\":false,\"inspect\":false,\"keys\":false,\"monitor\":false,\"monitorEvents\":false,\"profile\":false,\"profileEnd\":false,\"queryObjects\":false,\"table\":false,\"undebug\":false,\"unmonitor\":false,\"unmonitorEvents\":false,\"values\":false}}')},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(417);t.default=class{constructor(e,t){this._cachedMap=void 0,this._code=void 0,this._opts=void 0,this._rawMappings=void 0,this._lastGenLine=void 0,this._lastSourceLine=void 0,this._lastSourceColumn=void 0,this._cachedMap=null,this._code=t,this._opts=e,this._rawMappings=[]}get(){if(!this._cachedMap){const e=this._cachedMap=new n.SourceMapGenerator({sourceRoot:this._opts.sourceRoot}),t=this._code;\"string\"==typeof t?e.setSourceContent(this._opts.sourceFileName.replace(/\\\\/g,\"/\"),t):\"object\"==typeof t&&Object.keys(t).forEach((r=>{e.setSourceContent(r.replace(/\\\\/g,\"/\"),t[r])})),this._rawMappings.forEach((t=>e.addMapping(t)),e)}return this._cachedMap.toJSON()}getRawMappings(){return this._rawMappings.slice()}mark(e,t,r,n,s,i,o){this._lastGenLine!==e&&null===r||(o||this._lastGenLine!==e||this._lastSourceLine!==r||this._lastSourceColumn!==n)&&(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=n,this._rawMappings.push({name:s||void 0,generated:{line:e,column:t},source:null==r?void 0:(i||this._opts.sourceFileName).replace(/\\\\/g,\"/\"),original:null==r?void 0:{line:r,column:n}}))}}},()=>{},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(419),s=r(233),i=r(0),o=r(165);const a=/e/i,l=/\\.0+$/,c=/^0[box]/,u=/^\\s*[@#]__PURE__\\s*$/;class p{constructor(e,t){this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._parenPushNewlineState=null,this._noLineTerminator=!1,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new WeakSet,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=e,this._buf=new n.default(t)}generate(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(){this.format.compact||this.format.concise||this._indent++}dedent(){this.format.compact||this.format.concise||this._indent--}semicolon(e=!1){this._maybeAddAuxComment(),this._append(\";\",!e)}rightBrace(){this.format.minified&&this._buf.removeLastSemicolon(),this.token(\"}\")}space(e=!1){this.format.compact||(this._buf.hasContent()&&!this.endsWith(\" \")&&!this.endsWith(\"\\n\")||e)&&this._space()}word(e){(this._endsWithWord||this.endsWith(\"/\")&&0===e.indexOf(\"/\"))&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0}number(e){this.word(e),this._endsWithInteger=Number.isInteger(+e)&&!c.test(e)&&!a.test(e)&&!l.test(e)&&\".\"!==e[e.length-1]}token(e){(\"--\"===e&&this.endsWith(\"!\")||\"+\"===e[0]&&this.endsWith(\"+\")||\"-\"===e[0]&&this.endsWith(\"-\")||\".\"===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)}newline(e){if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else if(!(this.endsWith(\"\\n\\n\")||(\"number\"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith(\"{\\n\")||this.endsWith(\":\\n\"))&&e--,e<=0)))for(let t=0;t<e;t++)this._newline()}endsWith(e){return this._buf.endsWith(e)}removeTrailingNewline(){this._buf.removeTrailingNewline()}exactSource(e,t){this._catchUp(\"start\",e),this._buf.exactSource(e,t)}source(e,t){this._catchUp(e,t),this._buf.source(e,t)}withSource(e,t,r){this._catchUp(e,t),this._buf.withSource(e,t,r)}_space(){this._append(\" \",!0)}_newline(){this._append(\"\\n\",!0)}_append(e,t=!1){this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1}_maybeIndent(e){this._indent&&this.endsWith(\"\\n\")&&\"\\n\"!==e[0]&&this._buf.queue(this._getIndent())}_maybeAddParen(e){const t=this._parenPushNewlineState;if(!t)return;let r;for(r=0;r<e.length&&\" \"===e[r];r++)continue;if(r===e.length)return;const n=e[r];if(\"\\n\"!==n){if(\"/\"!==n||r+1===e.length)return void(this._parenPushNewlineState=null);const t=e[r+1];if(\"*\"===t){if(u.test(e.slice(r+2,e.length-2)))return}else if(\"/\"!==t)return void(this._parenPushNewlineState=null)}this.token(\"(\"),this.indent(),t.printed=!0}_catchUp(e,t){if(!this.format.retainLines)return;const r=t?t[e]:null;if(null!=(null==r?void 0:r.line)){const e=r.line-this._buf.getCurrentLine();for(let t=0;t<e;t++)this._newline()}}_getIndent(){return this.format.indent.style.repeat(this._indent)}startTerminatorless(e=!1){return e?(this._noLineTerminator=!0,null):this._parenPushNewlineState={printed:!1}}endTerminatorless(e){this._noLineTerminator=!1,null!=e&&e.printed&&(this.dedent(),this.newline(),this.token(\")\"))}print(e,t){if(!e)return;const r=this.format.concise;e._compact&&(this.format.concise=!0);const n=this[e.type];if(!n)throw new ReferenceError(`unknown node of type ${JSON.stringify(e.type)} with constructor ${JSON.stringify(null==e?void 0:e.constructor.name)}`);this._printStack.push(e);const o=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!o);let a=s.needsParens(e,t,this._printStack);this.format.retainFunctionParens&&\"FunctionExpression\"===e.type&&e.extra&&e.extra.parenthesized&&(a=!0),a&&this.token(\"(\"),this._printLeadingComments(e);const l=i.isProgram(e)||i.isFile(e)?null:e.loc;this.withSource(\"start\",l,(()=>{n.call(this,e,t)})),this._printTrailingComments(e),a&&this.token(\")\"),this._printStack.pop(),this.format.concise=r,this._insideAux=o}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:\"CommentBlock\",value:e})}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:\"CommentBlock\",value:e})}getPossibleRaw(e){const t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,r={}){if(null==e||!e.length)return;r.indent&&this.indent();const n={addNewlines:r.addNewlines};for(let s=0;s<e.length;s++){const i=e[s];i&&(r.statement&&this._printNewline(!0,i,t,n),this.print(i,t),r.iterator&&r.iterator(i,s),r.separator&&s<e.length-1&&r.separator.call(this),r.statement&&this._printNewline(!1,i,t,n))}r.indent&&this.dedent()}printAndIndentOnComments(e,t){const r=e.leadingComments&&e.leadingComments.length>0;r&&this.indent(),this.print(e,t),r&&this.dedent()}printBlock(e){const t=e.body;i.isEmptyStatement(t)||this.space(),this.print(t,e)}_printTrailingComments(e){this._printComments(this._getComments(!1,e))}_printLeadingComments(e){this._printComments(this._getComments(!0,e),!0)}printInnerComments(e,t=!0){var r;null!=(r=e.innerComments)&&r.length&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())}printSequence(e,t,r={}){return r.statement=!0,this.printJoin(e,t,r)}printList(e,t,r={}){return null==r.separator&&(r.separator=d),this.printJoin(e,t,r)}_printNewline(e,t,r,n){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space();let i=0;this._buf.hasContent()&&(e||i++,n.addNewlines&&(i+=n.addNewlines(e,t)||0),(e?s.needsWhitespaceBefore:s.needsWhitespaceAfter)(t,r)&&i++),this.newline(i)}_getComments(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]}_printComment(e,t){if(!this.format.shouldPrintComment(e.value))return;if(e.ignore)return;if(this._printedComments.has(e))return;this._printedComments.add(e);const r=\"CommentBlock\"===e.type,n=r&&!t&&!this._noLineTerminator;n&&this._buf.hasContent()&&this.newline(1),this.endsWith(\"[\")||this.endsWith(\"{\")||this.space();let s=r||this._noLineTerminator?`/*${e.value}*/`:`//${e.value}\\n`;if(r&&this.format.indent.adjustMultilineComment){var i;const t=null==(i=e.loc)?void 0:i.start.column;if(t){const e=new RegExp(\"\\\\n\\\\s{1,\"+t+\"}\",\"g\");s=s.replace(e,\"\\n\")}const r=Math.max(this._getIndent().length,this.format.retainLines?0:this._buf.getCurrentColumn());s=s.replace(/\\n(?!$)/g,`\\n${\" \".repeat(r)}`)}this.endsWith(\"/\")&&this._space(),this.withSource(\"start\",e.loc,(()=>{this._append(s)})),n&&this.newline(1)}_printComments(e,t){if(null!=e&&e.length)if(t&&1===e.length&&u.test(e[0].value))this._printComment(e[0],this._buf.hasContent()&&!this.endsWith(\"\\n\"));else for(const t of e)this._printComment(t)}printAssertions(e){var t;null!=(t=e.assertions)&&t.length&&(this.space(),this.word(\"assert\"),this.space(),this.token(\"{\"),this.space(),this.printList(e.assertions,e),this.space(),this.token(\"}\"))}}Object.assign(p.prototype,o),p.prototype.Noop=function(){};var f=p;function d(){this.token(\",\"),this.space()}t.default=f},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;const r=/^[ \\t]+$/;t.default=class{constructor(e){this._map=null,this._buf=[],this._last=\"\",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._disallowedPop=null,this._map=e}get(){this._flush();const e=this._map,t={code:this._buf.join(\"\").trimRight(),map:null,rawMappings:null==e?void 0:e.getRawMappings()};return e&&Object.defineProperty(t,\"map\",{configurable:!0,enumerable:!0,get(){return this.map=e.get()},set(e){Object.defineProperty(this,\"map\",{value:e,writable:!0})}}),t}append(e){this._flush();const{line:t,column:r,filename:n,identifierName:s,force:i}=this._sourcePosition;this._append(e,t,r,s,n,i)}queue(e){if(\"\\n\"===e)for(;this._queue.length>0&&r.test(this._queue[0][0]);)this._queue.shift();const{line:t,column:n,filename:s,identifierName:i,force:o}=this._sourcePosition;this._queue.unshift([e,t,n,i,s,o])}_flush(){let e;for(;e=this._queue.pop();)this._append(...e)}_append(e,t,r,n,s,i){this._buf.push(e),this._last=e[e.length-1];let o=e.indexOf(\"\\n\"),a=0;for(0!==o&&this._mark(t,r,n,s,i);-1!==o;)this._position.line++,this._position.column=0,a=o+1,a<e.length&&this._mark(++t,0,n,s,i),o=e.indexOf(\"\\n\",a);this._position.column+=e.length-a}_mark(e,t,r,n,s){var i;null==(i=this._map)||i.mark(this._position.line,this._position.column,e,t,r,n,s)}removeTrailingNewline(){this._queue.length>0&&\"\\n\"===this._queue[0][0]&&this._queue.shift()}removeLastSemicolon(){this._queue.length>0&&\";\"===this._queue[0][0]&&this._queue.shift()}endsWith(e){if(1===e.length){let t;if(this._queue.length>0){const e=this._queue[0][0];t=e[e.length-1]}else t=this._last;return t===e}const t=this._last+this._queue.reduce(((e,t)=>t[0]+e),\"\");return e.length<=t.length&&t.slice(-e.length)===e}hasContent(){return this._queue.length>0||!!this._last}exactSource(e,t){this.source(\"start\",e,!0),t(),this.source(\"end\",e),this._disallowPop(\"start\",e)}source(e,t,r){e&&!t||this._normalizePosition(e,t,this._sourcePosition,r)}withSource(e,t,r){if(!this._map)return r();const n=this._sourcePosition.line,s=this._sourcePosition.column,i=this._sourcePosition.filename,o=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.force&&this._sourcePosition.line===n&&this._sourcePosition.column===s&&this._sourcePosition.filename===i||this._disallowedPop&&this._disallowedPop.line===n&&this._disallowedPop.column===s&&this._disallowedPop.filename===i||(this._sourcePosition.line=n,this._sourcePosition.column=s,this._sourcePosition.filename=i,this._sourcePosition.identifierName=o,this._sourcePosition.force=!1,this._disallowedPop=null)}_disallowPop(e,t){e&&!t||(this._disallowedPop=this._normalizePosition(e,t))}_normalizePosition(e,t,r,n){const s=t?t[e]:null;void 0===r&&(r={identifierName:null,line:null,column:null,filename:null,force:!1});const i=r.line,o=r.column,a=r.filename;return r.identifierName=\"start\"===e&&(null==t?void 0:t.identifierName)||null,r.line=null==s?void 0:s.line,r.column=null==s?void 0:s.column,r.filename=null==t?void 0:t.filename,(n||r.line!==i||r.column!==o||r.filename!==a)&&(r.force=n),r}getCurrentColumn(){const e=this._queue.reduce(((e,t)=>t[0]+e),\"\"),t=e.lastIndexOf(\"\\n\");return-1===t?this._position.column+e.length:e.length-1-t}getCurrentLine(){const e=this._queue.reduce(((e,t)=>t[0]+e),\"\");let t=0;for(let r=0;r<e.length;r++)\"\\n\"===e[r]&&t++;return this._position.line+t}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.list=t.nodes=void 0;var n=r(0);function s(e,t={}){return n.isMemberExpression(e)||n.isOptionalMemberExpression(e)?(s(e.object,t),e.computed&&s(e.property,t)):n.isBinary(e)||n.isAssignmentExpression(e)?(s(e.left,t),s(e.right,t)):n.isCallExpression(e)||n.isOptionalCallExpression(e)?(t.hasCall=!0,s(e.callee,t)):n.isFunction(e)?t.hasFunction=!0:n.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return n.isMemberExpression(e)?i(e.object)||i(e.property):n.isIdentifier(e)?\"require\"===e.name||\"_\"===e.name[0]:n.isCallExpression(e)?i(e.callee):!(!n.isBinary(e)&&!n.isAssignmentExpression(e))&&(n.isIdentifier(e.left)&&i(e.left)||i(e.right))}function o(e){return n.isLiteral(e)||n.isObjectExpression(e)||n.isArrayExpression(e)||n.isIdentifier(e)||n.isMemberExpression(e)}const a={AssignmentExpression(e){const t=s(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:(e,t)=>({before:!!e.consequent.length||t.cases[0]===e,after:!e.consequent.length&&t.cases[t.cases.length-1]===e}),LogicalExpression(e){if(n.isFunction(e.left)||n.isFunction(e.right))return{after:!0}},Literal(e){if(n.isStringLiteral(e)&&\"use strict\"===e.value)return{after:!0}},CallExpression(e){if(n.isFunction(e.callee)||i(e))return{before:!0,after:!0}},OptionalCallExpression(e){if(n.isFunction(e.callee))return{before:!0,after:!0}},VariableDeclaration(e){for(let t=0;t<e.declarations.length;t++){const r=e.declarations[t];let n=i(r.id)&&!o(r.init);if(!n){const e=s(r.init);n=i(r.init)&&e.hasCall||e.hasFunction}if(n)return{before:!0,after:!0}}},IfStatement(e){if(n.isBlockStatement(e.consequent))return{before:!0,after:!0}}};t.nodes=a,a.ObjectProperty=a.ObjectTypeProperty=a.ObjectMethod=function(e,t){if(t.properties[0]===e)return{before:!0}},a.ObjectTypeCallProperty=function(e,t){var r;if(t.callProperties[0]===e&&(null==(r=t.properties)||!r.length))return{before:!0}},a.ObjectTypeIndexer=function(e,t){var r,n;if(!(t.indexers[0]!==e||null!=(r=t.properties)&&r.length||null!=(n=t.callProperties)&&n.length))return{before:!0}},a.ObjectTypeInternalSlot=function(e,t){var r,n,s;if(!(t.internalSlots[0]!==e||null!=(r=t.properties)&&r.length||null!=(n=t.callProperties)&&n.length||null!=(s=t.indexers)&&s.length))return{before:!0}};t.list={VariableDeclaration:e=>e.declarations.map((e=>e.init)),ArrayExpression:e=>e.elements,ObjectExpression:e=>e.properties},[[\"Function\",!0],[\"Class\",!0],[\"Loop\",!0],[\"LabeledStatement\",!0],[\"SwitchStatement\",!0],[\"TryStatement\",!0]].forEach((function([e,t]){\"boolean\"==typeof t&&(t={after:t,before:t}),[e].concat(n.FLIPPED_ALIAS_KEYS[e]||[]).forEach((function(e){a[e]=function(){return t}}))}))},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.NullableTypeAnnotation=function(e,t){return n.isArrayTypeAnnotation(t)},t.FunctionTypeAnnotation=function(e,t,r){return n.isUnionTypeAnnotation(t)||n.isIntersectionTypeAnnotation(t)||n.isArrayTypeAnnotation(t)||n.isTypeAnnotation(t)&&n.isArrowFunctionExpression(r[r.length-3])},t.UpdateExpression=function(e,t){return o(e,t)||i(e,t)},t.ObjectExpression=function(e,t,r){return c(r,{expressionStatement:!0,arrowBody:!0})},t.DoExpression=function(e,t,r){return!e.async&&c(r,{expressionStatement:!0})},t.Binary=function(e,t){if(\"**\"===e.operator&&n.isBinaryExpression(t,{operator:\"**\"}))return t.left===e;if(i(e,t))return!0;if(o(e,t)||n.isUnaryLike(t)||n.isAwaitExpression(t))return!0;if(n.isBinary(t)){const r=t.operator,i=s[r],o=e.operator,a=s[o];if(i===a&&t.right===e&&!n.isLogicalExpression(t)||i>a)return!0}},t.IntersectionTypeAnnotation=t.UnionTypeAnnotation=function(e,t){return n.isArrayTypeAnnotation(t)||n.isNullableTypeAnnotation(t)||n.isIntersectionTypeAnnotation(t)||n.isUnionTypeAnnotation(t)},t.OptionalIndexedAccessType=function(e,t){return n.isIndexedAccessType(t,{objectType:e})},t.TSAsExpression=function(){return!0},t.TSTypeAssertion=function(){return!0},t.TSIntersectionType=t.TSUnionType=function(e,t){return n.isTSArrayType(t)||n.isTSOptionalType(t)||n.isTSIntersectionType(t)||n.isTSUnionType(t)||n.isTSRestType(t)},t.TSInferType=function(e,t){return n.isTSArrayType(t)||n.isTSOptionalType(t)},t.BinaryExpression=function(e,t){return\"in\"===e.operator&&(n.isVariableDeclarator(t)||n.isFor(t))},t.SequenceExpression=function(e,t){return!(n.isForStatement(t)||n.isThrowStatement(t)||n.isReturnStatement(t)||n.isIfStatement(t)&&t.test===e||n.isWhileStatement(t)&&t.test===e||n.isForInStatement(t)&&t.right===e||n.isSwitchStatement(t)&&t.discriminant===e||n.isExpressionStatement(t)&&t.expression===e)},t.AwaitExpression=t.YieldExpression=function(e,t){return n.isBinary(t)||n.isUnaryLike(t)||o(e,t)||n.isAwaitExpression(t)&&n.isYieldExpression(e)||n.isConditionalExpression(t)&&e===t.test||i(e,t)},t.ClassExpression=function(e,t,r){return c(r,{expressionStatement:!0,exportDefault:!0})},t.UnaryLike=a,t.FunctionExpression=function(e,t,r){return c(r,{expressionStatement:!0,exportDefault:!0})},t.ArrowFunctionExpression=function(e,t){return n.isExportDeclaration(t)||l(e,t)},t.ConditionalExpression=l,t.OptionalCallExpression=t.OptionalMemberExpression=function(e,t){return n.isCallExpression(t,{callee:e})||n.isMemberExpression(t,{object:e})},t.AssignmentExpression=function(e,t){return!!n.isObjectPattern(e.left)||l(e,t)},t.LogicalExpression=function(e,t){switch(e.operator){case\"||\":return!!n.isLogicalExpression(t)&&(\"??\"===t.operator||\"&&\"===t.operator);case\"&&\":return n.isLogicalExpression(t,{operator:\"??\"});case\"??\":return n.isLogicalExpression(t)&&\"??\"!==t.operator}},t.Identifier=function(e,t,r){if(\"let\"===e.name){const s=n.isMemberExpression(t,{object:e,computed:!0})||n.isOptionalMemberExpression(t,{object:e,computed:!0,optional:!1});return c(r,{expressionStatement:s,forHead:s,forInHead:s,forOfHead:!0})}return\"async\"===e.name&&n.isForOfStatement(t)&&e===t.left};var n=r(0);const s={\"||\":0,\"??\":0,\"&&\":1,\"|\":2,\"^\":3,\"&\":4,\"==\":5,\"===\":5,\"!=\":5,\"!==\":5,\"<\":6,\">\":6,\"<=\":6,\">=\":6,in:6,instanceof:6,\">>\":7,\"<<\":7,\">>>\":7,\"+\":8,\"-\":8,\"*\":9,\"/\":9,\"%\":9,\"**\":10},i=(e,t)=>(n.isClassDeclaration(t)||n.isClassExpression(t))&&t.superClass===e,o=(e,t)=>(n.isMemberExpression(t)||n.isOptionalMemberExpression(t))&&t.object===e||(n.isCallExpression(t)||n.isOptionalCallExpression(t)||n.isNewExpression(t))&&t.callee===e||n.isTaggedTemplateExpression(t)&&t.tag===e||n.isTSNonNullExpression(t);function a(e,t){return o(e,t)||n.isBinaryExpression(t,{operator:\"**\",left:e})||i(e,t)}function l(e,t){return!!(n.isUnaryLike(t)||n.isBinary(t)||n.isConditionalExpression(t,{test:e})||n.isAwaitExpression(t)||n.isTSTypeAssertion(t)||n.isTSAsExpression(t))||a(e,t)}function c(e,{expressionStatement:t=!1,arrowBody:r=!1,exportDefault:s=!1,forHead:i=!1,forInHead:a=!1,forOfHead:l=!1}){let c=e.length-1,u=e[c];c--;let p=e[c];for(;c>=0;){if(t&&n.isExpressionStatement(p,{expression:u})||s&&n.isExportDefaultDeclaration(p,{declaration:u})||r&&n.isArrowFunctionExpression(p,{body:u})||i&&n.isForStatement(p,{init:u})||a&&n.isForInStatement(p,{left:u})||l&&n.isForOfStatement(p,{left:u}))return!0;if(!(o(u,p)&&!n.isNewExpression(p)||n.isSequenceExpression(p)&&p.expressions[0]===u||n.isConditional(p,{test:u})||n.isBinary(p,{left:u})||n.isAssignmentExpression(p,{left:u})))return!1;u=p,c--,p=e[c]}return!1}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.typeParameters,e),this.print(e.quasi,e)},t.TemplateElement=function(e,t){const r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,s=(r?\"`\":\"}\")+e.value.raw+(n?\"`\":\"${\");this.token(s)},t.TemplateLiteral=function(e){const t=e.quasis;for(let r=0;r<t.length;r++)this.print(t[r],e),r+1<t.length&&this.print(e.expressions[r],e)},r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.UnaryExpression=function(e){\"void\"===e.operator||\"delete\"===e.operator||\"typeof\"===e.operator||\"throw\"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)},t.DoExpression=function(e){e.async&&(this.word(\"async\"),this.space()),this.word(\"do\"),this.space(),this.print(e.body,e)},t.ParenthesizedExpression=function(e){this.token(\"(\"),this.print(e.expression,e),this.token(\")\")},t.UpdateExpression=function(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.startTerminatorless(!0),this.print(e.argument,e),this.endTerminatorless(),this.token(e.operator))},t.ConditionalExpression=function(e){this.print(e.test,e),this.space(),this.token(\"?\"),this.space(),this.print(e.consequent,e),this.space(),this.token(\":\"),this.space(),this.print(e.alternate,e)},t.NewExpression=function(e,t){this.word(\"new\"),this.space(),this.print(e.callee,e),(!this.format.minified||0!==e.arguments.length||e.optional||n.isCallExpression(t,{callee:e})||n.isMemberExpression(t)||n.isNewExpression(t))&&(this.print(e.typeArguments,e),this.print(e.typeParameters,e),e.optional&&this.token(\"?.\"),this.token(\"(\"),this.printList(e.arguments,e),this.token(\")\"))},t.SequenceExpression=function(e){this.printList(e.expressions,e)},t.ThisExpression=function(){this.word(\"this\")},t.Super=function(){this.word(\"super\")},t.Decorator=function(e){this.token(\"@\"),this.print(e.expression,e),this.newline()},t.OptionalMemberExpression=function(e){if(this.print(e.object,e),!e.computed&&n.isMemberExpression(e.property))throw new TypeError(\"Got a MemberExpression for MemberExpression property\");let t=e.computed;n.isLiteral(e.property)&&\"number\"==typeof e.property.value&&(t=!0),e.optional&&this.token(\"?.\"),t?(this.token(\"[\"),this.print(e.property,e),this.token(\"]\")):(e.optional||this.token(\".\"),this.print(e.property,e))},t.OptionalCallExpression=function(e){this.print(e.callee,e),this.print(e.typeArguments,e),this.print(e.typeParameters,e),e.optional&&this.token(\"?.\"),this.token(\"(\"),this.printList(e.arguments,e),this.token(\")\")},t.CallExpression=function(e){this.print(e.callee,e),this.print(e.typeArguments,e),this.print(e.typeParameters,e),this.token(\"(\"),this.printList(e.arguments,e),this.token(\")\")},t.Import=function(){this.word(\"import\")},t.EmptyStatement=function(){this.semicolon(!0)},t.ExpressionStatement=function(e){this.print(e.expression,e),this.semicolon()},t.AssignmentPattern=function(e){this.print(e.left,e),e.left.optional&&this.token(\"?\"),this.print(e.left.typeAnnotation,e),this.space(),this.token(\"=\"),this.space(),this.print(e.right,e)},t.LogicalExpression=t.BinaryExpression=t.AssignmentExpression=function(e,t){const r=this.inForStatementInitCounter&&\"in\"===e.operator&&!s.needsParens(e,t);r&&this.token(\"(\"),this.print(e.left,e),this.space(),\"in\"===e.operator||\"instanceof\"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(\")\")},t.BindExpression=function(e){this.print(e.object,e),this.token(\"::\"),this.print(e.callee,e)},t.MemberExpression=function(e){if(this.print(e.object,e),!e.computed&&n.isMemberExpression(e.property))throw new TypeError(\"Got a MemberExpression for MemberExpression property\");let t=e.computed;n.isLiteral(e.property)&&\"number\"==typeof e.property.value&&(t=!0),t?(this.token(\"[\"),this.print(e.property,e),this.token(\"]\")):(this.token(\".\"),this.print(e.property,e))},t.MetaProperty=function(e){this.print(e.meta,e),this.token(\".\"),this.print(e.property,e)},t.PrivateName=function(e){this.token(\"#\"),this.print(e.id,e)},t.V8IntrinsicIdentifier=function(e){this.token(\"%\"),this.word(e.name)},t.ModuleExpression=function(e){this.word(\"module\"),this.space(),this.token(\"{\"),0===e.body.body.length?this.token(\"}\"):(this.newline(),this.printSequence(e.body.body,e,{indent:!0}),this.rightBrace())},t.AwaitExpression=t.YieldExpression=void 0;var n=r(0),s=r(233);function i(e){return function(t){if(this.word(e),t.delegate&&this.token(\"*\"),t.argument){this.space();const e=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(e)}}}const o=i(\"yield\");t.YieldExpression=o;const a=i(\"await\");t.AwaitExpression=a},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.WithStatement=function(e){this.word(\"with\"),this.space(),this.token(\"(\"),this.print(e.object,e),this.token(\")\"),this.printBlock(e)},t.IfStatement=function(e){this.word(\"if\"),this.space(),this.token(\"(\"),this.print(e.test,e),this.token(\")\"),this.space();const t=e.alternate&&n.isIfStatement(s(e.consequent));t&&(this.token(\"{\"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token(\"}\")),e.alternate&&(this.endsWith(\"}\")&&this.space(),this.word(\"else\"),this.space(),this.printAndIndentOnComments(e.alternate,e))},t.ForStatement=function(e){this.word(\"for\"),this.space(),this.token(\"(\"),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(\";\"),e.test&&(this.space(),this.print(e.test,e)),this.token(\";\"),e.update&&(this.space(),this.print(e.update,e)),this.token(\")\"),this.printBlock(e)},t.WhileStatement=function(e){this.word(\"while\"),this.space(),this.token(\"(\"),this.print(e.test,e),this.token(\")\"),this.printBlock(e)},t.DoWhileStatement=function(e){this.word(\"do\"),this.space(),this.print(e.body,e),this.space(),this.word(\"while\"),this.space(),this.token(\"(\"),this.print(e.test,e),this.token(\")\"),this.semicolon()},t.LabeledStatement=function(e){this.print(e.label,e),this.token(\":\"),this.space(),this.print(e.body,e)},t.TryStatement=function(e){this.word(\"try\"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word(\"finally\"),this.space(),this.print(e.finalizer,e))},t.CatchClause=function(e){this.word(\"catch\"),this.space(),e.param&&(this.token(\"(\"),this.print(e.param,e),this.print(e.param.typeAnnotation,e),this.token(\")\"),this.space()),this.print(e.body,e)},t.SwitchStatement=function(e){this.word(\"switch\"),this.space(),this.token(\"(\"),this.print(e.discriminant,e),this.token(\")\"),this.space(),this.token(\"{\"),this.printSequence(e.cases,e,{indent:!0,addNewlines(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token(\"}\")},t.SwitchCase=function(e){e.test?(this.word(\"case\"),this.space(),this.print(e.test,e),this.token(\":\")):(this.word(\"default\"),this.token(\":\")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))},t.DebuggerStatement=function(){this.word(\"debugger\"),this.semicolon()},t.VariableDeclaration=function(e,t){e.declare&&(this.word(\"declare\"),this.space()),this.word(e.kind),this.space();let r,s=!1;if(!n.isFor(t))for(const t of e.declarations)t.init&&(s=!0);if(s&&(r=\"const\"===e.kind?h:d),this.printList(e.declarations,e,{separator:r}),n.isFor(t))if(n.isForStatement(t)){if(t.init===e)return}else if(t.left===e)return;this.semicolon()},t.VariableDeclarator=function(e){this.print(e.id,e),e.definite&&this.token(\"!\"),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token(\"=\"),this.space(),this.print(e.init,e))},t.ThrowStatement=t.BreakStatement=t.ReturnStatement=t.ContinueStatement=t.ForOfStatement=t.ForInStatement=void 0;var n=r(0);function s(e){return n.isStatement(e.body)?s(e.body):e}const i=function(e){return function(t){this.word(\"for\"),this.space(),\"of\"===e&&t.await&&(this.word(\"await\"),this.space()),this.token(\"(\"),this.print(t.left,t),this.space(),this.word(e),this.space(),this.print(t.right,t),this.token(\")\"),this.printBlock(t)}},o=i(\"in\");t.ForInStatement=o;const a=i(\"of\");function l(e,t=\"label\"){return function(r){this.word(e);const n=r[t];if(n){this.space();const e=\"label\"==t,s=this.startTerminatorless(e);this.print(n,r),this.endTerminatorless(s)}this.semicolon()}}t.ForOfStatement=a;const c=l(\"continue\");t.ContinueStatement=c;const u=l(\"return\",\"argument\");t.ReturnStatement=u;const p=l(\"break\");t.BreakStatement=p;const f=l(\"throw\",\"argument\");function d(){if(this.token(\",\"),this.newline(),this.endsWith(\"\\n\"))for(let e=0;e<4;e++)this.space(!0)}function h(){if(this.token(\",\"),this.newline(),this.endsWith(\"\\n\"))for(let e=0;e<6;e++)this.space(!0)}t.ThrowStatement=f},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ClassExpression=t.ClassDeclaration=function(e,t){this.format.decoratorsBeforeExport&&(n.isExportDefaultDeclaration(t)||n.isExportNamedDeclaration(t))||this.printJoin(e.decorators,e),e.declare&&(this.word(\"declare\"),this.space()),e.abstract&&(this.word(\"abstract\"),this.space()),this.word(\"class\"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word(\"extends\"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word(\"implements\"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)},t.ClassBody=function(e){this.token(\"{\"),this.printInnerComments(e),0===e.body.length?this.token(\"}\"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith(\"\\n\")||this.newline(),this.rightBrace())},t.ClassProperty=function(e){this.printJoin(e.decorators,e),this.source(\"end\",e.key.loc),this.tsPrintClassMemberModifiers(e,!0),e.computed?(this.token(\"[\"),this.print(e.key,e),this.token(\"]\")):(this._variance(e),this.print(e.key,e)),e.optional&&this.token(\"?\"),e.definite&&this.token(\"!\"),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token(\"=\"),this.space(),this.print(e.value,e)),this.semicolon()},t.ClassPrivateProperty=function(e){this.printJoin(e.decorators,e),e.static&&(this.word(\"static\"),this.space()),this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token(\"=\"),this.space(),this.print(e.value,e)),this.semicolon()},t.ClassMethod=function(e){this._classMethodHead(e),this.space(),this.print(e.body,e)},t.ClassPrivateMethod=function(e){this._classMethodHead(e),this.space(),this.print(e.body,e)},t._classMethodHead=function(e){this.printJoin(e.decorators,e),this.source(\"end\",e.key.loc),this.tsPrintClassMemberModifiers(e,!1),this._methodHead(e)},t.StaticBlock=function(e){this.word(\"static\"),this.space(),this.token(\"{\"),0===e.body.length?this.token(\"}\"):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.rightBrace())};var n=r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t._params=function(e){this.print(e.typeParameters,e),this.token(\"(\"),this._parameters(e.params,e),this.token(\")\"),this.print(e.returnType,e)},t._parameters=function(e,t){for(let r=0;r<e.length;r++)this._param(e[r],t),r<e.length-1&&(this.token(\",\"),this.space())},t._param=function(e,t){this.printJoin(e.decorators,e),this.print(e,t),e.optional&&this.token(\"?\"),this.print(e.typeAnnotation,e)},t._methodHead=function(e){const t=e.kind,r=e.key;\"get\"!==t&&\"set\"!==t||(this.word(t),this.space()),e.async&&(this._catchUp(\"start\",r.loc),this.word(\"async\"),this.space()),\"method\"!==t&&\"init\"!==t||e.generator&&this.token(\"*\"),e.computed?(this.token(\"[\"),this.print(r,e),this.token(\"]\")):this.print(r,e),e.optional&&this.token(\"?\"),this._params(e)},t._predicate=function(e){e.predicate&&(e.returnType||this.token(\":\"),this.space(),this.print(e.predicate,e))},t._functionHead=function(e){e.async&&(this.word(\"async\"),this.space()),this.word(\"function\"),e.generator&&this.token(\"*\"),this.space(),e.id&&this.print(e.id,e),this._params(e),this._predicate(e)},t.FunctionDeclaration=t.FunctionExpression=function(e){this._functionHead(e),this.space(),this.print(e.body,e)},t.ArrowFunctionExpression=function(e){e.async&&(this.word(\"async\"),this.space());const t=e.params[0];this.format.retainLines||this.format.auxiliaryCommentBefore||this.format.auxiliaryCommentAfter||1!==e.params.length||!n.isIdentifier(t)||function(e,t){var r,n;return!!(e.typeParameters||e.returnType||e.predicate||t.typeAnnotation||t.optional||null!=(r=t.leadingComments)&&r.length||null!=(n=t.trailingComments)&&n.length)}(e,t)?this._params(e):this.print(t,e),this._predicate(e),this.space(),this.token(\"=>\"),this.space(),this.print(e.body,e)};var n=r(0)},(e,t)=>{\"use strict\";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=l(e),o=i[0],a=i[1],c=new s(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),u=0,p=a>0?o-4:o;for(r=0;r<p;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,s=n%3,i=[],o=16383,a=0,l=n-s;a<l;a+=o)i.push(c(e,a,a+o>l?l:a+o));return 1===s?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+\"==\")):2===s&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+\"=\")),i.join(\"\")};for(var r=[],n=[],s=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",o=0,a=i.length;o<a;++o)r[o]=i[o],n[i.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var s,i,o=[],a=t;a<n;a+=3)s=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(i=s)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join(\"\")}n[\"-\".charCodeAt(0)]=62,n[\"_\".charCodeAt(0)]=63},(e,t)=>{\n  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */t.read=function(e,t,r,n,s){var i,o,a=8*s-n-1,l=(1<<a)-1,c=l>>1,u=-7,p=r?s-1:0,f=r?-1:1,d=e[t+p];for(p+=f,i=d&(1<<-u)-1,d>>=-u,u+=a;u>0;i=256*i+e[t+p],p+=f,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+e[t+p],p+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),i-=c}return(d?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,s,i){var o,a,l,c=8*i-s-1,u=(1<<c)-1,p=u>>1,f=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+p>=1?f/l:f*Math.pow(2,1-p))*l>=2&&(o++,l/=2),o+p>=u?(a=0,o=u):o+p>=1?(a=(t*l-1)*Math.pow(2,s),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,s),o=0));s>=8;e[r+d]=255&a,d+=h,a/=256,s-=8);for(o=o<<s|a,c+=s;c>0;e[r+d]=255&o,d+=h,o/=256,c-=8);e[r+d-h]|=128*m}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.AnyTypeAnnotation=function(){this.word(\"any\")},t.ArrayTypeAnnotation=function(e){this.print(e.elementType,e),this.token(\"[\"),this.token(\"]\")},t.BooleanTypeAnnotation=function(){this.word(\"boolean\")},t.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?\"true\":\"false\")},t.NullLiteralTypeAnnotation=function(){this.word(\"null\")},t.DeclareClass=function(e,t){n.isDeclareExportDeclaration(t)||(this.word(\"declare\"),this.space()),this.word(\"class\"),this.space(),this._interfaceish(e)},t.DeclareFunction=function(e,t){n.isDeclareExportDeclaration(t)||(this.word(\"declare\"),this.space()),this.word(\"function\"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),e.predicate&&(this.space(),this.print(e.predicate,e)),this.semicolon()},t.InferredPredicate=function(){this.token(\"%\"),this.word(\"checks\")},t.DeclaredPredicate=function(e){this.token(\"%\"),this.word(\"checks\"),this.token(\"(\"),this.print(e.value,e),this.token(\")\")},t.DeclareInterface=function(e){this.word(\"declare\"),this.space(),this.InterfaceDeclaration(e)},t.DeclareModule=function(e){this.word(\"declare\"),this.space(),this.word(\"module\"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)},t.DeclareModuleExports=function(e){this.word(\"declare\"),this.space(),this.word(\"module\"),this.token(\".\"),this.word(\"exports\"),this.print(e.typeAnnotation,e)},t.DeclareTypeAlias=function(e){this.word(\"declare\"),this.space(),this.TypeAlias(e)},t.DeclareOpaqueType=function(e,t){n.isDeclareExportDeclaration(t)||(this.word(\"declare\"),this.space()),this.OpaqueType(e)},t.DeclareVariable=function(e,t){n.isDeclareExportDeclaration(t)||(this.word(\"declare\"),this.space()),this.word(\"var\"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()},t.DeclareExportDeclaration=function(e){this.word(\"declare\"),this.space(),this.word(\"export\"),this.space(),e.default&&(this.word(\"default\"),this.space()),c.apply(this,arguments)},t.DeclareExportAllDeclaration=function(){this.word(\"declare\"),this.space(),s.ExportAllDeclaration.apply(this,arguments)},t.EnumDeclaration=function(e){const{id:t,body:r}=e;this.word(\"enum\"),this.space(),this.print(t,e),this.print(r,e)},t.EnumBooleanBody=function(e){const{explicitType:t}=e;o(this,\"boolean\",t),a(this,e)},t.EnumNumberBody=function(e){const{explicitType:t}=e;o(this,\"number\",t),a(this,e)},t.EnumStringBody=function(e){const{explicitType:t}=e;o(this,\"string\",t),a(this,e)},t.EnumSymbolBody=function(e){o(this,\"symbol\",!0),a(this,e)},t.EnumDefaultedMember=function(e){const{id:t}=e;this.print(t,e),this.token(\",\")},t.EnumBooleanMember=function(e){l(this,e)},t.EnumNumberMember=function(e){l(this,e)},t.EnumStringMember=function(e){l(this,e)},t.ExistsTypeAnnotation=function(){this.token(\"*\")},t.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters,e),this.token(\"(\"),e.this&&(this.word(\"this\"),this.token(\":\"),this.space(),this.print(e.this.typeAnnotation,e),(e.params.length||e.rest)&&(this.token(\",\"),this.space())),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(\",\"),this.space()),this.token(\"...\"),this.print(e.rest,e)),this.token(\")\"),\"ObjectTypeCallProperty\"===t.type||\"DeclareFunction\"===t.type||\"ObjectTypeProperty\"===t.type&&t.method?this.token(\":\"):(this.space(),this.token(\"=>\")),this.space(),this.print(e.returnType,e)},t.FunctionTypeParam=function(e){this.print(e.name,e),e.optional&&this.token(\"?\"),e.name&&(this.token(\":\"),this.space()),this.print(e.typeAnnotation,e)},t.GenericTypeAnnotation=t.ClassImplements=t.InterfaceExtends=function(e){this.print(e.id,e),this.print(e.typeParameters,e)},t._interfaceish=function(e){var t;this.print(e.id,e),this.print(e.typeParameters,e),null!=(t=e.extends)&&t.length&&(this.space(),this.word(\"extends\"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word(\"mixins\"),this.space(),this.printList(e.mixins,e)),e.implements&&e.implements.length&&(this.space(),this.word(\"implements\"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)},t._variance=function(e){e.variance&&(\"plus\"===e.variance.kind?this.token(\"+\"):\"minus\"===e.variance.kind&&this.token(\"-\"))},t.InterfaceDeclaration=function(e){this.word(\"interface\"),this.space(),this._interfaceish(e)},t.InterfaceTypeAnnotation=function(e){this.word(\"interface\"),e.extends&&e.extends.length&&(this.space(),this.word(\"extends\"),this.space(),this.printList(e.extends,e)),this.space(),this.print(e.body,e)},t.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:u})},t.MixedTypeAnnotation=function(){this.word(\"mixed\")},t.EmptyTypeAnnotation=function(){this.word(\"empty\")},t.NullableTypeAnnotation=function(e){this.token(\"?\"),this.print(e.typeAnnotation,e)},t.NumberTypeAnnotation=function(){this.word(\"number\")},t.StringTypeAnnotation=function(){this.word(\"string\")},t.ThisTypeAnnotation=function(){this.word(\"this\")},t.TupleTypeAnnotation=function(e){this.token(\"[\"),this.printList(e.types,e),this.token(\"]\")},t.TypeofTypeAnnotation=function(e){this.word(\"typeof\"),this.space(),this.print(e.argument,e)},t.TypeAlias=function(e){this.word(\"type\"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token(\"=\"),this.space(),this.print(e.right,e),this.semicolon()},t.TypeAnnotation=function(e){this.token(\":\"),this.space(),e.optional&&this.token(\"?\"),this.print(e.typeAnnotation,e)},t.TypeParameterDeclaration=t.TypeParameterInstantiation=function(e){this.token(\"<\"),this.printList(e.params,e,{}),this.token(\">\")},t.TypeParameter=function(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token(\"=\"),this.space(),this.print(e.default,e))},t.OpaqueType=function(e){this.word(\"opaque\"),this.space(),this.word(\"type\"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(\":\"),this.space(),this.print(e.supertype,e)),e.impltype&&(this.space(),this.token(\"=\"),this.space(),this.print(e.impltype,e)),this.semicolon()},t.ObjectTypeAnnotation=function(e){e.exact?this.token(\"{|\"):this.token(\"{\");const t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.space(),this.printJoin(t,e,{addNewlines(e){if(e&&!t[0])return 1},indent:!0,statement:!0,iterator:()=>{(1!==t.length||e.inexact)&&(this.token(\",\"),this.space())}}),this.space()),e.inexact&&(this.indent(),this.token(\"...\"),t.length&&this.newline(),this.dedent()),e.exact?this.token(\"|}\"):this.token(\"}\")},t.ObjectTypeInternalSlot=function(e){e.static&&(this.word(\"static\"),this.space()),this.token(\"[\"),this.token(\"[\"),this.print(e.id,e),this.token(\"]\"),this.token(\"]\"),e.optional&&this.token(\"?\"),e.method||(this.token(\":\"),this.space()),this.print(e.value,e)},t.ObjectTypeCallProperty=function(e){e.static&&(this.word(\"static\"),this.space()),this.print(e.value,e)},t.ObjectTypeIndexer=function(e){e.static&&(this.word(\"static\"),this.space()),this._variance(e),this.token(\"[\"),e.id&&(this.print(e.id,e),this.token(\":\"),this.space()),this.print(e.key,e),this.token(\"]\"),this.token(\":\"),this.space(),this.print(e.value,e)},t.ObjectTypeProperty=function(e){e.proto&&(this.word(\"proto\"),this.space()),e.static&&(this.word(\"static\"),this.space()),\"get\"!==e.kind&&\"set\"!==e.kind||(this.word(e.kind),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token(\"?\"),e.method||(this.token(\":\"),this.space()),this.print(e.value,e)},t.ObjectTypeSpreadProperty=function(e){this.token(\"...\"),this.print(e.argument,e)},t.QualifiedTypeIdentifier=function(e){this.print(e.qualification,e),this.token(\".\"),this.print(e.id,e)},t.SymbolTypeAnnotation=function(){this.word(\"symbol\")},t.UnionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:p})},t.TypeCastExpression=function(e){this.token(\"(\"),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(\")\")},t.Variance=function(e){\"plus\"===e.kind?this.token(\"+\"):this.token(\"-\")},t.VoidTypeAnnotation=function(){this.word(\"void\")},t.IndexedAccessType=function(e){this.print(e.objectType,e),this.token(\"[\"),this.print(e.indexType,e),this.token(\"]\")},t.OptionalIndexedAccessType=function(e){this.print(e.objectType,e),e.optional&&this.token(\"?.\"),this.token(\"[\"),this.print(e.indexType,e),this.token(\"]\")},Object.defineProperty(t,\"NumberLiteralTypeAnnotation\",{enumerable:!0,get:function(){return i.NumericLiteral}}),Object.defineProperty(t,\"StringLiteralTypeAnnotation\",{enumerable:!0,get:function(){return i.StringLiteral}});var n=r(0),s=r(234),i=r(235);function o(e,t,r){r&&(e.space(),e.word(\"of\"),e.space(),e.word(t)),e.space()}function a(e,t){const{members:r}=t;e.token(\"{\"),e.indent(),e.newline();for(const n of r)e.print(n,t),e.newline();t.hasUnknownMembers&&(e.token(\"...\"),e.newline()),e.dedent(),e.token(\"}\")}function l(e,t){const{id:r,init:n}=t;e.print(r,t),e.space(),e.token(\"=\"),e.space(),e.print(n,t),e.token(\",\")}function c(e){if(e.declaration){const t=e.declaration;this.print(t,e),n.isStatement(t)||this.semicolon()}else this.token(\"{\"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token(\"}\"),e.source&&(this.space(),this.word(\"from\"),this.space(),this.print(e.source,e)),this.semicolon()}function u(){this.space(),this.token(\"&\"),this.space()}function p(){this.space(),this.token(\"|\"),this.space()}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.File=function(e){e.program&&this.print(e.program.interpreter,e),this.print(e.program,e)},t.Program=function(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline(),this.printSequence(e.body,e)},t.BlockStatement=function(e){var t;this.token(\"{\"),this.printInnerComments(e);const r=null==(t=e.directives)?void 0:t.length;e.body.length||r?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),r&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source(\"end\",e.loc),this.endsWith(\"\\n\")||this.newline(),this.rightBrace()):(this.source(\"end\",e.loc),this.token(\"}\"))},t.Directive=function(e){this.print(e.value,e),this.semicolon()},t.DirectiveLiteral=function(e){const t=this.getPossibleRaw(e);if(null!=t)return void this.token(t);const{value:r}=e;if(s.test(r)){if(n.test(r))throw new Error(\"Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.\");this.token(`'${r}'`)}else this.token(`\"${r}\"`)},t.InterpreterDirective=function(e){this.token(`#!${e.value}\\n`)},t.Placeholder=function(e){this.token(\"%%\"),this.print(e.name),this.token(\"%%\"),\"Statement\"===e.expectedNode&&this.semicolon()},r(0);const n=/(?:^|[^\\\\])(?:\\\\\\\\)*'/,s=/(?:^|[^\\\\])(?:\\\\\\\\)*\"/},(e,t,r)=>{\"use strict\";function n(){this.space()}Object.defineProperty(t,\"__esModule\",{value:!0}),t.JSXAttribute=function(e){this.print(e.name,e),e.value&&(this.token(\"=\"),this.print(e.value,e))},t.JSXIdentifier=function(e){this.word(e.name)},t.JSXNamespacedName=function(e){this.print(e.namespace,e),this.token(\":\"),this.print(e.name,e)},t.JSXMemberExpression=function(e){this.print(e.object,e),this.token(\".\"),this.print(e.property,e)},t.JSXSpreadAttribute=function(e){this.token(\"{\"),this.token(\"...\"),this.print(e.argument,e),this.token(\"}\")},t.JSXExpressionContainer=function(e){this.token(\"{\"),this.print(e.expression,e),this.token(\"}\")},t.JSXSpreadChild=function(e){this.token(\"{\"),this.token(\"...\"),this.print(e.expression,e),this.token(\"}\")},t.JSXText=function(e){const t=this.getPossibleRaw(e);null!=t?this.token(t):this.token(e.value)},t.JSXElement=function(e){const t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();for(const t of e.children)this.print(t,e);this.dedent(),this.print(e.closingElement,e)}},t.JSXOpeningElement=function(e){this.token(\"<\"),this.print(e.name,e),this.print(e.typeParameters,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:n})),e.selfClosing?(this.space(),this.token(\"/>\")):this.token(\">\")},t.JSXClosingElement=function(e){this.token(\"</\"),this.print(e.name,e),this.token(\">\")},t.JSXEmptyExpression=function(e){this.printInnerComments(e)},t.JSXFragment=function(e){this.print(e.openingFragment,e),this.indent();for(const t of e.children)this.print(t,e);this.dedent(),this.print(e.closingFragment,e)},t.JSXOpeningFragment=function(){this.token(\"<\"),this.token(\">\")},t.JSXClosingFragment=function(){this.token(\"</\"),this.token(\">\")},r(0)},(e,t,r)=>{\"use strict\";function n(e,t){!0!==t&&e.token(t)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.TSTypeAnnotation=function(e){this.token(\":\"),this.space(),e.optional&&this.token(\"?\"),this.print(e.typeAnnotation,e)},t.TSTypeParameterDeclaration=t.TSTypeParameterInstantiation=function(e){this.token(\"<\"),this.printList(e.params,e,{}),this.token(\">\")},t.TSTypeParameter=function(e){this.word(e.name),e.constraint&&(this.space(),this.word(\"extends\"),this.space(),this.print(e.constraint,e)),e.default&&(this.space(),this.token(\"=\"),this.space(),this.print(e.default,e))},t.TSParameterProperty=function(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word(\"readonly\"),this.space()),this._param(e.parameter)},t.TSDeclareFunction=function(e){e.declare&&(this.word(\"declare\"),this.space()),this._functionHead(e),this.token(\";\")},t.TSDeclareMethod=function(e){this._classMethodHead(e),this.token(\";\")},t.TSQualifiedName=function(e){this.print(e.left,e),this.token(\".\"),this.print(e.right,e)},t.TSCallSignatureDeclaration=function(e){this.tsPrintSignatureDeclarationBase(e),this.token(\";\")},t.TSConstructSignatureDeclaration=function(e){this.word(\"new\"),this.space(),this.tsPrintSignatureDeclarationBase(e),this.token(\";\")},t.TSPropertySignature=function(e){const{readonly:t,initializer:r}=e;t&&(this.word(\"readonly\"),this.space()),this.tsPrintPropertyOrMethodName(e),this.print(e.typeAnnotation,e),r&&(this.space(),this.token(\"=\"),this.space(),this.print(r,e)),this.token(\";\")},t.tsPrintPropertyOrMethodName=function(e){e.computed&&this.token(\"[\"),this.print(e.key,e),e.computed&&this.token(\"]\"),e.optional&&this.token(\"?\")},t.TSMethodSignature=function(e){const{kind:t}=e;\"set\"!==t&&\"get\"!==t||(this.word(t),this.space()),this.tsPrintPropertyOrMethodName(e),this.tsPrintSignatureDeclarationBase(e),this.token(\";\")},t.TSIndexSignature=function(e){const{readonly:t,static:r}=e;r&&(this.word(\"static\"),this.space()),t&&(this.word(\"readonly\"),this.space()),this.token(\"[\"),this._parameters(e.parameters,e),this.token(\"]\"),this.print(e.typeAnnotation,e),this.token(\";\")},t.TSAnyKeyword=function(){this.word(\"any\")},t.TSBigIntKeyword=function(){this.word(\"bigint\")},t.TSUnknownKeyword=function(){this.word(\"unknown\")},t.TSNumberKeyword=function(){this.word(\"number\")},t.TSObjectKeyword=function(){this.word(\"object\")},t.TSBooleanKeyword=function(){this.word(\"boolean\")},t.TSStringKeyword=function(){this.word(\"string\")},t.TSSymbolKeyword=function(){this.word(\"symbol\")},t.TSVoidKeyword=function(){this.word(\"void\")},t.TSUndefinedKeyword=function(){this.word(\"undefined\")},t.TSNullKeyword=function(){this.word(\"null\")},t.TSNeverKeyword=function(){this.word(\"never\")},t.TSIntrinsicKeyword=function(){this.word(\"intrinsic\")},t.TSThisType=function(){this.word(\"this\")},t.TSFunctionType=function(e){this.tsPrintFunctionOrConstructorType(e)},t.TSConstructorType=function(e){e.abstract&&(this.word(\"abstract\"),this.space()),this.word(\"new\"),this.space(),this.tsPrintFunctionOrConstructorType(e)},t.tsPrintFunctionOrConstructorType=function(e){const{typeParameters:t,parameters:r}=e;this.print(t,e),this.token(\"(\"),this._parameters(r,e),this.token(\")\"),this.space(),this.token(\"=>\"),this.space(),this.print(e.typeAnnotation.typeAnnotation,e)},t.TSTypeReference=function(e){this.print(e.typeName,e),this.print(e.typeParameters,e)},t.TSTypePredicate=function(e){e.asserts&&(this.word(\"asserts\"),this.space()),this.print(e.parameterName),e.typeAnnotation&&(this.space(),this.word(\"is\"),this.space(),this.print(e.typeAnnotation.typeAnnotation))},t.TSTypeQuery=function(e){this.word(\"typeof\"),this.space(),this.print(e.exprName)},t.TSTypeLiteral=function(e){this.tsPrintTypeLiteralOrInterfaceBody(e.members,e)},t.tsPrintTypeLiteralOrInterfaceBody=function(e,t){this.tsPrintBraced(e,t)},t.tsPrintBraced=function(e,t){if(this.token(\"{\"),e.length){this.indent(),this.newline();for(const r of e)this.print(r,t),this.newline();this.dedent(),this.rightBrace()}else this.token(\"}\")},t.TSArrayType=function(e){this.print(e.elementType,e),this.token(\"[]\")},t.TSTupleType=function(e){this.token(\"[\"),this.printList(e.elementTypes,e),this.token(\"]\")},t.TSOptionalType=function(e){this.print(e.typeAnnotation,e),this.token(\"?\")},t.TSRestType=function(e){this.token(\"...\"),this.print(e.typeAnnotation,e)},t.TSNamedTupleMember=function(e){this.print(e.label,e),e.optional&&this.token(\"?\"),this.token(\":\"),this.space(),this.print(e.elementType,e)},t.TSUnionType=function(e){this.tsPrintUnionOrIntersectionType(e,\"|\")},t.TSIntersectionType=function(e){this.tsPrintUnionOrIntersectionType(e,\"&\")},t.tsPrintUnionOrIntersectionType=function(e,t){this.printJoin(e.types,e,{separator(){this.space(),this.token(t),this.space()}})},t.TSConditionalType=function(e){this.print(e.checkType),this.space(),this.word(\"extends\"),this.space(),this.print(e.extendsType),this.space(),this.token(\"?\"),this.space(),this.print(e.trueType),this.space(),this.token(\":\"),this.space(),this.print(e.falseType)},t.TSInferType=function(e){this.token(\"infer\"),this.space(),this.print(e.typeParameter)},t.TSParenthesizedType=function(e){this.token(\"(\"),this.print(e.typeAnnotation,e),this.token(\")\")},t.TSTypeOperator=function(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation,e)},t.TSIndexedAccessType=function(e){this.print(e.objectType,e),this.token(\"[\"),this.print(e.indexType,e),this.token(\"]\")},t.TSMappedType=function(e){const{nameType:t,optional:r,readonly:s,typeParameter:i}=e;this.token(\"{\"),this.space(),s&&(n(this,s),this.word(\"readonly\"),this.space()),this.token(\"[\"),this.word(i.name),this.space(),this.word(\"in\"),this.space(),this.print(i.constraint,i),t&&(this.space(),this.word(\"as\"),this.space(),this.print(t,e)),this.token(\"]\"),r&&(n(this,r),this.token(\"?\")),this.token(\":\"),this.space(),this.print(e.typeAnnotation,e),this.space(),this.token(\"}\")},t.TSLiteralType=function(e){this.print(e.literal,e)},t.TSExpressionWithTypeArguments=function(e){this.print(e.expression,e),this.print(e.typeParameters,e)},t.TSInterfaceDeclaration=function(e){const{declare:t,id:r,typeParameters:n,extends:s,body:i}=e;t&&(this.word(\"declare\"),this.space()),this.word(\"interface\"),this.space(),this.print(r,e),this.print(n,e),null!=s&&s.length&&(this.space(),this.word(\"extends\"),this.space(),this.printList(s,e)),this.space(),this.print(i,e)},t.TSInterfaceBody=function(e){this.tsPrintTypeLiteralOrInterfaceBody(e.body,e)},t.TSTypeAliasDeclaration=function(e){const{declare:t,id:r,typeParameters:n,typeAnnotation:s}=e;t&&(this.word(\"declare\"),this.space()),this.word(\"type\"),this.space(),this.print(r,e),this.print(n,e),this.space(),this.token(\"=\"),this.space(),this.print(s,e),this.token(\";\")},t.TSAsExpression=function(e){const{expression:t,typeAnnotation:r}=e;this.print(t,e),this.space(),this.word(\"as\"),this.space(),this.print(r,e)},t.TSTypeAssertion=function(e){const{typeAnnotation:t,expression:r}=e;this.token(\"<\"),this.print(t,e),this.token(\">\"),this.space(),this.print(r,e)},t.TSEnumDeclaration=function(e){const{declare:t,const:r,id:n,members:s}=e;t&&(this.word(\"declare\"),this.space()),r&&(this.word(\"const\"),this.space()),this.word(\"enum\"),this.space(),this.print(n,e),this.space(),this.tsPrintBraced(s,e)},t.TSEnumMember=function(e){const{id:t,initializer:r}=e;this.print(t,e),r&&(this.space(),this.token(\"=\"),this.space(),this.print(r,e)),this.token(\",\")},t.TSModuleDeclaration=function(e){const{declare:t,id:r}=e;if(t&&(this.word(\"declare\"),this.space()),e.global||(this.word(\"Identifier\"===r.type?\"namespace\":\"module\"),this.space()),this.print(r,e),!e.body)return void this.token(\";\");let n=e.body;for(;\"TSModuleDeclaration\"===n.type;)this.token(\".\"),this.print(n.id,n),n=n.body;this.space(),this.print(n,e)},t.TSModuleBlock=function(e){this.tsPrintBraced(e.body,e)},t.TSImportType=function(e){const{argument:t,qualifier:r,typeParameters:n}=e;this.word(\"import\"),this.token(\"(\"),this.print(t,e),this.token(\")\"),r&&(this.token(\".\"),this.print(r,e)),n&&this.print(n,e)},t.TSImportEqualsDeclaration=function(e){const{isExport:t,id:r,moduleReference:n}=e;t&&(this.word(\"export\"),this.space()),this.word(\"import\"),this.space(),this.print(r,e),this.space(),this.token(\"=\"),this.space(),this.print(n,e),this.token(\";\")},t.TSExternalModuleReference=function(e){this.token(\"require(\"),this.print(e.expression,e),this.token(\")\")},t.TSNonNullExpression=function(e){this.print(e.expression,e),this.token(\"!\")},t.TSExportAssignment=function(e){this.word(\"export\"),this.space(),this.token(\"=\"),this.space(),this.print(e.expression,e),this.token(\";\")},t.TSNamespaceExportDeclaration=function(e){this.word(\"export\"),this.space(),this.word(\"as\"),this.space(),this.word(\"namespace\"),this.space(),this.print(e.id,e)},t.tsPrintSignatureDeclarationBase=function(e){const{typeParameters:t,parameters:r}=e;this.print(t,e),this.token(\"(\"),this._parameters(r,e),this.token(\")\"),this.print(e.typeAnnotation,e)},t.tsPrintClassMemberModifiers=function(e,t){t&&e.declare&&(this.word(\"declare\"),this.space()),e.accessibility&&(this.word(e.accessibility),this.space()),e.static&&(this.word(\"static\"),this.space()),e.override&&(this.word(\"override\"),this.space()),e.abstract&&(this.word(\"abstract\"),this.space()),t&&e.readonly&&(this.word(\"readonly\"),this.space())},r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.findParent=function(e){let t=this;for(;t=t.parentPath;)if(e(t))return t;return null},t.find=function(e){let t=this;do{if(e(t))return t}while(t=t.parentPath);return null},t.getFunctionParent=function(){return this.findParent((e=>e.isFunction()))},t.getStatementParent=function(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error(\"File/Program node, we can't possibly find a statement parent to this\");return e},t.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,(function(e,t,r){let s;const i=n.VISITOR_KEYS[e.type];for(const e of r){const r=e[t+1];s?(r.listKey&&s.listKey===r.listKey&&r.key<s.key||i.indexOf(s.parentKey)>i.indexOf(r.parentKey))&&(s=r):s=r}return s}))},t.getDeepestCommonAncestorFrom=function(e,t){if(!e.length)return this;if(1===e.length)return e[0];let r,n,s=1/0;const i=e.map((e=>{const t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==this);return t.length<s&&(s=t.length),t})),o=i[0];e:for(let e=0;e<s;e++){const t=o[e];for(const r of i)if(r[e]!==t)break e;r=e,n=t}if(n)return t?t(n,r,i):n;throw new Error(\"Couldn't find intersection\")},t.getAncestry=function(){let e=this;const t=[];do{t.push(e)}while(e=e.parentPath);return t},t.isAncestor=function(e){return e.isDescendant(this)},t.isDescendant=function(e){return!!this.findParent((t=>t===e))},t.inType=function(...e){let t=this;for(;t;){for(const r of e)if(t.node.type===r)return!0;t=t.parentPath}return!1};var n=r(0);r(19)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.getTypeAnnotation=function(){if(this.typeAnnotation)return this.typeAnnotation;let e=this._getTypeAnnotation()||s.anyTypeAnnotation();return s.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e},t._getTypeAnnotation=function(){const e=this.node;if(e){if(e.typeAnnotation)return e.typeAnnotation;if(!i.has(e)){i.add(e);try{var t;let r=n[e.type];if(r)return r.call(this,e);if(r=n[this.parentPath.type],null!=(t=r)&&t.validParent)return this.parentPath.getTypeAnnotation()}finally{i.delete(e)}}}else if(\"init\"===this.key&&this.parentPath.isVariableDeclarator()){const e=this.parentPath.parentPath,t=e.parentPath;return\"left\"===e.key&&t.isForInStatement()?s.stringTypeAnnotation():\"left\"===e.key&&t.isForOfStatement()?s.anyTypeAnnotation():s.voidTypeAnnotation()}},t.isBaseType=function(e,t){return o(e,this.getTypeAnnotation(),t)},t.couldBeBaseType=function(e){const t=this.getTypeAnnotation();if(s.isAnyTypeAnnotation(t))return!0;if(s.isUnionTypeAnnotation(t)){for(const r of t.types)if(s.isAnyTypeAnnotation(r)||o(e,r,!0))return!0;return!1}return o(e,t,!0)},t.baseTypeStrictlyMatches=function(e){const t=this.getTypeAnnotation(),r=e.getTypeAnnotation();return!(s.isAnyTypeAnnotation(t)||!s.isFlowBaseAnnotation(t))&&r.type===t.type},t.isGenericType=function(e){const t=this.getTypeAnnotation();return s.isGenericTypeAnnotation(t)&&s.isIdentifier(t.id,{name:e})};var n=r(435),s=r(0);const i=new WeakSet;function o(e,t,r){if(\"string\"===e)return s.isStringTypeAnnotation(t);if(\"number\"===e)return s.isNumberTypeAnnotation(t);if(\"boolean\"===e)return s.isBooleanTypeAnnotation(t);if(\"any\"===e)return s.isAnyTypeAnnotation(t);if(\"mixed\"===e)return s.isMixedTypeAnnotation(t);if(\"empty\"===e)return s.isEmptyTypeAnnotation(t);if(\"void\"===e)return s.isVoidTypeAnnotation(t);if(r)return!1;throw new Error(`Unknown base type ${e}`)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.VariableDeclarator=function(){var e;if(!this.get(\"id\").isIdentifier())return;const t=this.get(\"init\");let r=t.getTypeAnnotation();return\"AnyTypeAnnotation\"===(null==(e=r)?void 0:e.type)&&t.isCallExpression()&&t.get(\"callee\").isIdentifier({name:\"Array\"})&&!t.scope.hasBinding(\"Array\",!0)&&(r=o()),r},t.TypeCastExpression=i,t.NewExpression=function(e){if(this.get(\"callee\").isIdentifier())return n.genericTypeAnnotation(e.callee)},t.TemplateLiteral=function(){return n.stringTypeAnnotation()},t.UnaryExpression=function(e){const t=e.operator;return\"void\"===t?n.voidTypeAnnotation():n.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?n.numberTypeAnnotation():n.STRING_UNARY_OPERATORS.indexOf(t)>=0?n.stringTypeAnnotation():n.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?n.booleanTypeAnnotation():void 0},t.BinaryExpression=function(e){const t=e.operator;if(n.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return n.numberTypeAnnotation();if(n.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return n.booleanTypeAnnotation();if(\"+\"===t){const e=this.get(\"right\"),t=this.get(\"left\");return t.isBaseType(\"number\")&&e.isBaseType(\"number\")?n.numberTypeAnnotation():t.isBaseType(\"string\")||e.isBaseType(\"string\")?n.stringTypeAnnotation():n.unionTypeAnnotation([n.stringTypeAnnotation(),n.numberTypeAnnotation()])}},t.LogicalExpression=function(){const e=[this.get(\"left\").getTypeAnnotation(),this.get(\"right\").getTypeAnnotation()];return n.isTSTypeAnnotation(e[0])&&n.createTSUnionType?n.createTSUnionType(e):n.createFlowUnionType?n.createFlowUnionType(e):n.createUnionTypeAnnotation(e)},t.ConditionalExpression=function(){const e=[this.get(\"consequent\").getTypeAnnotation(),this.get(\"alternate\").getTypeAnnotation()];return n.isTSTypeAnnotation(e[0])&&n.createTSUnionType?n.createTSUnionType(e):n.createFlowUnionType?n.createFlowUnionType(e):n.createUnionTypeAnnotation(e)},t.SequenceExpression=function(){return this.get(\"expressions\").pop().getTypeAnnotation()},t.ParenthesizedExpression=function(){return this.get(\"expression\").getTypeAnnotation()},t.AssignmentExpression=function(){return this.get(\"right\").getTypeAnnotation()},t.UpdateExpression=function(e){const t=e.operator;if(\"++\"===t||\"--\"===t)return n.numberTypeAnnotation()},t.StringLiteral=function(){return n.stringTypeAnnotation()},t.NumericLiteral=function(){return n.numberTypeAnnotation()},t.BooleanLiteral=function(){return n.booleanTypeAnnotation()},t.NullLiteral=function(){return n.nullLiteralTypeAnnotation()},t.RegExpLiteral=function(){return n.genericTypeAnnotation(n.identifier(\"RegExp\"))},t.ObjectExpression=function(){return n.genericTypeAnnotation(n.identifier(\"Object\"))},t.ArrayExpression=o,t.RestElement=a,t.ClassDeclaration=t.ClassExpression=t.FunctionDeclaration=t.ArrowFunctionExpression=t.FunctionExpression=function(){return n.genericTypeAnnotation(n.identifier(\"Function\"))},t.CallExpression=function(){const{callee:e}=this.node;return c(e)?n.arrayTypeAnnotation(n.stringTypeAnnotation()):l(e)||u(e)?n.arrayTypeAnnotation(n.anyTypeAnnotation()):p(e)?n.arrayTypeAnnotation(n.tupleTypeAnnotation([n.stringTypeAnnotation(),n.anyTypeAnnotation()])):f(this.get(\"callee\"))},t.TaggedTemplateExpression=function(){return f(this.get(\"tag\"))},Object.defineProperty(t,\"Identifier\",{enumerable:!0,get:function(){return s.default}});var n=r(0),s=r(436);function i(e){return e.typeAnnotation}function o(){return n.genericTypeAnnotation(n.identifier(\"Array\"))}function a(){return o()}i.validParent=!0,a.validParent=!0;const l=n.buildMatchMemberExpression(\"Array.from\"),c=n.buildMatchMemberExpression(\"Object.keys\"),u=n.buildMatchMemberExpression(\"Object.values\"),p=n.buildMatchMemberExpression(\"Object.entries\");function f(e){if((e=e.resolve()).isFunction()){if(e.is(\"async\"))return e.is(\"generator\")?n.genericTypeAnnotation(n.identifier(\"AsyncIterator\")):n.genericTypeAnnotation(n.identifier(\"Promise\"));if(e.node.returnType)return e.node.returnType}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if(!this.isReferenced())return;const t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:function(e,t,r){const i=[],a=[];let l=s(e,t,a);const c=o(e,t,r);if(c){const t=s(e,c.ifStatement);l=l.filter((e=>t.indexOf(e)<0)),i.push(c.typeAnnotation)}if(l.length){l=l.concat(a);for(const e of l)i.push(e.getTypeAnnotation())}if(i.length)return n.isTSTypeAnnotation(i[0])&&n.createTSUnionType?n.createTSUnionType(i):n.createFlowUnionType?n.createFlowUnionType(i):n.createUnionTypeAnnotation(i)}(t,this,e.name):\"undefined\"===e.name?n.voidTypeAnnotation():\"NaN\"===e.name||\"Infinity\"===e.name?n.numberTypeAnnotation():void e.name};var n=r(0);function s(e,t,r){const n=e.constantViolations.slice();return n.unshift(e.path),n.filter((e=>{const n=(e=e.resolve())._guessExecutionStatusRelativeTo(t);return r&&\"unknown\"===n&&r.push(e),\"before\"===n}))}function i(e,t){const r=t.node.operator,s=t.get(\"right\").resolve(),i=t.get(\"left\").resolve();let o,a,l;if(i.isIdentifier({name:e})?o=s:s.isIdentifier({name:e})&&(o=i),o)return\"===\"===r?o.getTypeAnnotation():n.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?n.numberTypeAnnotation():void 0;if(\"===\"!==r&&\"==\"!==r)return;if(i.isUnaryExpression({operator:\"typeof\"})?(a=i,l=s):s.isUnaryExpression({operator:\"typeof\"})&&(a=s,l=i),!a)return;if(!a.get(\"argument\").isIdentifier({name:e}))return;if(l=l.resolve(),!l.isLiteral())return;const c=l.node.value;return\"string\"==typeof c?n.createTypeAnnotationBasedOnTypeof(c):void 0}function o(e,t,r){const s=function(e,t,r){let n;for(;n=t.parentPath;){if(n.isIfStatement()||n.isConditionalExpression()){if(\"test\"===t.key)return;return n}if(n.isFunction()&&n.parentPath.scope.getBinding(r)!==e)return;t=n}}(e,t,r);if(!s)return;const a=[s.get(\"test\")],l=[];for(let e=0;e<a.length;e++){const t=a[e];if(t.isLogicalExpression())\"&&\"===t.node.operator&&(a.push(t.get(\"left\")),a.push(t.get(\"right\")));else if(t.isBinaryExpression()){const e=i(r,t);e&&l.push(e)}}return l.length?n.isTSTypeAnnotation(l[0])&&n.createTSUnionType?{typeAnnotation:n.createTSUnionType(l),ifStatement:s}:n.createFlowUnionType?{typeAnnotation:n.createFlowUnionType(l),ifStatement:s}:{typeAnnotation:n.createUnionTypeAnnotation(l),ifStatement:s}:o(s,r)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.replaceWithMultiple=function(e){var t;this.resync(),e=this._verifyNodeList(e),l.inheritLeadingComments(e[0],this.node),l.inheritTrailingComments(e[e.length-1],this.node),null==(t=o.path.get(this.parent))||t.delete(this.node),this.node=this.container[this.key]=null;const r=this.insertAfter(e);return this.node?this.requeue():this.remove(),r},t.replaceWithSourceString=function(e){this.resync();try{e=`(${e})`,e=(0,a.parse)(e)}catch(t){const r=t.loc;throw r&&(t.message+=\" - make sure this is an expression.\\n\"+(0,n.codeFrameColumns)(e,{start:{line:r.line,column:r.column+1}}),t.code=\"BABEL_REPLACE_SOURCE_ERROR\"),t}return e=e.program.body[0].expression,s.default.removeProperties(e),this.replaceWith(e)},t.replaceWith=function(e){if(this.resync(),this.removed)throw new Error(\"You can't replace this node, we've already removed it\");if(e instanceof i.default&&(e=e.node),!e)throw new Error(\"You passed `path.replaceWith()` a falsy node, use `path.remove()` instead\");if(this.node===e)return[this];if(this.isProgram()&&!l.isProgram(e))throw new Error(\"You can only replace a Program root node with another Program node\");if(Array.isArray(e))throw new Error(\"Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`\");if(\"string\"==typeof e)throw new Error(\"Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`\");let t=\"\";if(this.isNodeType(\"Statement\")&&l.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||this.parentPath.isExportDefaultDeclaration()||(e=l.expressionStatement(e),t=\"expression\")),this.isNodeType(\"Expression\")&&l.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);const r=this.node;return r&&(l.inheritsComments(e,r),l.removeComments(r)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue(),[t?this.get(t):this]},t._replaceWith=function(e){var t;if(!this.container)throw new ReferenceError(\"Container is falsy\");this.inList?l.validate(this.parent,this.key,[e]):l.validate(this.parent,this.key,e),this.debug(`Replace with ${null==e?void 0:e.type}`),null==(t=o.path.get(this.parent))||t.set(e,this).delete(this.node),this.node=this.container[this.key]=e},t.replaceExpressionWithStatements=function(e){this.resync();const t=l.toSequenceExpression(e,this.scope);if(t)return this.replaceWith(t)[0].get(\"expressions\");const r=this.getFunctionParent(),n=null==r?void 0:r.is(\"async\"),i=null==r?void 0:r.is(\"generator\"),o=l.arrowFunctionExpression([],l.blockStatement(e));this.replaceWith(l.callExpression(o,[]));const a=this.get(\"callee\");(0,c.default)(a.get(\"body\"),(e=>{this.scope.push({id:e})}),\"var\");const u=this.get(\"callee\").getCompletionRecords();for(const e of u){if(!e.isExpressionStatement())continue;const t=e.findParent((e=>e.isLoop()));if(t){let r=t.getData(\"expressionReplacementReturnUid\");r?r=l.identifier(r.name):(r=a.scope.generateDeclaredUidIdentifier(\"ret\"),a.get(\"body\").pushContainer(\"body\",l.returnStatement(l.cloneNode(r))),t.setData(\"expressionReplacementReturnUid\",r)),e.get(\"expression\").replaceWith(l.assignmentExpression(\"=\",l.cloneNode(r),e.node.expression))}else e.replaceWith(l.returnStatement(e.node.expression))}a.arrowFunctionToExpression();const p=a,f=n&&s.default.hasType(this.get(\"callee.body\").node,\"AwaitExpression\",l.FUNCTION_TYPES),d=i&&s.default.hasType(this.get(\"callee.body\").node,\"YieldExpression\",l.FUNCTION_TYPES);return f&&(p.set(\"async\",!0),d||this.replaceWith(l.awaitExpression(this.node))),d&&(p.set(\"generator\",!0),this.replaceWith(l.yieldExpression(this.node,!0))),p.get(\"body.body\")},t.replaceInline=function(e){if(this.resync(),Array.isArray(e)){if(Array.isArray(this.container)){e=this._verifyNodeList(e);const t=this._containerInsertAfter(e);return this.remove(),t}return this.replaceWithMultiple(e)}return this.replaceWith(e)};var n=r(39),s=r(10),i=r(19),o=r(34),a=r(27),l=r(0),c=r(439)},(e,t,r)=>{\"use strict\";function n(){return{grey:null,red:{bold:null}}}r.r(t),r.d(t,{getChalk:()=>n})},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r=\"var\"){e.traverse(s,{kind:r,emit:t})};var n=r(0);const s={Scope(e,t){\"let\"===t.kind&&e.skip()},FunctionParent(e){e.skip()},VariableDeclaration(e,t){if(t.kind&&e.node.kind!==t.kind)return;const r=[],s=e.get(\"declarations\");let i;for(const e of s){i=e.node.id,e.node.init&&r.push(n.expressionStatement(n.assignmentExpression(\"=\",e.node.id,e.node.init)));for(const r of Object.keys(e.getBindingIdentifiers()))t.emit(n.identifier(r),r,null!==e.node.init)}e.parentPath.isFor({left:e.node})?e.replaceWith(i):e.replaceWithMultiple(r)}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.evaluateTruthy=function(){const e=this.evaluate();if(e.confident)return!!e.value},t.evaluate=function(){const e={confident:!0,deoptPath:null,seen:new Map};let t=o(this,e);return e.confident||(t=void 0),{confident:e.confident,deopt:e.deoptPath,value:t}};const n=[\"String\",\"Number\",\"Math\"],s=[\"random\"];function i(e,t){t.confident&&(t.deoptPath=e,t.confident=!1)}function o(e,t){const{node:l}=e,{seen:c}=t;if(c.has(l)){const r=c.get(l);return r.resolved?r.value:void i(e,t)}{const u={resolved:!1};c.set(l,u);const p=function(e,t){if(t.confident){if(e.isSequenceExpression()){const r=e.get(\"expressions\");return o(r[r.length-1],t)}if(e.isStringLiteral()||e.isNumericLiteral()||e.isBooleanLiteral())return e.node.value;if(e.isNullLiteral())return null;if(e.isTemplateLiteral())return a(e,e.node.quasis,t);if(e.isTaggedTemplateExpression()&&e.get(\"tag\").isMemberExpression()){const r=e.get(\"tag.object\"),{node:{name:n}}=r,s=e.get(\"tag.property\");if(r.isIdentifier()&&\"String\"===n&&!e.scope.getBinding(n)&&s.isIdentifier()&&\"raw\"===s.node.name)return a(e,e.node.quasi.quasis,t,!0)}if(e.isConditionalExpression()){const r=o(e.get(\"test\"),t);if(!t.confident)return;return o(r?e.get(\"consequent\"):e.get(\"alternate\"),t)}if(e.isExpressionWrapper())return o(e.get(\"expression\"),t);if(e.isMemberExpression()&&!e.parentPath.isCallExpression({callee:e.node})){const t=e.get(\"property\"),r=e.get(\"object\");if(r.isLiteral()&&t.isIdentifier()){const e=r.node.value,n=typeof e;if(\"number\"===n||\"string\"===n)return e[t.node.name]}}if(e.isReferencedIdentifier()){const r=e.scope.getBinding(e.node.name);if(r&&r.constantViolations.length>0)return i(r.path,t);if(r&&e.node.start<r.path.node.end)return i(r.path,t);if(null!=r&&r.hasValue)return r.value;{if(\"undefined\"===e.node.name)return r?i(r.path,t):void 0;if(\"Infinity\"===e.node.name)return r?i(r.path,t):1/0;if(\"NaN\"===e.node.name)return r?i(r.path,t):NaN;const n=e.resolve();return n===e?i(e,t):o(n,t)}}if(e.isUnaryExpression({prefix:!0})){if(\"void\"===e.node.operator)return;const r=e.get(\"argument\");if(\"typeof\"===e.node.operator&&(r.isFunction()||r.isClass()))return\"function\";const n=o(r,t);if(!t.confident)return;switch(e.node.operator){case\"!\":return!n;case\"+\":return+n;case\"-\":return-n;case\"~\":return~n;case\"typeof\":return typeof n}}if(e.isArrayExpression()){const r=[],n=e.get(\"elements\");for(const e of n){const n=e.evaluate();if(!n.confident)return i(n.deopt,t);r.push(n.value)}return r}if(e.isObjectExpression()){const r={},n=e.get(\"properties\");for(const e of n){if(e.isObjectMethod()||e.isSpreadElement())return i(e,t);let n=e.get(\"key\");if(e.node.computed){if(n=n.evaluate(),!n.confident)return i(n.deopt,t);n=n.value}else n=n.isIdentifier()?n.node.name:n.node.value;let s=e.get(\"value\").evaluate();if(!s.confident)return i(s.deopt,t);s=s.value,r[n]=s}return r}if(e.isLogicalExpression()){const r=t.confident,n=o(e.get(\"left\"),t),s=t.confident;t.confident=r;const i=o(e.get(\"right\"),t),a=t.confident;switch(e.node.operator){case\"||\":if(t.confident=s&&(!!n||a),!t.confident)return;return n||i;case\"&&\":if(t.confident=s&&(!n||a),!t.confident)return;return n&&i}}if(e.isBinaryExpression()){const r=o(e.get(\"left\"),t);if(!t.confident)return;const n=o(e.get(\"right\"),t);if(!t.confident)return;switch(e.node.operator){case\"-\":return r-n;case\"+\":return r+n;case\"/\":return r/n;case\"*\":return r*n;case\"%\":return r%n;case\"**\":return Math.pow(r,n);case\"<\":return r<n;case\">\":return r>n;case\"<=\":return r<=n;case\">=\":return r>=n;case\"==\":return r==n;case\"!=\":return r!=n;case\"===\":return r===n;case\"!==\":return r!==n;case\"|\":return r|n;case\"&\":return r&n;case\"^\":return r^n;case\"<<\":return r<<n;case\">>\":return r>>n;case\">>>\":return r>>>n}}if(e.isCallExpression()){const i=e.get(\"callee\");let a,l;if(i.isIdentifier()&&!e.scope.getBinding(i.node.name)&&n.indexOf(i.node.name)>=0&&(l=r.g[i.node.name]),i.isMemberExpression()){const e=i.get(\"object\"),t=i.get(\"property\");if(e.isIdentifier()&&t.isIdentifier()&&n.indexOf(e.node.name)>=0&&s.indexOf(t.node.name)<0&&(a=r.g[e.node.name],l=a[t.node.name]),e.isLiteral()&&t.isIdentifier()){const r=typeof e.node.value;\"string\"!==r&&\"number\"!==r||(a=e.node.value,l=a[t.node.name])}}if(l){const r=e.get(\"arguments\").map((e=>o(e,t)));if(!t.confident)return;return l.apply(a,r)}}i(e,t)}}(e,t);return t.confident&&(u.resolved=!0,u.value=p),p}}function a(e,t,r,n=!1){let s=\"\",i=0;const a=e.get(\"expressions\");for(const e of t){if(!r.confident)break;s+=n?e.value.raw:e.value.cooked;const t=a[i++];t&&(s+=String(o(t,r)))}if(r.confident)return s}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.toComputedKey=function(){let e;if(this.isMemberExpression())e=this.node.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError(\"todo\");e=this.node.key}return this.node.computed||n.isIdentifier(e)&&(e=n.stringLiteral(e.name)),e},t.ensureBlock=function(){const e=this.get(\"body\"),t=e.node;if(Array.isArray(e))throw new Error(\"Can't convert array path to a block statement\");if(!t)throw new Error(\"Can't convert node without a body\");if(e.isBlockStatement())return t;const r=[];let s,i,o=\"body\";e.isStatement()?(i=\"body\",s=0,r.push(e.node)):(o+=\".body.0\",this.isFunction()?(s=\"argument\",r.push(n.returnStatement(e.node))):(s=\"expression\",r.push(n.expressionStatement(e.node)))),this.node.body=n.blockStatement(r);const a=this.get(o);return e.setup(a,i?a.node[i]:a.node,i,s),this.node},t.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression()},t.unwrapFunctionEnvironment=function(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError(\"Can only unwrap the environment of a function.\");i(this)},t.arrowFunctionToExpression=function({allowInsertArrow:e=!0,specCompliant:t=!1,noNewArrows:r=!t}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError(\"Cannot convert non-arrow function to a function expression.\");const o=i(this,r,e);if(this.ensureBlock(),this.node.type=\"FunctionExpression\",!r){const e=o?null:this.parentPath.scope.generateUidIdentifier(\"arrowCheckId\");e&&this.parentPath.scope.push({id:e,init:n.objectExpression([])}),this.get(\"body\").unshiftContainer(\"body\",n.expressionStatement(n.callExpression(this.hub.addHelper(\"newArrowCheck\"),[n.thisExpression(),e?n.identifier(e.name):n.identifier(o)]))),this.replaceWith(n.callExpression(n.memberExpression((0,s.default)(this,!0)||this.node,n.identifier(\"bind\")),[e?n.identifier(e.name):n.thisExpression()]))}};var n=r(0),s=r(134);function i(e,t=!0,r=!0){const s=e.findParent((e=>e.isFunction()&&!e.isArrowFunctionExpression()||e.isProgram()||e.isClassProperty({static:!1}))),i=\"constructor\"===(null==s?void 0:s.node.kind);if(s.isClassProperty())throw e.buildCodeFrameError(\"Unable to transform arrow inside class property\");const{thisPaths:l,argumentsPaths:c,newTargetPaths:u,superProps:p,superCalls:f}=function(e){const t=[],r=[],n=[],s=[],i=[];return e.traverse({ClassProperty(e){e.skip()},Function(e){e.isArrowFunctionExpression()||e.skip()},ThisExpression(e){t.push(e)},JSXIdentifier(e){\"this\"===e.node.name&&(e.parentPath.isJSXMemberExpression({object:e.node})||e.parentPath.isJSXOpeningElement({name:e.node}))&&t.push(e)},CallExpression(e){e.get(\"callee\").isSuper()&&i.push(e)},MemberExpression(e){e.get(\"object\").isSuper()&&s.push(e)},ReferencedIdentifier(e){\"arguments\"===e.node.name&&r.push(e)},MetaProperty(e){e.get(\"meta\").isIdentifier({name:\"new\"})&&e.get(\"property\").isIdentifier({name:\"target\"})&&n.push(e)}}),{thisPaths:t,argumentsPaths:r,newTargetPaths:n,superProps:s,superCalls:i}}(e);if(i&&f.length>0){if(!r)throw f[0].buildCodeFrameError(\"Unable to handle nested super() usage in arrow\");const e=[];s.traverse({Function(e){e.isArrowFunctionExpression()||e.skip()},ClassProperty(e){e.skip()},CallExpression(t){t.get(\"callee\").isSuper()&&e.push(t)}});const t=function(e){return a(e,\"supercall\",(()=>{const t=e.scope.generateUidIdentifier(\"args\");return n.arrowFunctionExpression([n.restElement(t)],n.callExpression(n.super(),[n.spreadElement(n.identifier(t.name))]))}))}(s);e.forEach((e=>{const r=n.identifier(t);r.loc=e.node.callee.loc,e.get(\"callee\").replaceWith(r)}))}if(c.length>0){const e=a(s,\"arguments\",(()=>n.identifier(\"arguments\")));c.forEach((t=>{const r=n.identifier(e);r.loc=t.node.loc,t.replaceWith(r)}))}if(u.length>0){const e=a(s,\"newtarget\",(()=>n.metaProperty(n.identifier(\"new\"),n.identifier(\"target\"))));u.forEach((t=>{const r=n.identifier(e);r.loc=t.node.loc,t.replaceWith(r)}))}if(p.length>0){if(!r)throw p[0].buildCodeFrameError(\"Unable to handle nested super.prop usage\");p.reduce(((e,t)=>e.concat(function(e){if(e.parentPath.isAssignmentExpression()&&\"=\"!==e.parentPath.node.operator){const t=e.parentPath,r=t.node.operator.slice(0,-1),s=t.node.right;if(t.node.operator=\"=\",e.node.computed){const i=e.scope.generateDeclaredUidIdentifier(\"tmp\");t.get(\"left\").replaceWith(n.memberExpression(e.node.object,n.assignmentExpression(\"=\",i,e.node.property),!0)),t.get(\"right\").replaceWith(n.binaryExpression(r,n.memberExpression(e.node.object,n.identifier(i.name),!0),s))}else t.get(\"left\").replaceWith(n.memberExpression(e.node.object,e.node.property)),t.get(\"right\").replaceWith(n.binaryExpression(r,n.memberExpression(e.node.object,n.identifier(e.node.property.name)),s));return[t.get(\"left\"),t.get(\"right\").get(\"left\")]}if(e.parentPath.isUpdateExpression()){const t=e.parentPath,r=e.scope.generateDeclaredUidIdentifier(\"tmp\"),s=e.node.computed?e.scope.generateDeclaredUidIdentifier(\"prop\"):null,i=[n.assignmentExpression(\"=\",r,n.memberExpression(e.node.object,s?n.assignmentExpression(\"=\",s,e.node.property):e.node.property,e.node.computed)),n.assignmentExpression(\"=\",n.memberExpression(e.node.object,s?n.identifier(s.name):e.node.property,e.node.computed),n.binaryExpression(\"+\",n.identifier(r.name),n.numericLiteral(1)))];return e.parentPath.node.prefix||i.push(n.identifier(r.name)),t.replaceWith(n.sequenceExpression(i)),[t.get(\"expressions.0.right\"),t.get(\"expressions.1.left\")]}return[e]}(t))),[]).forEach((e=>{const t=e.node.computed?\"\":e.get(\"property\").node.name,r=e.parentPath.isAssignmentExpression({left:e.node}),i=e.parentPath.isCallExpression({callee:e.node}),o=function(e,t,r){return a(e,`superprop_${t?\"set\":\"get\"}:${r||\"\"}`,(()=>{const s=[];let i;if(r)i=n.memberExpression(n.super(),n.identifier(r));else{const t=e.scope.generateUidIdentifier(\"prop\");s.unshift(t),i=n.memberExpression(n.super(),n.identifier(t.name),!0)}if(t){const t=e.scope.generateUidIdentifier(\"value\");s.push(t),i=n.assignmentExpression(\"=\",i,n.identifier(t.name))}return n.arrowFunctionExpression(s,i)}))}(s,r,t),c=[];if(e.node.computed&&c.push(e.get(\"property\").node),r){const t=e.parentPath.node.right;c.push(t)}const u=n.callExpression(n.identifier(o),c);i?(e.parentPath.unshiftContainer(\"arguments\",n.thisExpression()),e.replaceWith(n.memberExpression(u,n.identifier(\"call\"))),l.push(e.parentPath.get(\"arguments.0\"))):r?e.parentPath.replaceWith(u):e.replaceWith(u)}))}let d;return(l.length>0||!t)&&(d=function(e,t){return a(e,\"this\",(r=>{if(!t||!o(e))return n.thisExpression();const s=new WeakSet;e.traverse({Function(e){e.isArrowFunctionExpression()||e.skip()},ClassProperty(e){e.skip()},CallExpression(e){e.get(\"callee\").isSuper()&&(s.has(e.node)||(s.add(e.node),e.replaceWithMultiple([e.node,n.assignmentExpression(\"=\",n.identifier(r),n.identifier(\"this\"))])))}})}))}(s,i),(t||i&&o(s))&&(l.forEach((e=>{const t=e.isJSX()?n.jsxIdentifier(d):n.identifier(d);t.loc=e.node.loc,e.replaceWith(t)})),t||(d=null))),d}function o(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}function a(e,t,r){const n=\"binding:\"+t;let s=e.getData(n);if(!s){const i=e.scope.generateUidIdentifier(t);s=i.name,e.setData(n,s),e.scope.push({id:i,init:r(s)})}return s}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){const t=e.params;for(let e=0;e<t.length;e++){const r=t[e];if(n.isAssignmentPattern(r)||n.isRestElement(r))return e}return t.length};var n=r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.program=t.expression=t.statement=t.statements=t.smart=void 0;var n=r(0);function s(e){return{code:e=>`/* @babel/template */;\\n${e}`,validate:()=>{},unwrap:t=>e(t.program.body.slice(1))}}const i=s((e=>e.length>1?e:e[0]));t.smart=i;const o=s((e=>e));t.statements=o;const a=s((e=>{if(0===e.length)throw new Error(\"Found nothing to return.\");if(e.length>1)throw new Error(\"Found multiple statements but wanted one\");return e[0]}));t.statement=a;const l={code:e=>`(\\n${e}\\n)`,validate:e=>{if(e.program.body.length>1)throw new Error(\"Found multiple statements but wanted one\");if(0===l.unwrap(e).start)throw new Error(\"Parse result included parens.\")},unwrap:({program:e})=>{const[t]=e.body;return n.assertExpressionStatement(t),t.expression}};t.expression=l,t.program={code:e=>e,validate:()=>{},unwrap:e=>e.program}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t,r){const l=new WeakMap,c=new WeakMap,u=r||(0,n.validate)(null);return Object.assign(((r,...o)=>{if(\"string\"==typeof r){if(o.length>1)throw new Error(\"Unexpected extra params.\");return a((0,s.default)(t,r,(0,n.merge)(u,(0,n.validate)(o[0]))))}if(Array.isArray(r)){let e=l.get(r);return e||(e=(0,i.default)(t,r,u),l.set(r,e)),a(e(o))}if(\"object\"==typeof r&&r){if(o.length>0)throw new Error(\"Unexpected extra params.\");return e(t,(0,n.merge)(u,(0,n.validate)(r)))}throw new Error(\"Unexpected template param \"+typeof r)}),{ast:(e,...r)=>{if(\"string\"==typeof e){if(r.length>1)throw new Error(\"Unexpected extra params.\");return(0,s.default)(t,e,(0,n.merge)((0,n.merge)(u,(0,n.validate)(r[0])),o))()}if(Array.isArray(e)){let s=c.get(e);return s||(s=(0,i.default)(t,e,(0,n.merge)(u,o)),c.set(e,s)),s(r)()}throw new Error(\"Unexpected template param \"+typeof e)}})};var n=r(135),s=r(445),i=r(446);const o=(0,n.validate)({placeholderPattern:!1});function a(e){let t=\"\";try{throw new Error}catch(e){e.stack&&(t=e.stack.split(\"\\n\").slice(3).join(\"\\n\"))}return r=>{try{return e(r)}catch(e){throw e.stack+=`\\n    =============\\n${t}`,e}}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){let o;return t=e.code(t),a=>{const l=(0,n.normalizeReplacements)(a);return o||(o=(0,s.default)(e,t,r)),e.unwrap((0,i.default)(o,l))}};var n=r(135),s=r(237),i=r(238)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){const{metadata:a,names:l}=function(e,t,r){let n,i,a,l=\"\";do{l+=\"$\";const c=o(t,l);n=c.names,i=new Set(n),a=(0,s.default)(e,e.code(c.code),{parser:r.parser,placeholderWhitelist:new Set(c.names.concat(r.placeholderWhitelist?Array.from(r.placeholderWhitelist):[])),placeholderPattern:r.placeholderPattern,preserveComments:r.preserveComments,syntacticPlaceholders:r.syntacticPlaceholders})}while(a.placeholders.some((e=>e.isDuplicate&&i.has(e.name))));return{metadata:a,names:n}}(e,t,r);return t=>{const r={};return t.forEach(((e,t)=>{r[l[t]]=e})),t=>{const s=(0,n.normalizeReplacements)(t);return s&&Object.keys(s).forEach((e=>{if(Object.prototype.hasOwnProperty.call(r,e))throw new Error(\"Unexpected replacement overlap.\")})),e.unwrap((0,i.default)(a,s?Object.assign(s,r):r))}}};var n=r(135),s=r(237),i=r(238);function o(e,t){const r=[];let n=e[0];for(let s=1;s<e.length;s++){const i=`${t}${s-1}`;r.push(i),n+=i+e[s]}return{names:r,code:n}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.matchesPattern=function(e,t){return n.matchesPattern(this.node,e,t)},t.has=s,t.isStatic=function(){return this.scope.isStatic(this.node)},t.isnt=function(e){return!this.has(e)},t.equals=function(e,t){return this.node[e]===t},t.isNodeType=function(e){return n.isType(this.type,e)},t.canHaveVariableDeclarationOrExpression=function(){return(\"init\"===this.key||\"left\"===this.key)&&this.parentPath.isFor()},t.canSwapBetweenExpressionAndStatement=function(e){return!(\"body\"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?n.isBlockStatement(e):!!this.isBlockStatement()&&n.isExpression(e))},t.isCompletionRecord=function(e){let t=this,r=!0;do{const n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0},t.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!n.isBlockStatement(this.container)&&n.STATEMENT_OR_BLOCK_KEYS.includes(this.key)},t.referencesImport=function(e,t){if(!this.isReferencedIdentifier()){if((this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?n.isStringLiteral(this.node.property,{value:t}):this.node.property.name===t)){const t=this.get(\"object\");return t.isReferencedIdentifier()&&t.referencesImport(e,\"*\")}return!1}const r=this.scope.getBinding(this.node.name);if(!r||\"module\"!==r.kind)return!1;const s=r.path,i=s.parentPath;return!!i.isImportDeclaration()&&(i.node.source.value===e&&(!t||(!(!s.isImportDefaultSpecifier()||\"default\"!==t)||(!(!s.isImportNamespaceSpecifier()||\"*\"!==t)||!(!s.isImportSpecifier()||!n.isIdentifier(s.node.imported,{name:t}))))))},t.getSource=function(){const e=this.node;if(e.end){const t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return\"\"},t.willIMaybeExecuteBefore=function(e){return\"after\"!==this._guessExecutionStatusRelativeTo(e)},t._guessExecutionStatusRelativeTo=function(e){const t={this:o(this),target:o(e)};if(t.target.node!==t.this.node)return this._guessExecutionStatusRelativeToDifferentFunctions(t.target);const r={target:e.getAncestry(),this:this.getAncestry()};if(r.target.indexOf(this)>=0)return\"after\";if(r.this.indexOf(e)>=0)return\"before\";let s;const i={target:0,this:0};for(;!s&&i.this<r.this.length;){const e=r.this[i.this];i.target=r.target.indexOf(e),i.target>=0?s=e:i.this++}if(!s)throw new Error(\"Internal Babel error - The two compared nodes don't appear to belong to the same program.\");if(l(r.this,i.this-1)||l(r.target,i.target-1))return\"unknown\";const a={this:r.this[i.this-1],target:r.target[i.target-1]};if(a.target.listKey&&a.this.listKey&&a.target.container===a.this.container)return a.target.key>a.this.key?\"before\":\"after\";const c=n.VISITOR_KEYS[s.type],u=c.indexOf(a.this.parentKey);return c.indexOf(a.target.parentKey)>u?\"before\":\"after\"},t._guessExecutionStatusRelativeToDifferentFunctions=function(e){if(!e.isFunctionDeclaration()||e.parentPath.isExportDeclaration())return\"unknown\";const t=e.scope.getBinding(e.node.id.name);if(!t.references)return\"before\";const r=t.referencePaths;let n;for(const t of r){if(t.find((t=>t.node===e.node)))continue;if(\"callee\"!==t.key||!t.parentPath.isCallExpression())return\"unknown\";if(c.has(t.node))continue;c.add(t.node);const r=this._guessExecutionStatusRelativeTo(t);if(c.delete(t.node),n&&n!==r)return\"unknown\";n=r}return n},t.resolve=function(e,t){return this._resolve(e,t)||this},t._resolve=function(e,t){if(!(t&&t.indexOf(this)>=0))if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get(\"id\").isIdentifier())return this.get(\"init\").resolve(e,t)}else if(this.isReferencedIdentifier()){const r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if(\"module\"===r.kind)return;if(r.path!==this){const n=r.path.resolve(e,t);if(this.find((e=>e.node===n.node)))return;return n}}else{if(this.isTypeCastExpression())return this.get(\"expression\").resolve(e,t);if(e&&this.isMemberExpression()){const r=this.toComputedKey();if(!n.isLiteral(r))return;const s=r.value,i=this.get(\"object\").resolve(e,t);if(i.isObjectExpression()){const r=i.get(\"properties\");for(const n of r){if(!n.isProperty())continue;const r=n.get(\"key\");let i=n.isnt(\"computed\")&&r.isIdentifier({name:s});if(i=i||r.isLiteral({value:s}),i)return n.get(\"value\").resolve(e,t)}}else if(i.isArrayExpression()&&!isNaN(+s)){const r=i.get(\"elements\")[s];if(r)return r.resolve(e,t)}}}},t.isConstantExpression=function(){if(this.isIdentifier()){const e=this.scope.getBinding(this.node.name);return!!e&&e.constant}return this.isLiteral()?!this.isRegExpLiteral()&&(!this.isTemplateLiteral()||this.get(\"expressions\").every((e=>e.isConstantExpression()))):this.isUnaryExpression()?\"void\"===this.node.operator&&this.get(\"argument\").isConstantExpression():!!this.isBinaryExpression()&&(this.get(\"left\").isConstantExpression()&&this.get(\"right\").isConstantExpression())},t.isInStrictMode=function(){return!!(this.isProgram()?this:this.parentPath).find((e=>{if(e.isProgram({sourceType:\"module\"}))return!0;if(e.isClass())return!0;if(!e.isProgram()&&!e.isFunction())return!1;if(e.isArrowFunctionExpression()&&!e.get(\"body\").isBlockStatement())return!1;const t=e.isFunction()?e.node.body:e.node;for(const e of t.directives)if(\"use strict\"===e.value.value)return!0}))},t.is=void 0;var n=r(0);function s(e){const t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}const i=s;function o(e){return(e.scope.getFunctionParent()||e.scope.getProgramParent()).path}function a(e,t){switch(e){case\"LogicalExpression\":return\"right\"===t;case\"ConditionalExpression\":case\"IfStatement\":return\"consequent\"===t||\"alternate\"===t;case\"WhileStatement\":case\"DoWhileStatement\":case\"ForInStatement\":case\"ForOfStatement\":return\"body\"===t;case\"ForStatement\":return\"body\"===t||\"update\"===t;case\"SwitchStatement\":return\"cases\"===t;case\"TryStatement\":return\"handler\"===t;case\"AssignmentPattern\":return\"right\"===t;case\"OptionalMemberExpression\":return\"property\"===t;case\"OptionalCallExpression\":return\"arguments\"===t;default:return!1}}function l(e,t){for(let r=0;r<t;r++){const t=e[r];if(a(t.parent.type,t.parentKey))return!0}return!1}t.is=i;const c=new WeakSet},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.call=function(e){const t=this.opts;return this.debug(e),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])},t._call=function(e){if(!e)return!1;for(const t of e){if(!t)continue;const e=this.node;if(!e)return!0;const r=t.call(this.state,this,this.state);if(r&&\"object\"==typeof r&&\"function\"==typeof r.then)throw new Error(\"You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.\");if(r)throw new Error(`Unexpected return value from visitor method ${t}`);if(this.node!==e)return!0;if(this._traverseFlags>0)return!0}return!1},t.isBlacklisted=t.isDenylisted=function(){var e;const t=null!=(e=this.opts.denylist)?e:this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1},t.visit=function(){return!!this.node&&(!this.isDenylisted()&&((!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.shouldSkip||this.call(\"enter\")||this.shouldSkip?(this.debug(\"Skip...\"),this.shouldStop):(this.debug(\"Recursing into...\"),n.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call(\"exit\"),this.shouldStop))))},t.skip=function(){this.shouldSkip=!0},t.skipKey=function(e){null==this.skipKeys&&(this.skipKeys={}),this.skipKeys[e]=!0},t.stop=function(){this._traverseFlags|=s.SHOULD_SKIP|s.SHOULD_STOP},t.setScope=function(){if(this.opts&&this.opts.noScope)return;let e,t=this.parentPath;for(\"key\"===this.key&&t.isMethod()&&(t=t.parentPath);t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()},t.setContext=function(e){return null!=this.skipKeys&&(this.skipKeys={}),this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this},t.resync=function(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())},t._resyncParent=function(){this.parentPath&&(this.parent=this.parentPath.node)},t._resyncKey=function(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(const e of Object.keys(this.container))if(this.container[e]===this.node)return this.setKey(e);this.key=null}},t._resyncList=function(){if(!this.parent||!this.inList)return;const e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)},t._resyncRemoved=function(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()},t.popContext=function(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)},t.pushContext=function(e){this.contexts.push(e),this.setContext(e)},t.setup=function(e,t,r,n){this.listKey=r,this.container=t,this.parentPath=e||this.parentPath,this.setKey(n)},t.setKey=function(e){var t;this.key=e,this.node=this.container[this.key],this.type=null==(t=this.node)?void 0:t.type},t.requeue=function(e=this){if(e.removed)return;const t=this.contexts;for(const r of t)r.maybeQueue(e)},t._getQueueContexts=function(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,e);)t=e.contexts;return t};var n=r(10),s=r(19)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.remove=function(){var e;this._assertUnremoved(),this.resync(),null!=(e=this.opts)&&e.noScope||this._removeFromScope(),this._callRemovalHooks()||(this.shareCommentsWithSiblings(),this._remove()),this._markRemoved()},t._removeFromScope=function(){const e=this.getBindingIdentifiers();Object.keys(e).forEach((e=>this.scope.removeBinding(e)))},t._callRemovalHooks=function(){for(const e of n.hooks)if(e(this,this.parentPath))return!0},t._remove=function(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)},t._markRemoved=function(){this._traverseFlags|=i.SHOULD_SKIP|i.REMOVED,this.parent&&s.path.get(this.parent).delete(this.node),this.node=null},t._assertUnremoved=function(){if(this.removed)throw this.buildCodeFrameError(\"NodePath has been removed so is read-only.\")};var n=r(450),s=r(34),i=r(19)},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.hooks=void 0,t.hooks=[function(e,t){if(\"test\"===e.key&&(t.isWhile()||t.isSwitchCase())||\"declaration\"===e.key&&t.isExportDeclaration()||\"body\"===e.key&&t.isLabeledStatement()||\"declarations\"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||\"expression\"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return\"left\"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&(\"consequent\"===e.key||\"alternate\"===e.key)||\"body\"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:\"BlockStatement\",body:[]}),!0}]},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.insertBefore=function(e){this._assertUnremoved();const t=this._verifyNodeList(e),{parentPath:r}=this;if(r.isExpressionStatement()||r.isLabeledStatement()||r.isExportNamedDeclaration()||r.isExportDefaultDeclaration()&&this.isDeclaration())return r.insertBefore(t);if(this.isNodeType(\"Expression\")&&!this.isJSXElement()||r.isForStatement()&&\"init\"===this.key)return this.node&&t.push(this.node),this.replaceExpressionWithStatements(t);if(Array.isArray(this.container))return this._containerInsertBefore(t);if(this.isStatementOrBlock()){const e=this.node,r=e&&(!this.isExpressionStatement()||null!=e.expression);return this.replaceWith(o.blockStatement(r?[e]:[])),this.unshiftContainer(\"body\",t)}throw new Error(\"We don't know what to do with this node type. We were previously a Statement but we can't fit in here?\")},t._containerInsert=function(e,t){this.updateSiblingKeys(e,t.length);const r=[];this.container.splice(e,0,...t);for(let n=0;n<t.length;n++){const t=e+n,s=this.getSibling(t);r.push(s),this.context&&this.context.queue&&s.pushContext(this.context)}const n=this._getQueueContexts();for(const e of r){e.setScope(),e.debug(\"Inserted.\");for(const t of n)t.maybeQueue(e,!0)}return r},t._containerInsertBefore=function(e){return this._containerInsert(this.key,e)},t._containerInsertAfter=function(e){return this._containerInsert(this.key+1,e)},t.insertAfter=function(e){this._assertUnremoved();const t=this._verifyNodeList(e),{parentPath:r}=this;if(r.isExpressionStatement()||r.isLabeledStatement()||r.isExportNamedDeclaration()||r.isExportDefaultDeclaration()&&this.isDeclaration())return r.insertAfter(t.map((e=>o.isExpression(e)?o.expressionStatement(e):e)));if(this.isNodeType(\"Expression\")&&!this.isJSXElement()&&!r.isJSXElement()||r.isForStatement()&&\"init\"===this.key){if(this.node){const e=this.node;let{scope:n}=this;if(n.path.isPattern())return o.assertExpression(e),this.replaceWith(o.callExpression(o.arrowFunctionExpression([],e),[])),this.get(\"callee.body\").insertAfter(t),[this];r.isMethod({computed:!0,key:e})&&(n=n.parent);const s=n.generateDeclaredUidIdentifier();t.unshift(o.expressionStatement(o.assignmentExpression(\"=\",o.cloneNode(s),e))),t.push(o.expressionStatement(o.cloneNode(s)))}return this.replaceExpressionWithStatements(t)}if(Array.isArray(this.container))return this._containerInsertAfter(t);if(this.isStatementOrBlock()){const e=this.node,r=e&&(!this.isExpressionStatement()||null!=e.expression);return this.replaceWith(o.blockStatement(r?[e]:[])),this.pushContainer(\"body\",t)}throw new Error(\"We don't know what to do with this node type. We were previously a Statement but we can't fit in here?\")},t.updateSiblingKeys=function(e,t){if(!this.parent)return;const r=n.path.get(this.parent);for(const[,n]of r)n.key>=e&&(n.key+=t)},t._verifyNodeList=function(e){if(!e)return[];Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++){const r=e[t];let n;if(r?\"object\"!=typeof r?n=\"contains a non-object node\":r.type?r instanceof i.default&&(n=\"has a NodePath when it expected a raw object\"):n=\"without a type\":n=\"has falsy node\",n){const e=Array.isArray(r)?\"array\":typeof r;throw new Error(`Node list ${n} with the index of ${t} and type of ${e}`)}}return e},t.unshiftContainer=function(e,t){return this._assertUnremoved(),t=this._verifyNodeList(t),i.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0}).setContext(this.context)._containerInsertBefore(t)},t.pushContainer=function(e,t){this._assertUnremoved();const r=this._verifyNodeList(t),n=this.node[e];return i.default.get({parentPath:this,parent:this.node,container:n,listKey:e,key:n.length}).setContext(this.context).replaceWithMultiple(r)},t.hoist=function(e=this.scope){return new s.default(this,e).run()};var n=r(34),s=r(452),i=r(19),o=r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(0);const s={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&n.react.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression())return;if(\"this\"===e.node.name){let r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}const r=e.scope.getBinding(e.node.name);if(r){for(const n of r.constantViolations)if(n.scope!==r.path.scope)return t.mutableBinding=!0,void e.stop();r===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=r)}}};t.default=class{constructor(e,t){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=t,this.path=e,this.attachAfter=!1}isCompatibleScope(e){for(const t of Object.keys(this.bindings)){const r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0}getCompatibleScopes(){let e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)}getAttachmentPath(){let e=this._getAttachmentPath();if(!e)return;let t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(const r of Object.keys(this.bindings)){if(!t.hasOwnBinding(r))continue;const n=this.bindings[r];if(\"param\"!==n.kind&&\"params\"!==n.path.parentKey&&this.getAttachmentParentForPath(n.path).key>=e.key){this.attachAfter=!0,e=n.path;for(const t of n.constantViolations)this.getAttachmentParentForPath(t).key>e.key&&(e=t)}}return e}_getAttachmentPath(){const e=this.scopes.pop();if(e)if(e.path.isFunction()){if(!this.hasOwnParamBindings(e))return this.getNextScopeAttachmentParent();{if(this.scope===e)return;const t=e.path.get(\"body\").get(\"body\");for(let e=0;e<t.length;e++)if(!t[e].node._blockHoist)return t[e]}}else if(e.path.isProgram())return this.getNextScopeAttachmentParent()}getNextScopeAttachmentParent(){const e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)}getAttachmentParentForPath(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())return e}while(e=e.parentPath)}hasOwnParamBindings(e){for(const t of Object.keys(this.bindings)){if(!e.hasOwnBinding(t))continue;const r=this.bindings[t];if(\"param\"===r.kind&&r.constant)return!0}return!1}run(){if(this.path.traverse(s,this),this.mutableBinding)return;this.getCompatibleScopes();const e=this.getAttachmentPath();if(!e)return;if(e.getFunctionParent()===this.path.getFunctionParent())return;let t=e.scope.generateUidIdentifier(\"ref\");const r=n.variableDeclarator(t,this.path.node),i=this.attachAfter?\"insertAfter\":\"insertBefore\",[o]=e[i]([e.isVariableDeclarator()?r:n.variableDeclaration(\"var\",[r])]),a=this.path.parentPath;return a.isJSXElement()&&this.path.container===a.node.children&&(t=n.jsxExpressionContainer(t)),this.path.replaceWith(n.cloneNode(t)),e.isVariableDeclarator()?o.get(\"init\"):o.get(\"declarations.0.init\")}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.getOpposite=function(){return\"left\"===this.key?this.getSibling(\"right\"):\"right\"===this.key?this.getSibling(\"left\"):null},t.getCompletionRecords=function(){return c(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map((e=>e.path))},t.getSibling=function(e){return n.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)},t.getPrevSibling=function(){return this.getSibling(this.key-1)},t.getNextSibling=function(){return this.getSibling(this.key+1)},t.getAllNextSiblings=function(){let e=this.key,t=this.getSibling(++e);const r=[];for(;t.node;)r.push(t),t=this.getSibling(++e);return r},t.getAllPrevSiblings=function(){let e=this.key,t=this.getSibling(--e);const r=[];for(;t.node;)r.push(t),t=this.getSibling(--e);return r},t.get=function(e,t=!0){!0===t&&(t=this.context);const r=e.split(\".\");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)},t._getKey=function(e,t){const r=this.node,s=r[e];return Array.isArray(s)?s.map(((i,o)=>n.default.get({listKey:e,parentPath:this,parent:r,container:s,key:o}).setContext(t))):n.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(t)},t._getPattern=function(e,t){let r=this;for(const n of e)r=\".\"===n?r.parentPath:Array.isArray(r)?r[n]:r.get(n,t);return r},t.getBindingIdentifiers=function(e){return s.getBindingIdentifiers(this.node,e)},t.getOuterBindingIdentifiers=function(e){return s.getOuterBindingIdentifiers(this.node,e)},t.getBindingIdentifierPaths=function(e=!1,t=!1){let r=[].concat(this);const n=Object.create(null);for(;r.length;){const i=r.shift();if(!i)continue;if(!i.node)continue;const o=s.getBindingIdentifiers.keys[i.node.type];if(i.isIdentifier())e?(n[i.node.name]=n[i.node.name]||[]).push(i):n[i.node.name]=i;else if(i.isExportDeclaration()){const e=i.get(\"declaration\");e.isDeclaration()&&r.push(e)}else{if(t){if(i.isFunctionDeclaration()){r.push(i.get(\"id\"));continue}if(i.isFunctionExpression())continue}if(o)for(let e=0;e<o.length;e++){const t=o[e],n=i.get(t);(Array.isArray(n)||n.node)&&(r=r.concat(n))}}}return n},t.getOuterBindingIdentifierPaths=function(e){return this.getBindingIdentifierPaths(e,!0)};var n=r(19),s=r(0);function i(e,t,r){return e?t.concat(c(e,r)):t}function o(e){e.forEach((e=>{e.type=1}))}function a(e,t){e.forEach((e=>{e.path.isBreakStatement({label:null})&&(t?e.path.replaceWith(s.unaryExpression(\"void\",s.numericLiteral(0))):e.path.remove())}))}function l(e,t){let r=[];if(t.canHaveBreak){let n=[];for(let s=0;s<e.length;s++){const i=e[s],l=Object.assign({},t,{inCaseClause:!1});i.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?l.shouldPopulateBreak=!0:l.shouldPopulateBreak=!1;const u=c(i,l);if(u.length>0&&u.every((e=>1===e.type))){n.length>0&&u.every((e=>e.path.isBreakStatement({label:null})))?(o(n),r=r.concat(n),n.some((e=>e.path.isDeclaration()))&&(r=r.concat(u),a(u,!0)),a(u,!1)):(r=r.concat(u),t.shouldPopulateBreak||a(u,!0));break}s===e.length-1?r=r.concat(u):(r=r.concat(u.filter((e=>1===e.type))),n=u.filter((e=>0===e.type)))}}else e.length&&(r=r.concat(c(e[e.length-1],t)));return r}function c(e,t){let r=[];if(e.isIfStatement())r=i(e.get(\"consequent\"),r,t),r=i(e.get(\"alternate\"),r,t);else if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())r=i(e.get(\"body\"),r,t);else if(e.isProgram()||e.isBlockStatement())r=r.concat(l(e.get(\"body\"),t));else{if(e.isFunction())return c(e.get(\"body\"),t);e.isTryStatement()?(r=i(e.get(\"block\"),r,t),r=i(e.get(\"handler\"),r,t)):e.isCatchClause()?r=i(e.get(\"body\"),r,t):e.isSwitchStatement()?r=function(e,t,r){let n=[];for(let s=0;s<e.length;s++){const i=c(e[s],r),o=[],a=[];for(const e of i)0===e.type&&o.push(e),1===e.type&&a.push(e);o.length&&(n=o),t=t.concat(a)}return t.concat(n)}(e.get(\"cases\"),r,t):e.isSwitchCase()?r=r.concat(l(e.get(\"consequent\"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0})):e.isBreakStatement()?r.push(function(e){return{type:1,path:e}}(e)):r.push(function(e){return{type:0,path:e}}(e))}return r}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.shareCommentsWithSiblings=function(){if(\"string\"==typeof this.key)return;const e=this.node;if(!e)return;const t=e.trailingComments,r=e.leadingComments;if(!t&&!r)return;const n=this.getSibling(this.key-1),s=this.getSibling(this.key+1),i=Boolean(n.node),o=Boolean(s.node);i&&!o?n.addComments(\"trailing\",t):o&&!i&&s.addComments(\"leading\",r)},t.addComment=function(e,t,r){n.addComment(this.node,e,t,r)},t.addComments=function(e,t){n.addComments(this.node,e,t)};var n=r(0)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.explode=i,t.verify=o,t.merge=function(e,t=[],r){const n={};for(let s=0;s<e.length;s++){const o=e[s],a=t[s];i(o);for(const e of Object.keys(o)){let t=o[e];(a||r)&&(t=l(t,a,r)),f(n[e]=n[e]||{},t)}}return n};var n=r(212),s=r(0);function i(e){if(e._exploded)return e;e._exploded=!0;for(const t of Object.keys(e)){if(p(t))continue;const r=t.split(\"|\");if(1===r.length)continue;const n=e[t];delete e[t];for(const t of r)e[t]=n}o(e),delete e.__esModule,function(e){for(const t of Object.keys(e)){if(p(t))continue;const r=e[t];\"function\"==typeof r&&(e[t]={enter:r})}}(e),c(e);for(const t of Object.keys(e)){if(p(t))continue;const r=n[t];if(!r)continue;const s=e[t];for(const e of Object.keys(s))s[e]=u(r,s[e]);if(delete e[t],r.types)for(const t of r.types)e[t]?f(e[t],s):e[t]=s;else f(e,s)}for(const t of Object.keys(e)){if(p(t))continue;const r=e[t];let n=s.FLIPPED_ALIAS_KEYS[t];const i=s.DEPRECATED_KEYS[t];if(i&&(n=[i]),n){delete e[t];for(const t of n){const n=e[t];n?f(n,r):e[t]=Object.assign({},r)}}}for(const t of Object.keys(e))p(t)||c(e[t]);return e}function o(e){if(!e._verified){if(\"function\"==typeof e)throw new Error(\"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?\");for(const t of Object.keys(e)){if(\"enter\"!==t&&\"exit\"!==t||a(t,e[t]),p(t))continue;if(s.TYPES.indexOf(t)<0)throw new Error(`You gave us a visitor for the node type ${t} but it's not a valid type`);const r=e[t];if(\"object\"==typeof r)for(const e of Object.keys(r)){if(\"enter\"!==e&&\"exit\"!==e)throw new Error(`You passed \\`traverse()\\` a visitor object with the property ${t} that has the invalid property ${e}`);a(`${t}.${e}`,r[e])}}e._verified=!0}}function a(e,t){const r=[].concat(t);for(const t of r)if(\"function\"!=typeof t)throw new TypeError(`Non-function found defined in ${e} with type ${typeof t}`)}function l(e,t,r){const n={};for(const s of Object.keys(e)){let i=e[s];Array.isArray(i)&&(i=i.map((function(e){let n=e;return t&&(n=function(r){return e.call(t,r,t)}),r&&(n=r(t.key,s,n)),n!==e&&(n.toString=()=>e.toString()),n})),n[s]=i)}return n}function c(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function u(e,t){const r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=()=>t.toString(),r}function p(e){return\"_\"===e[0]||\"enter\"===e||\"exit\"===e||\"shouldSkip\"===e||\"denylist\"===e||\"noScope\"===e||\"skipKeys\"===e||\"blacklist\"===e}function f(e,t){for(const r of Object.keys(t))e[r]=[].concat(e[r]||[],t[r])}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0,t.default=class{getCode(){}getScope(){}addHelper(){throw new Error(\"Helpers are not supported by the default hub.\")}buildError(e,t,r=TypeError){return new r(t)}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(21),s=r(458);const i=Object.assign({__proto__:null},s);var o=i;t.default=o;const a=e=>t=>({minVersion:e,ast:()=>n.default.program.ast(t)});i.asyncIterator=a(\"7.0.0-beta.0\")`\n  export default function _asyncIterator(iterable) {\n    var method;\n    if (typeof Symbol !== \"undefined\") {\n      if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];\n      if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];\n    }\n    if (method == null) method = iterable[\"@@asyncIterator\"];\n    if (method == null) method = iterable[\"@@iterator\"]\n    if (method == null) throw new TypeError(\"Object is not async iterable\");\n    return method.call(iterable);\n  }\n`,i.AwaitValue=a(\"7.0.0-beta.0\")`\n  export default function _AwaitValue(value) {\n    this.wrapped = value;\n  }\n`,i.AsyncGenerator=a(\"7.0.0-beta.0\")`\n  import AwaitValue from \"AwaitValue\";\n\n  export default function AsyncGenerator(gen) {\n    var front, back;\n\n    function send(key, arg) {\n      return new Promise(function (resolve, reject) {\n        var request = {\n          key: key,\n          arg: arg,\n          resolve: resolve,\n          reject: reject,\n          next: null,\n        };\n\n        if (back) {\n          back = back.next = request;\n        } else {\n          front = back = request;\n          resume(key, arg);\n        }\n      });\n    }\n\n    function resume(key, arg) {\n      try {\n        var result = gen[key](arg)\n        var value = result.value;\n        var wrappedAwait = value instanceof AwaitValue;\n\n        Promise.resolve(wrappedAwait ? value.wrapped : value).then(\n          function (arg) {\n            if (wrappedAwait) {\n              resume(key === \"return\" ? \"return\" : \"next\", arg);\n              return\n            }\n\n            settle(result.done ? \"return\" : \"normal\", arg);\n          },\n          function (err) { resume(\"throw\", err); });\n      } catch (err) {\n        settle(\"throw\", err);\n      }\n    }\n\n    function settle(type, value) {\n      switch (type) {\n        case \"return\":\n          front.resolve({ value: value, done: true });\n          break;\n        case \"throw\":\n          front.reject(value);\n          break;\n        default:\n          front.resolve({ value: value, done: false });\n          break;\n      }\n\n      front = front.next;\n      if (front) {\n        resume(front.key, front.arg);\n      } else {\n        back = null;\n      }\n    }\n\n    this._invoke = send;\n\n    // Hide \"return\" method if generator return is not supported\n    if (typeof gen.return !== \"function\") {\n      this.return = undefined;\n    }\n  }\n\n  AsyncGenerator.prototype[typeof Symbol === \"function\" && Symbol.asyncIterator || \"@@asyncIterator\"] = function () { return this; };\n\n  AsyncGenerator.prototype.next = function (arg) { return this._invoke(\"next\", arg); };\n  AsyncGenerator.prototype.throw = function (arg) { return this._invoke(\"throw\", arg); };\n  AsyncGenerator.prototype.return = function (arg) { return this._invoke(\"return\", arg); };\n`,i.wrapAsyncGenerator=a(\"7.0.0-beta.0\")`\n  import AsyncGenerator from \"AsyncGenerator\";\n\n  export default function _wrapAsyncGenerator(fn) {\n    return function () {\n      return new AsyncGenerator(fn.apply(this, arguments));\n    };\n  }\n`,i.awaitAsyncGenerator=a(\"7.0.0-beta.0\")`\n  import AwaitValue from \"AwaitValue\";\n\n  export default function _awaitAsyncGenerator(value) {\n    return new AwaitValue(value);\n  }\n`,i.asyncGeneratorDelegate=a(\"7.0.0-beta.0\")`\n  export default function _asyncGeneratorDelegate(inner, awaitWrap) {\n    var iter = {}, waiting = false;\n\n    function pump(key, value) {\n      waiting = true;\n      value = new Promise(function (resolve) { resolve(inner[key](value)); });\n      return { done: false, value: awaitWrap(value) };\n    };\n\n    iter[typeof Symbol !== \"undefined\" && Symbol.iterator || \"@@iterator\"] = function () { return this; };\n\n    iter.next = function (value) {\n      if (waiting) {\n        waiting = false;\n        return value;\n      }\n      return pump(\"next\", value);\n    };\n\n    if (typeof inner.throw === \"function\") {\n      iter.throw = function (value) {\n        if (waiting) {\n          waiting = false;\n          throw value;\n        }\n        return pump(\"throw\", value);\n      };\n    }\n\n    if (typeof inner.return === \"function\") {\n      iter.return = function (value) {\n        if (waiting) {\n          waiting = false;\n          return value;\n        }\n        return pump(\"return\", value);\n      };\n    }\n\n    return iter;\n  }\n`,i.asyncToGenerator=a(\"7.0.0-beta.0\")`\n  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n    try {\n      var info = gen[key](arg);\n      var value = info.value;\n    } catch (error) {\n      reject(error);\n      return;\n    }\n\n    if (info.done) {\n      resolve(value);\n    } else {\n      Promise.resolve(value).then(_next, _throw);\n    }\n  }\n\n  export default function _asyncToGenerator(fn) {\n    return function () {\n      var self = this, args = arguments;\n      return new Promise(function (resolve, reject) {\n        var gen = fn.apply(self, args);\n        function _next(value) {\n          asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n        }\n        function _throw(err) {\n          asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n        }\n\n        _next(undefined);\n      });\n    };\n  }\n`,i.classCallCheck=a(\"7.0.0-beta.0\")`\n  export default function _classCallCheck(instance, Constructor) {\n    if (!(instance instanceof Constructor)) {\n      throw new TypeError(\"Cannot call a class as a function\");\n    }\n  }\n`,i.createClass=a(\"7.0.0-beta.0\")`\n  function _defineProperties(target, props) {\n    for (var i = 0; i < props.length; i ++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      Object.defineProperty(target, descriptor.key, descriptor);\n    }\n  }\n\n  export default function _createClass(Constructor, protoProps, staticProps) {\n    if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) _defineProperties(Constructor, staticProps);\n    return Constructor;\n  }\n`,i.defineEnumerableProperties=a(\"7.0.0-beta.0\")`\n  export default function _defineEnumerableProperties(obj, descs) {\n    for (var key in descs) {\n      var desc = descs[key];\n      desc.configurable = desc.enumerable = true;\n      if (\"value\" in desc) desc.writable = true;\n      Object.defineProperty(obj, key, desc);\n    }\n\n    // Symbols are not enumerated over by for-in loops. If native\n    // Symbols are available, fetch all of the descs object's own\n    // symbol properties and define them on our target object too.\n    if (Object.getOwnPropertySymbols) {\n      var objectSymbols = Object.getOwnPropertySymbols(descs);\n      for (var i = 0; i < objectSymbols.length; i++) {\n        var sym = objectSymbols[i];\n        var desc = descs[sym];\n        desc.configurable = desc.enumerable = true;\n        if (\"value\" in desc) desc.writable = true;\n        Object.defineProperty(obj, sym, desc);\n      }\n    }\n    return obj;\n  }\n`,i.defaults=a(\"7.0.0-beta.0\")`\n  export default function _defaults(obj, defaults) {\n    var keys = Object.getOwnPropertyNames(defaults);\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n      var value = Object.getOwnPropertyDescriptor(defaults, key);\n      if (value && value.configurable && obj[key] === undefined) {\n        Object.defineProperty(obj, key, value);\n      }\n    }\n    return obj;\n  }\n`,i.defineProperty=a(\"7.0.0-beta.0\")`\n  export default function _defineProperty(obj, key, value) {\n    // Shortcircuit the slow defineProperty path when possible.\n    // We are trying to avoid issues where setters defined on the\n    // prototype cause side effects under the fast path of simple\n    // assignment. By checking for existence of the property with\n    // the in operator, we can optimize most of this overhead away.\n    if (key in obj) {\n      Object.defineProperty(obj, key, {\n        value: value,\n        enumerable: true,\n        configurable: true,\n        writable: true\n      });\n    } else {\n      obj[key] = value;\n    }\n    return obj;\n  }\n`,i.extends=a(\"7.0.0-beta.0\")`\n  export default function _extends() {\n    _extends = Object.assign || function (target) {\n      for (var i = 1; i < arguments.length; i++) {\n        var source = arguments[i];\n        for (var key in source) {\n          if (Object.prototype.hasOwnProperty.call(source, key)) {\n            target[key] = source[key];\n          }\n        }\n      }\n      return target;\n    };\n\n    return _extends.apply(this, arguments);\n  }\n`,i.objectSpread=a(\"7.0.0-beta.0\")`\n  import defineProperty from \"defineProperty\";\n\n  export default function _objectSpread(target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = (arguments[i] != null) ? Object(arguments[i]) : {};\n      var ownKeys = Object.keys(source);\n      if (typeof Object.getOwnPropertySymbols === 'function') {\n        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n          return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n        }));\n      }\n      ownKeys.forEach(function(key) {\n        defineProperty(target, key, source[key]);\n      });\n    }\n    return target;\n  }\n`,i.inherits=a(\"7.0.0-beta.0\")`\n  import setPrototypeOf from \"setPrototypeOf\";\n\n  export default function _inherits(subClass, superClass) {\n    if (typeof superClass !== \"function\" && superClass !== null) {\n      throw new TypeError(\"Super expression must either be null or a function\");\n    }\n    subClass.prototype = Object.create(superClass && superClass.prototype, {\n      constructor: {\n        value: subClass,\n        writable: true,\n        configurable: true\n      }\n    });\n    if (superClass) setPrototypeOf(subClass, superClass);\n  }\n`,i.inheritsLoose=a(\"7.0.0-beta.0\")`\n  import setPrototypeOf from \"setPrototypeOf\";\n\n  export default function _inheritsLoose(subClass, superClass) {\n    subClass.prototype = Object.create(superClass.prototype);\n    subClass.prototype.constructor = subClass;\n    setPrototypeOf(subClass, superClass);\n  }\n`,i.getPrototypeOf=a(\"7.0.0-beta.0\")`\n  export default function _getPrototypeOf(o) {\n    _getPrototypeOf = Object.setPrototypeOf\n      ? Object.getPrototypeOf\n      : function _getPrototypeOf(o) {\n          return o.__proto__ || Object.getPrototypeOf(o);\n        };\n    return _getPrototypeOf(o);\n  }\n`,i.setPrototypeOf=a(\"7.0.0-beta.0\")`\n  export default function _setPrototypeOf(o, p) {\n    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n      o.__proto__ = p;\n      return o;\n    };\n    return _setPrototypeOf(o, p);\n  }\n`,i.isNativeReflectConstruct=a(\"7.9.0\")`\n  export default function _isNativeReflectConstruct() {\n    if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n\n    // core-js@3\n    if (Reflect.construct.sham) return false;\n\n    // Proxy can't be polyfilled. Every browser implemented\n    // proxies before or at the same time as Reflect.construct,\n    // so if they support Proxy they also support Reflect.construct.\n    if (typeof Proxy === \"function\") return true;\n\n    // Since Reflect.construct can't be properly polyfilled, some\n    // implementations (e.g. core-js@2) don't set the correct internal slots.\n    // Those polyfills don't allow us to subclass built-ins, so we need to\n    // use our fallback implementation.\n    try {\n      // If the internal slots aren't set, this throws an error similar to\n      //   TypeError: this is not a Boolean object.\n\n      Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n      return true;\n    } catch (e) {\n      return false;\n    }\n  }\n`,i.construct=a(\"7.0.0-beta.0\")`\n  import setPrototypeOf from \"setPrototypeOf\";\n  import isNativeReflectConstruct from \"isNativeReflectConstruct\";\n\n  export default function _construct(Parent, args, Class) {\n    if (isNativeReflectConstruct()) {\n      _construct = Reflect.construct;\n    } else {\n      // NOTE: If Parent !== Class, the correct __proto__ is set *after*\n      //       calling the constructor.\n      _construct = function _construct(Parent, args, Class) {\n        var a = [null];\n        a.push.apply(a, args);\n        var Constructor = Function.bind.apply(Parent, a);\n        var instance = new Constructor();\n        if (Class) setPrototypeOf(instance, Class.prototype);\n        return instance;\n      };\n    }\n    // Avoid issues with Class being present but undefined when it wasn't\n    // present in the original call.\n    return _construct.apply(null, arguments);\n  }\n`,i.isNativeFunction=a(\"7.0.0-beta.0\")`\n  export default function _isNativeFunction(fn) {\n    // Note: This function returns \"true\" for core-js functions.\n    return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n  }\n`,i.wrapNativeSuper=a(\"7.0.0-beta.0\")`\n  import getPrototypeOf from \"getPrototypeOf\";\n  import setPrototypeOf from \"setPrototypeOf\";\n  import isNativeFunction from \"isNativeFunction\";\n  import construct from \"construct\";\n\n  export default function _wrapNativeSuper(Class) {\n    var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n    _wrapNativeSuper = function _wrapNativeSuper(Class) {\n      if (Class === null || !isNativeFunction(Class)) return Class;\n      if (typeof Class !== \"function\") {\n        throw new TypeError(\"Super expression must either be null or a function\");\n      }\n      if (typeof _cache !== \"undefined\") {\n        if (_cache.has(Class)) return _cache.get(Class);\n        _cache.set(Class, Wrapper);\n      }\n      function Wrapper() {\n        return construct(Class, arguments, getPrototypeOf(this).constructor)\n      }\n      Wrapper.prototype = Object.create(Class.prototype, {\n        constructor: {\n          value: Wrapper,\n          enumerable: false,\n          writable: true,\n          configurable: true,\n        }\n      });\n\n      return setPrototypeOf(Wrapper, Class);\n    }\n\n    return _wrapNativeSuper(Class)\n  }\n`,i.instanceof=a(\"7.0.0-beta.0\")`\n  export default function _instanceof(left, right) {\n    if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n      return !!right[Symbol.hasInstance](left);\n    } else {\n      return left instanceof right;\n    }\n  }\n`,i.interopRequireDefault=a(\"7.0.0-beta.0\")`\n  export default function _interopRequireDefault(obj) {\n    return obj && obj.__esModule ? obj : { default: obj };\n  }\n`,i.interopRequireWildcard=a(\"7.14.0\")`\n  function _getRequireWildcardCache(nodeInterop) {\n    if (typeof WeakMap !== \"function\") return null;\n\n    var cacheBabelInterop = new WeakMap();\n    var cacheNodeInterop = new WeakMap();\n    return (_getRequireWildcardCache = function (nodeInterop) {\n      return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n    })(nodeInterop);\n  }\n\n  export default function _interopRequireWildcard(obj, nodeInterop) {\n    if (!nodeInterop && obj && obj.__esModule) {\n      return obj;\n    }\n\n    if (obj === null || (typeof obj !== \"object\" && typeof obj !== \"function\")) {\n      return { default: obj }\n    }\n\n    var cache = _getRequireWildcardCache(nodeInterop);\n    if (cache && cache.has(obj)) {\n      return cache.get(obj);\n    }\n\n    var newObj = {};\n    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n    for (var key in obj) {\n      if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n        var desc = hasPropertyDescriptor\n          ? Object.getOwnPropertyDescriptor(obj, key)\n          : null;\n        if (desc && (desc.get || desc.set)) {\n          Object.defineProperty(newObj, key, desc);\n        } else {\n          newObj[key] = obj[key];\n        }\n      }\n    }\n    newObj.default = obj;\n    if (cache) {\n      cache.set(obj, newObj);\n    }\n    return newObj;\n  }\n`,i.newArrowCheck=a(\"7.0.0-beta.0\")`\n  export default function _newArrowCheck(innerThis, boundThis) {\n    if (innerThis !== boundThis) {\n      throw new TypeError(\"Cannot instantiate an arrow function\");\n    }\n  }\n`,i.objectDestructuringEmpty=a(\"7.0.0-beta.0\")`\n  export default function _objectDestructuringEmpty(obj) {\n    if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n  }\n`,i.objectWithoutPropertiesLoose=a(\"7.0.0-beta.0\")`\n  export default function _objectWithoutPropertiesLoose(source, excluded) {\n    if (source == null) return {};\n\n    var target = {};\n    var sourceKeys = Object.keys(source);\n    var key, i;\n\n    for (i = 0; i < sourceKeys.length; i++) {\n      key = sourceKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      target[key] = source[key];\n    }\n\n    return target;\n  }\n`,i.objectWithoutProperties=a(\"7.0.0-beta.0\")`\n  import objectWithoutPropertiesLoose from \"objectWithoutPropertiesLoose\";\n\n  export default function _objectWithoutProperties(source, excluded) {\n    if (source == null) return {};\n\n    var target = objectWithoutPropertiesLoose(source, excluded);\n    var key, i;\n\n    if (Object.getOwnPropertySymbols) {\n      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n      for (i = 0; i < sourceSymbolKeys.length; i++) {\n        key = sourceSymbolKeys[i];\n        if (excluded.indexOf(key) >= 0) continue;\n        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n        target[key] = source[key];\n      }\n    }\n\n    return target;\n  }\n`,i.assertThisInitialized=a(\"7.0.0-beta.0\")`\n  export default function _assertThisInitialized(self) {\n    if (self === void 0) {\n      throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n    }\n    return self;\n  }\n`,i.possibleConstructorReturn=a(\"7.0.0-beta.0\")`\n  import assertThisInitialized from \"assertThisInitialized\";\n\n  export default function _possibleConstructorReturn(self, call) {\n    if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n      return call;\n    }\n    return assertThisInitialized(self);\n  }\n`,i.createSuper=a(\"7.9.0\")`\n  import getPrototypeOf from \"getPrototypeOf\";\n  import isNativeReflectConstruct from \"isNativeReflectConstruct\";\n  import possibleConstructorReturn from \"possibleConstructorReturn\";\n\n  export default function _createSuper(Derived) {\n    var hasNativeReflectConstruct = isNativeReflectConstruct();\n\n    return function _createSuperInternal() {\n      var Super = getPrototypeOf(Derived), result;\n      if (hasNativeReflectConstruct) {\n        // NOTE: This doesn't work if this.__proto__.constructor has been modified.\n        var NewTarget = getPrototypeOf(this).constructor;\n        result = Reflect.construct(Super, arguments, NewTarget);\n      } else {\n        result = Super.apply(this, arguments);\n      }\n      return possibleConstructorReturn(this, result);\n    }\n  }\n `,i.superPropBase=a(\"7.0.0-beta.0\")`\n  import getPrototypeOf from \"getPrototypeOf\";\n\n  export default function _superPropBase(object, property) {\n    // Yes, this throws if object is null to being with, that's on purpose.\n    while (!Object.prototype.hasOwnProperty.call(object, property)) {\n      object = getPrototypeOf(object);\n      if (object === null) break;\n    }\n    return object;\n  }\n`,i.get=a(\"7.0.0-beta.0\")`\n  import superPropBase from \"superPropBase\";\n\n  export default function _get(target, property, receiver) {\n    if (typeof Reflect !== \"undefined\" && Reflect.get) {\n      _get = Reflect.get;\n    } else {\n      _get = function _get(target, property, receiver) {\n        var base = superPropBase(target, property);\n\n        if (!base) return;\n\n        var desc = Object.getOwnPropertyDescriptor(base, property);\n        if (desc.get) {\n          return desc.get.call(receiver);\n        }\n\n        return desc.value;\n      };\n    }\n    return _get(target, property, receiver || target);\n  }\n`,i.set=a(\"7.0.0-beta.0\")`\n  import superPropBase from \"superPropBase\";\n  import defineProperty from \"defineProperty\";\n\n  function set(target, property, value, receiver) {\n    if (typeof Reflect !== \"undefined\" && Reflect.set) {\n      set = Reflect.set;\n    } else {\n      set = function set(target, property, value, receiver) {\n        var base = superPropBase(target, property);\n        var desc;\n\n        if (base) {\n          desc = Object.getOwnPropertyDescriptor(base, property);\n          if (desc.set) {\n            desc.set.call(receiver, value);\n            return true;\n          } else if (!desc.writable) {\n            // Both getter and non-writable fall into this.\n            return false;\n          }\n        }\n\n        // Without a super that defines the property, spec boils down to\n        // \"define on receiver\" for some reason.\n        desc = Object.getOwnPropertyDescriptor(receiver, property);\n        if (desc) {\n          if (!desc.writable) {\n            // Setter, getter, and non-writable fall into this.\n            return false;\n          }\n\n          desc.value = value;\n          Object.defineProperty(receiver, property, desc);\n        } else {\n          // Avoid setters that may be defined on Sub's prototype, but not on\n          // the instance.\n          defineProperty(receiver, property, value);\n        }\n\n        return true;\n      };\n    }\n\n    return set(target, property, value, receiver);\n  }\n\n  export default function _set(target, property, value, receiver, isStrict) {\n    var s = set(target, property, value, receiver || target);\n    if (!s && isStrict) {\n      throw new Error('failed to set property');\n    }\n\n    return value;\n  }\n`,i.taggedTemplateLiteral=a(\"7.0.0-beta.0\")`\n  export default function _taggedTemplateLiteral(strings, raw) {\n    if (!raw) { raw = strings.slice(0); }\n    return Object.freeze(Object.defineProperties(strings, {\n        raw: { value: Object.freeze(raw) }\n    }));\n  }\n`,i.taggedTemplateLiteralLoose=a(\"7.0.0-beta.0\")`\n  export default function _taggedTemplateLiteralLoose(strings, raw) {\n    if (!raw) { raw = strings.slice(0); }\n    strings.raw = raw;\n    return strings;\n  }\n`,i.readOnlyError=a(\"7.0.0-beta.0\")`\n  export default function _readOnlyError(name) {\n    throw new TypeError(\"\\\\\"\" + name + \"\\\\\" is read-only\");\n  }\n`,i.writeOnlyError=a(\"7.12.13\")`\n  export default function _writeOnlyError(name) {\n    throw new TypeError(\"\\\\\"\" + name + \"\\\\\" is write-only\");\n  }\n`,i.classNameTDZError=a(\"7.0.0-beta.0\")`\n  export default function _classNameTDZError(name) {\n    throw new Error(\"Class \\\\\"\" + name + \"\\\\\" cannot be referenced in computed property keys.\");\n  }\n`,i.temporalUndefined=a(\"7.0.0-beta.0\")`\n  // This function isn't mean to be called, but to be used as a reference.\n  // We can't use a normal object because it isn't hoisted.\n  export default function _temporalUndefined() {}\n`,i.tdz=a(\"7.5.5\")`\n  export default function _tdzError(name) {\n    throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n  }\n`,i.temporalRef=a(\"7.0.0-beta.0\")`\n  import undef from \"temporalUndefined\";\n  import err from \"tdz\";\n\n  export default function _temporalRef(val, name) {\n    return val === undef ? err(name) : val;\n  }\n`,i.slicedToArray=a(\"7.0.0-beta.0\")`\n  import arrayWithHoles from \"arrayWithHoles\";\n  import iterableToArrayLimit from \"iterableToArrayLimit\";\n  import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n  import nonIterableRest from \"nonIterableRest\";\n\n  export default function _slicedToArray(arr, i) {\n    return (\n      arrayWithHoles(arr) ||\n      iterableToArrayLimit(arr, i) ||\n      unsupportedIterableToArray(arr, i) ||\n      nonIterableRest()\n    );\n  }\n`,i.slicedToArrayLoose=a(\"7.0.0-beta.0\")`\n  import arrayWithHoles from \"arrayWithHoles\";\n  import iterableToArrayLimitLoose from \"iterableToArrayLimitLoose\";\n  import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n  import nonIterableRest from \"nonIterableRest\";\n\n  export default function _slicedToArrayLoose(arr, i) {\n    return (\n      arrayWithHoles(arr) ||\n      iterableToArrayLimitLoose(arr, i) ||\n      unsupportedIterableToArray(arr, i) ||\n      nonIterableRest()\n    );\n  }\n`,i.toArray=a(\"7.0.0-beta.0\")`\n  import arrayWithHoles from \"arrayWithHoles\";\n  import iterableToArray from \"iterableToArray\";\n  import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n  import nonIterableRest from \"nonIterableRest\";\n\n  export default function _toArray(arr) {\n    return (\n      arrayWithHoles(arr) ||\n      iterableToArray(arr) ||\n      unsupportedIterableToArray(arr) ||\n      nonIterableRest()\n    );\n  }\n`,i.toConsumableArray=a(\"7.0.0-beta.0\")`\n  import arrayWithoutHoles from \"arrayWithoutHoles\";\n  import iterableToArray from \"iterableToArray\";\n  import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n  import nonIterableSpread from \"nonIterableSpread\";\n\n  export default function _toConsumableArray(arr) {\n    return (\n      arrayWithoutHoles(arr) ||\n      iterableToArray(arr) ||\n      unsupportedIterableToArray(arr) ||\n      nonIterableSpread()\n    );\n  }\n`,i.arrayWithoutHoles=a(\"7.0.0-beta.0\")`\n  import arrayLikeToArray from \"arrayLikeToArray\";\n\n  export default function _arrayWithoutHoles(arr) {\n    if (Array.isArray(arr)) return arrayLikeToArray(arr);\n  }\n`,i.arrayWithHoles=a(\"7.0.0-beta.0\")`\n  export default function _arrayWithHoles(arr) {\n    if (Array.isArray(arr)) return arr;\n  }\n`,i.maybeArrayLike=a(\"7.9.0\")`\n  import arrayLikeToArray from \"arrayLikeToArray\";\n\n  export default function _maybeArrayLike(next, arr, i) {\n    if (arr && !Array.isArray(arr) && typeof arr.length === \"number\") {\n      var len = arr.length;\n      return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len);\n    }\n    return next(arr, i);\n  }\n`,i.iterableToArray=a(\"7.0.0-beta.0\")`\n  export default function _iterableToArray(iter) {\n    if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n  }\n`,i.iterableToArrayLimit=a(\"7.0.0-beta.0\")`\n  export default function _iterableToArrayLimit(arr, i) {\n    // this is an expanded form of \\`for...of\\` that properly supports abrupt completions of\n    // iterators etc. variable names have been minimised to reduce the size of this massive\n    // helper. sometimes spec compliance is annoying :(\n    //\n    // _n = _iteratorNormalCompletion\n    // _d = _didIteratorError\n    // _e = _iteratorError\n    // _i = _iterator\n    // _s = _step\n\n    var _i = arr == null ? null : (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n    if (_i == null) return;\n\n    var _arr = [];\n    var _n = true;\n    var _d = false;\n    var _s, _e;\n    try {\n      for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n        _arr.push(_s.value);\n        if (i && _arr.length === i) break;\n      }\n    } catch (err) {\n      _d = true;\n      _e = err;\n    } finally {\n      try {\n        if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n      } finally {\n        if (_d) throw _e;\n      }\n    }\n    return _arr;\n  }\n`,i.iterableToArrayLimitLoose=a(\"7.0.0-beta.0\")`\n  export default function _iterableToArrayLimitLoose(arr, i) {\n    var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n    if (_i == null) return;\n\n    var _arr = [];\n    for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {\n      _arr.push(_step.value);\n      if (i && _arr.length === i) break;\n    }\n    return _arr;\n  }\n`,i.unsupportedIterableToArray=a(\"7.9.0\")`\n  import arrayLikeToArray from \"arrayLikeToArray\";\n\n  export default function _unsupportedIterableToArray(o, minLen) {\n    if (!o) return;\n    if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n    var n = Object.prototype.toString.call(o).slice(8, -1);\n    if (n === \"Object\" && o.constructor) n = o.constructor.name;\n    if (n === \"Map\" || n === \"Set\") return Array.from(o);\n    if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))\n      return arrayLikeToArray(o, minLen);\n  }\n`,i.arrayLikeToArray=a(\"7.9.0\")`\n  export default function _arrayLikeToArray(arr, len) {\n    if (len == null || len > arr.length) len = arr.length;\n    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n    return arr2;\n  }\n`,i.nonIterableSpread=a(\"7.0.0-beta.0\")`\n  export default function _nonIterableSpread() {\n    throw new TypeError(\n      \"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"\n    );\n  }\n`,i.nonIterableRest=a(\"7.0.0-beta.0\")`\n  export default function _nonIterableRest() {\n    throw new TypeError(\n      \"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"\n    );\n  }\n`,i.createForOfIteratorHelper=a(\"7.9.0\")`\n  import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n\n  // s: start (create the iterator)\n  // n: next\n  // e: error (called whenever something throws)\n  // f: finish (always called at the end)\n\n  export default function _createForOfIteratorHelper(o, allowArrayLike) {\n    var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n    if (!it) {\n      // Fallback for engines without symbol support\n      if (\n        Array.isArray(o) ||\n        (it = unsupportedIterableToArray(o)) ||\n        (allowArrayLike && o && typeof o.length === \"number\")\n      ) {\n        if (it) o = it;\n        var i = 0;\n        var F = function(){};\n        return {\n          s: F,\n          n: function() {\n            if (i >= o.length) return { done: true };\n            return { done: false, value: o[i++] };\n          },\n          e: function(e) { throw e; },\n          f: F,\n        };\n      }\n\n      throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n    }\n\n    var normalCompletion = true, didErr = false, err;\n\n    return {\n      s: function() {\n        it = it.call(o);\n      },\n      n: function() {\n        var step = it.next();\n        normalCompletion = step.done;\n        return step;\n      },\n      e: function(e) {\n        didErr = true;\n        err = e;\n      },\n      f: function() {\n        try {\n          if (!normalCompletion && it.return != null) it.return();\n        } finally {\n          if (didErr) throw err;\n        }\n      }\n    };\n  }\n`,i.createForOfIteratorHelperLoose=a(\"7.9.0\")`\n  import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n\n  export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n    var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n    if (it) return (it = it.call(o)).next.bind(it);\n\n    // Fallback for engines without symbol support\n    if (\n      Array.isArray(o) ||\n      (it = unsupportedIterableToArray(o)) ||\n      (allowArrayLike && o && typeof o.length === \"number\")\n    ) {\n      if (it) o = it;\n      var i = 0;\n      return function() {\n        if (i >= o.length) return { done: true };\n        return { done: false, value: o[i++] };\n      }\n    }\n\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n`,i.skipFirstGeneratorNext=a(\"7.0.0-beta.0\")`\n  export default function _skipFirstGeneratorNext(fn) {\n    return function () {\n      var it = fn.apply(this, arguments);\n      it.next();\n      return it;\n    }\n  }\n`,i.toPrimitive=a(\"7.1.5\")`\n  export default function _toPrimitive(\n    input,\n    hint /*: \"default\" | \"string\" | \"number\" | void */\n  ) {\n    if (typeof input !== \"object\" || input === null) return input;\n    var prim = input[Symbol.toPrimitive];\n    if (prim !== undefined) {\n      var res = prim.call(input, hint || \"default\");\n      if (typeof res !== \"object\") return res;\n      throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n    }\n    return (hint === \"string\" ? String : Number)(input);\n  }\n`,i.toPropertyKey=a(\"7.1.5\")`\n  import toPrimitive from \"toPrimitive\";\n\n  export default function _toPropertyKey(arg) {\n    var key = toPrimitive(arg, \"string\");\n    return typeof key === \"symbol\" ? key : String(key);\n  }\n`,i.initializerWarningHelper=a(\"7.0.0-beta.0\")`\n    export default function _initializerWarningHelper(descriptor, context){\n        throw new Error(\n          'Decorating class property failed. Please ensure that ' +\n          'proposal-class-properties is enabled and runs after the decorators transform.'\n        );\n    }\n`,i.initializerDefineProperty=a(\"7.0.0-beta.0\")`\n    export default function _initializerDefineProperty(target, property, descriptor, context){\n        if (!descriptor) return;\n\n        Object.defineProperty(target, property, {\n            enumerable: descriptor.enumerable,\n            configurable: descriptor.configurable,\n            writable: descriptor.writable,\n            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n        });\n    }\n`,i.applyDecoratedDescriptor=a(\"7.0.0-beta.0\")`\n    export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){\n        var desc = {};\n        Object.keys(descriptor).forEach(function(key){\n            desc[key] = descriptor[key];\n        });\n        desc.enumerable = !!desc.enumerable;\n        desc.configurable = !!desc.configurable;\n        if ('value' in desc || desc.initializer){\n            desc.writable = true;\n        }\n\n        desc = decorators.slice().reverse().reduce(function(desc, decorator){\n            return decorator(target, property, desc) || desc;\n        }, desc);\n\n        if (context && desc.initializer !== void 0){\n            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n            desc.initializer = undefined;\n        }\n\n        if (desc.initializer === void 0){\n            Object.defineProperty(target, property, desc);\n            desc = null;\n        }\n\n        return desc;\n    }\n`,i.classPrivateFieldLooseKey=a(\"7.0.0-beta.0\")`\n  var id = 0;\n  export default function _classPrivateFieldKey(name) {\n    return \"__private_\" + (id++) + \"_\" + name;\n  }\n`,i.classPrivateFieldLooseBase=a(\"7.0.0-beta.0\")`\n  export default function _classPrivateFieldBase(receiver, privateKey) {\n    if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {\n      throw new TypeError(\"attempted to use private field on non-instance\");\n    }\n    return receiver;\n  }\n`,i.classPrivateFieldGet=a(\"7.0.0-beta.0\")`\n  import classApplyDescriptorGet from \"classApplyDescriptorGet\";\n  import classExtractFieldDescriptor from \"classExtractFieldDescriptor\";\n  export default function _classPrivateFieldGet(receiver, privateMap) {\n    var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n    return classApplyDescriptorGet(receiver, descriptor);\n  }\n`,i.classPrivateFieldSet=a(\"7.0.0-beta.0\")`\n  import classApplyDescriptorSet from \"classApplyDescriptorSet\";\n  import classExtractFieldDescriptor from \"classExtractFieldDescriptor\";\n  export default function _classPrivateFieldSet(receiver, privateMap, value) {\n    var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"set\");\n    classApplyDescriptorSet(receiver, descriptor, value);\n    return value;\n  }\n`,i.classPrivateFieldDestructureSet=a(\"7.4.4\")`\n  import classApplyDescriptorDestructureSet from \"classApplyDescriptorDestructureSet\";\n  import classExtractFieldDescriptor from \"classExtractFieldDescriptor\";\n  export default function _classPrivateFieldDestructureSet(receiver, privateMap) {\n    var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"set\");\n    return classApplyDescriptorDestructureSet(receiver, descriptor);\n  }\n`,i.classExtractFieldDescriptor=a(\"7.13.10\")`\n  export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n    if (!privateMap.has(receiver)) {\n      throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n    }\n    return privateMap.get(receiver);\n  }\n`,i.classStaticPrivateFieldSpecGet=a(\"7.0.2\")`\n  import classApplyDescriptorGet from \"classApplyDescriptorGet\";\n  import classCheckPrivateStaticAccess from \"classCheckPrivateStaticAccess\";\n  import classCheckPrivateStaticFieldDescriptor from \"classCheckPrivateStaticFieldDescriptor\";\n  export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {\n    classCheckPrivateStaticAccess(receiver, classConstructor);\n    classCheckPrivateStaticFieldDescriptor(descriptor, \"get\");\n    return classApplyDescriptorGet(receiver, descriptor);\n  }\n`,i.classStaticPrivateFieldSpecSet=a(\"7.0.2\")`\n  import classApplyDescriptorSet from \"classApplyDescriptorSet\";\n  import classCheckPrivateStaticAccess from \"classCheckPrivateStaticAccess\";\n  import classCheckPrivateStaticFieldDescriptor from \"classCheckPrivateStaticFieldDescriptor\";\n  export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {\n    classCheckPrivateStaticAccess(receiver, classConstructor);\n    classCheckPrivateStaticFieldDescriptor(descriptor, \"set\");\n    classApplyDescriptorSet(receiver, descriptor, value);\n    return value;\n  }\n`,i.classStaticPrivateMethodGet=a(\"7.3.2\")`\n  import classCheckPrivateStaticAccess from \"classCheckPrivateStaticAccess\";\n  export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) {\n    classCheckPrivateStaticAccess(receiver, classConstructor);\n    return method;\n  }\n`,i.classStaticPrivateMethodSet=a(\"7.3.2\")`\n  export default function _classStaticPrivateMethodSet() {\n    throw new TypeError(\"attempted to set read only static private field\");\n  }\n`,i.classApplyDescriptorGet=a(\"7.13.10\")`\n  export default function _classApplyDescriptorGet(receiver, descriptor) {\n    if (descriptor.get) {\n      return descriptor.get.call(receiver);\n    }\n    return descriptor.value;\n  }\n`,i.classApplyDescriptorSet=a(\"7.13.10\")`\n  export default function _classApplyDescriptorSet(receiver, descriptor, value) {\n    if (descriptor.set) {\n      descriptor.set.call(receiver, value);\n    } else {\n      if (!descriptor.writable) {\n        // This should only throw in strict mode, but class bodies are\n        // always strict and private fields can only be used inside\n        // class bodies.\n        throw new TypeError(\"attempted to set read only private field\");\n      }\n      descriptor.value = value;\n    }\n  }\n`,i.classApplyDescriptorDestructureSet=a(\"7.13.10\")`\n  export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {\n    if (descriptor.set) {\n      if (!(\"__destrObj\" in descriptor)) {\n        descriptor.__destrObj = {\n          set value(v) {\n            descriptor.set.call(receiver, v)\n          },\n        };\n      }\n      return descriptor.__destrObj;\n    } else {\n      if (!descriptor.writable) {\n        // This should only throw in strict mode, but class bodies are\n        // always strict and private fields can only be used inside\n        // class bodies.\n        throw new TypeError(\"attempted to set read only private field\");\n      }\n\n      return descriptor;\n    }\n  }\n`,i.classStaticPrivateFieldDestructureSet=a(\"7.13.10\")`\n  import classApplyDescriptorDestructureSet from \"classApplyDescriptorDestructureSet\";\n  import classCheckPrivateStaticAccess from \"classCheckPrivateStaticAccess\";\n  import classCheckPrivateStaticFieldDescriptor from \"classCheckPrivateStaticFieldDescriptor\";\n  export default function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {\n    classCheckPrivateStaticAccess(receiver, classConstructor);\n    classCheckPrivateStaticFieldDescriptor(descriptor, \"set\");\n    return classApplyDescriptorDestructureSet(receiver, descriptor);\n  }\n`,i.classCheckPrivateStaticAccess=a(\"7.13.10\")`\n  export default function _classCheckPrivateStaticAccess(receiver, classConstructor) {\n    if (receiver !== classConstructor) {\n      throw new TypeError(\"Private static access of wrong provenance\");\n    }\n  }\n`,i.classCheckPrivateStaticFieldDescriptor=a(\"7.13.10\")`\n  export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {\n    if (descriptor === undefined) {\n      throw new TypeError(\"attempted to \" + action + \" private static field before its declaration\");\n    }\n  }\n`,i.decorate=a(\"7.1.5\")`\n  import toArray from \"toArray\";\n  import toPropertyKey from \"toPropertyKey\";\n\n  // These comments are stripped by @babel/template\n  /*::\n  type PropertyDescriptor =\n    | {\n        value: any,\n        writable: boolean,\n        configurable: boolean,\n        enumerable: boolean,\n      }\n    | {\n        get?: () => any,\n        set?: (v: any) => void,\n        configurable: boolean,\n        enumerable: boolean,\n      };\n\n  type FieldDescriptor ={\n    writable: boolean,\n    configurable: boolean,\n    enumerable: boolean,\n  };\n\n  type Placement = \"static\" | \"prototype\" | \"own\";\n  type Key = string | symbol; // PrivateName is not supported yet.\n\n  type ElementDescriptor =\n    | {\n        kind: \"method\",\n        key: Key,\n        placement: Placement,\n        descriptor: PropertyDescriptor\n      }\n    | {\n        kind: \"field\",\n        key: Key,\n        placement: Placement,\n        descriptor: FieldDescriptor,\n        initializer?: () => any,\n      };\n\n  // This is exposed to the user code\n  type ElementObjectInput = ElementDescriptor & {\n    [@@toStringTag]?: \"Descriptor\"\n  };\n\n  // This is exposed to the user code\n  type ElementObjectOutput = ElementDescriptor & {\n    [@@toStringTag]?: \"Descriptor\"\n    extras?: ElementDescriptor[],\n    finisher?: ClassFinisher,\n  };\n\n  // This is exposed to the user code\n  type ClassObject = {\n    [@@toStringTag]?: \"Descriptor\",\n    kind: \"class\",\n    elements: ElementDescriptor[],\n  };\n\n  type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput;\n  type ClassDecorator = (descriptor: ClassObject) => ?ClassObject;\n  type ClassFinisher = <A, B>(cl: Class<A>) => Class<B>;\n\n  // Only used by Babel in the transform output, not part of the spec.\n  type ElementDefinition =\n    | {\n        kind: \"method\",\n        value: any,\n        key: Key,\n        static?: boolean,\n        decorators?: ElementDecorator[],\n      }\n    | {\n        kind: \"field\",\n        value: () => any,\n        key: Key,\n        static?: boolean,\n        decorators?: ElementDecorator[],\n    };\n\n  declare function ClassFactory<C>(initialize: (instance: C) => void): {\n    F: Class<C>,\n    d: ElementDefinition[]\n  }\n\n  */\n\n  /*::\n  // Various combinations with/without extras and with one or many finishers\n\n  type ElementFinisherExtras = {\n    element: ElementDescriptor,\n    finisher?: ClassFinisher,\n    extras?: ElementDescriptor[],\n  };\n\n  type ElementFinishersExtras = {\n    element: ElementDescriptor,\n    finishers: ClassFinisher[],\n    extras: ElementDescriptor[],\n  };\n\n  type ElementsFinisher = {\n    elements: ElementDescriptor[],\n    finisher?: ClassFinisher,\n  };\n\n  type ElementsFinishers = {\n    elements: ElementDescriptor[],\n    finishers: ClassFinisher[],\n  };\n\n  */\n\n  /*::\n\n  type Placements = {\n    static: Key[],\n    prototype: Key[],\n    own: Key[],\n  };\n\n  */\n\n  // ClassDefinitionEvaluation (Steps 26-*)\n  export default function _decorate(\n    decorators /*: ClassDecorator[] */,\n    factory /*: ClassFactory */,\n    superClass /*: ?Class<*> */,\n    mixins /*: ?Array<Function> */,\n  ) /*: Class<*> */ {\n    var api = _getDecoratorsApi();\n    if (mixins) {\n      for (var i = 0; i < mixins.length; i++) {\n        api = mixins[i](api);\n      }\n    }\n\n    var r = factory(function initialize(O) {\n      api.initializeInstanceElements(O, decorated.elements);\n    }, superClass);\n    var decorated = api.decorateClass(\n      _coalesceClassElements(r.d.map(_createElementDescriptor)),\n      decorators,\n    );\n\n    api.initializeClassElements(r.F, decorated.elements);\n\n    return api.runClassFinishers(r.F, decorated.finishers);\n  }\n\n  function _getDecoratorsApi() {\n    _getDecoratorsApi = function() {\n      return api;\n    };\n\n    var api = {\n      elementsDefinitionOrder: [[\"method\"], [\"field\"]],\n\n      // InitializeInstanceElements\n      initializeInstanceElements: function(\n        /*::<C>*/ O /*: C */,\n        elements /*: ElementDescriptor[] */,\n      ) {\n        [\"method\", \"field\"].forEach(function(kind) {\n          elements.forEach(function(element /*: ElementDescriptor */) {\n            if (element.kind === kind && element.placement === \"own\") {\n              this.defineClassElement(O, element);\n            }\n          }, this);\n        }, this);\n      },\n\n      // InitializeClassElements\n      initializeClassElements: function(\n        /*::<C>*/ F /*: Class<C> */,\n        elements /*: ElementDescriptor[] */,\n      ) {\n        var proto = F.prototype;\n\n        [\"method\", \"field\"].forEach(function(kind) {\n          elements.forEach(function(element /*: ElementDescriptor */) {\n            var placement = element.placement;\n            if (\n              element.kind === kind &&\n              (placement === \"static\" || placement === \"prototype\")\n            ) {\n              var receiver = placement === \"static\" ? F : proto;\n              this.defineClassElement(receiver, element);\n            }\n          }, this);\n        }, this);\n      },\n\n      // DefineClassElement\n      defineClassElement: function(\n        /*::<C>*/ receiver /*: C | Class<C> */,\n        element /*: ElementDescriptor */,\n      ) {\n        var descriptor /*: PropertyDescriptor */ = element.descriptor;\n        if (element.kind === \"field\") {\n          var initializer = element.initializer;\n          descriptor = {\n            enumerable: descriptor.enumerable,\n            writable: descriptor.writable,\n            configurable: descriptor.configurable,\n            value: initializer === void 0 ? void 0 : initializer.call(receiver),\n          };\n        }\n        Object.defineProperty(receiver, element.key, descriptor);\n      },\n\n      // DecorateClass\n      decorateClass: function(\n        elements /*: ElementDescriptor[] */,\n        decorators /*: ClassDecorator[] */,\n      ) /*: ElementsFinishers */ {\n        var newElements /*: ElementDescriptor[] */ = [];\n        var finishers /*: ClassFinisher[] */ = [];\n        var placements /*: Placements */ = {\n          static: [],\n          prototype: [],\n          own: [],\n        };\n\n        elements.forEach(function(element /*: ElementDescriptor */) {\n          this.addElementPlacement(element, placements);\n        }, this);\n\n        elements.forEach(function(element /*: ElementDescriptor */) {\n          if (!_hasDecorators(element)) return newElements.push(element);\n\n          var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement(\n            element,\n            placements,\n          );\n          newElements.push(elementFinishersExtras.element);\n          newElements.push.apply(newElements, elementFinishersExtras.extras);\n          finishers.push.apply(finishers, elementFinishersExtras.finishers);\n        }, this);\n\n        if (!decorators) {\n          return { elements: newElements, finishers: finishers };\n        }\n\n        var result /*: ElementsFinishers */ = this.decorateConstructor(\n          newElements,\n          decorators,\n        );\n        finishers.push.apply(finishers, result.finishers);\n        result.finishers = finishers;\n\n        return result;\n      },\n\n      // AddElementPlacement\n      addElementPlacement: function(\n        element /*: ElementDescriptor */,\n        placements /*: Placements */,\n        silent /*: boolean */,\n      ) {\n        var keys = placements[element.placement];\n        if (!silent && keys.indexOf(element.key) !== -1) {\n          throw new TypeError(\"Duplicated element (\" + element.key + \")\");\n        }\n        keys.push(element.key);\n      },\n\n      // DecorateElement\n      decorateElement: function(\n        element /*: ElementDescriptor */,\n        placements /*: Placements */,\n      ) /*: ElementFinishersExtras */ {\n        var extras /*: ElementDescriptor[] */ = [];\n        var finishers /*: ClassFinisher[] */ = [];\n\n        for (\n          var decorators = element.decorators, i = decorators.length - 1;\n          i >= 0;\n          i--\n        ) {\n          // (inlined) RemoveElementPlacement\n          var keys = placements[element.placement];\n          keys.splice(keys.indexOf(element.key), 1);\n\n          var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor(\n            element,\n          );\n          var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras(\n            (0, decorators[i])(elementObject) /*: ElementObjectOutput */ ||\n              elementObject,\n          );\n\n          element = elementFinisherExtras.element;\n          this.addElementPlacement(element, placements);\n\n          if (elementFinisherExtras.finisher) {\n            finishers.push(elementFinisherExtras.finisher);\n          }\n\n          var newExtras /*: ElementDescriptor[] | void */ =\n            elementFinisherExtras.extras;\n          if (newExtras) {\n            for (var j = 0; j < newExtras.length; j++) {\n              this.addElementPlacement(newExtras[j], placements);\n            }\n            extras.push.apply(extras, newExtras);\n          }\n        }\n\n        return { element: element, finishers: finishers, extras: extras };\n      },\n\n      // DecorateConstructor\n      decorateConstructor: function(\n        elements /*: ElementDescriptor[] */,\n        decorators /*: ClassDecorator[] */,\n      ) /*: ElementsFinishers */ {\n        var finishers /*: ClassFinisher[] */ = [];\n\n        for (var i = decorators.length - 1; i >= 0; i--) {\n          var obj /*: ClassObject */ = this.fromClassDescriptor(elements);\n          var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor(\n            (0, decorators[i])(obj) /*: ClassObject */ || obj,\n          );\n\n          if (elementsAndFinisher.finisher !== undefined) {\n            finishers.push(elementsAndFinisher.finisher);\n          }\n\n          if (elementsAndFinisher.elements !== undefined) {\n            elements = elementsAndFinisher.elements;\n\n            for (var j = 0; j < elements.length - 1; j++) {\n              for (var k = j + 1; k < elements.length; k++) {\n                if (\n                  elements[j].key === elements[k].key &&\n                  elements[j].placement === elements[k].placement\n                ) {\n                  throw new TypeError(\n                    \"Duplicated element (\" + elements[j].key + \")\",\n                  );\n                }\n              }\n            }\n          }\n        }\n\n        return { elements: elements, finishers: finishers };\n      },\n\n      // FromElementDescriptor\n      fromElementDescriptor: function(\n        element /*: ElementDescriptor */,\n      ) /*: ElementObject */ {\n        var obj /*: ElementObject */ = {\n          kind: element.kind,\n          key: element.key,\n          placement: element.placement,\n          descriptor: element.descriptor,\n        };\n\n        var desc = {\n          value: \"Descriptor\",\n          configurable: true,\n        };\n        Object.defineProperty(obj, Symbol.toStringTag, desc);\n\n        if (element.kind === \"field\") obj.initializer = element.initializer;\n\n        return obj;\n      },\n\n      // ToElementDescriptors\n      toElementDescriptors: function(\n        elementObjects /*: ElementObject[] */,\n      ) /*: ElementDescriptor[] */ {\n        if (elementObjects === undefined) return;\n        return toArray(elementObjects).map(function(elementObject) {\n          var element = this.toElementDescriptor(elementObject);\n          this.disallowProperty(elementObject, \"finisher\", \"An element descriptor\");\n          this.disallowProperty(elementObject, \"extras\", \"An element descriptor\");\n          return element;\n        }, this);\n      },\n\n      // ToElementDescriptor\n      toElementDescriptor: function(\n        elementObject /*: ElementObject */,\n      ) /*: ElementDescriptor */ {\n        var kind = String(elementObject.kind);\n        if (kind !== \"method\" && kind !== \"field\") {\n          throw new TypeError(\n            'An element descriptor\\\\'s .kind property must be either \"method\" or' +\n              ' \"field\", but a decorator created an element descriptor with' +\n              ' .kind \"' +\n              kind +\n              '\"',\n          );\n        }\n\n        var key = toPropertyKey(elementObject.key);\n\n        var placement = String(elementObject.placement);\n        if (\n          placement !== \"static\" &&\n          placement !== \"prototype\" &&\n          placement !== \"own\"\n        ) {\n          throw new TypeError(\n            'An element descriptor\\\\'s .placement property must be one of \"static\",' +\n              ' \"prototype\" or \"own\", but a decorator created an element descriptor' +\n              ' with .placement \"' +\n              placement +\n              '\"',\n          );\n        }\n\n        var descriptor /*: PropertyDescriptor */ = elementObject.descriptor;\n\n        this.disallowProperty(elementObject, \"elements\", \"An element descriptor\");\n\n        var element /*: ElementDescriptor */ = {\n          kind: kind,\n          key: key,\n          placement: placement,\n          descriptor: Object.assign({}, descriptor),\n        };\n\n        if (kind !== \"field\") {\n          this.disallowProperty(elementObject, \"initializer\", \"A method descriptor\");\n        } else {\n          this.disallowProperty(\n            descriptor,\n            \"get\",\n            \"The property descriptor of a field descriptor\",\n          );\n          this.disallowProperty(\n            descriptor,\n            \"set\",\n            \"The property descriptor of a field descriptor\",\n          );\n          this.disallowProperty(\n            descriptor,\n            \"value\",\n            \"The property descriptor of a field descriptor\",\n          );\n\n          element.initializer = elementObject.initializer;\n        }\n\n        return element;\n      },\n\n      toElementFinisherExtras: function(\n        elementObject /*: ElementObject */,\n      ) /*: ElementFinisherExtras */ {\n        var element /*: ElementDescriptor */ = this.toElementDescriptor(\n          elementObject,\n        );\n        var finisher /*: ClassFinisher */ = _optionalCallableProperty(\n          elementObject,\n          \"finisher\",\n        );\n        var extras /*: ElementDescriptors[] */ = this.toElementDescriptors(\n          elementObject.extras,\n        );\n\n        return { element: element, finisher: finisher, extras: extras };\n      },\n\n      // FromClassDescriptor\n      fromClassDescriptor: function(\n        elements /*: ElementDescriptor[] */,\n      ) /*: ClassObject */ {\n        var obj = {\n          kind: \"class\",\n          elements: elements.map(this.fromElementDescriptor, this),\n        };\n\n        var desc = { value: \"Descriptor\", configurable: true };\n        Object.defineProperty(obj, Symbol.toStringTag, desc);\n\n        return obj;\n      },\n\n      // ToClassDescriptor\n      toClassDescriptor: function(\n        obj /*: ClassObject */,\n      ) /*: ElementsFinisher */ {\n        var kind = String(obj.kind);\n        if (kind !== \"class\") {\n          throw new TypeError(\n            'A class descriptor\\\\'s .kind property must be \"class\", but a decorator' +\n              ' created a class descriptor with .kind \"' +\n              kind +\n              '\"',\n          );\n        }\n\n        this.disallowProperty(obj, \"key\", \"A class descriptor\");\n        this.disallowProperty(obj, \"placement\", \"A class descriptor\");\n        this.disallowProperty(obj, \"descriptor\", \"A class descriptor\");\n        this.disallowProperty(obj, \"initializer\", \"A class descriptor\");\n        this.disallowProperty(obj, \"extras\", \"A class descriptor\");\n\n        var finisher = _optionalCallableProperty(obj, \"finisher\");\n        var elements = this.toElementDescriptors(obj.elements);\n\n        return { elements: elements, finisher: finisher };\n      },\n\n      // RunClassFinishers\n      runClassFinishers: function(\n        constructor /*: Class<*> */,\n        finishers /*: ClassFinisher[] */,\n      ) /*: Class<*> */ {\n        for (var i = 0; i < finishers.length; i++) {\n          var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor);\n          if (newConstructor !== undefined) {\n            // NOTE: This should check if IsConstructor(newConstructor) is false.\n            if (typeof newConstructor !== \"function\") {\n              throw new TypeError(\"Finishers must return a constructor.\");\n            }\n            constructor = newConstructor;\n          }\n        }\n        return constructor;\n      },\n\n      disallowProperty: function(obj, name, objectType) {\n        if (obj[name] !== undefined) {\n          throw new TypeError(objectType + \" can't have a .\" + name + \" property.\");\n        }\n      }\n    };\n\n    return api;\n  }\n\n  // ClassElementEvaluation\n  function _createElementDescriptor(\n    def /*: ElementDefinition */,\n  ) /*: ElementDescriptor */ {\n    var key = toPropertyKey(def.key);\n\n    var descriptor /*: PropertyDescriptor */;\n    if (def.kind === \"method\") {\n      descriptor = {\n        value: def.value,\n        writable: true,\n        configurable: true,\n        enumerable: false,\n      };\n    } else if (def.kind === \"get\") {\n      descriptor = { get: def.value, configurable: true, enumerable: false };\n    } else if (def.kind === \"set\") {\n      descriptor = { set: def.value, configurable: true, enumerable: false };\n    } else if (def.kind === \"field\") {\n      descriptor = { configurable: true, writable: true, enumerable: true };\n    }\n\n    var element /*: ElementDescriptor */ = {\n      kind: def.kind === \"field\" ? \"field\" : \"method\",\n      key: key,\n      placement: def.static\n        ? \"static\"\n        : def.kind === \"field\"\n        ? \"own\"\n        : \"prototype\",\n      descriptor: descriptor,\n    };\n    if (def.decorators) element.decorators = def.decorators;\n    if (def.kind === \"field\") element.initializer = def.value;\n\n    return element;\n  }\n\n  // CoalesceGetterSetter\n  function _coalesceGetterSetter(\n    element /*: ElementDescriptor */,\n    other /*: ElementDescriptor */,\n  ) {\n    if (element.descriptor.get !== undefined) {\n      other.descriptor.get = element.descriptor.get;\n    } else {\n      other.descriptor.set = element.descriptor.set;\n    }\n  }\n\n  // CoalesceClassElements\n  function _coalesceClassElements(\n    elements /*: ElementDescriptor[] */,\n  ) /*: ElementDescriptor[] */ {\n    var newElements /*: ElementDescriptor[] */ = [];\n\n    var isSameElement = function(\n      other /*: ElementDescriptor */,\n    ) /*: boolean */ {\n      return (\n        other.kind === \"method\" &&\n        other.key === element.key &&\n        other.placement === element.placement\n      );\n    };\n\n    for (var i = 0; i < elements.length; i++) {\n      var element /*: ElementDescriptor */ = elements[i];\n      var other /*: ElementDescriptor */;\n\n      if (\n        element.kind === \"method\" &&\n        (other = newElements.find(isSameElement))\n      ) {\n        if (\n          _isDataDescriptor(element.descriptor) ||\n          _isDataDescriptor(other.descriptor)\n        ) {\n          if (_hasDecorators(element) || _hasDecorators(other)) {\n            throw new ReferenceError(\n              \"Duplicated methods (\" + element.key + \") can't be decorated.\",\n            );\n          }\n          other.descriptor = element.descriptor;\n        } else {\n          if (_hasDecorators(element)) {\n            if (_hasDecorators(other)) {\n              throw new ReferenceError(\n                \"Decorators can't be placed on different accessors with for \" +\n                  \"the same property (\" +\n                  element.key +\n                  \").\",\n              );\n            }\n            other.decorators = element.decorators;\n          }\n          _coalesceGetterSetter(element, other);\n        }\n      } else {\n        newElements.push(element);\n      }\n    }\n\n    return newElements;\n  }\n\n  function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ {\n    return element.decorators && element.decorators.length;\n  }\n\n  function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ {\n    return (\n      desc !== undefined &&\n      !(desc.value === undefined && desc.writable === undefined)\n    );\n  }\n\n  function _optionalCallableProperty /*::<T>*/(\n    obj /*: T */,\n    name /*: $Keys<T> */,\n  ) /*: ?Function */ {\n    var value = obj[name];\n    if (value !== undefined && typeof value !== \"function\") {\n      throw new TypeError(\"Expected '\" + name + \"' to be a function\");\n    }\n    return value;\n  }\n\n`,i.classPrivateMethodGet=a(\"7.1.6\")`\n  export default function _classPrivateMethodGet(receiver, privateSet, fn) {\n    if (!privateSet.has(receiver)) {\n      throw new TypeError(\"attempted to get private field on non-instance\");\n    }\n    return fn;\n  }\n`,i.classPrivateMethodSet=a(\"7.1.6\")`\n    export default function _classPrivateMethodSet() {\n      throw new TypeError(\"attempted to reassign private method\");\n    }\n  `},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.wrapRegExp=t.typeof=t.objectSpread2=t.jsx=void 0;var n=r(21);const s={minVersion:\"7.0.0-beta.0\",ast:()=>n.default.program.ast('\\nvar REACT_ELEMENT_TYPE;\\nexport default function _createRawReactElement(type, props, key, children) {\\n  if (!REACT_ELEMENT_TYPE) {\\n    REACT_ELEMENT_TYPE =\\n      (typeof Symbol === \"function\" &&\\n        \\n        Symbol[\"for\"] &&\\n        Symbol[\"for\"](\"react.element\")) ||\\n      0xeac7;\\n  }\\n  var defaultProps = type && type.defaultProps;\\n  var childrenLength = arguments.length - 3;\\n  if (!props && childrenLength !== 0) {\\n    \\n    \\n    props = { children: void 0 };\\n  }\\n  if (childrenLength === 1) {\\n    props.children = children;\\n  } else if (childrenLength > 1) {\\n    var childArray = new Array(childrenLength);\\n    for (var i = 0; i < childrenLength; i++) {\\n      childArray[i] = arguments[i + 3];\\n    }\\n    props.children = childArray;\\n  }\\n  if (props && defaultProps) {\\n    for (var propName in defaultProps) {\\n      if (props[propName] === void 0) {\\n        props[propName] = defaultProps[propName];\\n      }\\n    }\\n  } else if (!props) {\\n    props = defaultProps || {};\\n  }\\n  return {\\n    $$typeof: REACT_ELEMENT_TYPE,\\n    type: type,\\n    key: key === undefined ? null : \"\" + key,\\n    ref: null,\\n    props: props,\\n    _owner: null,\\n  };\\n}\\n')};t.jsx=s;const i={minVersion:\"7.5.0\",ast:()=>n.default.program.ast('\\nimport defineProperty from \"defineProperty\";\\nfunction ownKeys(object, enumerableOnly) {\\n  var keys = Object.keys(object);\\n  if (Object.getOwnPropertySymbols) {\\n    var symbols = Object.getOwnPropertySymbols(object);\\n    if (enumerableOnly) {\\n      symbols = symbols.filter(function (sym) {\\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\\n      });\\n    }\\n    keys.push.apply(keys, symbols);\\n  }\\n  return keys;\\n}\\nexport default function _objectSpread2(target) {\\n  for (var i = 1; i < arguments.length; i++) {\\n    var source = arguments[i] != null ? arguments[i] : {};\\n    if (i % 2) {\\n      ownKeys(Object(source), true).forEach(function (key) {\\n        defineProperty(target, key, source[key]);\\n      });\\n    } else if (Object.getOwnPropertyDescriptors) {\\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\\n    } else {\\n      ownKeys(Object(source)).forEach(function (key) {\\n        Object.defineProperty(\\n          target,\\n          key,\\n          Object.getOwnPropertyDescriptor(source, key)\\n        );\\n      });\\n    }\\n  }\\n  return target;\\n}\\n')};t.objectSpread2=i;const o={minVersion:\"7.0.0-beta.0\",ast:()=>n.default.program.ast('\\nexport default function _typeof(obj) {\\n  \"@babel/helpers - typeof\";\\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\\n    _typeof = function (obj) {\\n      return typeof obj;\\n    };\\n  } else {\\n    _typeof = function (obj) {\\n      return obj &&\\n        typeof Symbol === \"function\" &&\\n        obj.constructor === Symbol &&\\n        obj !== Symbol.prototype\\n        ? \"symbol\"\\n        : typeof obj;\\n    };\\n  }\\n  return _typeof(obj);\\n}\\n')};t.typeof=o;const a={minVersion:\"7.2.6\",ast:()=>n.default.program.ast('\\nimport setPrototypeOf from \"setPrototypeOf\";\\nimport inherits from \"inherits\";\\nexport default function _wrapRegExp() {\\n  _wrapRegExp = function (re, groups) {\\n    return new BabelRegExp(re, undefined, groups);\\n  };\\n  var _super = RegExp.prototype;\\n  var _groups = new WeakMap();\\n  function BabelRegExp(re, flags, groups) {\\n    var _this = new RegExp(re, flags);\\n    \\n    _groups.set(_this, groups || _groups.get(re));\\n    return setPrototypeOf(_this, BabelRegExp.prototype);\\n  }\\n  inherits(BabelRegExp, RegExp);\\n  BabelRegExp.prototype.exec = function (str) {\\n    var result = _super.exec.call(this, str);\\n    if (result) result.groups = buildGroups(result, this);\\n    return result;\\n  };\\n  BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {\\n    if (typeof substitution === \"string\") {\\n      var groups = _groups.get(this);\\n      return _super[Symbol.replace].call(\\n        this,\\n        str,\\n        substitution.replace(/\\\\$<([^>]+)>/g, function (_, name) {\\n          return \"$\" + groups[name];\\n        })\\n      );\\n    } else if (typeof substitution === \"function\") {\\n      var _this = this;\\n      return _super[Symbol.replace].call(this, str, function () {\\n        var args = arguments;\\n        \\n        if (typeof args[args.length - 1] !== \"object\") {\\n          args = [].slice.call(args);\\n          args.push(buildGroups(args, _this));\\n        }\\n        return substitution.apply(this, args);\\n      });\\n    } else {\\n      return _super[Symbol.replace].call(this, str, substitution);\\n    }\\n  };\\n  function buildGroups(result, re) {\\n    \\n    \\n    var g = _groups.get(re);\\n    return Object.keys(g).reduce(function (groups, name) {\\n      groups[name] = result[g[name]];\\n      return groups;\\n    }, Object.create(null));\\n  }\\n  return _wrapRegExp.apply(this, arguments);\\n}\\n')};t.wrapRegExp=a},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(30),s=r(0),i=r(460),o=r(257);t.default=class{constructor(e,t,r){this._defaultOpts={importedSource:null,importedType:\"commonjs\",importedInterop:\"babel\",importingInterop:\"babel\",ensureLiveReference:!1,ensureNoContext:!1,importPosition:\"before\"};const n=e.find((e=>e.isProgram()));this._programPath=n,this._programScope=n.scope,this._hub=n.hub,this._defaultOpts=this._applyDefaults(t,r,!0)}addDefault(e,t){return this.addNamed(\"default\",e,t)}addNamed(e,t,r){return n(\"string\"==typeof e),this._generateImport(this._applyDefaults(t,r),e)}addNamespace(e,t){return this._generateImport(this._applyDefaults(e,t),null)}addSideEffect(e,t){return this._generateImport(this._applyDefaults(e,t),!1)}_applyDefaults(e,t,r=!1){const s=[];\"string\"==typeof e?(s.push({importedSource:e}),s.push(t)):(n(!t,\"Unexpected secondary arguments.\"),s.push(e));const i=Object.assign({},this._defaultOpts);for(const e of s)e&&(Object.keys(i).forEach((t=>{void 0!==e[t]&&(i[t]=e[t])})),r||(void 0!==e.nameHint&&(i.nameHint=e.nameHint),void 0!==e.blockHoist&&(i.blockHoist=e.blockHoist)));return i}_generateImport(e,t){const r=\"default\"===t,n=!!t&&!r,a=null===t,{importedSource:l,importedType:c,importedInterop:u,importingInterop:p,ensureLiveReference:f,ensureNoContext:d,nameHint:h,importPosition:m,blockHoist:y}=e;let g=h||t;const b=(0,o.default)(this._programPath),v=b&&\"node\"===p,E=b&&\"babel\"===p;if(\"after\"===m&&!b)throw new Error('\"importPosition\": \"after\" is only supported in modules');const x=new i.default(l,this._programScope,this._hub);if(\"es6\"===c){if(!v&&!E)throw new Error(\"Cannot import an ES6 module from CommonJS\");x.import(),a?x.namespace(h||l):(r||n)&&x.named(g,t)}else{if(\"commonjs\"!==c)throw new Error(`Unexpected interopType \"${c}\"`);if(\"babel\"===u)if(v){g=\"default\"!==g?g:l;const e=`${l}$es6Default`;x.import(),a?x.default(e).var(g||l).wildcardInterop():r?f?x.default(e).var(g||l).defaultInterop().read(\"default\"):x.default(e).var(g).defaultInterop().prop(t):n&&x.default(e).read(t)}else E?(x.import(),a?x.namespace(g||l):(r||n)&&x.named(g,t)):(x.require(),a?x.var(g||l).wildcardInterop():(r||n)&&f?r?(g=\"default\"!==g?g:l,x.var(g).read(t),x.defaultInterop()):x.var(l).read(t):r?x.var(g).defaultInterop().prop(t):n&&x.var(g).prop(t));else if(\"compiled\"===u)v?(x.import(),a?x.default(g||l):(r||n)&&x.default(l).read(g)):E?(x.import(),a?x.namespace(g||l):(r||n)&&x.named(g,t)):(x.require(),a?x.var(g||l):(r||n)&&(f?x.var(l).read(g):x.prop(t).var(g)));else{if(\"uncompiled\"!==u)throw new Error(`Unknown importedInterop \"${u}\".`);if(r&&f)throw new Error(\"No live reference for commonjs default\");v?(x.import(),a?x.default(g||l):r?x.default(g):n&&x.default(l).read(g)):E?(x.import(),a?x.default(g||l):r?x.default(g):n&&x.named(g,t)):(x.require(),a?x.var(g||l):r?x.var(g):n&&(f?x.var(l).read(g):x.var(g).prop(t)))}}const{statements:S,resultName:T}=x.done();return this._insertStatements(S,m,y),(r||n)&&d&&\"Identifier\"!==T.type?s.sequenceExpression([s.numericLiteral(0),T]):T}_insertStatements(e,t=\"before\",r=3){const n=this._programPath.get(\"body\");if(\"after\"===t){for(let t=n.length-1;t>=0;t--)if(n[t].isImportDeclaration())return void n[t].insertAfter(e)}else{e.forEach((e=>{e._blockHoist=r}));const t=n.find((e=>{const t=e.node._blockHoist;return Number.isFinite(t)&&t<4}));if(t)return void t.insertBefore(e)}this._programPath.unshiftContainer(\"body\",e)}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=r(30),s=r(0);t.default=class{constructor(e,t,r){this._statements=[],this._resultName=null,this._scope=null,this._hub=null,this._importedSource=void 0,this._scope=t,this._hub=r,this._importedSource=e}done(){return{statements:this._statements,resultName:this._resultName}}import(){return this._statements.push(s.importDeclaration([],s.stringLiteral(this._importedSource))),this}require(){return this._statements.push(s.expressionStatement(s.callExpression(s.identifier(\"require\"),[s.stringLiteral(this._importedSource)]))),this}namespace(e=\"namespace\"){const t=this._scope.generateUidIdentifier(e),r=this._statements[this._statements.length-1];return n(\"ImportDeclaration\"===r.type),n(0===r.specifiers.length),r.specifiers=[s.importNamespaceSpecifier(t)],this._resultName=s.cloneNode(t),this}default(e){e=this._scope.generateUidIdentifier(e);const t=this._statements[this._statements.length-1];return n(\"ImportDeclaration\"===t.type),n(0===t.specifiers.length),t.specifiers=[s.importDefaultSpecifier(e)],this._resultName=s.cloneNode(e),this}named(e,t){if(\"default\"===t)return this.default(e);e=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];return n(\"ImportDeclaration\"===r.type),n(0===r.specifiers.length),r.specifiers=[s.importSpecifier(e,s.identifier(t))],this._resultName=s.cloneNode(e),this}var(e){e=this._scope.generateUidIdentifier(e);let t=this._statements[this._statements.length-1];return\"ExpressionStatement\"!==t.type&&(n(this._resultName),t=s.expressionStatement(this._resultName),this._statements.push(t)),this._statements[this._statements.length-1]=s.variableDeclaration(\"var\",[s.variableDeclarator(e,t.expression)]),this._resultName=s.cloneNode(e),this}defaultInterop(){return this._interop(this._hub.addHelper(\"interopRequireDefault\"))}wildcardInterop(){return this._interop(this._hub.addHelper(\"interopRequireWildcard\"))}_interop(e){const t=this._statements[this._statements.length-1];return\"ExpressionStatement\"===t.type?t.expression=s.callExpression(e,[t.expression]):\"VariableDeclaration\"===t.type?(n(1===t.declarations.length),t.declarations[0].init=s.callExpression(e,[t.declarations[0].init])):n.fail(\"Unexpected type.\"),this}prop(e){const t=this._statements[this._statements.length-1];return\"ExpressionStatement\"===t.type?t.expression=s.memberExpression(t.expression,s.identifier(e)):\"VariableDeclaration\"===t.type?(n(1===t.declarations.length),t.declarations[0].init=s.memberExpression(t.declarations[0].init,s.identifier(e))):n.fail(\"Unexpected type:\"+t.type),this}read(e){this._resultName=s.memberExpression(this._resultName,s.identifier(e))}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,s.default)(e.node,Object.assign({},o,{noScope:!0}))};var n=r(70),s=r(10),i=r(0);const o=s.default.visitors.merge([n.environmentVisitor,{ThisExpression(e){e.replaceWith(i.unaryExpression(\"void\",i.numericLiteral(0),!0))}}])},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){const r=new Map,n=new Map,i=t=>{e.requeue(t)};for(const[e,n]of t.source){for(const[t,s]of n.imports)r.set(t,[e,s,null]);for(const t of n.importsNamespace)r.set(t,[e,null,t])}for(const[e,r]of t.local){let t=n.get(e);t||(t=[],n.set(e,t)),t.push(...r.names)}const l={metadata:t,requeueInParent:i,scope:e.scope,exported:n};e.traverse(a,l),(0,o.default)(e,new Set([...Array.from(r.keys()),...Array.from(n.keys())]));const c={seen:new WeakSet,metadata:t,requeueInParent:i,scope:e.scope,imported:r,exported:n,buildImportReference:([e,r,n],i)=>{const o=t.source.get(e);if(n)return o.lazy&&(i=s.callExpression(i,[])),i;let a=s.identifier(o.name);if(o.lazy&&(a=s.callExpression(a,[])),\"default\"===r&&\"node-default\"===o.interop)return a;const l=t.stringSpecifiers.has(r);return s.memberExpression(a,l?s.stringLiteral(r):s.identifier(r),l)}};e.traverse(u,c)};var n=r(30),s=r(0),i=r(21),o=r(260);const a={Scope(e){e.skip()},ClassDeclaration(e){const{requeueInParent:t,exported:r,metadata:n}=this,{id:i}=e.node;if(!i)throw new Error(\"Expected class to have a name\");const o=i.name,a=r.get(o)||[];if(a.length>0){const r=s.expressionStatement(l(n,a,s.identifier(o)));r._blockHoist=e.node._blockHoist,t(e.insertAfter(r)[0])}},VariableDeclaration(e){const{requeueInParent:t,exported:r,metadata:n}=this;Object.keys(e.getOuterBindingIdentifiers()).forEach((i=>{const o=r.get(i)||[];if(o.length>0){const r=s.expressionStatement(l(n,o,s.identifier(i)));r._blockHoist=e.node._blockHoist,t(e.insertAfter(r)[0])}}))}},l=(e,t,r)=>(t||[]).reduce(((t,r)=>{const{stringSpecifiers:n}=e,i=n.has(r);return s.assignmentExpression(\"=\",s.memberExpression(s.identifier(e.exportName),i?s.stringLiteral(r):s.identifier(r),i),t)}),r),c=e=>i.default.expression.ast`\n    (function() {\n      throw new Error('\"' + '${e}' + '\" is read-only.');\n    })()\n  `,u={ReferencedIdentifier(e){const{seen:t,buildImportReference:r,scope:n,imported:i,requeueInParent:o}=this;if(t.has(e.node))return;t.add(e.node);const a=e.node.name,l=i.get(a);if(l){const t=e.scope.getBinding(a);if(n.getBinding(a)!==t)return;const i=r(l,e.node);if(i.loc=e.node.loc,(e.parentPath.isCallExpression({callee:e.node})||e.parentPath.isOptionalCallExpression({callee:e.node})||e.parentPath.isTaggedTemplateExpression({tag:e.node}))&&s.isMemberExpression(i))e.replaceWith(s.sequenceExpression([s.numericLiteral(0),i]));else if(e.isJSXIdentifier()&&s.isMemberExpression(i)){const{object:t,property:r}=i;e.replaceWith(s.jsxMemberExpression(s.jsxIdentifier(t.name),s.jsxIdentifier(r.name)))}else e.replaceWith(i);o(e),e.skip()}},AssignmentExpression:{exit(e){const{scope:t,seen:r,imported:i,exported:o,requeueInParent:a,buildImportReference:u}=this;if(r.has(e.node))return;r.add(e.node);const p=e.get(\"left\");if(!p.isMemberExpression())if(p.isIdentifier()){const r=p.node.name;if(t.getBinding(r)!==e.scope.getBinding(r))return;const f=o.get(r),d=i.get(r);if((null==f?void 0:f.length)>0||d){n(\"=\"===e.node.operator,\"Path was not simplified\");const t=e.node;d&&(t.left=u(d,t.left),t.right=s.sequenceExpression([t.right,c(r)])),e.replaceWith(l(this.metadata,f,t)),a(e)}}else{const r=p.getOuterBindingIdentifiers(),n=Object.keys(r).filter((r=>t.getBinding(r)===e.scope.getBinding(r))),u=n.find((e=>i.has(e)));u&&(e.node.right=s.sequenceExpression([e.node.right,c(u)]));const f=[];if(n.forEach((e=>{const t=o.get(e)||[];t.length>0&&f.push(l(this.metadata,t,s.identifier(e)))})),f.length>0){let t=s.sequenceExpression(f);e.parentPath.isExpressionStatement()&&(t=s.expressionStatement(t),t._blockHoist=e.parentPath.node._blockHoist),a(e.insertAfter(t)[0])}}}},\"ForOfStatement|ForInStatement\"(e){const{scope:t,node:r}=e,{left:n}=r,{exported:i,scope:o}=this;if(!s.isVariableDeclaration(n)){let r=!1;const a=e.get(\"body\"),l=a.scope;for(const e of Object.keys(s.getOuterBindingIdentifiers(n)))i.get(e)&&o.getBinding(e)===t.getBinding(e)&&(r=!0,l.hasOwnBinding(e)&&l.rename(e));if(!r)return;const c=t.generateUidIdentifierBasedOnNode(n);a.unshiftContainer(\"body\",s.expressionStatement(s.assignmentExpression(\"=\",n,c))),e.get(\"left\").replaceWith(s.variableDeclaration(\"let\",[s.variableDeclarator(s.cloneNode(c))])),t.registerDeclaration(e.get(\"left\"))}}}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.hasExports=function(e){return e.hasExports},t.isSideEffectImport=o,t.validateImportInteropOption=a,t.default=function(e,t,{importInterop:r,initializeReexports:s=!1,lazy:a=!1,esNamespaceOnly:p=!1}){t||(t=e.scope.generateUidIdentifier(\"exports\").name);const f=new Set;!function(e){e.get(\"body\").forEach((e=>{e.isExportDefaultDeclaration()&&(0,i.default)(e)}))}(e);const{local:d,source:h,hasExports:m}=function(e,{lazy:t,initializeReexports:r},s){const i=function(e,t,r){const n=new Map;e.get(\"body\").forEach((e=>{let r;if(e.isImportDeclaration())r=\"import\";else{if(e.isExportDefaultDeclaration()&&(e=e.get(\"declaration\")),e.isExportNamedDeclaration())if(e.node.declaration)e=e.get(\"declaration\");else if(t&&e.node.source&&e.get(\"source\").isStringLiteral())return void e.get(\"specifiers\").forEach((e=>{u(e),n.set(e.get(\"local\").node.name,\"block\")}));if(e.isFunctionDeclaration())r=\"hoisted\";else if(e.isClassDeclaration())r=\"block\";else if(e.isVariableDeclaration({kind:\"var\"}))r=\"var\";else{if(!e.isVariableDeclaration())return;r=\"block\"}}Object.keys(e.getOuterBindingIdentifiers()).forEach((e=>{n.set(e,r)}))}));const s=new Map,i=e=>{const t=e.node.name;let r=s.get(t);if(!r){const i=n.get(t);if(void 0===i)throw e.buildCodeFrameError(`Exporting local \"${t}\", which is not declared.`);r={names:[],kind:i},s.set(t,r)}return r};return e.get(\"body\").forEach((e=>{if(!e.isExportNamedDeclaration()||!t&&e.node.source){if(e.isExportDefaultDeclaration()){const t=e.get(\"declaration\");if(!t.isFunctionDeclaration()&&!t.isClassDeclaration())throw t.buildCodeFrameError(\"Unexpected default expression export.\");i(t.get(\"id\")).names.push(\"default\")}}else if(e.node.declaration){const t=e.get(\"declaration\"),r=t.getOuterBindingIdentifierPaths();Object.keys(r).forEach((e=>{if(\"__esModule\"===e)throw t.buildCodeFrameError('Illegal export \"__esModule\".');i(r[e]).names.push(e)}))}else e.get(\"specifiers\").forEach((e=>{const t=e.get(\"local\"),n=e.get(\"exported\"),s=i(t),o=c(n,r);if(\"__esModule\"===o)throw n.buildCodeFrameError('Illegal export \"__esModule\".');s.names.push(o)}))})),s}(e,r,s),a=new Map,l=t=>{const r=t.value;let s=a.get(r);return s||(s={name:e.scope.generateUidIdentifier((0,n.basename)(r,(0,n.extname)(r))).name,interop:\"none\",loc:null,imports:new Map,importsNamespace:new Set,reexports:new Map,reexportNamespace:new Set,reexportAll:null,lazy:!1,source:r},a.set(r,s)),s};let p=!1;e.get(\"body\").forEach((e=>{if(e.isImportDeclaration()){const t=l(e.node.source);t.loc||(t.loc=e.node.loc),e.get(\"specifiers\").forEach((e=>{if(e.isImportDefaultSpecifier()){const r=e.get(\"local\").node.name;t.imports.set(r,\"default\");const n=i.get(r);n&&(i.delete(r),n.names.forEach((e=>{t.reexports.set(e,\"default\")})))}else if(e.isImportNamespaceSpecifier()){const r=e.get(\"local\").node.name;t.importsNamespace.add(r);const n=i.get(r);n&&(i.delete(r),n.names.forEach((e=>{t.reexportNamespace.add(e)})))}else if(e.isImportSpecifier()){const r=c(e.get(\"imported\"),s),n=e.get(\"local\").node.name;t.imports.set(n,r);const o=i.get(n);o&&(i.delete(n),o.names.forEach((e=>{t.reexports.set(e,r)})))}}))}else if(e.isExportAllDeclaration()){p=!0;const t=l(e.node.source);t.loc||(t.loc=e.node.loc),t.reexportAll={loc:e.node.loc}}else if(e.isExportNamedDeclaration()&&e.node.source){p=!0;const t=l(e.node.source);t.loc||(t.loc=e.node.loc),e.get(\"specifiers\").forEach((e=>{u(e);const r=c(e.get(\"local\"),s),n=c(e.get(\"exported\"),s);if(t.reexports.set(n,r),\"__esModule\"===n)throw e.get(\"exported\").buildCodeFrameError('Illegal export \"__esModule\".')}))}else(e.isExportNamedDeclaration()||e.isExportDefaultDeclaration())&&(p=!0)}));for(const e of a.values()){let t=!1,r=!1;e.importsNamespace.size>0&&(t=!0,r=!0),e.reexportAll&&(r=!0);for(const n of e.imports.values())\"default\"===n?t=!0:r=!0;for(const n of e.reexports.values())\"default\"===n?t=!0:r=!0;t&&r?e.interop=\"namespace\":t&&(e.interop=\"default\")}for(const[e,r]of a)if(!1!==t&&!o(r)&&!r.reexportAll)if(!0===t)r.lazy=!/\\./.test(e);else if(Array.isArray(t))r.lazy=-1!==t.indexOf(e);else{if(\"function\"!=typeof t)throw new Error(\".lazy must be a boolean, string array, or function\");r.lazy=t(e)}return{hasExports:p,local:i,source:a}}(e,{initializeReexports:s,lazy:a},f);!function(e){e.get(\"body\").forEach((e=>{if(e.isImportDeclaration())e.remove();else if(e.isExportNamedDeclaration())e.node.declaration?(e.node.declaration._blockHoist=e.node._blockHoist,e.replaceWith(e.node.declaration)):e.remove();else if(e.isExportDefaultDeclaration()){const t=e.get(\"declaration\");if(!t.isFunctionDeclaration()&&!t.isClassDeclaration())throw t.buildCodeFrameError(\"Unexpected default expression export.\");t._blockHoist=e.node._blockHoist,e.replaceWith(t)}else e.isExportAllDeclaration()&&e.remove()}))}(e);for(const[,e]of h){e.importsNamespace.size>0&&(e.name=e.importsNamespace.values().next().value);const t=l(r,e.source);\"none\"===t?e.interop=\"none\":\"node\"===t&&\"namespace\"===e.interop?e.interop=\"node-namespace\":\"node\"===t&&\"default\"===e.interop?e.interop=\"node-default\":p&&\"namespace\"===e.interop&&(e.interop=\"default\")}return{exportName:t,exportNameListName:null,hasExports:m,local:d,source:h,stringSpecifiers:f}};var n=r(8),s=r(63),i=r(132);function o(e){return 0===e.imports.size&&0===e.importsNamespace.size&&0===e.reexports.size&&0===e.reexportNamespace.size&&!e.reexportAll}function a(e){if(\"function\"!=typeof e&&\"none\"!==e&&\"babel\"!==e&&\"node\"!==e)throw new Error(`.importInterop must be one of \"none\", \"babel\", \"node\", or a function returning one of those values (received ${e}).`);return e}function l(e,t){return\"function\"==typeof e?a(e(t)):e}function c(e,t){if(e.isIdentifier())return e.node.name;if(e.isStringLiteral()){const r=e.node.value;return(0,s.isIdentifierName)(r)||t.add(r),r}throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${e.node.type}`)}function u(e){if(!e.isExportSpecifier())throw e.isExportNamespaceSpecifier()?e.buildCodeFrameError(\"Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.\"):e.buildCodeFrameError(\"Unexpected export specifier type\")}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=r;{const e=r;t.default=r=function(t,r){var n,s,i,o;return e(t,{moduleId:null!=(n=r.moduleId)?n:t.moduleId,moduleIds:null!=(s=r.moduleIds)?s:t.moduleIds,getModuleId:null!=(i=r.getModuleId)?i:t.getModuleId,moduleRoot:null!=(o=r.moduleRoot)?o:t.moduleRoot})}}function r(e,t){const{filename:r,filenameRelative:n=r,sourceRoot:s=t.moduleRoot}=e,{moduleId:i,moduleIds:o=!!i,getModuleId:a,moduleRoot:l=s}=t;if(!o)return null;if(null!=i&&!a)return i;let c=null!=l?l+\"/\":\"\";if(n){const e=null!=s?new RegExp(\"^\"+s+\"/?\"):\"\";c+=n.replace(e,\"\").replace(/\\.(\\w*?)$/,\"\")}return c=c.replace(/\\\\/g,\"/\"),a&&a(c)||c}},(e,t,r)=>{\"use strict\";function n(){const e=r(211);return n=function(){return e},e}function s(){const e=r(133);return s=function(){return e},e}function i(){const e=r(21);return i=function(){return e},e}function o(){const e=r(0);return o=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t=\"global\"){let r;const n={global:l,module:c,umd:u,var:p}[t];if(!n)throw new Error(`Unsupported output type ${t}`);return r=n(e),(0,s().default)(r).code};var a=r(126);function l(e){const t=o().identifier(\"babelHelpers\"),r=[],n=o().functionExpression(null,[o().identifier(\"global\")],o().blockStatement(r)),s=o().program([o().expressionStatement(o().callExpression(n,[o().conditionalExpression(o().binaryExpression(\"===\",o().unaryExpression(\"typeof\",o().identifier(\"global\")),o().stringLiteral(\"undefined\")),o().identifier(\"self\"),o().identifier(\"global\"))]))]);return r.push(o().variableDeclaration(\"var\",[o().variableDeclarator(t,o().assignmentExpression(\"=\",o().memberExpression(o().identifier(\"global\"),t),o().objectExpression([])))])),f(r,t,e),s}function c(e){const t=[],r=f(t,null,e);return t.unshift(o().exportNamedDeclaration(null,Object.keys(r).map((e=>o().exportSpecifier(o().cloneNode(r[e]),o().identifier(e)))))),o().program(t,[],\"module\")}function u(e){const t=o().identifier(\"babelHelpers\"),r=[];return r.push(o().variableDeclaration(\"var\",[o().variableDeclarator(t,o().identifier(\"global\"))])),f(r,t,e),o().program([(n={FACTORY_PARAMETERS:o().identifier(\"global\"),BROWSER_ARGUMENTS:o().assignmentExpression(\"=\",o().memberExpression(o().identifier(\"root\"),t),o().objectExpression([])),COMMON_ARGUMENTS:o().identifier(\"exports\"),AMD_ARGUMENTS:o().arrayExpression([o().stringLiteral(\"exports\")]),FACTORY_BODY:r,UMD_ROOT:o().identifier(\"this\")},i().default`\n    (function (root, factory) {\n      if (typeof define === \"function\" && define.amd) {\n        define(AMD_ARGUMENTS, factory);\n      } else if (typeof exports === \"object\") {\n        factory(COMMON_ARGUMENTS);\n      } else {\n        factory(BROWSER_ARGUMENTS);\n      }\n    })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n      FACTORY_BODY\n    });\n  `(n))]);var n}function p(e){const t=o().identifier(\"babelHelpers\"),r=[];r.push(o().variableDeclaration(\"var\",[o().variableDeclarator(t,o().objectExpression([]))]));const n=o().program(r);return f(r,t,e),r.push(o().expressionStatement(t)),n}function f(e,t,r){const s=e=>t?o().memberExpression(t,o().identifier(e)):o().identifier(`_${e}`),i={};return n().list.forEach((function(t){if(r&&r.indexOf(t)<0)return;const o=i[t]=s(t);n().ensure(t,a.default);const{nodes:l}=n().get(t,s,o);e.push(...l)})),i}},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var s=r(287),i=r(150),o=r(9),a=r(79),l=r(80),c=r(300);function u(){const e=r(10);return u=function(){return e},e}var p=r(81),f=r(82),d=r(484),h=r(485),m=r(303),y=(r(302),n()((function*(e){var t;const r=yield*(0,m.default)(e);if(!r)return null;const{options:n,context:s,fileHandling:o}=r;if(\"ignored\"===o)return null;const a={},{plugins:c,presets:u}=n;if(!c||!u)throw new Error(\"Assertion failure - plugins and presets exist\");const p=Object.assign({},s,{targets:n.targets}),d=e=>{const t=(0,l.getItemDescriptor)(e);if(!t)throw new Error(\"Assertion failure - must be config item\");return t},h=u.map(d),y=c.map(d),b=[[]],v=[];if(yield*g(s,(function*e(t,r){const n=[];for(let e=0;e<t.length;e++){const s=t[e];if(!1!==s.options)try{s.ownPass?n.push({preset:yield*w(s,p),pass:[]}):n.unshift({preset:yield*w(s,p),pass:r})}catch(r){throw\"BABEL_UNKNOWN_OPTION\"===r.code&&(0,f.checkNoUnwrappedItemOptionPairs)(t,e,\"preset\",r),r}}if(n.length>0){b.splice(1,0,...n.map((e=>e.pass)).filter((e=>e!==r)));for(const{preset:t,pass:r}of n){if(!t)return!0;if(r.push(...t.plugins),yield*e(t.presets,r))return!0;t.options.forEach((e=>{(0,i.mergeOptions)(a,e)}))}}}))(h,b[0]))return null;const E=a;(0,i.mergeOptions)(E,n);const S=Object.assign({},p,{assumptions:null!=(t=E.assumptions)?t:{}});return yield*g(s,(function*(){b[0].unshift(...y);for(const e of b){const t=[];v.push(t);for(let r=0;r<e.length;r++){const n=e[r];if(!1!==n.options)try{t.push(yield*x(n,S))}catch(t){throw\"BABEL_UNKNOWN_PLUGIN_PROPERTY\"===t.code&&(0,f.checkNoUnwrappedItemOptionPairs)(e,r,\"plugin\",t),t}}}}))(),E.plugins=v[0],E.presets=v.slice(1).filter((e=>e.length>0)).map((e=>({plugins:e}))),E.passPerPreset=E.presets.length>0,{options:E,passes:v}})));function g(e,t){return function*(r,n){try{return yield*t(r,n)}catch(t){throw/^\\[BABEL\\]/.test(t.message)||(t.message=`[BABEL] ${e.filename||\"unknown\"}: ${t.message}`),t}}}t.default=y;const b=e=>(0,p.makeWeakCache)((function*({value:t,options:r,dirname:n,alias:i},a){if(!1===r)throw new Error(\"Assertion failure\");r=r||{};let l=t;if(\"function\"==typeof t){const c=(0,s.maybeAsync)(t,\"You appear to be using an async plugin/preset, but Babel has been called synchronously\"),u=Object.assign({},o,e(a));try{l=yield*c(u,r,n)}catch(e){throw i&&(e.message+=` (While processing: ${JSON.stringify(i)})`),e}}if(!l||\"object\"!=typeof l)throw new Error(\"Plugin/Preset did not return an object.\");if((0,s.isThenable)(l))throw yield*[],new Error(`You appear to be using a promise as a plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version. As an alternative, you can prefix the promise with \"await\". (While processing: ${JSON.stringify(i)})`);return{value:l,options:r,dirname:n,alias:i}})),v=b(h.makePluginAPI),E=b(h.makePresetAPI);function*x(e,t){if(e.value instanceof a.default){if(e.options)throw new Error(\"Passed options to an existing Plugin instance will not work.\");return e.value}return yield*S(yield*v(e,t),t)}const S=(0,p.makeWeakCache)((function*({value:e,options:t,dirname:r,alias:n},i){const o=(0,d.validatePluginObject)(e),l=Object.assign({},o);if(l.visitor&&(l.visitor=u().default.explode(Object.assign({},l.visitor))),l.inherits){const e={name:void 0,alias:`${n}$inherits`,value:l.inherits,options:t,dirname:r},o=yield*(0,s.forwardAsync)(x,(t=>i.invalidate((r=>t(e,r)))));l.pre=A(o.pre,l.pre),l.post=A(o.post,l.post),l.manipulateOptions=A(o.manipulateOptions,l.manipulateOptions),l.visitor=u().default.visitors.merge([o.visitor||{},l.visitor||{}])}return new a.default(l,t,n)})),T=(e,t)=>{if(e.test||e.include||e.exclude){const e=t.name?`\"${t.name}\"`:\"/* your preset */\";throw new Error([`Preset ${e} requires a filename to be set when babel is called directly,`,\"```\",`babel.transform(code, { filename: 'file.ts', presets: [${e}] });`,\"```\",\"See https://babeljs.io/docs/en/options#filename for more information.\"].join(\"\\n\"))}};function*w(e,t){const r=P(yield*E(e,t));return((e,t,r)=>{if(!t.filename){const{options:t}=e;T(t,r),t.overrides&&t.overrides.forEach((e=>T(e,r)))}})(r,t,e),yield*(0,c.buildPresetChain)(r,t)}const P=(0,p.makeWeakCacheSync)((({value:e,dirname:t,alias:r})=>({options:(0,f.validate)(\"preset\",e),alias:r,dirname:t})));function A(e,t){const r=[e,t].filter(Boolean);return r.length<=1?r[0]:function(...e){for(const t of r)t.apply(this,e)}}},e=>{\"use strict\";e.exports=JSON.parse('[{\"name\":\"nodejs\",\"version\":\"0.2.0\",\"date\":\"2011-08-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.3.0\",\"date\":\"2011-08-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.4.0\",\"date\":\"2011-08-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.5.0\",\"date\":\"2011-08-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.6.0\",\"date\":\"2011-11-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.7.0\",\"date\":\"2012-01-17\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.8.0\",\"date\":\"2012-06-22\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.9.0\",\"date\":\"2012-07-20\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.10.0\",\"date\":\"2013-03-11\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.11.0\",\"date\":\"2013-03-28\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"0.12.0\",\"date\":\"2015-02-06\",\"lts\":false,\"security\":false},{\"name\":\"iojs\",\"version\":\"1.0.0\",\"date\":\"2015-01-14\"},{\"name\":\"iojs\",\"version\":\"1.1.0\",\"date\":\"2015-02-03\"},{\"name\":\"iojs\",\"version\":\"1.2.0\",\"date\":\"2015-02-11\"},{\"name\":\"iojs\",\"version\":\"1.3.0\",\"date\":\"2015-02-20\"},{\"name\":\"iojs\",\"version\":\"1.5.0\",\"date\":\"2015-03-06\"},{\"name\":\"iojs\",\"version\":\"1.6.0\",\"date\":\"2015-03-20\"},{\"name\":\"iojs\",\"version\":\"2.0.0\",\"date\":\"2015-05-04\"},{\"name\":\"iojs\",\"version\":\"2.1.0\",\"date\":\"2015-05-24\"},{\"name\":\"iojs\",\"version\":\"2.2.0\",\"date\":\"2015-06-01\"},{\"name\":\"iojs\",\"version\":\"2.3.0\",\"date\":\"2015-06-13\"},{\"name\":\"iojs\",\"version\":\"2.4.0\",\"date\":\"2015-07-17\"},{\"name\":\"iojs\",\"version\":\"2.5.0\",\"date\":\"2015-07-28\"},{\"name\":\"iojs\",\"version\":\"3.0.0\",\"date\":\"2015-08-04\"},{\"name\":\"iojs\",\"version\":\"3.1.0\",\"date\":\"2015-08-19\"},{\"name\":\"iojs\",\"version\":\"3.2.0\",\"date\":\"2015-08-25\"},{\"name\":\"iojs\",\"version\":\"3.3.0\",\"date\":\"2015-09-02\"},{\"name\":\"nodejs\",\"version\":\"4.0.0\",\"date\":\"2015-09-08\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"4.1.0\",\"date\":\"2015-09-17\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"4.2.0\",\"date\":\"2015-10-12\",\"lts\":\"Argon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"4.3.0\",\"date\":\"2016-02-09\",\"lts\":\"Argon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"4.4.0\",\"date\":\"2016-03-08\",\"lts\":\"Argon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"4.5.0\",\"date\":\"2016-08-16\",\"lts\":\"Argon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"4.6.0\",\"date\":\"2016-09-27\",\"lts\":\"Argon\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"4.7.0\",\"date\":\"2016-12-06\",\"lts\":\"Argon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"4.8.0\",\"date\":\"2017-02-21\",\"lts\":\"Argon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"4.9.0\",\"date\":\"2018-03-28\",\"lts\":\"Argon\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"5.0.0\",\"date\":\"2015-10-29\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.1.0\",\"date\":\"2015-11-17\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.2.0\",\"date\":\"2015-12-09\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.3.0\",\"date\":\"2015-12-15\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.4.0\",\"date\":\"2016-01-06\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.5.0\",\"date\":\"2016-01-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.6.0\",\"date\":\"2016-02-09\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.7.0\",\"date\":\"2016-02-23\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.8.0\",\"date\":\"2016-03-09\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.9.0\",\"date\":\"2016-03-16\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.10.0\",\"date\":\"2016-04-01\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.11.0\",\"date\":\"2016-04-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"5.12.0\",\"date\":\"2016-06-23\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.0.0\",\"date\":\"2016-04-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.1.0\",\"date\":\"2016-05-05\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.2.0\",\"date\":\"2016-05-17\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.3.0\",\"date\":\"2016-07-06\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.4.0\",\"date\":\"2016-08-12\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.5.0\",\"date\":\"2016-08-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.6.0\",\"date\":\"2016-09-14\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.7.0\",\"date\":\"2016-09-27\",\"lts\":false,\"security\":true},{\"name\":\"nodejs\",\"version\":\"6.8.0\",\"date\":\"2016-10-12\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.9.0\",\"date\":\"2016-10-18\",\"lts\":\"Boron\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.10.0\",\"date\":\"2017-02-21\",\"lts\":\"Boron\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.11.0\",\"date\":\"2017-06-06\",\"lts\":\"Boron\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.12.0\",\"date\":\"2017-11-06\",\"lts\":\"Boron\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.13.0\",\"date\":\"2018-02-10\",\"lts\":\"Boron\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.14.0\",\"date\":\"2018-03-28\",\"lts\":\"Boron\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"6.15.0\",\"date\":\"2018-11-27\",\"lts\":\"Boron\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"6.16.0\",\"date\":\"2018-12-26\",\"lts\":\"Boron\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"6.17.0\",\"date\":\"2019-02-28\",\"lts\":\"Boron\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"7.0.0\",\"date\":\"2016-10-25\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.1.0\",\"date\":\"2016-11-08\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.2.0\",\"date\":\"2016-11-22\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.3.0\",\"date\":\"2016-12-20\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.4.0\",\"date\":\"2017-01-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.5.0\",\"date\":\"2017-01-31\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.6.0\",\"date\":\"2017-02-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.7.0\",\"date\":\"2017-02-28\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.8.0\",\"date\":\"2017-03-29\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.9.0\",\"date\":\"2017-04-11\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"7.10.0\",\"date\":\"2017-05-02\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.0.0\",\"date\":\"2017-05-30\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.1.0\",\"date\":\"2017-06-08\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.2.0\",\"date\":\"2017-07-19\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.3.0\",\"date\":\"2017-08-08\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.4.0\",\"date\":\"2017-08-15\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.5.0\",\"date\":\"2017-09-12\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.6.0\",\"date\":\"2017-09-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.7.0\",\"date\":\"2017-10-11\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.8.0\",\"date\":\"2017-10-24\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.9.0\",\"date\":\"2017-10-31\",\"lts\":\"Carbon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.10.0\",\"date\":\"2018-03-06\",\"lts\":\"Carbon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.11.0\",\"date\":\"2018-03-28\",\"lts\":\"Carbon\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"8.12.0\",\"date\":\"2018-09-10\",\"lts\":\"Carbon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.13.0\",\"date\":\"2018-11-20\",\"lts\":\"Carbon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.14.0\",\"date\":\"2018-11-27\",\"lts\":\"Carbon\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"8.15.0\",\"date\":\"2018-12-26\",\"lts\":\"Carbon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.16.0\",\"date\":\"2019-04-16\",\"lts\":\"Carbon\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"8.17.0\",\"date\":\"2019-12-17\",\"lts\":\"Carbon\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"9.0.0\",\"date\":\"2017-10-31\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.1.0\",\"date\":\"2017-11-07\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.2.0\",\"date\":\"2017-11-14\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.3.0\",\"date\":\"2017-12-12\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.4.0\",\"date\":\"2018-01-10\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.5.0\",\"date\":\"2018-01-31\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.6.0\",\"date\":\"2018-02-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.7.0\",\"date\":\"2018-03-01\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.8.0\",\"date\":\"2018-03-07\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.9.0\",\"date\":\"2018-03-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"9.10.0\",\"date\":\"2018-03-28\",\"lts\":false,\"security\":true},{\"name\":\"nodejs\",\"version\":\"9.11.0\",\"date\":\"2018-04-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.0.0\",\"date\":\"2018-04-24\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.1.0\",\"date\":\"2018-05-08\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.2.0\",\"date\":\"2018-05-23\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.3.0\",\"date\":\"2018-05-29\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.4.0\",\"date\":\"2018-06-06\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.5.0\",\"date\":\"2018-06-20\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.6.0\",\"date\":\"2018-07-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.7.0\",\"date\":\"2018-07-18\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.8.0\",\"date\":\"2018-08-01\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.9.0\",\"date\":\"2018-08-15\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.10.0\",\"date\":\"2018-09-06\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.11.0\",\"date\":\"2018-09-19\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.12.0\",\"date\":\"2018-10-10\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.13.0\",\"date\":\"2018-10-30\",\"lts\":\"Dubnium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.14.0\",\"date\":\"2018-11-27\",\"lts\":\"Dubnium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"10.15.0\",\"date\":\"2018-12-26\",\"lts\":\"Dubnium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.16.0\",\"date\":\"2019-05-28\",\"lts\":\"Dubnium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.17.0\",\"date\":\"2019-10-22\",\"lts\":\"Dubnium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.18.0\",\"date\":\"2019-12-17\",\"lts\":\"Dubnium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"10.19.0\",\"date\":\"2020-02-05\",\"lts\":\"Dubnium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"10.20.0\",\"date\":\"2020-03-26\",\"lts\":\"Dubnium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.21.0\",\"date\":\"2020-06-02\",\"lts\":\"Dubnium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"10.22.0\",\"date\":\"2020-07-21\",\"lts\":\"Dubnium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.23.0\",\"date\":\"2020-10-27\",\"lts\":\"Dubnium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"10.24.0\",\"date\":\"2021-02-23\",\"lts\":\"Dubnium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"11.0.0\",\"date\":\"2018-10-23\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.1.0\",\"date\":\"2018-10-30\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.2.0\",\"date\":\"2018-11-15\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.3.0\",\"date\":\"2018-11-27\",\"lts\":false,\"security\":true},{\"name\":\"nodejs\",\"version\":\"11.4.0\",\"date\":\"2018-12-07\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.5.0\",\"date\":\"2018-12-18\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.6.0\",\"date\":\"2018-12-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.7.0\",\"date\":\"2019-01-17\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.8.0\",\"date\":\"2019-01-24\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.9.0\",\"date\":\"2019-01-30\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.10.0\",\"date\":\"2019-02-14\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.11.0\",\"date\":\"2019-03-05\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.12.0\",\"date\":\"2019-03-14\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.13.0\",\"date\":\"2019-03-28\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.14.0\",\"date\":\"2019-04-10\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"11.15.0\",\"date\":\"2019-04-30\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.0.0\",\"date\":\"2019-04-23\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.1.0\",\"date\":\"2019-04-29\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.2.0\",\"date\":\"2019-05-07\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.3.0\",\"date\":\"2019-05-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.4.0\",\"date\":\"2019-06-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.5.0\",\"date\":\"2019-06-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.6.0\",\"date\":\"2019-07-03\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.7.0\",\"date\":\"2019-07-23\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.8.0\",\"date\":\"2019-08-06\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.9.0\",\"date\":\"2019-08-20\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.10.0\",\"date\":\"2019-09-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.11.0\",\"date\":\"2019-09-25\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.12.0\",\"date\":\"2019-10-11\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.13.0\",\"date\":\"2019-10-21\",\"lts\":\"Erbium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.14.0\",\"date\":\"2019-12-17\",\"lts\":\"Erbium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"12.15.0\",\"date\":\"2020-02-05\",\"lts\":\"Erbium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"12.16.0\",\"date\":\"2020-02-11\",\"lts\":\"Erbium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.17.0\",\"date\":\"2020-05-26\",\"lts\":\"Erbium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.18.0\",\"date\":\"2020-06-02\",\"lts\":\"Erbium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"12.19.0\",\"date\":\"2020-10-06\",\"lts\":\"Erbium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.20.0\",\"date\":\"2020-11-24\",\"lts\":\"Erbium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"12.21.0\",\"date\":\"2021-02-23\",\"lts\":\"Erbium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"12.22.0\",\"date\":\"2021-03-30\",\"lts\":\"Erbium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.0.0\",\"date\":\"2019-10-22\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.1.0\",\"date\":\"2019-11-05\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.2.0\",\"date\":\"2019-11-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.3.0\",\"date\":\"2019-12-03\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.4.0\",\"date\":\"2019-12-17\",\"lts\":false,\"security\":true},{\"name\":\"nodejs\",\"version\":\"13.5.0\",\"date\":\"2019-12-18\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.6.0\",\"date\":\"2020-01-07\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.7.0\",\"date\":\"2020-01-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.8.0\",\"date\":\"2020-02-05\",\"lts\":false,\"security\":true},{\"name\":\"nodejs\",\"version\":\"13.9.0\",\"date\":\"2020-02-18\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.10.0\",\"date\":\"2020-03-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.11.0\",\"date\":\"2020-03-12\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.12.0\",\"date\":\"2020-03-26\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.13.0\",\"date\":\"2020-04-14\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"13.14.0\",\"date\":\"2020-04-29\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.0.0\",\"date\":\"2020-04-21\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.1.0\",\"date\":\"2020-04-29\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.2.0\",\"date\":\"2020-05-05\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.3.0\",\"date\":\"2020-05-19\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.4.0\",\"date\":\"2020-06-02\",\"lts\":false,\"security\":true},{\"name\":\"nodejs\",\"version\":\"14.5.0\",\"date\":\"2020-06-30\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.6.0\",\"date\":\"2020-07-20\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.7.0\",\"date\":\"2020-07-29\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.8.0\",\"date\":\"2020-08-11\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.9.0\",\"date\":\"2020-08-27\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.10.0\",\"date\":\"2020-09-08\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.11.0\",\"date\":\"2020-09-15\",\"lts\":false,\"security\":true},{\"name\":\"nodejs\",\"version\":\"14.12.0\",\"date\":\"2020-09-22\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.13.0\",\"date\":\"2020-09-29\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.14.0\",\"date\":\"2020-10-15\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.15.0\",\"date\":\"2020-10-27\",\"lts\":\"Fermium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"14.16.0\",\"date\":\"2021-02-23\",\"lts\":\"Fermium\",\"security\":true},{\"name\":\"nodejs\",\"version\":\"14.17.0\",\"date\":\"2021-05-11\",\"lts\":\"Fermium\",\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.0.0\",\"date\":\"2020-10-20\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.1.0\",\"date\":\"2020-11-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.2.0\",\"date\":\"2020-11-10\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.3.0\",\"date\":\"2020-11-24\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.4.0\",\"date\":\"2020-12-09\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.5.0\",\"date\":\"2020-12-22\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.6.0\",\"date\":\"2021-01-14\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.7.0\",\"date\":\"2021-01-25\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.8.0\",\"date\":\"2021-02-02\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.9.0\",\"date\":\"2021-02-18\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.10.0\",\"date\":\"2021-02-23\",\"lts\":false,\"security\":true},{\"name\":\"nodejs\",\"version\":\"15.11.0\",\"date\":\"2021-03-03\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.12.0\",\"date\":\"2021-03-17\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.13.0\",\"date\":\"2021-03-31\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"15.14.0\",\"date\":\"2021-04-06\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"16.0.0\",\"date\":\"2021-04-20\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"16.1.0\",\"date\":\"2021-05-04\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"16.2.0\",\"date\":\"2021-05-19\",\"lts\":false,\"security\":false},{\"name\":\"nodejs\",\"version\":\"16.3.0\",\"date\":\"2021-06-03\",\"lts\":false,\"security\":false}]')},(e,t,r)=>{const{browsers:n}=r(469),s=r(470).browserVersions,i=r(294);function o(e){return Object.keys(e).reduce(((t,r)=>(t[s[r]]=e[r],t)),{})}e.exports.a=Object.keys(i).reduce(((e,t)=>{let r=i[t];return e[n[t]]=Object.keys(r).reduce(((e,t)=>(\"A\"===t?e.usage_global=o(r[t]):\"C\"===t?e.versions=r[t].reduce(((e,t)=>(\"\"===t?e.push(null):e.push(s[t]),e)),[]):\"D\"===t?e.prefix_exceptions=o(r[t]):\"E\"===t?e.browser=r[t]:\"F\"===t?e.release_date=Object.keys(r[t]).reduce(((e,n)=>(e[s[n]]=r[t][n],e)),{}):e.prefix=r[t],e)),{}),e}),{})},(e,t,r)=>{e.exports.browsers=r(292)},(e,t,r)=>{e.exports.browserVersions=r(293)},e=>{\"use strict\";e.exports=JSON.parse('{\"v0.8\":{\"start\":\"2012-06-25\",\"end\":\"2014-07-31\"},\"v0.10\":{\"start\":\"2013-03-11\",\"end\":\"2016-10-31\"},\"v0.12\":{\"start\":\"2015-02-06\",\"end\":\"2016-12-31\"},\"v4\":{\"start\":\"2015-09-08\",\"lts\":\"2015-10-12\",\"maintenance\":\"2017-04-01\",\"end\":\"2018-04-30\",\"codename\":\"Argon\"},\"v5\":{\"start\":\"2015-10-29\",\"maintenance\":\"2016-04-30\",\"end\":\"2016-06-30\"},\"v6\":{\"start\":\"2016-04-26\",\"lts\":\"2016-10-18\",\"maintenance\":\"2018-04-30\",\"end\":\"2019-04-30\",\"codename\":\"Boron\"},\"v7\":{\"start\":\"2016-10-25\",\"maintenance\":\"2017-04-30\",\"end\":\"2017-06-30\"},\"v8\":{\"start\":\"2017-05-30\",\"lts\":\"2017-10-31\",\"maintenance\":\"2019-01-01\",\"end\":\"2019-12-31\",\"codename\":\"Carbon\"},\"v9\":{\"start\":\"2017-10-01\",\"maintenance\":\"2018-04-01\",\"end\":\"2018-06-30\"},\"v10\":{\"start\":\"2018-04-24\",\"lts\":\"2018-10-30\",\"maintenance\":\"2020-05-19\",\"end\":\"2021-04-30\",\"codename\":\"Dubnium\"},\"v11\":{\"start\":\"2018-10-23\",\"maintenance\":\"2019-04-22\",\"end\":\"2019-06-01\"},\"v12\":{\"start\":\"2019-04-23\",\"lts\":\"2019-10-21\",\"maintenance\":\"2020-11-30\",\"end\":\"2022-04-30\",\"codename\":\"Erbium\"},\"v13\":{\"start\":\"2019-10-22\",\"maintenance\":\"2020-04-01\",\"end\":\"2020-06-01\"},\"v14\":{\"start\":\"2020-04-21\",\"lts\":\"2020-10-27\",\"maintenance\":\"2021-10-19\",\"end\":\"2023-04-30\",\"codename\":\"Fermium\"},\"v15\":{\"start\":\"2020-10-20\",\"maintenance\":\"2021-04-01\",\"end\":\"2021-06-01\"},\"v16\":{\"start\":\"2021-04-20\",\"lts\":\"2021-10-26\",\"maintenance\":\"2022-10-18\",\"end\":\"2024-04-30\",\"codename\":\"\"},\"v17\":{\"start\":\"2021-10-19\",\"maintenance\":\"2022-04-01\",\"end\":\"2022-06-01\"},\"v18\":{\"start\":\"2022-04-19\",\"lts\":\"2022-10-25\",\"maintenance\":\"2023-10-18\",\"end\":\"2025-04-30\",\"codename\":\"\"}}')},()=>{},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.OptionValidator=void 0;var n=r(298);t.OptionValidator=class{constructor(e){this.descriptor=e}validateTopLevelOptions(e,t){const r=Object.keys(t);for(const t of Object.keys(e))if(!r.includes(t))throw new Error(this.formatMessage(`'${t}' is not a valid top-level option.\\n- Did you mean '${(0,n.findSuggestion)(t,r)}'?`))}validateBooleanOption(e,t,r){return void 0===t?r:(this.invariant(\"boolean\"==typeof t,`'${e}' option must be a boolean.`),t)}validateStringOption(e,t,r){return void 0===t?r:(this.invariant(\"string\"==typeof t,`'${e}' option must be a string.`),t)}invariant(e,t){if(!e)throw new Error(this.formatMessage(t))}formatMessage(e){return`${this.descriptor}: ${e}`}}},(e,t,r)=>{e.exports=r(475)},e=>{\"use strict\";e.exports=JSON.parse('{\"es6.module\":{\"chrome\":\"61\",\"and_chr\":\"61\",\"edge\":\"16\",\"firefox\":\"60\",\"and_ff\":\"60\",\"node\":\"13.2.0\",\"opera\":\"48\",\"op_mob\":\"48\",\"safari\":\"10.1\",\"ios\":\"10.3\",\"samsung\":\"8.2\",\"android\":\"61\",\"electron\":\"2.0\",\"ios_saf\":\"10.3\"}}')},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.TargetNames=void 0,t.TargetNames={node:\"node\",chrome:\"chrome\",opera:\"opera\",edge:\"edge\",firefox:\"firefox\",safari:\"safari\",ie:\"ie\",ios:\"ios\",android:\"android\",electron:\"electron\",samsung:\"samsung\"}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.getInclusionReasons=function(e,t,r){const o=r[e]||{};return Object.keys(t).reduce(((e,r)=>{const a=(0,i.getLowestImplementedVersion)(o,r),l=t[r];if(a){const t=(0,i.isUnreleasedVersion)(a,r);(0,i.isUnreleasedVersion)(l,r)||!t&&!n.lt(l.toString(),(0,i.semverify)(a))||(e[r]=(0,s.prettifyVersion)(l))}else e[r]=(0,s.prettifyVersion)(l);return e}),{})};var n=r(28),s=r(299),i=r(152)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.targetsSupported=o,t.isRequired=a,t.default=function(e,t,r,n,s,i,o){const l=new Set,c={compatData:e,includes:t,excludes:r};for(const t in e)if(a(t,n,c))l.add(t);else if(o){const e=o.get(t);e&&l.add(e)}return s&&s.forEach((e=>!r.has(e)&&l.add(e))),i&&i.forEach((e=>!t.has(e)&&l.delete(e))),l};var n=r(28),s=r(479),i=r(152);function o(e,t){const r=Object.keys(e);return 0!==r.length&&0===r.filter((r=>{const s=(0,i.getLowestImplementedVersion)(t,r);if(!s)return!0;const o=e[r];if((0,i.isUnreleasedVersion)(o,r))return!1;if((0,i.isUnreleasedVersion)(s,r))return!0;if(!n.valid(o.toString()))throw new Error(`Invalid version passed for target \"${r}\": \"${o}\". Versions must be in semver format (major.minor.patch)`);return n.gt((0,i.semverify)(s),o.toString())})).length}function a(e,t,{compatData:r=s,includes:n,excludes:i}={}){return!(null!=i&&i.has(e)||(null==n||!n.has(e))&&o(t,r[e]))}},(e,t,r)=>{e.exports=r(480)},e=>{\"use strict\";e.exports=JSON.parse('{\"proposal-class-static-block\":{\"chrome\":\"91\",\"electron\":\"13.0\"},\"proposal-private-property-in-object\":{\"chrome\":\"91\",\"firefox\":\"90\",\"electron\":\"13.0\"},\"proposal-class-properties\":{\"chrome\":\"74\",\"opera\":\"62\",\"edge\":\"79\",\"firefox\":\"90\",\"safari\":\"14.1\",\"node\":\"12\",\"samsung\":\"11\",\"electron\":\"6.0\"},\"proposal-private-methods\":{\"chrome\":\"84\",\"opera\":\"70\",\"edge\":\"84\",\"firefox\":\"90\",\"safari\":\"15\",\"node\":\"14.6\",\"electron\":\"10.0\"},\"proposal-numeric-separator\":{\"chrome\":\"75\",\"opera\":\"62\",\"edge\":\"79\",\"firefox\":\"70\",\"safari\":\"13\",\"node\":\"12.5\",\"ios\":\"13\",\"samsung\":\"11\",\"electron\":\"6.0\"},\"proposal-logical-assignment-operators\":{\"chrome\":\"85\",\"opera\":\"71\",\"edge\":\"85\",\"firefox\":\"79\",\"safari\":\"14\",\"node\":\"15\",\"ios\":\"14\",\"electron\":\"10.0\"},\"proposal-nullish-coalescing-operator\":{\"chrome\":\"80\",\"opera\":\"67\",\"edge\":\"80\",\"firefox\":\"72\",\"safari\":\"13.1\",\"node\":\"14\",\"ios\":\"13.4\",\"samsung\":\"13\",\"electron\":\"8.0\"},\"proposal-optional-chaining\":{\"firefox\":\"74\",\"safari\":\"13.1\",\"ios\":\"13.4\"},\"proposal-json-strings\":{\"chrome\":\"66\",\"opera\":\"53\",\"edge\":\"79\",\"firefox\":\"62\",\"safari\":\"12\",\"node\":\"10\",\"ios\":\"12\",\"samsung\":\"9\",\"electron\":\"3.0\"},\"proposal-optional-catch-binding\":{\"chrome\":\"66\",\"opera\":\"53\",\"edge\":\"79\",\"firefox\":\"58\",\"safari\":\"11.1\",\"node\":\"10\",\"ios\":\"11.3\",\"samsung\":\"9\",\"electron\":\"3.0\"},\"transform-parameters\":{\"chrome\":\"49\",\"opera\":\"36\",\"edge\":\"18\",\"firefox\":\"53\",\"safari\":\"10\",\"node\":\"6\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"0.37\"},\"proposal-async-generator-functions\":{\"chrome\":\"63\",\"opera\":\"50\",\"edge\":\"79\",\"firefox\":\"57\",\"safari\":\"12\",\"node\":\"10\",\"ios\":\"12\",\"samsung\":\"8\",\"electron\":\"3.0\"},\"proposal-object-rest-spread\":{\"chrome\":\"60\",\"opera\":\"47\",\"edge\":\"79\",\"firefox\":\"55\",\"safari\":\"11.1\",\"node\":\"8.3\",\"ios\":\"11.3\",\"samsung\":\"8\",\"electron\":\"2.0\"},\"transform-dotall-regex\":{\"chrome\":\"62\",\"opera\":\"49\",\"edge\":\"79\",\"firefox\":\"78\",\"safari\":\"11.1\",\"node\":\"8.10\",\"ios\":\"11.3\",\"samsung\":\"8\",\"electron\":\"3.0\"},\"proposal-unicode-property-regex\":{\"chrome\":\"64\",\"opera\":\"51\",\"edge\":\"79\",\"firefox\":\"78\",\"safari\":\"11.1\",\"node\":\"10\",\"ios\":\"11.3\",\"samsung\":\"9\",\"electron\":\"3.0\"},\"transform-named-capturing-groups-regex\":{\"chrome\":\"64\",\"opera\":\"51\",\"edge\":\"79\",\"firefox\":\"78\",\"safari\":\"11.1\",\"node\":\"10\",\"ios\":\"11.3\",\"samsung\":\"9\",\"electron\":\"3.0\"},\"transform-async-to-generator\":{\"chrome\":\"55\",\"opera\":\"42\",\"edge\":\"15\",\"firefox\":\"52\",\"safari\":\"11\",\"node\":\"7.6\",\"ios\":\"11\",\"samsung\":\"6\",\"electron\":\"1.6\"},\"transform-exponentiation-operator\":{\"chrome\":\"52\",\"opera\":\"39\",\"edge\":\"14\",\"firefox\":\"52\",\"safari\":\"10.1\",\"node\":\"7\",\"ios\":\"10.3\",\"samsung\":\"6\",\"electron\":\"1.3\"},\"transform-template-literals\":{\"chrome\":\"41\",\"opera\":\"28\",\"edge\":\"13\",\"firefox\":\"34\",\"safari\":\"13\",\"node\":\"4\",\"ios\":\"13\",\"samsung\":\"3.4\",\"electron\":\"0.21\"},\"transform-literals\":{\"chrome\":\"44\",\"opera\":\"31\",\"edge\":\"12\",\"firefox\":\"53\",\"safari\":\"9\",\"node\":\"4\",\"ios\":\"9\",\"samsung\":\"4\",\"electron\":\"0.30\"},\"transform-function-name\":{\"chrome\":\"51\",\"opera\":\"38\",\"edge\":\"79\",\"firefox\":\"53\",\"safari\":\"10\",\"node\":\"6.5\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"1.2\"},\"transform-arrow-functions\":{\"chrome\":\"47\",\"opera\":\"34\",\"edge\":\"13\",\"firefox\":\"45\",\"safari\":\"10\",\"node\":\"6\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"0.36\"},\"transform-block-scoped-functions\":{\"chrome\":\"41\",\"opera\":\"28\",\"edge\":\"12\",\"firefox\":\"46\",\"safari\":\"10\",\"node\":\"4\",\"ie\":\"11\",\"ios\":\"10\",\"samsung\":\"3.4\",\"electron\":\"0.21\"},\"transform-classes\":{\"chrome\":\"46\",\"opera\":\"33\",\"edge\":\"13\",\"firefox\":\"45\",\"safari\":\"10\",\"node\":\"5\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"0.36\"},\"transform-object-super\":{\"chrome\":\"46\",\"opera\":\"33\",\"edge\":\"13\",\"firefox\":\"45\",\"safari\":\"10\",\"node\":\"5\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"0.36\"},\"transform-shorthand-properties\":{\"chrome\":\"43\",\"opera\":\"30\",\"edge\":\"12\",\"firefox\":\"33\",\"safari\":\"9\",\"node\":\"4\",\"ios\":\"9\",\"samsung\":\"4\",\"electron\":\"0.27\"},\"transform-duplicate-keys\":{\"chrome\":\"42\",\"opera\":\"29\",\"edge\":\"12\",\"firefox\":\"34\",\"safari\":\"9\",\"node\":\"4\",\"ios\":\"9\",\"samsung\":\"3.4\",\"electron\":\"0.25\"},\"transform-computed-properties\":{\"chrome\":\"44\",\"opera\":\"31\",\"edge\":\"12\",\"firefox\":\"34\",\"safari\":\"7.1\",\"node\":\"4\",\"ios\":\"8\",\"samsung\":\"4\",\"electron\":\"0.30\"},\"transform-for-of\":{\"chrome\":\"51\",\"opera\":\"38\",\"edge\":\"15\",\"firefox\":\"53\",\"safari\":\"10\",\"node\":\"6.5\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"1.2\"},\"transform-sticky-regex\":{\"chrome\":\"49\",\"opera\":\"36\",\"edge\":\"13\",\"firefox\":\"3\",\"safari\":\"10\",\"node\":\"6\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"0.37\"},\"transform-unicode-escapes\":{\"chrome\":\"44\",\"opera\":\"31\",\"edge\":\"12\",\"firefox\":\"53\",\"safari\":\"9\",\"node\":\"4\",\"ios\":\"9\",\"samsung\":\"4\",\"electron\":\"0.30\"},\"transform-unicode-regex\":{\"chrome\":\"50\",\"opera\":\"37\",\"edge\":\"13\",\"firefox\":\"46\",\"safari\":\"12\",\"node\":\"6\",\"ios\":\"12\",\"samsung\":\"5\",\"electron\":\"1.1\"},\"transform-spread\":{\"chrome\":\"46\",\"opera\":\"33\",\"edge\":\"13\",\"firefox\":\"45\",\"safari\":\"10\",\"node\":\"5\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"0.36\"},\"transform-destructuring\":{\"chrome\":\"51\",\"opera\":\"38\",\"edge\":\"15\",\"firefox\":\"53\",\"safari\":\"10\",\"node\":\"6.5\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"1.2\"},\"transform-block-scoping\":{\"chrome\":\"49\",\"opera\":\"36\",\"edge\":\"14\",\"firefox\":\"51\",\"safari\":\"11\",\"node\":\"6\",\"ios\":\"11\",\"samsung\":\"5\",\"electron\":\"0.37\"},\"transform-typeof-symbol\":{\"chrome\":\"38\",\"opera\":\"25\",\"edge\":\"12\",\"firefox\":\"36\",\"safari\":\"9\",\"node\":\"0.12\",\"ios\":\"9\",\"samsung\":\"3\",\"electron\":\"0.20\"},\"transform-new-target\":{\"chrome\":\"46\",\"opera\":\"33\",\"edge\":\"14\",\"firefox\":\"41\",\"safari\":\"10\",\"node\":\"5\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"0.36\"},\"transform-regenerator\":{\"chrome\":\"50\",\"opera\":\"37\",\"edge\":\"13\",\"firefox\":\"53\",\"safari\":\"10\",\"node\":\"6\",\"ios\":\"10\",\"samsung\":\"5\",\"electron\":\"1.1\"},\"transform-member-expression-literals\":{\"chrome\":\"7\",\"opera\":\"12\",\"edge\":\"12\",\"firefox\":\"2\",\"safari\":\"5.1\",\"node\":\"0.10\",\"ie\":\"9\",\"android\":\"4\",\"ios\":\"6\",\"phantom\":\"2\",\"samsung\":\"1\",\"electron\":\"0.20\"},\"transform-property-literals\":{\"chrome\":\"7\",\"opera\":\"12\",\"edge\":\"12\",\"firefox\":\"2\",\"safari\":\"5.1\",\"node\":\"0.10\",\"ie\":\"9\",\"android\":\"4\",\"ios\":\"6\",\"phantom\":\"2\",\"samsung\":\"1\",\"electron\":\"0.20\"},\"transform-reserved-words\":{\"chrome\":\"13\",\"opera\":\"10.50\",\"edge\":\"12\",\"firefox\":\"2\",\"safari\":\"3.1\",\"node\":\"0.10\",\"ie\":\"9\",\"android\":\"4.4\",\"ios\":\"6\",\"phantom\":\"2\",\"samsung\":\"1\",\"electron\":\"0.20\"},\"proposal-export-namespace-from\":{\"chrome\":\"72\",\"and_chr\":\"72\",\"edge\":\"79\",\"firefox\":\"80\",\"and_ff\":\"80\",\"node\":\"13.2\",\"opera\":\"60\",\"op_mob\":\"51\",\"samsung\":\"11.0\",\"android\":\"72\",\"electron\":\"5.0\"}}')},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0,t.default={auxiliaryComment:{message:\"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`\"},blacklist:{message:\"Put the specific transforms you want in the `plugins` option\"},breakConfig:{message:\"This is not a necessary option in Babel 6\"},experimental:{message:\"Put the specific transforms you want in the `plugins` option\"},externalHelpers:{message:\"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/\"},extra:{message:\"\"},jsxPragma:{message:\"use the `pragma` option in the `react-jsx` plugin. Check out http://babeljs.io/docs/plugins/transform-react-jsx/\"},loose:{message:\"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option.\"},metadataUsedHelpers:{message:\"Not required anymore as this is enabled by default\"},modules:{message:\"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules\"},nonStandard:{message:\"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/\"},optional:{message:\"Put the specific transforms you want in the `plugins` option\"},sourceMapName:{message:\"The `sourceMapName` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file` themselves.\"},stage:{message:\"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets\"},whitelist:{message:\"Put the specific transforms you want in the `plugins` option\"},resolveModuleSource:{version:6,message:\"Use `babel-plugin-module-resolver@3`'s 'resolvePath' options\"},metadata:{version:6,message:\"Generated plugin metadata is always included in the output result\"},sourceMapTarget:{version:6,message:\"The `sourceMapTarget` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file` themselves.\"}}},(e,t,r)=>{\"use strict\";function n(){const e=r(8);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){const r=n().resolve(t,e).split(n().sep);return new RegExp([\"^\",...r.map(((e,t)=>{const n=t===r.length-1;return\"**\"===e?n?u:c:\"*\"===e?n?l:a:0===e.indexOf(\"*.\")?o+p(e.slice(1))+(n?i:s):p(e)+(n?i:s)}))].join(\"\"))};const s=`\\\\${n().sep}`,i=`(?:${s}|$)`,o=`[^${s}]+`,a=`(?:${o}${s})`,l=`(?:${o}${i})`,c=`${a}*?`,u=`${a}*?${l}?`;function p(e){return e.replace(/[|\\\\{}()[\\]^$+*?.]/g,\"\\\\$&\")}},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.ConfigPrinter=t.ChainFormatter=void 0;const s={Programmatic:0,Config:1};t.ChainFormatter=s;const i={title(e,t,r){let n=\"\";return e===s.Programmatic?(n=\"programmatic options\",t&&(n+=\" from \"+t)):n=\"config \"+r,n},loc(e,t){let r=\"\";return null!=e&&(r+=`.overrides[${e}]`),null!=t&&(r+=`.env[\"${t}\"]`),r},*optionsAndDescriptors(e){const t=Object.assign({},e.options);delete t.overrides,delete t.env;const r=[...yield*e.plugins()];r.length&&(t.plugins=r.map((e=>o(e))));const n=[...yield*e.presets()];return n.length&&(t.presets=[...n].map((e=>o(e)))),JSON.stringify(t,void 0,2)}};function o(e){var t;let r=null==(t=e.file)?void 0:t.request;return null==r&&(\"object\"==typeof e.value?r=e.value:\"function\"==typeof e.value&&(r=`[Function: ${e.value.toString().substr(0,50)} ... ]`)),null==r&&(r=\"[Unknown]\"),void 0===e.options?r:null==e.name?[r,e.options]:[r,e.options,e.name]}class a{constructor(){this._stack=[]}configure(e,t,{callerName:r,filepath:n}){return e?(e,s,i)=>{this._stack.push({type:t,callerName:r,filepath:n,content:e,index:s,envName:i})}:()=>{}}static*format(e){let t=i.title(e.type,e.callerName,e.filepath);const r=i.loc(e.index,e.envName);return r&&(t+=` ${r}`),`${t}\\n${yield*i.optionsAndDescriptors(e.content)}`}*output(){return 0===this._stack.length?\"\":(yield*n().all(this._stack.map((e=>a.format(e))))).join(\"\\n\\n\")}}t.ConfigPrinter=a},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.validatePluginObject=function(e){const t={type:\"root\",source:\"plugin\"};return Object.keys(e).forEach((r=>{const n=s[r];if(!n){const e=new Error(`.${r} is not a valid Plugin property`);throw e.code=\"BABEL_UNKNOWN_PLUGIN_PROPERTY\",e}n({type:\"option\",name:r,parent:t},e[r])})),e};var n=r(301);const s={name:n.assertString,manipulateOptions:n.assertFunction,pre:n.assertFunction,post:n.assertFunction,inherits:n.assertFunction,visitor:function(e,t){const r=(0,n.assertObject)(e,t);if(r&&(Object.keys(r).forEach((e=>function(e,t){if(t&&\"object\"==typeof t)Object.keys(t).forEach((t=>{if(\"enter\"!==t&&\"exit\"!==t)throw new Error(`.visitor[\"${e}\"] may only have .enter and/or .exit handlers.`)}));else if(\"function\"!=typeof t)throw new Error(`.visitor[\"${e}\"] must be a function`);return t}(e,r[e]))),r.enter||r.exit))throw new Error(`${(0,n.msg)(e)} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`);return r},parserOverride:n.assertFunction,generatorOverride:n.assertFunction}},(e,t,r)=>{\"use strict\";function n(){const e=r(28);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.makeConfigAPI=o,t.makePresetAPI=a,t.makePluginAPI=function(e){return Object.assign({},a(e),{assumption:t=>e.using((e=>e.assumptions[t]))})};var s=r(9),i=r(81);function o(e){return{version:s.version,cache:e.simple(),env:t=>e.using((e=>void 0===t?e.envName:\"function\"==typeof t?(0,i.assertSimpleType)(t(e.envName)):(Array.isArray(t)||(t=[t]),t.some((t=>{if(\"string\"!=typeof t)throw new Error(\"Unexpected non-string value\");return t===e.envName}))))),async:()=>!1,caller:t=>e.using((e=>(0,i.assertSimpleType)(t(e.caller)))),assertVersion:l}}function a(e){return Object.assign({},o(e),{targets:()=>JSON.parse(e.using((e=>JSON.stringify(e.targets))))})}function l(e){if(\"number\"==typeof e){if(!Number.isInteger(e))throw new Error(\"Expected string or integer value.\");e=`^${e}.0.0-0`}if(\"string\"!=typeof e)throw new Error(\"Expected string or integer value.\");if(n().satisfies(s.version,e))return;const t=Error.stackTraceLimit;\"number\"==typeof t&&t<25&&(Error.stackTraceLimit=25);const r=new Error(`Requires Babel \"${e}\", but was loaded with \"${s.version}\". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention \"@babel/core\" or \"babel-core\" to see what is calling Babel.`);throw\"number\"==typeof t&&(Error.stackTraceLimit=t),Object.assign(r,{code:\"BABEL_VERSION_UNSUPPORTED\",version:s.version,range:e})}r(302)},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.transformAsync=t.transformSync=t.transform=void 0;var s=r(78),i=r(304);const o=n()((function*(e,t){const r=yield*(0,s.default)(t);return null===r?null:yield*(0,i.run)(r,e)}));t.transform=function(e,t,r){if(\"function\"==typeof t&&(r=t,t=void 0),void 0===r)return o.sync(e,t);o.errback(e,t,r)};const a=o.sync;t.transformSync=a;const l=o.async;t.transformAsync=l},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;class r{constructor(e,t,r){this._map=new Map,this.key=void 0,this.file=void 0,this.opts=void 0,this.cwd=void 0,this.filename=void 0,this.key=t,this.file=e,this.opts=r||{},this.cwd=e.opts.cwd,this.filename=e.opts.filename}set(e,t){this._map.set(e,t)}get(e){return this._map.get(e)}availableHelper(e,t){return this.file.availableHelper(e,t)}addHelper(e){return this.file.addHelper(e)}addImport(){return this.file.addImport()}buildCodeFrameError(e,t,r){return this.file.buildCodeFrameError(e,t,r)}}t.default=r,r.prototype.getModuleName=function(){return this.file.getModuleName()}},(e,t,r)=>{\"use strict\";function n(){const e=r(10);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(){return i||(i=new s.default(Object.assign({},a,{visitor:n().default.explode(a.visitor)}),{})),i};var s=r(79);let i;function o(e){const t=null==e?void 0:e._blockHoist;return null==t?1:!0===t?2:t}const a={name:\"internal.blockHoist\",visitor:{Block:{exit({node:e}){const{body:t}=e;let r=Math.pow(2,30)-1,n=!1;for(let e=0;e<t.length;e++){const s=o(t[e]);if(s>r){n=!0;break}r=s}n&&(e.body=function(e){const t=Object.create(null);for(let r=0;r<e.length;r++){const n=e[r],s=o(n);(t[s]||(t[s]=[])).push(n)}const r=Object.keys(t).map((e=>+e)).sort(((e,t)=>t-e));let n=0;for(const s of r){const r=t[s];for(const t of r)e[n++]=t}return e}(t.slice()))}}}}},(e,t,r)=>{\"use strict\";function n(){const e=r(490);return n=function(){return e},e}function s(){const e=r(8);return s=function(){return e},e}function i(){const e=r(65);return i=function(){return e},e}function o(){const e=r(0);return o=function(){return e},e}function a(){const e=r(491);return a=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function*(e,t,r,i){if(r=`${r||\"\"}`,i){if(\"Program\"===i.type)i=o().file(i,[],[]);else if(\"File\"!==i.type)throw new Error(\"AST root must be a Program or File node\");t.cloneInputAst&&(i=(0,u.default)(i))}else i=yield*(0,c.default)(e,t,r);let h=null;if(!1!==t.inputSourceMap){if(\"object\"==typeof t.inputSourceMap&&(h=a().fromObject(t.inputSourceMap)),!h){const e=m(f,i);if(e)try{h=a().fromComment(e)}catch(e){p(\"discarding unknown inline input sourcemap\",e)}}if(!h){const e=m(d,i);if(\"string\"==typeof t.filename&&e)try{const r=d.exec(e),i=n().readFileSync(s().resolve(s().dirname(t.filename),r[1]));i.length>1e6?p(\"skip merging input map > 1 MB\"):h=a().fromJSON(i)}catch(e){p(\"discarding unknown file input sourcemap\",e)}else e&&p(\"discarding un-loadable file input sourcemap\")}}return new l.default(t,{code:r,ast:i,inputMap:h})};var l=r(126),c=r(306),u=r(493);const p=i()(\"babel:transform:file\"),f=/^[@#]\\s+sourceMappingURL=data:(?:application|text)\\/json;(?:charset[:=]\\S+?;)?base64,(?:.*)$/,d=/^[@#][ \\t]+sourceMappingURL=([^\\s'\"`]+)[ \\t]*$/;function h(e,t,r){return t&&(t=t.filter((({value:t})=>!e.test(t)||(r=t,!1)))),[t,r]}function m(e,t){let r=null;return o().traverseFast(t,(t=>{[t.leadingComments,r]=h(e,t.leadingComments,r),[t.innerComments,r]=h(e,t.innerComments,r),[t.trailingComments,r]=h(e,t.trailingComments,r)})),r}},()=>{},()=>{},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,s){let i=`Support for the experimental syntax '${e}' isn't currently enabled (${t.line}:${t.column+1}):\\n\\n`+s;const o=r[e];if(o){const{syntax:e,transform:t}=o;if(e){const r=n(e);if(t){i+=`\\n\\nAdd ${n(t)} to the '${t.name.startsWith(\"@babel/plugin\")?\"plugins\":\"presets\"}' section of your Babel config to enable transformation.\\nIf you want to leave it as-is, add ${r} to the 'plugins' section to enable parsing.`}else i+=`\\n\\nAdd ${r} to the 'plugins' section of your Babel config to enable parsing.`}}return i};const r={asyncDoExpressions:{syntax:{name:\"@babel/plugin-syntax-async-do-expressions\",url:\"https://git.io/JYer8\"}},classProperties:{syntax:{name:\"@babel/plugin-syntax-class-properties\",url:\"https://git.io/vb4yQ\"},transform:{name:\"@babel/plugin-proposal-class-properties\",url:\"https://git.io/vb4SL\"}},classPrivateProperties:{syntax:{name:\"@babel/plugin-syntax-class-properties\",url:\"https://git.io/vb4yQ\"},transform:{name:\"@babel/plugin-proposal-class-properties\",url:\"https://git.io/vb4SL\"}},classPrivateMethods:{syntax:{name:\"@babel/plugin-syntax-class-properties\",url:\"https://git.io/vb4yQ\"},transform:{name:\"@babel/plugin-proposal-private-methods\",url:\"https://git.io/JvpRG\"}},classStaticBlock:{syntax:{name:\"@babel/plugin-syntax-class-static-block\",url:\"https://git.io/JTLB6\"},transform:{name:\"@babel/plugin-proposal-class-static-block\",url:\"https://git.io/JTLBP\"}},decimal:{syntax:{name:\"@babel/plugin-syntax-decimal\",url:\"https://git.io/JfKOH\"}},decorators:{syntax:{name:\"@babel/plugin-syntax-decorators\",url:\"https://git.io/vb4y9\"},transform:{name:\"@babel/plugin-proposal-decorators\",url:\"https://git.io/vb4ST\"}},doExpressions:{syntax:{name:\"@babel/plugin-syntax-do-expressions\",url:\"https://git.io/vb4yh\"},transform:{name:\"@babel/plugin-proposal-do-expressions\",url:\"https://git.io/vb4S3\"}},dynamicImport:{syntax:{name:\"@babel/plugin-syntax-dynamic-import\",url:\"https://git.io/vb4Sv\"}},exportDefaultFrom:{syntax:{name:\"@babel/plugin-syntax-export-default-from\",url:\"https://git.io/vb4SO\"},transform:{name:\"@babel/plugin-proposal-export-default-from\",url:\"https://git.io/vb4yH\"}},exportNamespaceFrom:{syntax:{name:\"@babel/plugin-syntax-export-namespace-from\",url:\"https://git.io/vb4Sf\"},transform:{name:\"@babel/plugin-proposal-export-namespace-from\",url:\"https://git.io/vb4SG\"}},flow:{syntax:{name:\"@babel/plugin-syntax-flow\",url:\"https://git.io/vb4yb\"},transform:{name:\"@babel/preset-flow\",url:\"https://git.io/JfeDn\"}},functionBind:{syntax:{name:\"@babel/plugin-syntax-function-bind\",url:\"https://git.io/vb4y7\"},transform:{name:\"@babel/plugin-proposal-function-bind\",url:\"https://git.io/vb4St\"}},functionSent:{syntax:{name:\"@babel/plugin-syntax-function-sent\",url:\"https://git.io/vb4yN\"},transform:{name:\"@babel/plugin-proposal-function-sent\",url:\"https://git.io/vb4SZ\"}},importMeta:{syntax:{name:\"@babel/plugin-syntax-import-meta\",url:\"https://git.io/vbKK6\"}},jsx:{syntax:{name:\"@babel/plugin-syntax-jsx\",url:\"https://git.io/vb4yA\"},transform:{name:\"@babel/preset-react\",url:\"https://git.io/JfeDR\"}},importAssertions:{syntax:{name:\"@babel/plugin-syntax-import-assertions\",url:\"https://git.io/JUbkv\"}},moduleStringNames:{syntax:{name:\"@babel/plugin-syntax-module-string-names\",url:\"https://git.io/JTL8G\"}},numericSeparator:{syntax:{name:\"@babel/plugin-syntax-numeric-separator\",url:\"https://git.io/vb4Sq\"},transform:{name:\"@babel/plugin-proposal-numeric-separator\",url:\"https://git.io/vb4yS\"}},optionalChaining:{syntax:{name:\"@babel/plugin-syntax-optional-chaining\",url:\"https://git.io/vb4Sc\"},transform:{name:\"@babel/plugin-proposal-optional-chaining\",url:\"https://git.io/vb4Sk\"}},pipelineOperator:{syntax:{name:\"@babel/plugin-syntax-pipeline-operator\",url:\"https://git.io/vb4yj\"},transform:{name:\"@babel/plugin-proposal-pipeline-operator\",url:\"https://git.io/vb4SU\"}},privateIn:{syntax:{name:\"@babel/plugin-syntax-private-property-in-object\",url:\"https://git.io/JfK3q\"},transform:{name:\"@babel/plugin-proposal-private-property-in-object\",url:\"https://git.io/JfK3O\"}},recordAndTuple:{syntax:{name:\"@babel/plugin-syntax-record-and-tuple\",url:\"https://git.io/JvKp3\"}},throwExpressions:{syntax:{name:\"@babel/plugin-syntax-throw-expressions\",url:\"https://git.io/vb4SJ\"},transform:{name:\"@babel/plugin-proposal-throw-expressions\",url:\"https://git.io/vb4yF\"}},typescript:{syntax:{name:\"@babel/plugin-syntax-typescript\",url:\"https://git.io/vb4SC\"},transform:{name:\"@babel/preset-typescript\",url:\"https://git.io/JfeDz\"}},asyncGenerators:{syntax:{name:\"@babel/plugin-syntax-async-generators\",url:\"https://git.io/vb4SY\"},transform:{name:\"@babel/plugin-proposal-async-generator-functions\",url:\"https://git.io/vb4yp\"}},logicalAssignment:{syntax:{name:\"@babel/plugin-syntax-logical-assignment-operators\",url:\"https://git.io/vAlBp\"},transform:{name:\"@babel/plugin-proposal-logical-assignment-operators\",url:\"https://git.io/vAlRe\"}},nullishCoalescingOperator:{syntax:{name:\"@babel/plugin-syntax-nullish-coalescing-operator\",url:\"https://git.io/vb4yx\"},transform:{name:\"@babel/plugin-proposal-nullish-coalescing-operator\",url:\"https://git.io/vb4Se\"}},objectRestSpread:{syntax:{name:\"@babel/plugin-syntax-object-rest-spread\",url:\"https://git.io/vb4y5\"},transform:{name:\"@babel/plugin-proposal-object-rest-spread\",url:\"https://git.io/vb4Ss\"}},optionalCatchBinding:{syntax:{name:\"@babel/plugin-syntax-optional-catch-binding\",url:\"https://git.io/vb4Sn\"},transform:{name:\"@babel/plugin-proposal-optional-catch-binding\",url:\"https://git.io/vb4SI\"}}};r.privateIn.syntax=r.privateIn.transform;const n=({name:e,url:t})=>`${e} (${t})`},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return JSON.parse(JSON.stringify(e,n),s)};const r=\"$$ babel internal serialized type\"+Math.random();function n(e,t){return\"bigint\"!=typeof t?t:{[r]:\"BigInt\",value:t.toString()}}function s(e,t){return t&&\"object\"==typeof t?\"BigInt\"!==t[r]?t:BigInt(t.value):t}},(e,t,r)=>{\"use strict\";function n(){const e=r(495);return n=function(){return e},e}function s(){const e=r(133);return s=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){const{opts:r,ast:o,code:a,inputMap:l}=t,c=[];for(const t of e)for(const e of t){const{generatorOverride:t}=e;if(t){const e=t(o,r.generatorOpts,a,s().default);void 0!==e&&c.push(e)}}let u;if(0===c.length)u=(0,s().default)(o,r.generatorOpts,a);else{if(1!==c.length)throw new Error(\"More than one plugin attempted to override codegen.\");if(u=c[0],\"function\"==typeof u.then)throw new Error(\"You appear to be using an async codegen plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.\")}let{code:p,map:f}=u;return f&&l&&(f=(0,i.default)(l.toObject(),f)),\"inline\"!==r.sourceMaps&&\"both\"!==r.sourceMaps||(p+=\"\\n\"+n().fromObject(f).toComment()),\"inline\"===r.sourceMaps&&(f=null),{outputCode:p,outputMap:f}};var i=r(496)},()=>{},(e,t,r)=>{\"use strict\";function n(){const e=r(497);return n=function(){return e},e}function s(e){return`${e.line}/${e.columnStart}`}function i(e){const t=new(n().SourceMapConsumer)(Object.assign({},e,{sourceRoot:null})),r=new Map,s=new Map;let i=null;return t.computeColumnSpans(),t.eachMapping((e=>{if(null===e.originalLine)return;let n=r.get(e.source);n||(n={path:e.source,content:t.sourceContentFor(e.source,!0)},r.set(e.source,n));let o=s.get(n);o||(o={source:n,mappings:[]},s.set(n,o));const a={line:e.originalLine,columnStart:e.originalColumn,columnEnd:1/0,name:e.name};i&&i.source===n&&i.mapping.line===e.originalLine&&(i.mapping.columnEnd=e.originalColumn),i={source:n,mapping:a},o.mappings.push({original:a,generated:t.allGeneratedPositionsFor({source:e.source,line:e.originalLine,column:e.originalColumn}).map((e=>({line:e.line,columnStart:e.column,columnEnd:e.lastColumn+1})))})}),null,n().SourceMapConsumer.ORIGINAL_ORDER),{file:e.file,sourceRoot:e.sourceRoot,sources:Array.from(s.values())}}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){const r=i(e),o=i(t),a=new(n().SourceMapGenerator);for(const{source:e}of r.sources)\"string\"==typeof e.content&&a.setSourceContent(e.path,e.content);if(1===o.sources.length){const e=o.sources[0],t=new Map;!function(e,t){for(const{source:r,mappings:n}of e.sources)for(const{original:e,generated:s}of n)for(const n of s)t(n,e,r)}(r,((r,n,i)=>{!function(e,t,r){const n=function({mappings:e},{line:t,columnStart:r,columnEnd:n}){return function(e,t){const r=[];for(let n=function(e,t){let r=0,n=e.length;for(;r<n;){const s=Math.floor((r+n)/2),i=t(e[s]);if(0===i){r=s;break}i>=0?n=s:r=s+1}let s=r;if(s<e.length){for(;s>=0&&t(e[s])>=0;)s--;return s+1}return s}(e,t);n<e.length&&0===t(e[n]);n++)r.push(e[n]);return r}(e,(({original:e})=>t>e.line?-1:t<e.line?1:r>=e.columnEnd?-1:n<=e.columnStart?1:0))}(e,t);for(const{generated:e}of n)for(const t of e)r(t)}(e,r,(e=>{const r=s(e);t.has(r)||(t.set(r,e),a.addMapping({source:i.path,original:{line:n.line,column:n.columnStart},generated:{line:e.line,column:e.columnStart},name:n.name}))}))}));for(const e of t.values()){if(e.columnEnd===1/0)continue;const r={line:e.line,columnStart:e.columnEnd},n=s(r);t.has(n)||a.addMapping({generated:{line:r.line,column:r.columnStart}})}}const l=a.toJSON();return\"string\"==typeof r.sourceRoot&&(l.sourceRoot=r.sourceRoot),l}},()=>{},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.transformFileSync=function(){throw new Error(\"Transforming files is not supported in browsers\")},t.transformFileAsync=function(){return Promise.reject(new Error(\"Transforming files is not supported in browsers\"))},t.transformFile=void 0,t.transformFile=function(e,t,r){\"function\"==typeof t&&(r=t),r(new Error(\"Transforming files is not supported in browsers\"),null)}},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.transformFromAstAsync=t.transformFromAstSync=t.transformFromAst=void 0;var s=r(78),i=r(304);const o=n()((function*(e,t,r){const n=yield*(0,s.default)(r);if(null===n)return null;if(!e)throw new Error(\"No AST given\");return yield*(0,i.run)(n,t,e)}));t.transformFromAst=function(e,t,r,n){if(\"function\"==typeof r&&(n=r,r=void 0),void 0===n)return o.sync(e,t,r);o.errback(e,t,r,n)};const a=o.sync;t.transformFromAstSync=a;const l=o.async;t.transformFromAstAsync=l},(e,t,r)=>{\"use strict\";function n(){const e=r(14);return n=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.parseAsync=t.parseSync=t.parse=void 0;var s=r(78),i=r(306),o=r(305);const a=n()((function*(e,t){const r=yield*(0,s.default)(t);return null===r?null:yield*(0,i.default)(r.passes,(0,o.default)(r),e)}));t.parse=function(e,t,r){if(\"function\"==typeof t&&(r=t,t=void 0),void 0===r)return a.sync(e,t);a.errback(e,t,r)};const l=a.sync;t.parseSync=l;const c=a.async;t.parseAsync=c},(e,t,r)=>{\"use strict\";t.a=void 0;var n=r(4),s=r(239),i=r(260),o=r(9),a=r(502),l=(0,n.declare)(((e,t)=>{var r,n;e.assertVersion(7);const l=(0,a.createDynamicImportTransform)(e),{strictNamespace:c=!1,mjsStrictNamespace:u=!0,allowTopLevelThis:p,strict:f,strictMode:d,noInterop:h,importInterop:m,lazy:y=!1,allowCommonJSExports:g=!0}=t,b=null!=(r=e.assumption(\"constantReexports\"))?r:t.loose,v=null!=(n=e.assumption(\"enumerableModuleMeta\"))?n:t.loose;if(!(\"boolean\"==typeof y||\"function\"==typeof y||Array.isArray(y)&&y.every((e=>\"string\"==typeof e))))throw new Error(\".lazy must be a boolean, array of strings, or a function\");if(\"boolean\"!=typeof c)throw new Error(\".strictNamespace must be a boolean, or undefined\");if(\"boolean\"!=typeof u)throw new Error(\".mjsStrictNamespace must be a boolean, or undefined\");const E=e=>o.template.expression.ast`\n    (function(){\n      throw new Error(\n        \"The CommonJS '\" + \"${e}\" + \"' variable is not available in ES6 modules.\" +\n        \"Consider setting setting sourceType:script or sourceType:unambiguous in your \" +\n        \"Babel config for this file.\");\n    })()\n  `,x={ReferencedIdentifier(e){const t=e.node.name;if(\"module\"!==t&&\"exports\"!==t)return;const r=e.scope.getBinding(t);this.scope.getBinding(t)!==r||e.parentPath.isObjectProperty({value:e.node})&&e.parentPath.parentPath.isObjectPattern()||e.parentPath.isAssignmentExpression({left:e.node})||e.isAssignmentExpression({left:e.node})||e.replaceWith(E(t))},AssignmentExpression(e){const t=e.get(\"left\");if(t.isIdentifier()){const t=e.node.name;if(\"module\"!==t&&\"exports\"!==t)return;const r=e.scope.getBinding(t);if(this.scope.getBinding(t)!==r)return;const n=e.get(\"right\");n.replaceWith(o.types.sequenceExpression([n.node,E(t)]))}else if(t.isPattern()){const r=t.getOuterBindingIdentifiers(),n=Object.keys(r).filter((t=>(\"module\"===t||\"exports\"===t)&&this.scope.getBinding(t)===e.scope.getBinding(t)))[0];if(n){const t=e.get(\"right\");t.replaceWith(o.types.sequenceExpression([t.node,E(n)]))}}}};return{name:\"transform-modules-commonjs\",pre(){this.file.set(\"@babel/plugin-transform-modules-*\",\"commonjs\")},visitor:{CallExpression(e){if(!this.file.has(\"@babel/plugin-proposal-dynamic-import\"))return;if(!e.get(\"callee\").isImport())return;let{scope:t}=e;do{t.rename(\"require\")}while(t=t.parent);l(this,e.get(\"callee\"))},Program:{exit(e,r){if(!(0,s.isModule)(e))return;e.scope.rename(\"exports\"),e.scope.rename(\"module\"),e.scope.rename(\"require\"),e.scope.rename(\"__filename\"),e.scope.rename(\"__dirname\"),g||((0,i.default)(e,new Set([\"module\",\"exports\"])),e.traverse(x,{scope:e.scope}));let n=(0,s.getModuleName)(this.file.opts,t);n&&(n=o.types.stringLiteral(n));const{meta:a,headers:l}=(0,s.rewriteModuleStatementsAndPrepareHeader)(e,{exportName:\"exports\",constantReexports:b,enumerableModuleMeta:v,strict:f,strictMode:d,allowTopLevelThis:p,noInterop:h,importInterop:m,lazy:y,esNamespaceOnly:\"string\"==typeof r.filename&&/\\.mjs$/.test(r.filename)?u:c});for(const[t,r]of a.source){const n=o.types.callExpression(o.types.identifier(\"require\"),[o.types.stringLiteral(t)]);let i;if((0,s.isSideEffectImport)(r)){if(r.lazy)throw new Error(\"Assertion failure\");i=o.types.expressionStatement(n)}else{const t=(0,s.wrapInterop)(e,n,r.interop)||n;i=r.lazy?o.template.ast`\n                  function ${r.name}() {\n                    const data = ${t};\n                    ${r.name} = function(){ return data; };\n                    return data;\n                  }\n                `:o.template.ast`\n                  var ${r.name} = ${t};\n                `}i.loc=r.loc,l.push(i),l.push(...(0,s.buildNamespaceInitStatements)(a,r,b))}(0,s.ensureStatementsHoisted)(l),e.unshiftContainer(\"body\",l)}}}}}));t.a=l},(e,t,r)=>{e.exports=r(503)},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});function r(e,t){var r=t.arguments,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,s=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){s=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(s)throw i}}return r}(e,t);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}(r,1)[0];return e.isStringLiteral(n)||e.isTemplateLiteral(n)?(e.removeComments(n),n):e.templateLiteral([e.templateElement({raw:\"\",cooked:\"\"}),e.templateElement({raw:\"\",cooked:\"\"},!0)],r)}t.getImportSource=r,t.createDynamicImportTransform=function(e){var t=e.template,n=e.types,s={static:{interop:t(\"Promise.resolve().then(() => INTEROP(require(SOURCE)))\"),noInterop:t(\"Promise.resolve().then(() => require(SOURCE))\")},dynamic:{interop:t(\"Promise.resolve(SOURCE).then(s => INTEROP(require(s)))\"),noInterop:t(\"Promise.resolve(SOURCE).then(s => require(s))\")}},i=\"function\"==typeof WeakSet&&new WeakSet;return function(e,t){if(i){if(i.has(t))return;i.add(t)}var o,a=r(n,t.parent),l=(o=a,n.isStringLiteral(o)||n.isTemplateLiteral(o)&&0===o.expressions.length?s.static:s.dynamic),c=e.opts.noInterop?l.noInterop({SOURCE:a}):l.interop({SOURCE:a,INTEROP:e.addHelper(\"interopRequireWildcard\")});t.parentPath.replaceWith(c)}}},(e,t,r)=>{\"use strict\";var n=r(7),s=r(505),i=r(509),o=r(316),a=r(8),l=r(315),c=r(510),u=r(83),p=r(512),f=r(84),d=r(96),h=r(518),m=r(329),y=r(27),g=r(95);function b(e){return e&&\"object\"==typeof e&&\"default\"in e?e.default:e}function v(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){t[r]=e[r]})),t.default=e,Object.freeze(t)}var E=v(s),x=b(o),S=b(a),T=v(p),w=b(f),P=b(d),A=b(h),O=b(m);const C=/\\bv-bind\\(\\s*(?:'([^']+)'|\"([^\"]+)\"|([^'\"][^)]*))\\s*\\)/g;function I(e,t,r){return`{\\n  ${e.map((e=>`\"${k(t,e,r)}\": (${e})`)).join(\",\\n  \")}\\n}`}function k(e,t,r){return r?x(e+t):`${e}-${t.replace(/([^\\w-])/g,\"_\")}`}const N=e=>{const{id:t,isProd:r}=e;return{postcssPlugin:\"vue-sfc-vars\",Declaration(e){C.test(e.value)&&(e.value=e.value.replace(C,((e,n,s,i)=>`var(--${k(t,n||s||i,r)})`)))}}};function _(e,t,r,n){const i=I(e,r,n),o=s.createSimpleExpression(i,!1),a=s.createTransformContext(s.createRoot([]),{prefixIdentifiers:!0,inline:!0,bindingMetadata:!1===t.__isScriptSetup?void 0:t}),l=s.processExpression(o,a);return`_useCssVars(_ctx => (${4===l.type?l.content:l.children.map((e=>\"string\"==typeof e?e:e.content)).join(\"\")}))`}N.postcss=!0;const j={};function D(e){void 0!==n||j[e]||(j[e]=!0)}function L(e,t){\"undefined\"==typeof window&&(D(`${e} is still an experimental proposal.\\nFollow its status at https://github.com/vuejs/rfcs/pull/${t}.`),D(\"When using experimental features,\\nit is recommended to pin your vue dependencies to exact versions to avoid breakage.\"))}const M=new(r(149))(500);function B(e,t=!1){const r=new SyntaxError(`Single file component can contain only one <${e.tag}${t?\" setup\":\"\"}> element`);return r.loc=e.loc,r}function R(e,t,r){const n=e.tag;let{start:s,end:i}=e.loc,o=\"\";e.children.length&&(s=e.children[0].loc.start,i=e.children[e.children.length-1].loc.end,o=t.slice(s.offset,i.offset));const a={},l={type:n,content:o,loc:{source:o,start:s,end:i},attrs:a};return r&&(l.content=function(e,t,r){if(e=e.slice(0,t.loc.start.offset),\"space\"===r)return e.replace($,\" \");{const r=e.split(F).length,n=\"script\"!==t.type||t.lang?\"\\n\":\"//\\n\";return Array(r).join(n)}}(t,l,r)+l.content),e.props.forEach((e=>{6===e.type&&(a[e.name]=e.value&&e.value.content||!0,\"lang\"===e.name?l.lang=e.value&&e.value.content:\"src\"===e.name?l.src=e.value&&e.value.content:\"style\"===n?\"scoped\"===e.name?l.scoped=!0:\"module\"===e.name&&(l.module=a[e.name]):\"script\"===n&&\"setup\"===e.name&&(l.setup=a.setup))})),l}const F=/\\r?\\n/g,U=/^(?:\\/\\/)?\\s*$/,$=/./g;function q(e,t,r,n,s){const o=new i.SourceMapGenerator({file:e.replace(/\\\\/g,\"/\"),sourceRoot:n.replace(/\\\\/g,\"/\")});return o.setSourceContent(e,t),r.split(F).forEach(((t,r)=>{if(!U.test(t)){const n=r+1+s,i=r+1;for(let r=0;r<t.length;r++)/\\s/.test(t[r])||o.addMapping({source:e,original:{line:n,column:r},generated:{line:i,column:r}})}})),JSON.parse(o.toString())}function V(e){const t=e.charAt(0);return\".\"===t||\"~\"===t||\"@\"===t}const W=/^https?:\\/\\//;function K(e){return W.test(e)}const G=/^\\s*data:/i;function H(e){return G.test(e)}function J(e){if(\"~\"===e.charAt(0)){const t=e.charAt(1);e=e.slice(\"/\"===t?2:1)}return Y(e)}function Y(e){return c.parse(u.isString(e)?e:\"\",!1,!0)}const X={base:null,includeAbsolute:!1,tags:{video:[\"src\",\"poster\"],source:[\"src\"],img:[\"src\"],image:[\"xlink:href\",\"href\"],use:[\"xlink:href\",\"href\"]}},z=e=>(t,r)=>Q(t,r,e),Q=(e,t,r=X)=>{if(1===e.type){if(!e.props.length)return;const n=r.tags||X.tags,s=n[e.tag],i=n[\"*\"];if(!s&&!i)return;const o=(s||[]).concat(i||[]);e.props.forEach(((n,s)=>{if(6!==n.type||!o.includes(n.name)||!n.value||K(n.value.content)||H(n.value.content)||\"#\"===n.value.content[0]||!r.includeAbsolute&&!V(n.value.content))return;const i=J(n.value.content);if(r.base&&\".\"===n.value.content[0]){const e=J(r.base),t=e.protocol||\"\",s=e.host?t+\"//\"+e.host:\"\",o=e.path||\"/\";return void(n.value.content=s+(S.posix||S).join(o,i.path+(i.hash||\"\")))}const a=function(e,t,r,n){if(e){const s=n.imports.find((t=>t.path===e));if(s)return s.exp;const i=`_imports_${n.imports.length}`,o=l.createSimpleExpression(i,!1,r,2);return n.imports.push({exp:o,path:e}),t&&e?n.hoist(l.createSimpleExpression(`${i} + '${t}'`,!1,r,2)):o}return l.createSimpleExpression(\"''\",!1,r,2)}(i.path,i.hash,n.loc,t);e.props[s]={type:7,name:\"bind\",arg:l.createSimpleExpression(n.name,!0,n.loc),exp:a,modifiers:[],loc:n.loc}}))}},Z=[\"img\",\"source\"],ee=/( |\\\\t|\\\\n|\\\\f|\\\\r)+/g,te=e=>(t,r)=>re(t,r,e),re=(e,t,r=X)=>{1===e.type&&Z.includes(e.tag)&&e.props.length&&e.props.forEach(((n,s)=>{if(\"srcset\"===n.name&&6===n.type){if(!n.value)return;const i=n.value.content;if(!i)return;const o=i.split(\",\").map((e=>{const[t,r]=e.replace(ee,\" \").trim().split(\" \",2);return{url:t,descriptor:r}}));for(let e=0;e<o.length;e++){const{url:t}=o[e];H(t)&&(o[e+1].url=t+\",\"+o[e+1].url,o.splice(e,1))}if(!o.some((({url:e})=>!K(e)&&!H(e)&&(r.includeAbsolute||V(e)))))return;if(r.base){const e=r.base,t=[];return o.forEach((({url:r,descriptor:n})=>{n=n?` ${n}`:\"\",V(r)?t.push((S.posix||S).join(e,r)+n):t.push(r+n)})),void(n.value.content=t.join(\", \"))}const a=l.createCompoundExpression([],n.loc);o.forEach((({url:e,descriptor:s},i)=>{if(K(e)||H(e)||!r.includeAbsolute&&!V(e)){const t=l.createSimpleExpression(`\"${e}\"`,!1,n.loc,2);a.children.push(t)}else{const{path:r}=J(e);let s;if(r){const e=t.imports.findIndex((e=>e.path===r));e>-1?s=l.createSimpleExpression(`_imports_${e}`,!1,n.loc,2):(s=l.createSimpleExpression(`_imports_${t.imports.length}`,!1,n.loc,2),t.imports.push({exp:s,path:r})),a.children.push(s)}}const c=o.length-1>i;s&&c?a.children.push(` + ' ${s}, ' + `):s?a.children.push(` + ' ${s}'`):c&&a.children.push(\" + ', ' + \")}));const c=t.hoist(a);c.constType=2,e.props[s]={type:7,name:\"bind\",arg:l.createSimpleExpression(\"srcset\",!0,n.loc),exp:c,modifiers:[],loc:n.loc}}}))};function ne({source:e,filename:t,preprocessOptions:r},n){let s=\"\",i=null;if(n.render(e,Object.assign({filename:t},r),((e,t)=>{e&&(i=e),s=t})),i)throw i;return s}function se(e){const{preprocessLang:t,preprocessCustomRequire:n}=e,s=!!t&&(n?n(t):r(519)[t]);if(!s)return t?{code:\"export default function render() {}\",source:e.source,tips:[`Component ${e.filename} uses lang ${t} for template. Please install the language preprocessor.`],errors:[`Component ${e.filename} uses lang ${t} for template, however it is not installed.`]}:ie(e);try{return ie(Object.assign(Object.assign({},e),{source:ne(e,s)}))}catch(t){return{code:\"export default function render() {}\",source:e.source,tips:[],errors:[t]}}}function ie({filename:e,id:t,scoped:r,slotted:n,inMap:s,source:o,ssr:a=!1,ssrCssVars:l,isProd:c=!1,compiler:p=(a?T:E),compilerOptions:f={},transformAssetUrls:d}){const h=[],m=[];let y=[];if(u.isObject(d)){const e=(g=d,Object.keys(g).some((e=>u.isArray(g[e])))?Object.assign(Object.assign({},X),{tags:g}):Object.assign(Object.assign({},X),g));y=[z(e),te(e)]}else!1!==d&&(y=[Q,re]);var g;a&&!l&&D(\"compileTemplate is called with `ssr: true` but no corresponding `cssVars` option.`.\"),t||(D(\"compileTemplate now requires the `id` option.`.\"),t=\"\");const b=t.replace(/^data-v-/,\"\"),v=`data-v-${b}`;let{code:x,ast:S,preamble:w,map:P}=p.compile(o,Object.assign(Object.assign({mode:\"module\",prefixIdentifiers:!0,hoistStatic:!0,cacheHandlers:!0,ssrCssVars:a&&l&&l.length?I(l,b,c):\"\",scopeId:r?v:void 0,slotted:n},f),{nodeTransforms:y.concat(f.nodeTransforms||[]),filename:e,sourceMap:!0,onError:e=>h.push(e),onWarn:e=>m.push(e)}));s&&(P&&(P=function(e,t){if(!e)return t;if(!t)return e;const r=new i.SourceMapConsumer(e),n=new i.SourceMapConsumer(t),s=new i.SourceMapGenerator;n.eachMapping((e=>{if(null==e.originalLine)return;const t=r.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=t.source&&s.addMapping({generated:{line:e.generatedLine,column:e.generatedColumn},original:{line:t.line,column:e.originalColumn},source:t.source,name:t.name})}));const o=s;return r.sources.forEach((e=>{o._sources.add(e);const t=r.sourceContentFor(e);null!=t&&s.setSourceContent(e,t)})),o._sourceRoot=e.sourceRoot,o._file=e.file,o.toJSON()}(s,P)),h.length&&function(e,t,r){const n=r.sourcesContent[0],s=n.indexOf(t),i=n.slice(0,s).split(/\\r?\\n/).length-1;e.forEach((e=>{e.loc&&(e.loc.start.line+=i,e.loc.start.offset+=s,e.loc.end!==e.loc.start&&(e.loc.end.line+=i,e.loc.end.offset+=s))}))}(h,o,s));const A=m.map((e=>{let t=e.message;return e.loc&&(t+=`\\n${u.generateCodeFrame(o,e.loc.start.offset,e.loc.end.offset)}`),t}));return{code:x,ast:S,preamble:w,source:o,errors:h,tips:A,map:P}}const oe=()=>({postcssPlugin:\"vue-sfc-trim\",Once(e){e.walk((({type:e,raws:t})=>{\"rule\"!==e&&\"atrule\"!==e||(t.before&&(t.before=\"\\n\"),\"after\"in t&&t.after&&(t.after=\"\\n\"))}))}});oe.postcss=!0;const ae=/^(-\\w+-)?animation-name$/,le=/^(-\\w+-)?animation$/,ce=(e=\"\")=>{const t=Object.create(null),r=e.replace(/^data-v-/,\"\");return{postcssPlugin:\"vue-sfc-scoped\",Rule(t){!function(e,t){ue.has(t)||t.parent&&\"atrule\"===t.parent.type&&/-?keyframes$/.test(t.parent.name)||(ue.add(t),t.selector=P((t=>{t.each((r=>{pe(e,r,t)}))})).processSync(t.selector))}(e,t)},AtRule(e){/-?keyframes$/.test(e.name)&&!e.params.endsWith(`-${r}`)&&(t[e.params]=e.params=e.params+\"-\"+r)},OnceExit(e){Object.keys(t).length&&e.walkDecls((e=>{ae.test(e.prop)&&(e.value=e.value.split(\",\").map((e=>t[e.trim()]||e.trim())).join(\",\")),le.test(e.prop)&&(e.value=e.value.split(\",\").map((e=>{const r=e.trim().split(/\\s+/),n=r.findIndex((e=>t[e]));return-1!==n?(r.splice(n,1,t[r[n]]),r.join(\" \")):e})).join(\",\"))}))}}},ue=new WeakSet;function pe(e,t,r,n=!1){let s=null,i=!0;if(t.each((n=>{if(\"combinator\"===n.type&&(\">>>\"===n.value||\"/deep/\"===n.value))return n.value=\" \",n.spaces.before=n.spaces.after=\"\",!1;if(\"pseudo\"===n.type){const{value:s}=n;if(\":deep\"===s||\"::v-deep\"===s){if(n.nodes.length){let e=n;n.nodes[0].each((r=>{t.insertAfter(e,r),e=r}));const r=t.at(t.index(n)-1);r&&fe(r)||t.insertAfter(n,P.combinator({value:\" \"})),t.removeChild(n)}else{const e=t.at(t.index(n)-1);e&&fe(e)&&t.removeChild(e),t.removeChild(n)}return!1}if(\":slotted\"===s||\"::v-slotted\"===s){pe(e,n.nodes[0],r,!0);let s=n;return n.nodes[0].each((e=>{t.insertAfter(s,e),s=e})),t.removeChild(n),i=!1,!1}if(\":global\"===s||\"::v-global\"===s)return r.insertAfter(t,n.nodes[0]),r.removeChild(t),!1}\"pseudo\"!==n.type&&\"combinator\"!==n.type&&(s=n)})),s?s.spaces.after=\"\":t.first.spaces.before=\"\",i){const r=n?e+\"-s\":e;t.insertAfter(s,P.attribute({attribute:r,value:r,raws:{},quoteMark:'\"'}))}}function fe(e){return\"combinator\"===e.type&&/^\\s+$/.test(e.value)}ce.postcss=!0;const de=(e,t,n,s=r(312))=>{const i=s(\"sass\"),o=Object.assign(Object.assign({},n),{data:me(e,n.filename,n.additionalData),file:n.filename,outFile:n.filename,sourceMap:!!t});try{const e=i.renderSync(o),r=e.stats.includedFiles;return t?{code:e.css.toString(),map:A(t,JSON.parse(e.map.toString())),errors:[],dependencies:r}:{code:e.css.toString(),errors:[],dependencies:r}}catch(e){return{code:\"\",errors:[e],dependencies:[]}}},he=(e,t,n,s=r(312))=>{const i=s(\"stylus\");try{const r=i(e);Object.keys(n).forEach((e=>r.set(e,n[e]))),t&&r.set(\"sourcemap\",{inline:!1,comment:!1});const s=r.render(),o=r.deps();return t?{code:s,map:A(t,r.sourcemap),errors:[],dependencies:o}:{code:s,errors:[],dependencies:o}}catch(e){return{code:\"\",errors:[e],dependencies:[]}}};function me(e,t,r){return r?u.isFunction(r)?r(e,t):r+e:e}const ye={less:(e,t,n,s=r(312))=>{const i=s(\"less\");let o,a=null;if(i.render(me(e,n.filename,n.additionalData),Object.assign(Object.assign({},n),{syncImport:!0}),((e,t)=>{a=e,o=t})),a)return{code:\"\",errors:[a],dependencies:[]};const l=o.imports;return t?{code:o.css.toString(),map:A(t,o.map),errors:[],dependencies:l}:{code:o.css.toString(),errors:[],dependencies:l}},sass:(e,t,r,n)=>de(e,t,Object.assign(Object.assign({},r),{indentedSyntax:!0}),n),scss:de,styl:he,stylus:he};const ge=/((?:^|\\n|;)\\s*)export(\\s*)default/,be=/((?:^|\\n|;)\\s*)export(.+)as(\\s*)default/s,ve=/((?:^|\\n|;)\\s*)export\\s+default\\s+class\\s+([\\w$]+)/;function Ee(e){return ge.test(e)||be.test(e)}const xe=\"defineProps\",Se=\"defineEmit\",Te=\"defineExpose\",we=\"withDefaults\",Pe=\"defineEmits\";function Ae(e,t,r){e[t.name]={type:r,rangeNode:t}}function Oe(e,t,r){if(\"VariableDeclaration\"===e.type){const n=\"const\"===e.kind;for(const{id:s,init:i}of e.declarations){const e=!(!n||!Fe(i,(e=>e===xe||e===Se||e===Pe||e===we)));if(\"Identifier\"===s.type){let o;const a=r.reactive||\"reactive\";o=Fe(i,a)?\"setup-let\":e||n&&Ue(i,a)?\"setup-const\":n?Fe(i,r.ref||\"ref\")?\"setup-ref\":\"setup-maybe-ref\":\"setup-let\",Ae(t,s,o)}else\"ObjectPattern\"===s.type?Ce(s,t,n,e):\"ArrayPattern\"===s.type&&Ie(s,t,n,e)}}else\"FunctionDeclaration\"!==e.type&&\"ClassDeclaration\"!==e.type||(t[e.id.name]={type:\"setup-const\",rangeNode:e.id})}function Ce(e,t,r,n=!1){for(const s of e.properties)if(\"ObjectProperty\"===s.type){if(\"Identifier\"===s.key.type)if(s.key===s.value){const e=n?\"setup-const\":r?\"setup-maybe-ref\":\"setup-let\";Ae(t,s.key,e)}else ke(s.value,t,r,n)}else{const e=r?\"setup-const\":\"setup-let\";Ae(t,s.argument,e)}}function Ie(e,t,r,n=!1){for(const s of e.elements)s&&ke(s,t,r,n)}function ke(e,t,r,n=!1){if(\"Identifier\"===e.type)Ae(t,e,n?\"setup-const\":r?\"setup-maybe-ref\":\"setup-let\");else if(\"RestElement\"===e.type){const n=r?\"setup-const\":\"setup-let\";Ae(t,e.argument,n)}else if(\"ObjectPattern\"===e.type)Ce(e,t,r);else if(\"ArrayPattern\"===e.type)Ie(e,t,r);else if(\"AssignmentPattern\"===e.type)if(\"Identifier\"===e.left.type){const s=n?\"setup-const\":r?\"setup-maybe-ref\":\"setup-let\";Ae(t,e.left,s)}else ke(e.left,t,r)}function Ne(e,t){\"TSInterfaceDeclaration\"===e.type?t[e.id.name]=[\"Object\"]:\"TSTypeAliasDeclaration\"===e.type?t[e.id.name]=_e(e.typeAnnotation,t):\"ExportNamedDeclaration\"===e.type&&e.declaration&&Ne(e.declaration,t)}function _e(e,t){switch(e.type){case\"TSStringKeyword\":return[\"String\"];case\"TSNumberKeyword\":return[\"Number\"];case\"TSBooleanKeyword\":return[\"Boolean\"];case\"TSObjectKeyword\":case\"TSTypeLiteral\":return[\"Object\"];case\"TSFunctionType\":return[\"Function\"];case\"TSArrayType\":case\"TSTupleType\":return[\"Array\"];case\"TSLiteralType\":switch(e.literal.type){case\"StringLiteral\":return[\"String\"];case\"BooleanLiteral\":return[\"Boolean\"];case\"NumericLiteral\":case\"BigIntLiteral\":return[\"Number\"];default:return[\"null\"]}case\"TSTypeReference\":if(\"Identifier\"===e.typeName.type){if(t[e.typeName.name])return t[e.typeName.name];switch(e.typeName.name){case\"Array\":case\"Function\":case\"Object\":case\"Set\":case\"Map\":case\"WeakSet\":case\"WeakMap\":return[e.typeName.name];case\"Record\":case\"Partial\":case\"Readonly\":case\"Pick\":case\"Omit\":case\"Exclude\":case\"Extract\":case\"Required\":case\"InstanceType\":return[\"Object\"]}}return[\"null\"];case\"TSUnionType\":return[...new Set([].concat(e.types.map((e=>_e(e,t)))))];case\"TSIntersectionType\":return[\"Object\"];default:return[\"null\"]}}function je(e,t){if(\"Identifier\"===e.type&&e.typeAnnotation&&\"TSTypeAnnotation\"===e.typeAnnotation.type){const r=e.typeAnnotation.typeAnnotation;if(\"TSLiteralType\"===r.type)t.add(String(r.literal.value));else if(\"TSUnionType\"===r.type)for(const e of r.types)\"TSLiteralType\"===e.type&&t.add(String(e.literal.value))}}function De(e,t,r){const{name:n}=t;e.scopeIds&&e.scopeIds.has(n)||(n in r?r[n]++:r[n]=1,(e.scopeIds||(e.scopeIds=new Set)).add(n))}function Le(e,t){const r=[],n=Object.create(null);g.walk(e,{enter(e,s){s&&r.push(s),\"Identifier\"===e.type?!n[e.name]&&function(e,t,r){if(!t)return!0;if((\"VariableDeclarator\"===t.type||\"ClassDeclaration\"===t.type)&&t.id===e)return!1;if(Re(t)){if(t.id===e)return!1;if(t.params.includes(e))return!1}return!Be(e,t)&&(!(\"ArrayPattern\"===t.type&&!$e(t,r))&&(!!(\"MemberExpression\"!==t.type&&\"OptionalMemberExpression\"!==t.type||t.property!==e||t.computed)&&\"arguments\"!==e.name))}(e,s,r)&&t(e,s,r):Re(e)?(\"BlockStatement\"===e.body.type&&e.body.body.forEach((t=>{if(\"VariableDeclaration\"===t.type)for(const r of t.declarations)Ge(r.id).forEach((t=>{De(e,t,n)}))})),e.params.forEach((t=>g.walk(t,{enter(t,r){\"Identifier\"!==t.type||Be(t,r)||r&&\"AssignmentPattern\"===r.type&&r.right===t||De(e,t,n)}})))):\"ObjectProperty\"===e.type&&\"ObjectPattern\"===s.type&&(e.inPattern=!0)},leave(e,t){t&&r.pop(),e.scopeIds&&e.scopeIds.forEach((e=>{n[e]--,0===n[e]&&delete n[e]}))}})}const Me=e=>e&&(\"ObjectProperty\"===e.type||\"ObjectMethod\"===e.type)&&!e.computed,Be=(e,t)=>Me(t)&&t.key===e;function Re(e){return/Function(?:Expression|Declaration)$|Method$/.test(e.type)}function Fe(e,t){return!(!e||\"CallExpression\"!==e.type||\"Identifier\"!==e.callee.type||!(\"string\"==typeof t?e.callee.name===t:t(e.callee.name)))}function Ue(e,t){if(Fe(e,t))return!0;switch(e.type){case\"UnaryExpression\":case\"BinaryExpression\":case\"ArrayExpression\":case\"ObjectExpression\":case\"FunctionExpression\":case\"ArrowFunctionExpression\":case\"UpdateExpression\":case\"ClassExpression\":case\"TaggedTemplateExpression\":return!0;case\"SequenceExpression\":return Ue(e.expressions[e.expressions.length-1],t);default:return!!e.type.endsWith(\"Literal\")}}function $e(e,t){if(e&&(\"ObjectProperty\"===e.type||\"ArrayPattern\"===e.type)){let e=t.length;for(;e--;){const r=t[e];if(\"AssignmentExpression\"===r.type){const e=t[0];return!(\"LabeledStatement\"===e.type&&\"ref\"===e.label.name)}if(\"ObjectProperty\"!==r.type&&!r.type.endsWith(\"Pattern\"))break}}return!1}function qe(e){for(const t of e)if(\"ExportDefaultDeclaration\"===t.type&&\"ObjectExpression\"===t.declaration.type)return Ve(t.declaration);return{}}function Ve(e){const t={};Object.defineProperty(t,\"__isScriptSetup\",{enumerable:!1,value:!1});for(const r of e.properties)if(\"ObjectProperty\"!==r.type||r.computed||\"Identifier\"!==r.key.type){if(\"ObjectMethod\"===r.type&&\"Identifier\"===r.key.type&&(\"setup\"===r.key.name||\"data\"===r.key.name))for(const e of r.body.body)if(\"ReturnStatement\"===e.type&&e.argument&&\"ObjectExpression\"===e.argument.type)for(const n of We(e.argument))t[n]=\"setup\"===r.key.name?\"setup-maybe-ref\":\"data\"}else if(\"props\"===r.key.name)for(const e of Ke(r.value))t[e]=\"props\";else if(\"inject\"===r.key.name)for(const e of Ke(r.value))t[e]=\"options\";else if(\"ObjectExpression\"===r.value.type&&(\"computed\"===r.key.name||\"methods\"===r.key.name))for(const e of We(r.value))t[e]=\"options\";return t}function We(e){const t=[];for(const r of e.properties)\"ObjectProperty\"!==r.type&&\"ObjectMethod\"!==r.type||r.computed||(\"Identifier\"===r.key.type?t.push(r.key.name):\"StringLiteral\"===r.key.type&&t.push(r.key.value));return t}function Ke(e){return\"ArrayExpression\"===e.type?function(e){const t=[];for(const r of e.elements)r&&\"StringLiteral\"===r.type&&t.push(r.value);return t}(e):\"ObjectExpression\"===e.type?We(e):[]}function Ge(e,t=[]){switch(e.type){case\"Identifier\":t.push(e);break;case\"MemberExpression\":let r=e;for(;\"MemberExpression\"===r.type;)r=r.object;t.push(r);break;case\"ObjectPattern\":e.properties.forEach((e=>{\"RestElement\"===e.type?Ge(e.argument,t):Ge(e.value,t)}));break;case\"ArrayPattern\":e.elements.forEach((e=>{e&&Ge(e,t)}));break;case\"RestElement\":Ge(e.argument,t);break;case\"AssignmentPattern\":Ge(e.left,t)}return t}function He(e){return{start:e.start,end:e.end}}l.generateCodeFrame,y.parse,g.walk,t.a=function(e,t){let{script:r,scriptSetup:n,source:s,filename:i}=e;const o=!!t.refSugar,a=!!t.parseOnly;n?!a&&L(\"<script setup>\",227):a&&(n={type:\"script\",content:\"\",attrs:{},loc:l.locStub}),t||(t={id:\"\"}),t.id||D(\"compileScript now requires passing the `id` option.\\nUpgrade your vite or vue-loader version for compatibility with the latest experimental proposals.\"),e.template&&\"false\"===e.template.attrs[\"inherit-attrs\"]&&D('experimetnal support for <template inherit-attrs=\"false\"> support has been removed. Use a <script> block with `export default` to declare options.');const c=t.id?t.id.replace(/^data-v-/,\"\"):\"\",p=e.cssVars,f=r&&r.lang,d=n&&n.lang,h=\"ts\"===f||\"tsx\"===f||\"ts\"===d||\"tsx\"===d,m=[...u.babelParserDefaultPlugins,\"jsx\"];if(t.babelParserPlugins&&m.push(...t.babelParserPlugins),h&&m.push(\"typescript\",\"decorators-legacy\"),!n){if(!r)throw new Error(\"[@vue/compiler-sfc] SFC contains no <script> tags.\");if(f&&!h&&\"jsx\"!==f)return r;try{const e=y.parse(r.content,{plugins:m,sourceType:\"module\",errorRecovery:a}).program.body,n=qe(e);let s=r.content;return p.length&&(s=function(e,t,r){if(!Ee(e))return e+`\\nconst ${t} = {}`;let n;const s=e.match(ve);if(n=s?e.replace(ve,\"$1class $2\")+`\\nconst ${t} = ${s[2]}`:e.replace(ge,`$1const ${t} =`),!Ee(n))return n;const i=new O(e);return y.parse(e,{sourceType:\"module\",plugins:r}).program.body.forEach((r=>{\"ExportDefaultDeclaration\"===r.type&&i.overwrite(r.start,r.declaration.start,`const ${t} = `),\"ExportNamedDeclaration\"===r.type&&r.specifiers.forEach((r=>{if(\"ExportSpecifier\"===r.type&&\"Identifier\"===r.exported.type&&\"default\"===r.exported.name){const n=r.end;i.overwrite(r.start,\",\"===e.charAt(n)?n+1:n,\"\"),i.append(`\\nconst ${t} = ${r.local.name}`)}}))})),i.toString()}(s,\"__default__\",m),p.length&&(s+=function(e,t,r,n){return`\\nimport { useCssVars as _useCssVars } from 'vue'\\nconst __injectCSSVars__ = () => {\\n${_(e,t,r,n)}}\\nconst __setup__ = __default__.setup\\n__default__.setup = __setup__\\n  ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) }\\n  : __injectCSSVars__\\n`}(p,n,c,!!t.isProd)),s+=\"\\nexport default __default__\"),Object.assign(Object.assign({},r),{content:s,bindings:n,scriptAst:e})}catch(e){return r}}if(r&&f!==d)throw new Error(\"[@vue/compiler-sfc] <script> and <script setup> must have the same language type.\");if(d&&!h&&\"jsx\"!==d)return n;const b={},v=a?{scriptBindings:[],scriptSetupBindings:[]}:void 0,E=new Set,x=Object.create(null),S=Object.create(null),T=Object.create(null),w=Object.create(null),P=new Set;let A,C,I,k,N,j,M,B,R,F,U=!1,$=!1,q=!1,V=!1,W=!1;const K={},G=new Set,H={},J=new O(s),Y=n.loc.start.offset,X=n.loc.end.offset,z=r&&r.loc.start.offset,Q=r&&r.loc.end.offset;function Z(e){return E.add(e),`_${e}`}function ee(t,r,n){try{return r.errorRecovery=a,y.parse(t,r).program.body}catch(t){throw t.message=`[@vue/compiler-sfc] ${t.message}\\n\\n${e.filename}\\n${u.generateCodeFrame(s,t.pos+n,t.pos+n+1)}`,t}}function te(t,r,n=r.end+Y){throw new Error(`[@vue/compiler-sfc] ${t}\\n\\n${e.filename}\\n${u.generateCodeFrame(s,r.start+Y,n)}`)}function re(e,t,r,n,s,i){\"vue\"===e&&r&&(S[r]=t),x[t]={isType:n,imported:r||\"default\",source:e,rangeNode:i,isFromSetup:s}}function ne(e){return!!Fe(e,xe)&&(U&&te(\"duplicate defineProps() call\",e),U=!0,C=e.arguments[0],e.typeParameters&&(C&&te(\"defineProps() cannot accept both type and non-type arguments at the same time. Use one or the other.\",e),N=e.typeParameters.params[0],k=ae(N,(e=>\"TSTypeLiteral\"===e.type)),k||te(\"type argument passed to defineProps() must be a literal type, or a reference to an interface or literal type.\",N)),!0)}function ie(e){return!!Fe(e,we)&&(ne(e.arguments[0])?(C&&te(\"withDefaults can only be used with type-based defineProps declaration.\",e),I=e.arguments[1]):te(\"withDefaults' first argument must be a defineProps call.\",e.arguments[0]||e),!0)}function oe(e){return!!Fe(e,(e=>e===Se||e===Pe))&&($&&te(\"duplicate defineEmits() call\",e),$=!0,M=e.arguments[0],e.typeParameters&&(M&&te(\"defineEmit() cannot accept both type and non-type arguments at the same time. Use one or the other.\",e),R=e.typeParameters.params[0],B=ae(R,(e=>\"TSFunctionType\"===e.type||\"TSTypeLiteral\"===e.type)),B||te(\"type argument passed to defineEmits() must be a function type, a literal type with call signatures, or a reference to the above types.\",R)),!0)}function ae(e,t){if(t(e))return e;if(\"TSTypeReference\"===e.type&&\"Identifier\"===e.typeName.type){const r=e.typeName.name,n=e=>\"TSInterfaceDeclaration\"===e.type&&e.id.name===r?e.body:\"TSTypeAliasDeclaration\"===e.type&&e.id.name===r&&t(e.typeAnnotation)?e.typeAnnotation:\"ExportNamedDeclaration\"===e.type&&e.declaration?n(e.declaration):void 0;for(const e of me){const t=n(e);if(t)return t}}}function le(e){return!!Fe(e,Te)&&(q&&te(\"duplicate defineExpose() call\",e),q=!0,!0)}function ce(e,t){e&&Le(e,(e=>{T[e.name]&&te(`\\`${t}()\\` in <script setup> cannot reference locally declared variables because it will be hoisted outside of the setup() function. If your component options requires initialization in the module scope, use a separate normal <script> to export the options instead.`,e)}))}function ue(e,t){if(\"AssignmentExpression\"===e.type){const{left:r,right:n}=e;if(\"Identifier\"===r.type)pe(r),J.prependRight(n.start+Y,`${Z(\"ref\")}(`),J.appendLeft(n.end+Y,\")\");else if(\"ObjectPattern\"===r.type){for(let e=r.start;e>0;e--)if(\"(\"===s[e+Y]){J.remove(e+Y,e+Y+1);break}for(let e=n.end;e>0;e++)if(\")\"===s[e+Y]){J.remove(e+Y,e+Y+1);break}fe(r,t)}else\"ArrayPattern\"===r.type&&de(r,t)}else\"SequenceExpression\"===e.type?e.expressions.forEach((e=>ue(e,t))):\"Identifier\"===e.type?(pe(e),J.appendLeft(e.end+Y,` = ${Z(\"ref\")}()`)):te(\"ref: statements can only contain assignment expressions.\",e)}function pe(e){\"$\"===e.name[0]&&te(\"ref variable identifiers cannot start with $.\",e),w[e.name]=T[e.name]={type:\"setup-ref\",rangeNode:e},P.add(e)}function fe(e,t){for(const r of e.properties){let e;\"ObjectProperty\"===r.type?r.key.start===r.value.start?(e=r.key,J.appendLeft(e.end+Y,`: __${e.name}`),\"AssignmentPattern\"===r.value.type&&P.add(r.value.left)):\"Identifier\"===r.value.type?(e=r.value,J.prependRight(e.start+Y,\"__\")):\"ObjectPattern\"===r.value.type?fe(r.value,t):\"ArrayPattern\"===r.value.type?de(r.value,t):\"AssignmentPattern\"===r.value.type&&(e=r.value.left,J.prependRight(e.start+Y,\"__\")):(e=r.argument,J.prependRight(e.start+Y,\"__\")),e&&(pe(e),J.appendLeft(t.end+Y,`\\nconst ${e.name} = ${Z(\"ref\")}(__${e.name});`))}}function de(e,t){for(const r of e.elements){if(!r)continue;let e;\"Identifier\"===r.type?e=r:\"AssignmentPattern\"===r.type?e=r.left:\"RestElement\"===r.type?e=r.argument:\"ObjectPattern\"===r.type?fe(r,t):\"ArrayPattern\"===r.type&&de(r,t),e&&(pe(e),J.prependRight(e.start+Y,\"__\"),J.appendLeft(t.end+Y,`\\nconst ${e.name} = ${Z(\"ref\")}(__${e.name});`))}}let he;if(r){he=ee(r.content,{plugins:m,sourceType:\"module\"},z);for(const e of he)if(\"ImportDeclaration\"===e.type)for(const t of e.specifiers){const r=\"ImportSpecifier\"===t.type&&\"Identifier\"===t.imported.type&&t.imported.name;re(e.source.value,t.local.name,r,\"type\"===e.importKind,!1,t.local)}else if(\"ExportDefaultDeclaration\"===e.type){A=e;const t=e.start+z;J.overwrite(t,t+\"export default\".length,\"const __default__ =\")}else if(\"ExportNamedDeclaration\"===e.type&&e.specifiers){const t=e.specifiers.find((e=>\"Identifier\"===e.exported.type&&\"default\"===e.exported.name));t&&(A=e,e.specifiers.length>1?J.remove(t.start+z,t.end+z):J.remove(e.start+z,e.end+z),e.source?J.prepend(`import { ${t.local.name} as __default__ } from '${e.source.value}'\\n`):J.append(`\\nconst __default__ = ${t.local.name}\\n`))}}const me=ee(n.content,{plugins:[...m,\"topLevelAwait\"],sourceType:\"module\"},Y);for(const e of me){const t=e.start+Y;let r=e.end+Y;for(e.trailingComments&&e.trailingComments.length>0&&(r=e.trailingComments[e.trailingComments.length-1].end+Y);r<=s.length&&/\\s/.test(s.charAt(r));)r++;if(\"LabeledStatement\"===e.type&&\"ref\"===e.label.name&&\"ExpressionStatement\"===e.body.type&&(o?(!a&&L(\"ref: sugar\",228),J.overwrite(e.label.start+Y,e.body.start+Y,\"const \"),ue(e.body.expression,e)):te(\"ref: sugar now needs to be explicitly enabled via @vitejs/plugin-vue or vue-loader options:\\n- @vitejs/plugin-vue: via `script.refSugar`\\n- vue-loader: via `refSugar` (requires 16.3.0+)\",e)),\"ImportDeclaration\"===e.type){J.move(t,r,0);let n=0;const s=t=>{const r=t>n;n++;const s=e.specifiers[t],i=e.specifiers[t+1];J.remove(r?e.specifiers[t-1].end+Y:s.start+Y,i&&!r?i.start+Y:s.end+Y)};for(let t=0;t<e.specifiers.length;t++){const r=e.specifiers[t],n=r.local.name,i=\"ImportSpecifier\"===r.type&&\"Identifier\"===r.imported.type&&r.imported.name,o=e.source.value,a=x[n];\"vue\"!==o||i!==xe&&i!==Se&&i!==Pe&&i!==Te?a?a.source===o&&a.imported===i?s(t):te(\"different imports aliased to same local name.\",r):re(o,n,i,\"type\"===e.importKind,!0,r.local):(D(`\\`${i}\\` is a compiler macro and no longer needs to be imported.`),s(t))}e.specifiers.length&&n===e.specifiers.length&&J.remove(e.start+Y,e.end+Y)}if(\"ExpressionStatement\"===e.type)if(ne(e.expression)||oe(e.expression)||ie(e.expression))J.remove(e.start+Y,e.end+Y);else if(le(e.expression)){const t=e.expression.callee;J.overwrite(t.start+Y,t.end+Y,\"expose\")}if(\"VariableDeclaration\"===e.type&&!e.declare){const t=e.declarations.length;let r=t;for(let s=0;s<t;s++){const i=e.declarations[s];if(i.init){const o=ne(i.init)||ie(i.init);o&&(j=n.content.slice(i.id.start,i.id.end));const a=oe(i.init);if(a&&(F=n.content.slice(i.id.start,i.id.end)),o||a)if(1===r)J.remove(e.start+Y,e.end+Y);else{let n=i.start+Y,o=i.end+Y;s<t-1?o=e.declarations[s+1].start+Y:n=e.declarations[s-1].end+Y,J.remove(n,o),r--}}}}\"VariableDeclaration\"!==e.type&&\"FunctionDeclaration\"!==e.type&&\"ClassDeclaration\"!==e.type||e.declare||Oe(e,T,S),(\"VariableDeclaration\"===e.type&&!e.declare||e.type.endsWith(\"Statement\"))&&g.walk(e,{enter(e){Re(e)&&this.skip(),\"AwaitExpression\"===e.type&&(V=!0,J.prependRight(e.argument.start+Y,Z(\"withAsyncContext\")+\"(\"),J.appendLeft(e.argument.end+Y,\")\"))}}),(\"ExportNamedDeclaration\"===e.type&&\"type\"!==e.exportKind||\"ExportAllDeclaration\"===e.type||\"ExportDefaultDeclaration\"===e.type)&&te(\"<script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.\",e),h&&(\"TSEnumDeclaration\"!==e.type||e.const||Ae(T,e.id,\"setup-const\"),(e.type.startsWith(\"TS\")||\"ExportNamedDeclaration\"===e.type&&\"type\"===e.exportKind||\"VariableDeclaration\"===e.type&&e.declare)&&(Ne(e,H),J.move(t,r,0)))}if(a){for(const e in x){const{rangeNode:t,isFromSetup:r}=x[e];(r?v.scriptSetupBindings:v.scriptBindings).push(He(t))}for(const e in T)v.scriptSetupBindings.push(He(T[e].rangeNode));return C&&(v.propsRuntimeArg=He(C)),N&&(v.propsTypeArg=He(N)),M&&(v.emitsRuntimeArg=He(M)),R&&(v.emitsTypeArg=He(R)),I&&(v.withDefaultsArg=He(I)),Object.assign(Object.assign({},n),{ranges:v,scriptAst:he,scriptSetupAst:me})}if(o&&Object.keys(w).length)for(const e of me)\"ImportDeclaration\"!==e.type&&Le(e,((e,t,r)=>{w[e.name]&&!P.has(e)?Me(t)&&t.shorthand?t.inPattern&&!$e(t,r)||J.appendLeft(e.end+Y,`: ${e.name}.value`):J.appendLeft(e.end+Y,\".value\"):\"$\"===e.name[0]&&w[e.name.slice(1)]&&J.remove(e.start+Y,e.start+Y+1)}));if(k&&function(e,t,r){const n=\"TSTypeLiteral\"===e.type?e.members:e.body;for(const e of n)if((\"TSPropertySignature\"===e.type||\"TSMethodSignature\"===e.type)&&\"Identifier\"===e.key.type){let n;\"TSMethodSignature\"===e.type?n=[\"Function\"]:e.typeAnnotation&&(n=_e(e.typeAnnotation.typeAnnotation,r)),t[e.key.name]={key:e.key.name,required:!e.optional,type:n||[\"null\"]}}}(k,K,H),B&&function(e,t){if(\"TSTypeLiteral\"!==e.type&&\"TSInterfaceBody\"!==e.type)je(e.parameters[0],t);else{const r=\"TSTypeLiteral\"===e.type?e.members:e.body;for(let e of r)\"TSCallSignatureDeclaration\"===e.type&&je(e.parameters[0],t)}}(B,G),ce(C,xe),ce(I,xe),ce(M,xe),r?Y<z?(J.remove(0,Y),J.remove(X,z),J.remove(Q,s.length)):(J.remove(0,z),J.remove(Q,Y),J.remove(X,s.length)):(J.remove(0,Y),J.remove(X,s.length)),he&&Object.assign(b,qe(he)),C)for(const e of Ke(C))b[e]=\"props\";for(const e in K)b[e]=\"props\";for(const[e,{isType:t,imported:r,source:n}]of Object.entries(x))t||(b[e]=\"default\"===r&&n.endsWith(\".vue\")||\"vue\"===n?\"setup-const\":\"setup-maybe-ref\");for(const e in T)b[e]=T[e].type;p.length&&(E.add(\"useCssVars\"),E.add(\"unref\"),J.prependRight(Y,`\\n${_(p,b,c,!!t.isProd)}\\n`));let ye=\"__props\";k&&(ye+=`: ${n.content.slice(k.start,k.end)}`),j&&J.prependRight(Y,`\\nconst ${j} = __props`);const be=q||!t.inlineTemplate?[\"expose\"]:[];let Ce;if(F&&be.push(\"emit\"===F?\"emit\":`emit: ${F}`),be.length&&(ye+=`, { ${be.join(\", \")} }`,B&&(ye+=`: { emit: (${n.content.slice(B.start,B.end)}), expose: any, slots: any, attrs: any }`)),t.inlineTemplate)if(e.template&&!e.template.src){t.templateOptions&&t.templateOptions.ssr&&(W=!0);const{code:r,ast:n,preamble:o,tips:a,errors:p}=se(Object.assign(Object.assign({filename:i,source:e.template.content,inMap:e.template.map},t.templateOptions),{id:c,scoped:e.styles.some((e=>e.scoped)),isProd:t.isProd,ssrCssVars:e.cssVars,compilerOptions:Object.assign(Object.assign({},t.templateOptions&&t.templateOptions.compilerOptions),{inline:!0,isTS:h,bindingMetadata:b})}));a.length&&a.forEach(D);const f=p[0];if(\"string\"==typeof f)throw new Error(f);if(f)throw f.loc&&(f.message+=\"\\n\\n\"+e.filename+\"\\n\"+u.generateCodeFrame(s,f.loc.start.offset,f.loc.end.offset)+\"\\n\"),f;o&&J.prepend(o),n&&n.helpers.includes(l.UNREF)&&E.delete(\"unref\"),Ce=r}else Ce=\"() => {}\";else{const e=Object.assign({},T);for(const t in x)x[t].isType||(e[t]=!0);Ce=`{ ${Object.keys(e).join(\", \")} }`}t.inlineTemplate?J.appendRight(X,`\\nreturn ${Ce}\\n}\\n\\n`):J.appendRight(X,`\\nconst __returned__ = ${Ce}\\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\\nreturn __returned__\\n}\\n\\n`);let Ie=\"\";var ke;W&&(Ie+=\"\\n  __ssrInlineRender: true,\"),C?Ie+=`\\n  props: ${n.content.slice(C.start,C.end).trim()},`:k&&(Ie+=function(e){const t=Object.keys(e);if(!t.length)return\"\";const r=I&&\"ObjectExpression\"===I.type&&I.properties.every((e=>\"ObjectProperty\"===e.type&&!e.computed));let n=`{\\n    ${t.map((t=>{let n;if(r){const e=I.properties.find((e=>e.key.name===t));e&&(n=`default: ${s.slice(e.value.start+Y,e.value.end+Y)}`)}{const{type:r,required:s}=e[t];return`${t}: { type: ${i=r,i.some((e=>\"null\"===e))?\"null\":i.length>1?`[${i.join(\", \")}]`:i[0]}, required: ${s}${n?`, ${n}`:\"\"} }`}var i})).join(\",\\n    \")}\\n  }`;return I&&!r&&(n=`${Z(\"mergeDefaults\")}(${n}, ${s.slice(I.start+Y,I.end+Y)})`),`\\n  props: ${n} as unknown as undefined,`}(K)),M?Ie+=`\\n  emits: ${n.content.slice(M.start,M.end).trim()},`:B&&(Ie+=(ke=G).size?`\\n  emits: [${Array.from(ke).map((e=>JSON.stringify(e))).join(\", \")}] as unknown as undefined,`:\"\");const De=q||t.inlineTemplate?\"\":\"  expose()\\n\";if(h){const e=A?\"\\n  ...__default__,\":\"\";J.prependLeft(Y,`\\nexport default ${Z(\"defineComponent\")}({${e}${Ie}\\n  ${V?\"async \":\"\"}setup(${ye}) {\\n${De}`),J.appendRight(X,\"})\")}else A?(J.prependLeft(Y,`\\n${V?\"async \":\"\"}function setup(${ye}) {\\n`),J.append(`\\nexport default /*#__PURE__*/ Object.assign(__default__, {${Ie}\\n  setup\\n})\\n`)):(J.prependLeft(Y,`\\nexport default {${Ie}\\n  ${V?\"async \":\"\"}setup(${ye}) {\\n${De}`),J.appendRight(X,\"}\"));return E.size>0&&J.prepend(`import { ${[...E].map((e=>`${e} as _${e}`)).join(\", \")} } from 'vue'\\n`),J.trim(),Object.assign(Object.assign({},n),{bindings:b,content:J.toString(),map:J.generateMap({source:i,hires:!0,includeContent:!0}),scriptAst:he,scriptSetupAst:me})},t.b=function(e){return function(e){const{filename:t,id:n,scoped:s=!1,trim:i=!0,isProd:o=!1,modules:a=!1,modulesOptions:l={},preprocessLang:c,postcssOptions:u,postcssPlugins:p}=e,f=c&&ye[c],d=f&&function(e,t){return t(e.source,e.inMap||e.map,Object.assign({filename:e.filename},e.preprocessOptions),e.preprocessCustomRequire)}(e,f),h=d?d.map:e.inMap||e.map,m=d?d.code:e.source,y=n.replace(/^data-v-/,\"\"),g=`data-v-${y}`,b=(p||[]).slice();let v;if(b.unshift(N({id:y,isProd:o})),i&&b.push(oe()),s&&b.push(ce(g)),a){if(!e.isAsync)throw new Error(\"[@vue/compiler-sfc] `modules` option can only be used with compileStyleAsync().\");b.push(r(310)(Object.assign(Object.assign({},l),{getJSON:(e,t)=>{v=t}})))}const E=Object.assign(Object.assign({},u),{to:t,from:t});let x,S,T;h&&(E.map={inline:!1,annotation:!1,prev:h});const P=new Set(d?d.dependencies:[]);P.delete(t);const A=[];d&&d.errors.length&&A.push(...d.errors);const O=e=>(e.forEach((e=>{\"dependency\"===e.type&&P.add(e.file)})),P);try{if(x=w(b).process(m,E),e.isAsync)return x.then((e=>({code:e.css||\"\",map:e.map&&e.map.toJSON(),errors:A,modules:v,rawResult:e,dependencies:O(e.messages)}))).catch((e=>({code:\"\",map:void 0,errors:[...A,e],rawResult:void 0,dependencies:P})));O(x.messages),S=x.css,T=x.map}catch(e){A.push(e)}return{code:S||\"\",map:T&&T.toJSON(),errors:A,rawResult:x,dependencies:P}}(Object.assign(Object.assign({},e),{isAsync:!0}))},t.c=se,t.d=function(e,{sourceMap:t=!0,filename:r=\"anonymous.vue\",sourceRoot:n=\"\",pad:s=!1,compiler:i=E}={}){const o=e+t+r+n+s+i.parse,a=M.get(o);if(a)return a;const l={filename:r,source:e,template:null,script:null,scriptSetup:null,styles:[],customBlocks:[],cssVars:[],slotted:!1},c=[];if(i.parse(e,{isNativeTag:()=>!0,isPreTag:()=>!0,getTextMode:({tag:e,props:t},r)=>!r&&\"template\"!==e||\"template\"===e&&t.some((e=>6===e.type&&\"lang\"===e.name&&e.value&&e.value.content&&\"html\"!==e.value.content))?2:0,onError:e=>{c.push(e)}}).children.forEach((t=>{if(1===t.type&&(t.children.length||function(e){return e.props.some((e=>6===e.type&&\"src\"===e.name))}(t)||\"template\"===t.tag))switch(t.tag){case\"template\":if(l.template)c.push(B(t));else{const r=l.template=R(t,e,!1);if(r.ast=t,r.attrs.functional){const e=new SyntaxError(\"<template functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal <template> instead.\");e.loc=t.props.find((e=>\"functional\"===e.name)).loc,c.push(e)}}break;case\"script\":const r=R(t,e,s),n=!!r.attrs.setup;if(n&&!l.scriptSetup){l.scriptSetup=r;break}if(!n&&!l.script){l.script=r;break}c.push(B(t,n));break;case\"style\":const i=R(t,e,s);i.attrs.vars&&c.push(new SyntaxError(\"<style vars> has been replaced by a new proposal: https://github.com/vuejs/rfcs/pull/231\")),l.styles.push(i);break;default:l.customBlocks.push(R(t,e,s))}})),l.scriptSetup&&(l.scriptSetup.src&&(c.push(new SyntaxError('<script setup> cannot use the \"src\" attribute because its syntax will be ambiguous outside of the component.')),l.scriptSetup=null),l.script&&l.script.src&&(c.push(new SyntaxError('<script> cannot use the \"src\" attribute when <script setup> is also present because they must be processed together.')),l.script=null)),t){const t=t=>{t&&!t.src&&(t.map=q(r,e,t.content,n,s&&\"template\"!==t.type?0:t.loc.start.line-1))};t(l.template),t(l.script),l.styles.forEach(t),l.customBlocks.forEach(t)}l.cssVars=function(e){const t=[];return e.styles.forEach((e=>{let r;for(;r=C.exec(e.content);)t.push(r[1]||r[2]||r[3])})),t}(l),l.cssVars.length&&L(\"v-bind() CSS variable injection\",231);const u=/(?:::v-|:)slotted\\(/;l.slotted=l.styles.some((e=>e.scoped&&u.test(e.content)));const p={descriptor:l,errors:c};return M.set(o,p),p}},(e,t,r)=>{\"use strict\";e.exports=r(314)},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(83),s=r(508),i=r(27),o=r(95);function a(e){throw e}function l(e){}function c(e,t,r,n){const s=(r||u)[e]+(n||\"\"),i=new SyntaxError(String(s));return i.code=e,i.loc=t,i}const u={0:\"Illegal comment.\",1:\"CDATA section is allowed only in XML context.\",2:\"Duplicate attribute.\",3:\"End tag cannot have attributes.\",4:\"Illegal '/' in tags.\",5:\"Unexpected EOF in tag.\",6:\"Unexpected EOF in CDATA section.\",7:\"Unexpected EOF in comment.\",8:\"Unexpected EOF in script.\",9:\"Unexpected EOF in tag.\",10:\"Incorrectly closed comment.\",11:\"Incorrectly opened comment.\",12:\"Illegal tag name. Use '&lt;' to print '<'.\",13:\"Attribute value was expected.\",14:\"End tag name was expected.\",15:\"Whitespace was expected.\",16:\"Unexpected '\\x3c!--' in comment.\",17:\"Attribute name cannot contain U+0022 (\\\"), U+0027 ('), and U+003C (<).\",18:\"Unquoted attribute value cannot contain U+0022 (\\\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).\",19:\"Attribute name cannot start with '='.\",21:\"'<?' is allowed only in XML context.\",20:\"Unexpected null cahracter.\",22:\"Illegal '/' in tags.\",23:\"Invalid end tag.\",24:\"Element is missing end tag.\",25:\"Interpolation end sign was not found.\",26:\"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.\",27:\"v-if/v-else-if is missing expression.\",28:\"v-if/else branches must use unique keys.\",29:\"v-else/v-else-if has no adjacent v-if.\",30:\"v-for is missing expression.\",31:\"v-for has invalid expression.\",32:\"<template v-for> key should be placed on the <template> tag.\",33:\"v-bind is missing expression.\",34:\"v-on is missing expression.\",35:\"Unexpected custom directive on <slot> outlet.\",36:\"Mixed v-slot usage on both the component and nested <template>.When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.\",37:\"Duplicate slot names found. \",38:\"Extraneous children found when component already has explicitly named default slot. These children will be ignored.\",39:\"v-slot can only be used on components or <template> tags.\",40:\"v-model is missing expression.\",41:\"v-model value must be a valid JavaScript member expression.\",42:\"v-model cannot be used on v-for or v-slot scope variables because they are not writable.\",43:\"Error parsing JavaScript expression: \",44:\"<KeepAlive> expects exactly one child component.\",45:'\"prefixIdentifiers\" option is not supported in this build of compiler.',46:\"ES module mode is not supported in this build of compiler.\",47:'\"cacheHandlers\" option is only supported when the \"prefixIdentifiers\" option is enabled.',48:'\"scopeId\" option is only supported in module mode.',49:\"\"},p=Symbol(\"\"),f=Symbol(\"\"),d=Symbol(\"\"),h=Symbol(\"\"),m=Symbol(\"\"),y=Symbol(\"\"),g=Symbol(\"\"),b=Symbol(\"\"),v=Symbol(\"\"),E=Symbol(\"\"),x=Symbol(\"\"),S=Symbol(\"\"),T=Symbol(\"\"),w=Symbol(\"\"),P=Symbol(\"\"),A=Symbol(\"\"),O=Symbol(\"\"),C=Symbol(\"\"),I=Symbol(\"\"),k=Symbol(\"\"),N=Symbol(\"\"),_=Symbol(\"\"),j=Symbol(\"\"),D=Symbol(\"\"),L=Symbol(\"\"),M=Symbol(\"\"),B=Symbol(\"\"),R=Symbol(\"\"),F=Symbol(\"\"),U=Symbol(\"\"),$=Symbol(\"\"),q=Symbol(\"\"),V={[p]:\"Fragment\",[f]:\"Teleport\",[d]:\"Suspense\",[h]:\"KeepAlive\",[m]:\"BaseTransition\",[y]:\"openBlock\",[g]:\"createBlock\",[b]:\"createVNode\",[v]:\"createCommentVNode\",[E]:\"createTextVNode\",[x]:\"createStaticVNode\",[S]:\"resolveComponent\",[T]:\"resolveDynamicComponent\",[w]:\"resolveDirective\",[P]:\"resolveFilter\",[A]:\"withDirectives\",[O]:\"renderList\",[C]:\"renderSlot\",[I]:\"createSlots\",[k]:\"toDisplayString\",[N]:\"mergeProps\",[_]:\"toHandlers\",[j]:\"camelize\",[D]:\"capitalize\",[L]:\"toHandlerKey\",[M]:\"setBlockTracking\",[B]:\"pushScopeId\",[R]:\"popScopeId\",[F]:\"withScopeId\",[U]:\"withCtx\",[$]:\"unref\",[q]:\"isRef\"},W={source:\"\",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function K(e,t=W){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}function G(e,t,r,n,s,i,o,a=!1,l=!1,c=W){return e&&(a?(e.helper(y),e.helper(g)):e.helper(b),o&&e.helper(A)),{type:13,tag:t,props:r,children:n,patchFlag:s,dynamicProps:i,directives:o,isBlock:a,disableTracking:l,loc:c}}function H(e,t=W){return{type:17,loc:t,elements:e}}function J(e,t=W){return{type:15,loc:t,properties:e}}function Y(e,t){return{type:16,loc:W,key:n.isString(e)?X(e,!0):e,value:t}}function X(e,t,r=W,n=0){return{type:4,loc:r,content:e,isStatic:t,constType:t?3:n}}function z(e,t=W){return{type:8,loc:t,children:e}}function Q(e,t=[],r=W){return{type:14,loc:r,callee:e,arguments:t}}function Z(e,t,r=!1,n=!1,s=W){return{type:18,params:e,returns:t,newline:r,isSlot:n,loc:s}}function ee(e,t,r,n=!0){return{type:19,test:e,consequent:t,alternate:r,newline:n,loc:W}}function te(e,t,r=!1){return{type:20,index:e,value:t,isVNode:r,loc:W}}const re=e=>4===e.type&&e.isStatic,ne=(e,t)=>e===t||e===n.hyphenate(t);function se(e){return ne(e,\"Teleport\")?f:ne(e,\"Suspense\")?d:ne(e,\"KeepAlive\")?h:ne(e,\"BaseTransition\")?m:void 0}const ie=/^\\d|[^\\$\\w]/,oe=e=>!ie.test(e),ae=/[A-Za-z_$\\xA0-\\uFFFF]/,le=/[\\.\\w$\\xA0-\\uFFFF]/,ce=/\\s+[.[]\\s*|\\s*[.[]\\s+/g,ue=e=>{e=e.trim().replace(ce,(e=>e.trim()));let t=0,r=0,n=0,s=null;for(let i=0;i<e.length;i++){const o=e.charAt(i);switch(t){case 0:if(\"[\"===o)r=t,t=1,n++;else if(!(0===i?ae:le).test(o))return!1;break;case 1:\"'\"===o||'\"'===o||\"`\"===o?(r=t,t=2,s=o):\"[\"===o?n++:\"]\"===o&&(--n||(t=r));break;case 2:o===s&&(t=r,s=null)}}return!n};function pe(e,t,r){const n={source:e.source.substr(t,r),start:fe(e.start,e.source,t),end:e.end};return null!=r&&(n.end=fe(e.start,e.source,t+r)),n}function fe(e,t,r=t.length){return de(n.extend({},e),t,r)}function de(e,t,r=t.length){let n=0,s=-1;for(let e=0;e<r;e++)10===t.charCodeAt(e)&&(n++,s=e);return e.offset+=r,e.line+=n,e.column=-1===s?e.column+r:r-s,e}function he(e,t,r=!1){for(let s=0;s<e.props.length;s++){const i=e.props[s];if(7===i.type&&(r||i.exp)&&(n.isString(t)?i.name===t:t.test(i.name)))return i}}function me(e,t,r=!1,n=!1){for(let s=0;s<e.props.length;s++){const i=e.props[s];if(6===i.type){if(r)continue;if(i.name===t&&(i.value||n))return i}else if(\"bind\"===i.name&&(i.exp||n)&&ye(i.arg,t))return i}}function ye(e,t){return!(!e||!re(e)||e.content!==t)}function ge(e){return 5===e.type||2===e.type}function be(e){return 7===e.type&&\"slot\"===e.name}function ve(e){return 1===e.type&&3===e.tagType}function Ee(e){return 1===e.type&&2===e.tagType}function xe(e,t,r){let s;const i=13===e.type?e.props:e.arguments[2];if(null==i||n.isString(i))s=J([t]);else if(14===i.type){const e=i.arguments[0];n.isString(e)||15!==e.type?i.callee===_?s=Q(r.helper(N),[J([t]),i]):i.arguments.unshift(J([t])):e.properties.unshift(t),!s&&(s=i)}else if(15===i.type){let e=!1;if(4===t.key.type){const r=t.key.content;e=i.properties.some((e=>4===e.key.type&&e.key.content===r))}e||i.properties.unshift(t),s=i}else s=Q(r.helper(N),[J([t]),i]);13===e.type?e.props=s:e.arguments[2]=s}function Se(e,t){return`_${t}_${e.replace(/[^\\w]/g,\"_\")}`}function Te(e,t){if(!e||0===Object.keys(t).length)return!1;switch(e.type){case 1:for(let r=0;r<e.props.length;r++){const n=e.props[r];if(7===n.type&&(Te(n.arg,t)||Te(n.exp,t)))return!0}return e.children.some((e=>Te(e,t)));case 11:return!!Te(e.source,t)||e.children.some((e=>Te(e,t)));case 9:return e.branches.some((e=>Te(e,t)));case 10:return!!Te(e.condition,t)||e.children.some((e=>Te(e,t)));case 4:return!e.isStatic&&oe(e.content)&&!!t[e.content];case 8:return e.children.some((e=>n.isObject(e)&&Te(e,t)));case 5:case 12:return Te(e.content,t);case 2:case 3:default:return!1}}const we={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with \"is\" prop will no longer be treated as components in Vue 3 unless the \"is\" value is explicitly prefixed with \"vue:\".',link:\"https://v3.vuejs.org/guide/migration/custom-elements-interop.html\"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \\`v-bind:${e}.sync\\` should be changed to \\`v-model:${e}\\`.`,link:\"https://v3.vuejs.org/guide/migration/v-model.html\"},COMPILER_V_BIND_PROP:{message:\".prop modifier for v-bind has been removed and no longer necessary. Vue 3 will automatically set a binding as DOM property when appropriate.\"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind=\"obj\" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:\"https://v3.vuejs.org/guide/migration/v-bind.html\"},COMPILER_V_ON_NATIVE:{message:\".native modifier for v-on has been removed as is no longer necessary.\",link:\"https://v3.vuejs.org/guide/migration/v-on-native-modifier-removed.html\"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:\"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.\",link:\"https://v3.vuejs.org/guide/migration/v-if-v-for.html\"},COMPILER_V_FOR_REF:{message:\"Ref usage on v-for no longer creates array ref values in Vue 3. Consider using function refs or refactor to avoid ref usage altogether.\",link:\"https://v3.vuejs.org/guide/migration/array-refs.html\"},COMPILER_NATIVE_TEMPLATE:{message:\"<template> with no special directives will render as a native template element instead of its inner content in Vue 3.\"},COMPILER_INLINE_TEMPLATE:{message:'\"inline-template\" has been removed in Vue 3.',link:\"https://v3.vuejs.org/guide/migration/inline-template-attribute.html\"},COMPILER_FILTER:{message:'filters have been removed in Vue 3. The \"|\" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:\"https://v3.vuejs.org/guide/migration/filters.html\"}};function Pe(e,t){const r=t.options?t.options.compatConfig:t.compatConfig,n=r&&r[e];return\"MODE\"===e?n||3:n}function Ae(e,t){const r=Pe(\"MODE\",t),n=Pe(e,t);return 3===r?!0===n:!1!==n}function Oe(e,t,r,...n){return Ae(e,t)}const Ce=/&(gt|lt|amp|apos|quot);/g,Ie={gt:\">\",lt:\"<\",amp:\"&\",apos:\"'\",quot:'\"'},ke={delimiters:[\"{{\",\"}}\"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:n.NO,isPreTag:n.NO,isCustomElement:n.NO,decodeEntities:e=>e.replace(Ce,((e,t)=>Ie[t])),onError:a,onWarn:l,comments:!1};function Ne(e,t={}){const r=function(e,t){const r=n.extend({},ke);for(const e in t)r[e]=t[e]||ke[e];return{options:r,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:r.onWarn}}(e,t),s=Ke(r);return K(_e(r,0,[]),Ge(r,s))}function _e(e,t,r){const s=He(r),i=s?s.ns:0,o=[];for(;!Ze(e,t,r);){const a=e.source;let l;if(0===t||1===t)if(!e.inVPre&&Je(a,e.options.delimiters[0]))l=qe(e,t);else if(0===t&&\"<\"===a[0])if(1===a.length)Qe(e,5,1);else if(\"!\"===a[1])Je(a,\"\\x3c!--\")?l=Le(e):Je(a,\"<!DOCTYPE\")?l=Me(e):Je(a,\"<![CDATA[\")?0!==i?l=De(e,r):(Qe(e,1),l=Me(e)):(Qe(e,11),l=Me(e));else if(\"/\"===a[1])if(2===a.length)Qe(e,5,2);else{if(\">\"===a[2]){Qe(e,14,2),Ye(e,3);continue}if(/[a-z]/i.test(a[2])){Qe(e,23),Fe(e,1,s);continue}Qe(e,12,2),l=Me(e)}else/[a-z]/i.test(a[1])?(l=Be(e,r),Ae(\"COMPILER_NATIVE_TEMPLATE\",e)&&l&&\"template\"===l.tag&&!l.props.some((e=>7===e.type&&Re(e.name)))&&(l=l.children)):\"?\"===a[1]?(Qe(e,21,1),l=Me(e)):Qe(e,12,1);if(l||(l=Ve(e,t)),n.isArray(l))for(let e=0;e<l.length;e++)je(o,l[e]);else je(o,l)}let a=!1;if(2!==t&&1!==t){const t=\"preserve\"===e.options.whitespace;for(let r=0;r<o.length;r++){const n=o[r];if(!e.inPre&&2===n.type)if(/[^\\t\\r\\n\\f ]/.test(n.content))t||(n.content=n.content.replace(/[\\t\\r\\n\\f ]+/g,\" \"));else{const e=o[r-1],s=o[r+1];!e||!s||!t&&(3===e.type||3===s.type||1===e.type&&1===s.type&&/[\\r\\n]/.test(n.content))?(a=!0,o[r]=null):n.content=\" \"}3!==n.type||e.options.comments||(a=!0,o[r]=null)}if(e.inPre&&s&&e.options.isPreTag(s.tag)){const e=o[0];e&&2===e.type&&(e.content=e.content.replace(/^\\r?\\n/,\"\"))}}return a?o.filter(Boolean):o}function je(e,t){if(2===t.type){const r=He(e);if(r&&2===r.type&&r.loc.end.offset===t.loc.start.offset)return r.content+=t.content,r.loc.end=t.loc.end,void(r.loc.source+=t.loc.source)}e.push(t)}function De(e,t){Ye(e,9);const r=_e(e,3,t);return 0===e.source.length?Qe(e,6):Ye(e,3),r}function Le(e){const t=Ke(e);let r;const n=/--(\\!)?>/.exec(e.source);if(n){n.index<=3&&Qe(e,0),n[1]&&Qe(e,10),r=e.source.slice(4,n.index);const t=e.source.slice(0,n.index);let s=1,i=0;for(;-1!==(i=t.indexOf(\"\\x3c!--\",s));)Ye(e,i-s+1),i+4<t.length&&Qe(e,16),s=i+1;Ye(e,n.index+n[0].length-s+1)}else r=e.source.slice(4),Ye(e,e.source.length),Qe(e,7);return{type:3,content:r,loc:Ge(e,t)}}function Me(e){const t=Ke(e),r=\"?\"===e.source[1]?1:2;let n;const s=e.source.indexOf(\">\");return-1===s?(n=e.source.slice(r),Ye(e,e.source.length)):(n=e.source.slice(r,s),Ye(e,s+1)),{type:3,content:n,loc:Ge(e,t)}}function Be(e,t){const r=e.inPre,n=e.inVPre,s=He(t),i=Fe(e,0,s),o=e.inPre&&!r,a=e.inVPre&&!n;if(i.isSelfClosing||e.options.isVoidTag(i.tag))return e.options.isPreTag(i.tag)&&(e.inPre=!1),i;t.push(i);const l=e.options.getTextMode(i,s),c=_e(e,l,t);t.pop();{const t=i.props.find((e=>6===e.type&&\"inline-template\"===e.name));if(t&&Oe(\"COMPILER_INLINE_TEMPLATE\",e,t.loc)){const r=Ge(e,i.loc.end);t.value={type:2,content:r.source,loc:r}}}if(i.children=c,et(e.source,i.tag))Fe(e,1,s);else if(Qe(e,24,0,i.loc.start),0===e.source.length&&\"script\"===i.tag.toLowerCase()){const t=c[0];t&&Je(t.loc.source,\"\\x3c!--\")&&Qe(e,8)}return i.loc=Ge(e,i.loc.start),o&&(e.inPre=!1),a&&(e.inVPre=!1),i}const Re=n.makeMap(\"if,else,else-if,for,slot\");function Fe(e,t,r){const s=Ke(e),i=/^<\\/?([a-z][^\\t\\r\\n\\f />]*)/i.exec(e.source),o=i[1],a=e.options.getNamespace(o,r);Ye(e,i[0].length),Xe(e);const l=Ke(e),c=e.source;e.options.isPreTag(o)&&(e.inPre=!0);let u=Ue(e,t);0===t&&!e.inVPre&&u.some((e=>7===e.type&&\"pre\"===e.name))&&(e.inVPre=!0,n.extend(e,l),e.source=c,u=Ue(e,t).filter((e=>\"v-pre\"!==e.name)));let p=!1;if(0===e.source.length?Qe(e,9):(p=Je(e.source,\"/>\"),1===t&&p&&Qe(e,4),Ye(e,p?2:1)),1===t)return;let f=0;return e.inVPre||(\"slot\"===o?f=2:\"template\"===o?u.some((e=>7===e.type&&Re(e.name)))&&(f=3):function(e,t,r){const n=r.options;if(n.isCustomElement(e))return!1;if(\"component\"===e||/^[A-Z]/.test(e)||se(e)||n.isBuiltInComponent&&n.isBuiltInComponent(e)||n.isNativeTag&&!n.isNativeTag(e))return!0;for(let e=0;e<t.length;e++){const n=t[e];if(6===n.type){if(\"is\"===n.name&&n.value){if(n.value.content.startsWith(\"vue:\"))return!0;if(Oe(\"COMPILER_IS_ON_ELEMENT\",r,n.loc))return!0}}else{if(\"is\"===n.name)return!0;if(\"bind\"===n.name&&ye(n.arg,\"is\")&&Oe(\"COMPILER_IS_ON_ELEMENT\",r,n.loc))return!0}}}(o,u,e)&&(f=1)),{type:1,ns:a,tag:o,tagType:f,props:u,isSelfClosing:p,children:[],loc:Ge(e,s),codegenNode:void 0}}function Ue(e,t){const r=[],n=new Set;for(;e.source.length>0&&!Je(e.source,\">\")&&!Je(e.source,\"/>\");){if(Je(e.source,\"/\")){Qe(e,22),Ye(e,1),Xe(e);continue}1===t&&Qe(e,3);const s=$e(e,n);0===t&&r.push(s),/^[^\\t\\r\\n\\f />]/.test(e.source)&&Qe(e,15),Xe(e)}return r}function $e(e,t){const r=Ke(e),n=/^[^\\t\\r\\n\\f />][^\\t\\r\\n\\f />=]*/.exec(e.source)[0];t.has(n)&&Qe(e,2),t.add(n),\"=\"===n[0]&&Qe(e,19);{const t=/[\"'<]/g;let r;for(;r=t.exec(n);)Qe(e,17,r.index)}let s;Ye(e,n.length),/^[\\t\\r\\n\\f ]*=/.test(e.source)&&(Xe(e),Ye(e,1),Xe(e),s=function(e){const t=Ke(e);let r;const n=e.source[0],s='\"'===n||\"'\"===n;if(s){Ye(e,1);const t=e.source.indexOf(n);-1===t?r=We(e,e.source.length,4):(r=We(e,t,4),Ye(e,1))}else{const t=/^[^\\t\\r\\n\\f >]+/.exec(e.source);if(!t)return;const n=/[\"'<=`]/g;let s;for(;s=n.exec(t[0]);)Qe(e,18,s.index);r=We(e,t[0].length,4)}return{content:r,isQuoted:s,loc:Ge(e,t)}}(e),s||Qe(e,13));const i=Ge(e,r);if(!e.inVPre&&/^(v-|:|@|#)/.test(n)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^@|^#)(\\[[^\\]]+\\]|[^\\.]+))?(.+)?$/i.exec(n);let o,a=t[1]||(Je(n,\":\")?\"bind\":Je(n,\"@\")?\"on\":\"slot\");if(t[2]){const s=\"slot\"===a,i=n.lastIndexOf(t[2]),l=Ge(e,ze(e,r,i),ze(e,r,i+t[2].length+(s&&t[3]||\"\").length));let c=t[2],u=!0;c.startsWith(\"[\")?(u=!1,c.endsWith(\"]\")||Qe(e,26),c=c.substr(1,c.length-2)):s&&(c+=t[3]||\"\"),o={type:4,content:c,isStatic:u,constType:u?3:0,loc:l}}if(s&&s.isQuoted){const e=s.loc;e.start.offset++,e.start.column++,e.end=fe(e.start,s.content),e.source=e.source.slice(1,-1)}const l=t[3]?t[3].substr(1).split(\".\"):[];return\"bind\"===a&&o&&l.includes(\"sync\")&&Oe(\"COMPILER_V_BIND_SYNC\",e,0,o.loc.source)&&(a=\"model\",l.splice(l.indexOf(\"sync\"),1)),{type:7,name:a,exp:s&&{type:4,content:s.content,isStatic:!1,constType:0,loc:s.loc},arg:o,modifiers:l,loc:i}}return{type:6,name:n,value:s&&{type:2,content:s.content,loc:s.loc},loc:i}}function qe(e,t){const[r,n]=e.options.delimiters,s=e.source.indexOf(n,r.length);if(-1===s)return void Qe(e,25);const i=Ke(e);Ye(e,r.length);const o=Ke(e),a=Ke(e),l=s-r.length,c=e.source.slice(0,l),u=We(e,l,t),p=u.trim(),f=u.indexOf(p);return f>0&&de(o,c,f),de(a,c,l-(u.length-p.length-f)),Ye(e,n.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:p,loc:Ge(e,o,a)},loc:Ge(e,i)}}function Ve(e,t){const r=[\"<\",e.options.delimiters[0]];3===t&&r.push(\"]]>\");let n=e.source.length;for(let t=0;t<r.length;t++){const s=e.source.indexOf(r[t],1);-1!==s&&n>s&&(n=s)}const s=Ke(e);return{type:2,content:We(e,n,t),loc:Ge(e,s)}}function We(e,t,r){const n=e.source.slice(0,t);return Ye(e,t),2===r||3===r||-1===n.indexOf(\"&\")?n:e.options.decodeEntities(n,4===r)}function Ke(e){const{column:t,line:r,offset:n}=e;return{column:t,line:r,offset:n}}function Ge(e,t,r){return{start:t,end:r=r||Ke(e),source:e.originalSource.slice(t.offset,r.offset)}}function He(e){return e[e.length-1]}function Je(e,t){return e.startsWith(t)}function Ye(e,t){const{source:r}=e;de(e,r,t),e.source=r.slice(t)}function Xe(e){const t=/^[\\t\\r\\n\\f ]+/.exec(e.source);t&&Ye(e,t[0].length)}function ze(e,t,r){return fe(t,e.originalSource.slice(t.offset,r),r)}function Qe(e,t,r,n=Ke(e)){r&&(n.offset+=r,n.column+=r),e.options.onError(c(t,{start:n,end:n,source:\"\"}))}function Ze(e,t,r){const n=e.source;switch(t){case 0:if(Je(n,\"</\"))for(let e=r.length-1;e>=0;--e)if(et(n,r[e].tag))return!0;break;case 1:case 2:{const e=He(r);if(e&&et(n,e.tag))return!0;break}case 3:if(Je(n,\"]]>\"))return!0}return!n}function et(e,t){return Je(e,\"</\")&&e.substr(2,t.length).toLowerCase()===t.toLowerCase()&&/[\\t\\r\\n\\f />]/.test(e[2+t.length]||\">\")}function tt(e,t){nt(e,t,rt(e,e.children[0]))}function rt(e,t){const{children:r}=e;return 1===r.length&&1===t.type&&!Ee(t)}function nt(e,t,r=!1){let n=!1,s=!0;const{children:i}=e;for(let e=0;e<i.length;e++){const o=i[e];if(1===o.type&&0===o.tagType){const e=r?0:st(o,t);if(e>0){if(e<3&&(s=!1),e>=2){o.codegenNode.patchFlag=\"-1\",o.codegenNode=t.hoist(o.codegenNode),n=!0;continue}}else{const e=o.codegenNode;if(13===e.type){const r=at(e);if((!r||512===r||1===r)&&it(o,t)>=2){const r=ot(o);r&&(e.props=t.hoist(r))}}}}else if(12===o.type){const e=st(o.content,t);e>0&&(e<3&&(s=!1),e>=2&&(o.codegenNode=t.hoist(o.codegenNode),n=!0))}if(1===o.type){const e=1===o.tagType;e&&t.scopes.vSlot++,nt(o,t),e&&t.scopes.vSlot--}else if(11===o.type)nt(o,t,1===o.children.length);else if(9===o.type)for(let e=0;e<o.branches.length;e++)nt(o.branches[e],t,1===o.branches[e].children.length)}s&&n&&t.transformHoist&&t.transformHoist(i,t,e)}function st(e,t){const{constantCache:r}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const s=r.get(e);if(void 0!==s)return s;const i=e.codegenNode;if(13!==i.type)return 0;if(at(i))return r.set(e,0),0;{let n=3;const s=it(e,t);if(0===s)return r.set(e,0),0;s<n&&(n=s);for(let s=0;s<e.children.length;s++){const i=st(e.children[s],t);if(0===i)return r.set(e,0),0;i<n&&(n=i)}if(n>1)for(let s=0;s<e.props.length;s++){const i=e.props[s];if(7===i.type&&\"bind\"===i.name&&i.exp){const s=st(i.exp,t);if(0===s)return r.set(e,0),0;s<n&&(n=s)}}return i.isBlock&&(t.removeHelper(y),t.removeHelper(g),i.isBlock=!1,t.helper(b)),r.set(e,n),n}case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return st(e.content,t);case 4:return e.constType;case 8:let o=3;for(let r=0;r<e.children.length;r++){const s=e.children[r];if(n.isString(s)||n.isSymbol(s))continue;const i=st(s,t);if(0===i)return 0;i<o&&(o=i)}return o;default:return 0}}function it(e,t){let r=3;const n=ot(e);if(n&&15===n.type){const{properties:e}=n;for(let n=0;n<e.length;n++){const{key:s,value:i}=e[n],o=st(s,t);if(0===o)return o;if(o<r&&(r=o),4!==i.type)return 0;const a=st(i,t);if(0===a)return a;a<r&&(r=a)}}return r}function ot(e){const t=e.codegenNode;if(13===t.type)return t.props}function at(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function lt(e,{filename:t=\"\",prefixIdentifiers:r=!1,hoistStatic:s=!1,cacheHandlers:i=!1,nodeTransforms:o=[],directiveTransforms:c={},transformHoist:u=null,isBuiltInComponent:p=n.NOOP,isCustomElement:f=n.NOOP,expressionPlugins:d=[],scopeId:h=null,slotted:m=!0,ssr:y=!1,ssrCssVars:g=\"\",bindingMetadata:b=n.EMPTY_OBJ,inline:v=!1,isTS:E=!1,onError:x=a,onWarn:S=l,compatConfig:T}){const w=t.replace(/\\?.*$/,\"\").match(/([^/\\\\]+)\\.\\w+$/),P={selfName:w&&n.capitalize(n.camelize(w[1])),prefixIdentifiers:r,hoistStatic:s,cacheHandlers:i,nodeTransforms:o,directiveTransforms:c,transformHoist:u,isBuiltInComponent:p,isCustomElement:f,expressionPlugins:d,scopeId:h,slotted:m,ssr:y,ssrCssVars:g,bindingMetadata:b,inline:v,isTS:E,onError:x,onWarn:S,compatConfig:T,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new Map,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,helper(e){const t=P.helpers.get(e)||0;return P.helpers.set(e,t+1),e},removeHelper(e){const t=P.helpers.get(e);if(t){const r=t-1;r?P.helpers.set(e,r):P.helpers.delete(e)}},helperString:e=>`_${V[P.helper(e)]}`,replaceNode(e){P.parent.children[P.childIndex]=P.currentNode=e},removeNode(e){const t=P.parent.children,r=e?t.indexOf(e):P.currentNode?P.childIndex:-1;e&&e!==P.currentNode?P.childIndex>r&&(P.childIndex--,P.onNodeRemoved()):(P.currentNode=null,P.onNodeRemoved()),P.parent.children.splice(r,1)},onNodeRemoved:()=>{},addIdentifiers(e){n.isString(e)?A(e):e.identifiers?e.identifiers.forEach(A):4===e.type&&A(e.content)},removeIdentifiers(e){n.isString(e)?O(e):e.identifiers?e.identifiers.forEach(O):4===e.type&&O(e.content)},hoist(e){P.hoists.push(e);const t=X(`_hoisted_${P.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>te(++P.cached,e,t)};function A(e){const{identifiers:t}=P;void 0===t[e]&&(t[e]=0),t[e]++}function O(e){P.identifiers[e]--}return P.filters=new Set,P}function ct(e,t){const r=lt(e,t);ut(e,r),t.hoistStatic&&tt(e,r),t.ssr||function(e,t){const{helper:r,removeHelper:s}=t,{children:i}=e;if(1===i.length){const t=i[0];if(rt(e,t)&&t.codegenNode){const n=t.codegenNode;13===n.type&&(n.isBlock||(s(b),n.isBlock=!0,r(y),r(g))),e.codegenNode=n}else e.codegenNode=t}else if(i.length>1){let s=64;n.PatchFlagNames[64],e.codegenNode=G(t,r(p),void 0,e.children,s+\"\",void 0,void 0,!0)}}(e,r),e.helpers=[...r.helpers.keys()],e.components=[...r.components],e.directives=[...r.directives],e.imports=r.imports,e.hoists=r.hoists,e.temps=r.temps,e.cached=r.cached,e.filters=[...r.filters]}function ut(e,t){t.currentNode=e;const{nodeTransforms:r}=t,s=[];for(let i=0;i<r.length;i++){const o=r[i](e,t);if(o&&(n.isArray(o)?s.push(...o):s.push(o)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(v);break;case 5:t.ssr||t.helper(k);break;case 9:for(let r=0;r<e.branches.length;r++)ut(e.branches[r],t);break;case 10:case 11:case 1:case 0:!function(e,t){let r=0;const s=()=>{r--};for(;r<e.children.length;r++){const i=e.children[r];n.isString(i)||(t.parent=e,t.childIndex=r,t.onNodeRemoved=s,ut(i,t))}}(e,t)}t.currentNode=e;let i=s.length;for(;i--;)s[i]()}function pt(e,t){const r=n.isString(e)?t=>t===e:t=>e.test(t);return(e,n)=>{if(1===e.type){const{props:s}=e;if(3===e.tagType&&s.some(be))return;const i=[];for(let o=0;o<s.length;o++){const a=s[o];if(7===a.type&&r(a.name)){s.splice(o,1),o--;const r=t(e,a,n);r&&i.push(r)}}return i}}}const ft=\"/*#__PURE__*/\";function dt(e,{mode:t=\"function\",prefixIdentifiers:r=\"module\"===t,sourceMap:n=!1,filename:i=\"template.vue.html\",scopeId:o=null,optimizeImports:a=!1,runtimeGlobalName:l=\"Vue\",runtimeModuleName:c=\"vue\",ssr:u=!1,isTS:p=!1}){const f={mode:t,prefixIdentifiers:r,sourceMap:n,filename:i,scopeId:o,optimizeImports:a,runtimeGlobalName:l,runtimeModuleName:c,ssr:u,isTS:p,source:e.loc.source,code:\"\",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${V[e]}`,push(e,t){if(f.code+=e,f.map){if(t){let e;if(4===t.type&&!t.isStatic){const r=t.content.replace(/^_ctx\\./,\"\");r!==t.content&&oe(r)&&(e=r)}h(t.loc.start,e)}de(f,e),t&&t.loc!==W&&h(t.loc.end)}},indent(){d(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:d(--f.indentLevel)},newline(){d(f.indentLevel)}};function d(e){f.push(\"\\n\"+\"  \".repeat(e))}function h(e,t){f.map.addMapping({name:t,source:f.filename,original:{line:e.line,column:e.column-1},generated:{line:f.line,column:f.column-1}})}return n&&(f.map=new s.SourceMapGenerator,f.map.setSourceContent(i,f.source)),f}function ht(e,t={}){const r=dt(e,t);t.onContextCreated&&t.onContextCreated(r);const{mode:n,push:s,prefixIdentifiers:i,indent:o,deindent:a,newline:l,scopeId:c,ssr:u}=r,p=e.helpers.length>0,f=!i&&\"module\"!==n,d=null!=c&&\"module\"===n,h=!!t.inline,m=h?dt(e,t):r;\"module\"===n?function(e,t,r,n){const{push:s,newline:i,optimizeImports:o,runtimeModuleName:a,scopeId:l,helper:c}=t;r&&(e.helpers.push(F),e.hoists.length&&e.helpers.push(B,R)),e.helpers.length&&(o?(s(`import { ${e.helpers.map((e=>V[e])).join(\", \")} } from ${JSON.stringify(a)}\\n`),s(`\\n// Binding optimization for webpack code-split\\nconst ${e.helpers.map((e=>`_${V[e]} = ${V[e]}`)).join(\", \")}\\n`)):s(`import { ${e.helpers.map((e=>`${V[e]} as _${V[e]}`)).join(\", \")} } from ${JSON.stringify(a)}\\n`)),e.ssrHelpers&&e.ssrHelpers.length&&s(`import { ${e.ssrHelpers.map((e=>`${V[e]} as _${V[e]}`)).join(\", \")} } from \"@vue/server-renderer\"\\n`),e.imports.length&&(function(e,t){e.length&&e.forEach((e=>{t.push(\"import \"),vt(e.exp,t),t.push(` from '${e.path}'`),t.newline()}))}(e.imports,t),i()),r&&(s(`const _withId = /*#__PURE__*/${c(F)}(\"${l}\")`),i()),yt(e.hoists,t),i(),n||s(\"export \")}(e,m,d,h):function(e,t){const{ssr:r,prefixIdentifiers:n,push:s,newline:i,runtimeModuleName:o,runtimeGlobalName:a}=t,l=r?`require(${JSON.stringify(o)})`:a,c=e=>`${V[e]}: _${V[e]}`;e.helpers.length>0&&(n?s(`const { ${e.helpers.map(c).join(\", \")} } = ${l}\\n`):(s(`const _Vue = ${l}\\n`),e.hoists.length&&s(`const { ${[b,v,E,x].filter((t=>e.helpers.includes(t))).map(c).join(\", \")} } = _Vue\\n`))),e.ssrHelpers&&e.ssrHelpers.length&&s(`const { ${e.ssrHelpers.map(c).join(\", \")} } = require(\"@vue/server-renderer\")\\n`),yt(e.hoists,t),i(),s(\"return \")}(e,m);const y=u?\"ssrRender\":\"render\",g=u?[\"_ctx\",\"_push\",\"_parent\",\"_attrs\"]:[\"_ctx\",\"_cache\"];t.bindingMetadata&&!t.inline&&g.push(\"$props\",\"$setup\",\"$data\",\"$options\");const S=t.isTS?g.map((e=>`${e}: any`)).join(\",\"):g.join(\", \");if(d&&!h&&s(`const ${y} = /*#__PURE__*/_withId(`),s(h||d?`(${S}) => {`:`function ${y}(${S}) {`),o(),f&&(s(\"with (_ctx) {\"),o(),p&&(s(`const { ${e.helpers.map((e=>`${V[e]}: _${V[e]}`)).join(\", \")} } = _Vue`),s(\"\\n\"),l())),e.components.length&&(mt(e.components,\"component\",r),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(mt(e.directives,\"directive\",r),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),mt(e.filters,\"filter\",r),l()),e.temps>0){s(\"let \");for(let t=0;t<e.temps;t++)s(`${t>0?\", \":\"\"}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(s(\"\\n\"),l()),u||s(\"return \"),e.codegenNode?vt(e.codegenNode,r):s(\"null\"),f&&(a(),s(\"}\")),a(),s(\"}\"),d&&!h&&s(\")\"),{ast:e,code:r.code,preamble:h?m.code:\"\",map:r.map?r.map.toJSON():void 0}}function mt(e,t,{helper:r,push:n,newline:s,isTS:i}){const o=r(\"filter\"===t?P:\"component\"===t?S:w);for(let r=0;r<e.length;r++){let a=e[r];const l=a.endsWith(\"__self\");l&&(a=a.slice(0,-6)),n(`const ${Se(a,t)} = ${o}(${JSON.stringify(a)}${l?\", true\":\"\"})${i?\"!\":\"\"}`),r<e.length-1&&s()}}function yt(e,t){if(!e.length)return;t.pure=!0;const{push:r,newline:n,helper:s,scopeId:i,mode:o}=t,a=null!=i&&\"function\"!==o;n(),a&&(r(`${s(B)}(\"${i}\")`),n()),e.forEach(((e,s)=>{e&&(r(`const _hoisted_${s+1} = `),vt(e,t),n())})),a&&(r(`${s(R)}()`),n()),t.pure=!1}function gt(e,t){const r=e.length>3||e.some((e=>n.isArray(e)||!function(e){return n.isString(e)||4===e.type||2===e.type||5===e.type||8===e.type}(e)));t.push(\"[\"),r&&t.indent(),bt(e,t,r),r&&t.deindent(),t.push(\"]\")}function bt(e,t,r=!1,s=!0){const{push:i,newline:o}=t;for(let a=0;a<e.length;a++){const l=e[a];n.isString(l)?i(l):n.isArray(l)?gt(l,t):vt(l,t),a<e.length-1&&(r?(s&&i(\",\"),o()):s&&i(\", \"))}}function vt(e,t){if(n.isString(e))t.push(e);else if(n.isSymbol(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:vt(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),e)}(e,t);break;case 4:Et(e,t);break;case 5:!function(e,t){const{push:r,helper:n,pure:s}=t;s&&r(ft),r(`${n(k)}(`),vt(e.content,t),r(\")\")}(e,t);break;case 12:vt(e.codegenNode,t);break;case 8:xt(e,t);break;case 3:!function(e,t){const{push:r,helper:n,pure:s}=t;s&&r(ft),r(`${n(v)}(${JSON.stringify(e.content)})`,e)}(e,t);break;case 13:!function(e,t){const{push:r,helper:n,pure:s}=t,{tag:i,props:o,children:a,patchFlag:l,dynamicProps:c,directives:u,isBlock:p,disableTracking:f}=e;u&&r(n(A)+\"(\"),p&&r(`(${n(y)}(${f?\"true\":\"\"}), `),s&&r(ft),r(n(p?g:b)+\"(\",e),bt(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||\"null\"))}([i,o,a,l,c]),t),r(\")\"),p&&r(\")\"),u&&(r(\", \"),vt(u,t),r(\")\"))}(e,t);break;case 14:!function(e,t){const{push:r,helper:s,pure:i}=t,o=n.isString(e.callee)?e.callee:s(e.callee);i&&r(ft),r(o+\"(\",e),bt(e.arguments,t),r(\")\")}(e,t);break;case 15:!function(e,t){const{push:r,indent:n,deindent:s,newline:i}=t,{properties:o}=e;if(!o.length)return void r(\"{}\",e);const a=o.length>1||o.some((e=>4!==e.value.type));r(a?\"{\":\"{ \"),a&&n();for(let e=0;e<o.length;e++){const{key:n,value:s}=o[e];St(n,t),r(\": \"),vt(s,t),e<o.length-1&&(r(\",\"),i())}a&&s(),r(a?\"}\":\" }\")}(e,t);break;case 17:!function(e,t){gt(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:r,indent:s,deindent:i,scopeId:o,mode:a}=t,{params:l,returns:c,body:u,newline:p,isSlot:f}=e;f&&r(f&&null!=o&&\"function\"!==a?\"_withId(\":`_${V[U]}(`),r(\"(\",e),n.isArray(l)?bt(l,t):l&&vt(l,t),r(\") => \"),(p||u)&&(r(\"{\"),s()),c?(p&&r(\"return \"),n.isArray(c)?gt(c,t):vt(c,t)):u&&vt(u,t),(p||u)&&(i(),r(\"}\")),f&&(e.isNonScopedSlot&&r(\", undefined, true\"),r(\")\"))}(e,t);break;case 19:!function(e,t){const{test:r,consequent:n,alternate:s,newline:i}=e,{push:o,indent:a,deindent:l,newline:c}=t;if(4===r.type){const e=!oe(r.content);e&&o(\"(\"),Et(r,t),e&&o(\")\")}else o(\"(\"),vt(r,t),o(\")\");i&&a(),t.indentLevel++,i||o(\" \"),o(\"? \"),vt(n,t),t.indentLevel--,i&&c(),i||o(\" \"),o(\": \");const u=19===s.type;u||t.indentLevel++,vt(s,t),u||t.indentLevel--,i&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:r,helper:n,indent:s,deindent:i,newline:o}=t;r(`_cache[${e.index}] || (`),e.isVNode&&(s(),r(`${n(M)}(-1),`),o()),r(`_cache[${e.index}] = `),vt(e.value,t),e.isVNode&&(r(\",\"),o(),r(`${n(M)}(1),`),o(),r(`_cache[${e.index}]`),i()),r(\")\")}(e,t);break;case 21:bt(e.body,t,!0,!1);break;case 22:!function(e,t){const{push:r,indent:s,deindent:i}=t;r(\"`\");const o=e.elements.length,a=o>3;for(let l=0;l<o;l++){const o=e.elements[l];n.isString(o)?r(o.replace(/(`|\\$|\\\\)/g,\"\\\\$1\")):(r(\"${\"),a&&s(),vt(o,t),a&&i(),r(\"}\"))}r(\"`\")}(e,t);break;case 23:Tt(e,t);break;case 24:!function(e,t){vt(e.left,t),t.push(\" = \"),vt(e.right,t)}(e,t);break;case 25:!function(e,t){t.push(\"(\"),bt(e.expressions,t),t.push(\")\")}(e,t);break;case 26:!function({returns:e},t){t.push(\"return \"),n.isArray(e)?gt(e,t):vt(e,t)}(e,t)}}function Et(e,t){const{content:r,isStatic:n}=e;t.push(n?JSON.stringify(r):r,e)}function xt(e,t){for(let r=0;r<e.children.length;r++){const s=e.children[r];n.isString(s)?t.push(s):vt(s,t)}}function St(e,t){const{push:r}=t;8===e.type?(r(\"[\"),xt(e,t),r(\"]\")):e.isStatic?r(oe(e.content)?e.content:JSON.stringify(e.content),e):r(`[${e.content}]`,e)}function Tt(e,t){const{push:r,indent:n,deindent:s}=t,{test:i,consequent:o,alternate:a}=e;r(\"if (\"),vt(i,t),r(\") {\"),n(),vt(o,t),s(),r(\"}\"),a&&(r(\" else \"),23===a.type?Tt(a,t):(r(\"{\"),n(),vt(a,t),s(),r(\"}\")))}const wt=n.makeMap(\"true,false,null,this\"),Pt=(e,t)=>{if(5===e.type)e.content=At(e.content,t);else if(1===e.type)for(let r=0;r<e.props.length;r++){const n=e.props[r];if(7===n.type&&\"for\"!==n.name){const e=n.exp,r=n.arg;!e||4!==e.type||\"on\"===n.name&&r||(n.exp=At(e,t,\"slot\"===n.name)),r&&4===r.type&&!r.isStatic&&(n.arg=At(r,t))}}};function At(e,t,r=!1,s=!1){if(!t.prefixIdentifiers||!e.content.trim())return e;const{inline:a,bindingMetadata:l}=t,u=(e,r,s)=>{const i=n.hasOwn(l,e)&&l[e];if(a){const n=r&&\"AssignmentExpression\"===r.type&&r.left===s,o=r&&\"UpdateExpression\"===r.type&&r.argument===s,a=r&&kt(r,g);if(\"setup-const\"===i)return e;if(\"setup-ref\"===i)return`${e}.value`;if(\"setup-maybe-ref\"===i)return n||o||a?`${e}.value`:`${t.helperString($)}(${e})`;if(\"setup-let\"===i){if(n){const{right:n,operator:s}=r,i=Nt(At(X(p.slice(n.start-1,n.end-1),!1),t));return`${t.helperString(q)}(${e})${t.isTS?\" //@ts-ignore\\n\":\"\"} ? ${e}.value ${s} ${i} : ${e}`}if(o){s.start=r.start,s.end=r.end;const{prefix:n,operator:i}=r,o=n?i:\"\",a=n?\"\":i;return`${t.helperString(q)}(${e})${t.isTS?\" //@ts-ignore\\n\":\"\"} ? ${o}${e}.value${a} : ${o}${e}${a}`}return a?e:`${t.helperString($)}(${e})`}if(\"props\"===i)return`__props.${e}`}else{if(i&&i.startsWith(\"setup\"))return`$setup.${e}`;if(i)return`$${i}.${e}`}return`_ctx.${e}`},p=e.content,f=p.indexOf(\"(\")>-1||p.indexOf(\".\")>0;if(oe(p)){const s=t.identifiers[p],i=n.isGloballyWhitelisted(p),o=wt(p);return r||s||i||o?s||(e.constType=o?3:2):(\"setup-const\"===l[e.content]&&(e.constType=1),e.content=u(p)),e}let d;const h=s?` ${p} `:`(${p})${r?\"=>{}\":\"\"}`;try{d=i.parse(h,{plugins:[...t.expressionPlugins,...n.babelParserDefaultPlugins]}).program}catch(r){return t.onError(c(43,e.loc,void 0,r.message)),e}const m=[],y=Object.create(t.identifiers),g=[];o.walk(d,{enter(e,t){if(t&&g.push(t),\"Identifier\"===e.type){if(!(e=>m.some((t=>t.start===e.start)))(e)){if(e.name.startsWith(\"_filter_\"))return;const r=function(e,t,r){if((\"VariableDeclarator\"===t.type||\"ClassDeclaration\"===t.type)&&t.id===e)return!1;if(Ot(t)){if(t.id===e)return!1;if(t.params.includes(e))return!1}return!It(e,t)&&(!(\"ArrayPattern\"===t.type&&!kt(t,r))&&(!!(\"MemberExpression\"!==t.type&&\"OptionalMemberExpression\"!==t.type||t.property!==e||t.computed)&&(\"arguments\"!==e.name&&(!n.isGloballyWhitelisted(e.name)&&\"require\"!==e.name))))}(e,t,g);!y[e.name]&&r?(Ct(t)&&t.shorthand&&(e.prefix=`${e.name}: `),e.name=u(e.name,t,e),m.push(e)):It(e,t)||(r&&y[e.name]||f||(e.isConstant=!0),m.push(e))}}else Ot(e)&&e.params.forEach((t=>o.walk(t,{enter(t,r){if(!(\"Identifier\"!==t.type||It(t,r)||r&&\"AssignmentPattern\"===r.type&&r.right===t)){const{name:r}=t;if(e.scopeIds&&e.scopeIds.has(r))return;r in y?y[r]++:y[r]=1,(e.scopeIds||(e.scopeIds=new Set)).add(r)}}})))},leave(e,t){t&&g.pop(),e!==d.body[0].expression&&e.scopeIds&&e.scopeIds.forEach((e=>{y[e]--,0===y[e]&&delete y[e]}))}});const b=[];let v;return m.sort(((e,t)=>e.start-t.start)),m.forEach(((t,r)=>{const n=t.start-1,s=t.end-1,i=m[r-1],o=p.slice(i?i.end-1:0,n);(o.length||t.prefix)&&b.push(o+(t.prefix||\"\"));const a=p.slice(n,s);b.push(X(t.name,!1,{source:a,start:fe(e.loc.start,a,n),end:fe(e.loc.start,a,s)},t.isConstant?3:0)),r===m.length-1&&s<p.length&&b.push(p.slice(s))})),b.length?v=z(b,e.loc):(v=e,v.constType=f?0:3),v.identifiers=Object.keys(y),v}const Ot=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),Ct=e=>e&&(\"ObjectProperty\"===e.type||\"ObjectMethod\"===e.type)&&!e.computed,It=(e,t)=>Ct(t)&&t.key===e;function kt(e,t){if(e&&(\"ObjectProperty\"===e.type||\"ArrayPattern\"===e.type)){let e=t.length;for(;e--;){const r=t[e];if(\"AssignmentExpression\"===r.type)return!0;if(\"ObjectProperty\"!==r.type&&!r.type.endsWith(\"Pattern\"))break}}return!1}function Nt(e){return n.isString(e)?e:4===e.type?e.content:e.children.map(Nt).join(\"\")}const _t=pt(/^(if|else|else-if)$/,((e,t,r)=>jt(e,t,r,((e,t,n)=>{const s=r.parent.children;let i=s.indexOf(e),o=0;for(;i-- >=0;){const e=s[i];e&&9===e.type&&(o+=e.branches.length)}return()=>{n?e.codegenNode=Lt(t,o,r):(function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode)).alternate=Lt(t,o+e.branches.length-1,r)}}))));function jt(e,t,r,n){if(!(\"else\"===t.name||t.exp&&t.exp.content.trim())){const n=t.exp?t.exp.loc:e.loc;r.onError(c(27,t.loc)),t.exp=X(\"true\",!1,n)}if(r.prefixIdentifiers&&t.exp&&(t.exp=At(t.exp,r)),\"if\"===t.name){const s=Dt(e,t),i={type:9,loc:e.loc,branches:[s]};if(r.replaceNode(i),n)return n(i,s,!0)}else{const s=r.parent.children;let i=s.indexOf(e);for(;i-- >=-1;){const o=s[i];if(!o||2!==o.type||o.content.trim().length){if(o&&9===o.type){r.removeNode();const s=Dt(e,t);{const e=s.userKey;e&&o.branches.forEach((({userKey:t})=>{Bt(t,e)&&r.onError(c(28,s.userKey.loc))}))}o.branches.push(s);const i=n&&n(o,s,!1);ut(s,r),i&&i(),r.currentNode=null}else r.onError(c(29,e.loc));break}r.removeNode(o)}}}function Dt(e,t){return{type:10,loc:e.loc,condition:\"else\"===t.name?void 0:t.exp,children:3!==e.tagType||he(e,\"for\")?[e]:e.children,userKey:me(e,\"key\")}}function Lt(e,t,r){return e.condition?ee(e.condition,Mt(e,t,r),Q(r.helper(v),['\"\"',\"true\"])):Mt(e,t,r)}function Mt(e,t,r){const{helper:s,removeHelper:i}=r,o=Y(\"key\",X(`${t}`,!1,W,2)),{children:a}=e,l=a[0];if(1!==a.length||1!==l.type){if(1===a.length&&11===l.type){const e=l.codegenNode;return xe(e,o,r),e}{let t=64;return n.PatchFlagNames[64],G(r,s(p),J([o]),a,t+\"\",void 0,void 0,!0,!1,e.loc)}}{const e=l.codegenNode;return 13!==e.type||e.isBlock||(i(b),e.isBlock=!0,s(y),s(g)),xe(e,o,r),e}}function Bt(e,t){if(!e||e.type!==t.type)return!1;if(6===e.type){if(e.value.content!==t.value.content)return!1}else{const r=e.exp,n=t.exp;if(r.type!==n.type)return!1;if(4!==r.type||r.isStatic!==n.isStatic||r.content!==n.content)return!1}return!0}const Rt=pt(\"for\",((e,t,r)=>{const{helper:n,removeHelper:s}=r;return Ft(e,t,r,(t=>{const i=Q(n(O),[t.source]),o=me(e,\"key\"),a=o?Y(\"key\",6===o.type?X(o.value.content,!0):o.exp):null;r.prefixIdentifiers&&a&&(a.value=At(a.value,r));const l=4===t.source.type&&t.source.constType>0,u=l?64:o?128:256;return t.codegenNode=G(r,n(p),void 0,i,u+\"\",void 0,void 0,!0,!l,e.loc),()=>{let o;const u=ve(e),{children:f}=t;u&&e.children.some((e=>{if(1===e.type){const t=me(e,\"key\");if(t)return r.onError(c(32,t.loc)),!0}}));const d=1!==f.length||1!==f[0].type,h=Ee(e)?e:u&&1===e.children.length&&Ee(e.children[0])?e.children[0]:null;h?(o=h.codegenNode,u&&a&&xe(o,a,r)):d?o=G(r,n(p),a?J([a]):void 0,e.children,\"64\",void 0,void 0,!0):(o=f[0].codegenNode,u&&a&&xe(o,a,r),o.isBlock!==!l&&(o.isBlock?(s(y),s(g)):s(b)),o.isBlock=!l,o.isBlock?(n(y),n(g)):n(b)),i.arguments.push(Z(Kt(t.parseResult),o,!0))}}))}));function Ft(e,t,r,n){if(!t.exp)return void r.onError(c(30,t.loc));const s=Vt(t.exp,r);if(!s)return void r.onError(c(31,t.loc));const{addIdentifiers:i,removeIdentifiers:o,scopes:a}=r,{source:l,value:u,key:p,index:f}=s,d={type:11,loc:t.loc,source:l,valueAlias:u,keyAlias:p,objectIndexAlias:f,parseResult:s,children:ve(e)?e.children:[e]};r.replaceNode(d),a.vFor++,r.prefixIdentifiers&&(u&&i(u),p&&i(p),f&&i(f));const h=n&&n(d);return()=>{a.vFor--,r.prefixIdentifiers&&(u&&o(u),p&&o(p),f&&o(f)),h&&h()}}const Ut=/([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/,$t=/,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/,qt=/^\\(|\\)$/g;function Vt(e,t){const r=e.loc,n=e.content,s=n.match(Ut);if(!s)return;const[,i,o]=s,a={source:Wt(r,o.trim(),n.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0};t.prefixIdentifiers&&(a.source=At(a.source,t));let l=i.trim().replace(qt,\"\").trim();const c=i.indexOf(l),u=l.match($t);if(u){l=l.replace($t,\"\").trim();const e=u[1].trim();let s;if(e&&(s=n.indexOf(e,c+l.length),a.key=Wt(r,e,s),t.prefixIdentifiers&&(a.key=At(a.key,t,!0))),u[2]){const i=u[2].trim();i&&(a.index=Wt(r,i,n.indexOf(i,a.key?s+e.length:c+l.length)),t.prefixIdentifiers&&(a.index=At(a.index,t,!0)))}}return l&&(a.value=Wt(r,l,c),t.prefixIdentifiers&&(a.value=At(a.value,t,!0))),a}function Wt(e,t,r){return X(t,!1,pe(e,r,t.length))}function Kt({value:e,key:t,index:r}){const n=[];return e&&n.push(e),t&&(e||n.push(X(\"_\",!1)),n.push(t)),r&&(t||(e||n.push(X(\"_\",!1)),n.push(X(\"__\",!1))),n.push(r)),n}const Gt=X(\"undefined\",!1),Ht=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const r=he(e,\"slot\");if(r){const e=r.exp;return t.prefixIdentifiers&&e&&t.addIdentifiers(e),t.scopes.vSlot++,()=>{t.prefixIdentifiers&&e&&t.removeIdentifiers(e),t.scopes.vSlot--}}}},Jt=(e,t)=>{let r;if(ve(e)&&e.props.some(be)&&(r=he(e,\"for\"))){const e=r.parseResult=Vt(r.exp,t);if(e){const{value:r,key:n,index:s}=e,{addIdentifiers:i,removeIdentifiers:o}=t;return r&&i(r),n&&i(n),s&&i(s),()=>{r&&o(r),n&&o(n),s&&o(s)}}}},Yt=(e,t,r)=>Z(e,t,!1,!0,t.length?t[0].loc:r);function Xt(e,t,r=Yt){t.helper(U);const{children:n,loc:s}=e,i=[],o=[];let a=t.scopes.vSlot>0||t.scopes.vFor>0;!t.ssr&&t.prefixIdentifiers&&(a=Te(e,t.identifiers));const l=he(e,\"slot\",!0);if(l){const{arg:e,exp:t}=l;e&&!re(e)&&(a=!0),i.push(Y(e||X(\"default\",!0),r(t,n,s)))}let u=!1,p=!1;const f=[],d=new Set;for(let e=0;e<n.length;e++){const s=n[e];let h;if(!ve(s)||!(h=he(s,\"slot\",!0))){3!==s.type&&f.push(s);continue}if(l){t.onError(c(36,h.loc));break}u=!0;const{children:m,loc:y}=s,{arg:g=X(\"default\",!0),exp:b,loc:v}=h;let E;re(g)?E=g?g.content:\"default\":a=!0;const x=r(b,m,y);let S,T,w;if(S=he(s,\"if\"))a=!0,o.push(ee(S.exp,zt(g,x),Gt));else if(T=he(s,/^else(-if)?$/,!0)){let r,s=e;for(;s--&&(r=n[s],3===r.type););if(r&&ve(r)&&he(r,\"if\")){n.splice(e,1),e--;let t=o[o.length-1];for(;19===t.alternate.type;)t=t.alternate;t.alternate=T.exp?ee(T.exp,zt(g,x),Gt):zt(g,x)}else t.onError(c(29,T.loc))}else if(w=he(s,\"for\")){a=!0;const e=w.parseResult||Vt(w.exp,t);e?o.push(Q(t.helper(O),[e.source,Z(Kt(e),zt(g,x),!0)])):t.onError(c(31,w.loc))}else{if(E){if(d.has(E)){t.onError(c(37,v));continue}d.add(E),\"default\"===E&&(p=!0)}i.push(Y(g,x))}}if(!l){const e=(e,n)=>{const i=r(e,n,s);return t.compatConfig&&(i.isNonScopedSlot=!0),Y(\"default\",i)};u?f.length&&f.some((e=>Zt(e)))&&(p?t.onError(c(38,f[0].loc)):i.push(e(void 0,f))):i.push(e(void 0,n))}const h=a?2:Qt(e.children)?3:1;let m=J(i.concat(Y(\"_\",X(h+\"\",!1))),s);return o.length&&(m=Q(t.helper(I),[m,H(o)])),{slots:m,hasDynamicSlots:a}}function zt(e,t){return J([Y(\"name\",e),Y(\"fn\",t)])}function Qt(e){for(let t=0;t<e.length;t++){const r=e[t];switch(r.type){case 1:if(2===r.tagType||0===r.tagType&&Qt(r.children))return!0;break;case 9:if(Qt(r.branches))return!0;break;case 10:case 11:if(Qt(r.children))return!0}}return!1}function Zt(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():Zt(e.content))}const er=new WeakMap,tr=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:r,props:s}=e,i=1===e.tagType;let o,a,l,c,u,p,m=i?rr(e,t):`\"${r}\"`,y=0,g=n.isObject(m)&&m.callee===T||m===f||m===d||!i&&(\"svg\"===r||\"foreignObject\"===r||me(e,\"key\",!0));if(s.length>0){const r=sr(e,t);o=r.props,y=r.patchFlag,u=r.dynamicPropNames;const n=r.directives;p=n&&n.length?H(n.map((e=>function(e,t){const r=[],n=er.get(e);if(n)r.push(t.helperString(n));else{const n=nr(\"v-\"+e.name,t);n?r.push(n):(t.helper(w),t.directives.add(e.name),r.push(Se(e.name,\"directive\")))}const{loc:s}=e;if(e.exp&&r.push(e.exp),e.arg&&(e.exp||r.push(\"void 0\"),r.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||r.push(\"void 0\"),r.push(\"void 0\"));const t=X(\"true\",!1,s);r.push(J(e.modifiers.map((e=>Y(e,t))),s))}return H(r,e.loc)}(e,t)))):void 0}if(e.children.length>0)if(m===h&&(g=!0,y|=1024),i&&m!==f&&m!==h){const{slots:r,hasDynamicSlots:n}=Xt(e,t);a=r,n&&(y|=1024)}else if(1===e.children.length&&m!==f){const r=e.children[0],n=r.type,s=5===n||8===n;s&&0===st(r,t)&&(y|=1),a=s||2===n?r:e.children}else a=e.children;0!==y&&(l=String(y),u&&u.length&&(c=function(e){let t=\"[\";for(let r=0,n=e.length;r<n;r++)t+=JSON.stringify(e[r]),r<n-1&&(t+=\", \");return t+\"]\"}(u))),e.codegenNode=G(t,m,o,a,l,c,p,!!g,!1,e.loc)};function rr(e,t,r=!1){let{tag:s}=e;const i=ar(s),o=me(e,\"is\");if(o)if(i||Ae(\"COMPILER_IS_ON_ELEMENT\",t)){const e=6===o.type?o.value&&X(o.value.content,!0):o.exp;if(e)return Q(t.helper(T),[e])}else 6===o.type&&o.value.content.startsWith(\"vue:\")&&(s=o.value.content.slice(4));const a=!i&&he(e,\"is\");if(a&&a.exp)return Q(t.helper(T),[a.exp]);const l=se(s)||t.isBuiltInComponent(s);if(l)return r||t.helper(l),l;{const e=nr(s,t);if(e)return e}return t.selfName&&n.capitalize(n.camelize(s))===t.selfName?(t.helper(S),t.components.add(s+\"__self\"),Se(s,\"component\")):(t.helper(S),t.components.add(s),Se(s,\"component\"))}function nr(e,t){const r=t.bindingMetadata;if(!r||!1===r.__isScriptSetup)return;const s=n.camelize(e),i=n.capitalize(s),o=t=>r[e]===t?e:r[s]===t?s:r[i]===t?i:void 0,a=o(\"setup-const\");if(a)return t.inline?a:`$setup[${JSON.stringify(a)}]`;const l=o(\"setup-let\")||o(\"setup-ref\")||o(\"setup-maybe-ref\");return l?t.inline?`${t.helperString($)}(${l})`:`$setup[${JSON.stringify(l)}]`:void 0}function sr(e,t,r=e.props,s=!1){const{tag:i,loc:o}=e,a=1===e.tagType;let l=[];const u=[],p=[];let f=0,d=!1,h=!1,m=!1,y=!1,g=!1,b=!1;const v=[],E=({key:e,value:r})=>{if(re(e)){const s=e.content,i=n.isOn(s);if(a||!i||\"onclick\"===s.toLowerCase()||\"onUpdate:modelValue\"===s||n.isReservedProp(s)||(y=!0),i&&n.isReservedProp(s)&&(b=!0),20===r.type||(4===r.type||8===r.type)&&st(r,t)>0)return;\"ref\"===s?d=!0:\"class\"!==s||a?\"style\"!==s||a?\"key\"===s||v.includes(s)||v.push(s):m=!0:h=!0}else g=!0};for(let f=0;f<r.length;f++){const h=r[f];if(6===h.type){const{loc:e,name:r,value:n}=h;let s=!0;if(\"ref\"===r&&(d=!0,t.inline&&(s=!1)),\"is\"===r&&(ar(i)||n&&n.content.startsWith(\"vue:\")||Ae(\"COMPILER_IS_ON_ELEMENT\",t)))continue;l.push(Y(X(r,!0,pe(e,0,r.length)),X(n?n.content:\"\",s,n?n.loc:e)))}else{const{name:r,arg:f,exp:d,loc:m}=h,y=\"bind\"===r,b=\"on\"===r;if(\"slot\"===r){a||t.onError(c(39,m));continue}if(\"once\"===r)continue;if(\"is\"===r||y&&ye(f,\"is\")&&(ar(i)||Ae(\"COMPILER_IS_ON_ELEMENT\",t)))continue;if(b&&s)continue;if(!f&&(y||b)){if(g=!0,d)if(l.length&&(u.push(J(ir(l),o)),l=[]),y){if(Ae(\"COMPILER_V_BIND_OBJECT_ORDER\",t)){u.unshift(d);continue}u.push(d)}else u.push({type:14,loc:m,callee:t.helper(_),arguments:[d]});else t.onError(c(y?33:34,m));continue}const v=t.directiveTransforms[r];if(v){const{props:r,needRuntime:i}=v(h,e,t);!s&&r.forEach(E),l.push(...r),i&&(p.push(h),n.isSymbol(i)&&er.set(h,i))}else p.push(h)}6===h.type&&\"ref\"===h.name&&t.scopes.vFor>0&&Oe(\"COMPILER_V_FOR_REF\",t,h.loc)&&l.push(Y(X(\"refInFor\",!0),X(\"true\",!1)))}let x;return u.length?(l.length&&u.push(J(ir(l),o)),x=u.length>1?Q(t.helper(N),u,o):u[0]):l.length&&(x=J(ir(l),o)),g?f|=16:(h&&(f|=2),m&&(f|=4),v.length&&(f|=8),y&&(f|=32)),0!==f&&32!==f||!(d||b||p.length>0)||(f|=512),{props:x,directives:p,patchFlag:f,dynamicPropNames:v}}function ir(e){const t=new Map,r=[];for(let n=0;n<e.length;n++){const s=e[n];if(8===s.key.type||!s.key.isStatic){r.push(s);continue}const i=s.key.content,o=t.get(i);o?(\"style\"===i||\"class\"===i||i.startsWith(\"on\"))&&or(o,s):(t.set(i,s),r.push(s))}return r}function or(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=H([e.value,t.value],e.loc)}function ar(e){return e[0].toLowerCase()+e.slice(1)===\"component\"}const lr=/-(\\w)/g,cr=(e=>{const t=Object.create(null);return e=>t[e]||(t[e]=(e=>e.replace(lr,((e,t)=>t?t.toUpperCase():\"\")))(e))})(),ur=(e,t)=>{if(Ee(e)){const{children:r,loc:n}=e,{slotName:s,slotProps:i}=pr(e,t),o=[t.prefixIdentifiers?\"_ctx.$slots\":\"$slots\",s];i&&o.push(i),r.length&&(i||o.push(\"{}\"),o.push(Z([],r,!1,!1,n))),t.scopeId&&!t.slotted&&(i||o.push(\"{}\"),r.length||o.push(\"undefined\"),o.push(\"true\")),e.codegenNode=Q(t.helper(C),o,n)}};function pr(e,t){let r,n='\"default\"';const s=[];for(let t=0;t<e.props.length;t++){const r=e.props[t];6===r.type?r.value&&(\"name\"===r.name?n=JSON.stringify(r.value.content):(r.name=cr(r.name),s.push(r))):\"bind\"===r.name&&ye(r.arg,\"name\")?r.exp&&(n=r.exp):(\"bind\"===r.name&&r.arg&&re(r.arg)&&(r.arg.content=cr(r.arg.content)),s.push(r))}if(s.length>0){const{props:n,directives:i}=sr(e,t,s);r=n,i.length&&t.onError(c(35,i[0].loc))}return{slotName:n,slotProps:r}}const fr=/^\\s*([\\w$_]+|\\([^)]*?\\))\\s*=>|^\\s*function(?:\\s+[\\w$]+)?\\s*\\(/,dr=(e,t,r,s)=>{const{loc:i,modifiers:o,arg:a}=e;let l;if(e.exp||o.length||r.onError(c(34,i)),4===a.type)if(a.isStatic){const e=a.content;l=X(n.toHandlerKey(n.camelize(e)),!0,a.loc)}else l=z([`${r.helperString(L)}(`,a,\")\"]);else l=a,l.children.unshift(`${r.helperString(L)}(`),l.children.push(\")\");let u=e.exp;u&&!u.content.trim()&&(u=void 0);let p=r.cacheHandlers&&!u;if(u){const n=ue(u.content),s=!(n||fr.test(u.content)),i=u.content.includes(\";\");r.prefixIdentifiers&&(s&&r.addIdentifiers(\"$event\"),u=e.exp=At(u,r,!1,i),s&&r.removeIdentifiers(\"$event\"),p=r.cacheHandlers&&!(4===u.type&&u.constType>0)&&!(n&&1===t.tagType)&&!Te(u,r.identifiers),p&&n&&(4===u.type?u.content=`${u.content} && ${u.content}(...args)`:u.children=[...u.children,\" && \",...u.children,\"(...args)\"])),(s||p&&n)&&(u=z([`${s?r.isTS?\"($event: any)\":\"$event\":(r.isTS?\"\\n//@ts-ignore\\n\":\"\")+\"(...args)\"} => ${i?\"{\":\"(\"}`,u,i?\"}\":\")\"]))}let f={props:[Y(l,u||X(\"() => {}\",!1,i))]};return s&&(f=s(f)),p&&(f.props[0].value=r.cache(f.props[0].value)),f},hr=(e,t,r)=>{const{exp:s,modifiers:i,loc:o}=e,a=e.arg;return 4!==a.type?(a.children.unshift(\"(\"),a.children.push(') || \"\"')):a.isStatic||(a.content=`${a.content} || \"\"`),i.includes(\"camel\")&&(4===a.type?a.isStatic?a.content=n.camelize(a.content):a.content=`${r.helperString(j)}(${a.content})`:(a.children.unshift(`${r.helperString(j)}(`),a.children.push(\")\"))),!s||4===s.type&&!s.content.trim()?(r.onError(c(33,o)),{props:[Y(a,X(\"\",!0,o))]}):{props:[Y(a,s)]}},mr=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const r=e.children;let n,s=!1;for(let e=0;e<r.length;e++){const t=r[e];if(ge(t)){s=!0;for(let s=e+1;s<r.length;s++){const i=r[s];if(!ge(i)){n=void 0;break}n||(n=r[e]={type:8,loc:t.loc,children:[t]}),n.children.push(\" + \",i),r.splice(s,1),s--}}}if(s&&(1!==r.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name]))||\"template\"===e.tag)))for(let e=0;e<r.length;e++){const n=r[e];if(ge(n)||8===n.type){const s=[];2===n.type&&\" \"===n.content||s.push(n),t.ssr||0!==st(n,t)||s.push(\"1\"),r[e]={type:12,content:n,loc:n.loc,codegenNode:Q(t.helper(E),s)}}}}},yr=new WeakSet,gr=(e,t)=>{if(1===e.type&&he(e,\"once\",!0)){if(yr.has(e))return;return yr.add(e),t.helper(M),()=>{const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},br=(e,t,r)=>{const{exp:n,arg:s}=e;if(!n)return r.onError(c(40,e.loc)),vr();const i=n.loc.source,o=4===n.type?n.content:i,a=r.bindingMetadata[i],l=r.inline&&a&&\"setup-const\"!==a;if(!o.trim()||!ue(o)&&!l)return r.onError(c(41,n.loc)),vr();if(r.prefixIdentifiers&&oe(o)&&r.identifiers[o])return r.onError(c(42,n.loc)),vr();const u=s||X(\"modelValue\",!0),p=s?re(s)?`onUpdate:${s.content}`:z(['\"onUpdate:\" + ',s]):\"onUpdate:modelValue\";let f;const d=r.isTS?\"($event: any)\":\"$event\";if(l)if(\"setup-ref\"===a)f=z([`${d} => (`,X(i,!1,n.loc),\".value = $event)\"]);else{const e=\"setup-let\"===a?`${i} = $event`:\"null\";f=z([`${d} => (${r.helperString(q)}(${i}) ? `,X(i,!1,n.loc),`.value = $event : ${e})`])}else f=z([`${d} => (`,n,\" = $event)\"]);const h=[Y(u,e.exp),Y(p,f)];if(r.prefixIdentifiers&&r.cacheHandlers&&!Te(n,r.identifiers)&&(h[1].value=r.cache(h[1].value)),e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(oe(e)?e:JSON.stringify(e))+\": true\")).join(\", \"),r=s?re(s)?`${s.content}Modifiers`:z([s,' + \"Modifiers\"']):\"modelModifiers\";h.push(Y(r,X(`{ ${t} }`,!1,e.loc,2)))}return vr(h)};function vr(e=[]){return{props:e}}const Er=/[\\w).+\\-_$\\]]/,xr=(e,t)=>{Ae(\"COMPILER_FILTER\",t)&&(5===e.type&&Sr(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&\"for\"!==e.name&&e.exp&&Sr(e.exp,t)})))};function Sr(e,t){if(4===e.type)Tr(e,t);else for(let r=0;r<e.children.length;r++){const n=e.children[r];\"object\"==typeof n&&(4===n.type?Tr(n,t):8===n.type?Sr(e,t):5===n.type&&Sr(n.content,t))}}function Tr(e,t){const r=e.content;let n,s,i,o,a=!1,l=!1,c=!1,u=!1,p=0,f=0,d=0,h=0,m=[];for(i=0;i<r.length;i++)if(s=n,n=r.charCodeAt(i),a)39===n&&92!==s&&(a=!1);else if(l)34===n&&92!==s&&(l=!1);else if(c)96===n&&92!==s&&(c=!1);else if(u)47===n&&92!==s&&(u=!1);else if(124!==n||124===r.charCodeAt(i+1)||124===r.charCodeAt(i-1)||p||f||d){switch(n){case 34:l=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:p++;break;case 125:p--}if(47===n){let e,t=i-1;for(;t>=0&&(e=r.charAt(t),\" \"===e);t--);e&&Er.test(e)||(u=!0)}}else void 0===o?(h=i+1,o=r.slice(0,i).trim()):y();function y(){m.push(r.slice(h,i).trim()),h=i+1}if(void 0===o?o=r.slice(0,i).trim():0!==h&&y(),m.length){for(i=0;i<m.length;i++)o=wr(o,m[i],t);e.content=o}}function wr(e,t,r){r.helper(P);const n=t.indexOf(\"(\");if(n<0)return r.filters.add(t),`${Se(t,\"filter\")}(${e})`;{const s=t.slice(0,n),i=t.slice(n+1);return r.filters.add(s),`${Se(s,\"filter\")}(${e}${\")\"!==i?\",\"+i:i}`}}function Pr(e){return[[gr,_t,Rt,xr,...e?[Jt,Pt]:[],ur,tr,Ht,mr],{on:dr,bind:hr,model:br}]}t.generateCodeFrame=n.generateCodeFrame,t.BASE_TRANSITION=m,t.CAMELIZE=j,t.CAPITALIZE=D,t.CREATE_BLOCK=g,t.CREATE_COMMENT=v,t.CREATE_SLOTS=I,t.CREATE_STATIC=x,t.CREATE_TEXT=E,t.CREATE_VNODE=b,t.FRAGMENT=p,t.IS_REF=q,t.KEEP_ALIVE=h,t.MERGE_PROPS=N,t.OPEN_BLOCK=y,t.POP_SCOPE_ID=R,t.PUSH_SCOPE_ID=B,t.RENDER_LIST=O,t.RENDER_SLOT=C,t.RESOLVE_COMPONENT=S,t.RESOLVE_DIRECTIVE=w,t.RESOLVE_DYNAMIC_COMPONENT=T,t.RESOLVE_FILTER=P,t.SET_BLOCK_TRACKING=M,t.SUSPENSE=d,t.TELEPORT=f,t.TO_DISPLAY_STRING=k,t.TO_HANDLERS=_,t.TO_HANDLER_KEY=L,t.UNREF=$,t.WITH_CTX=U,t.WITH_DIRECTIVES=A,t.WITH_SCOPE_ID=F,t.advancePositionWithClone=fe,t.advancePositionWithMutation=de,t.assert=function(e,t){if(!e)throw new Error(t||\"unexpected compiler condition\")},t.baseCompile=function(e,t={}){const r=t.onError||a,s=\"module\"===t.mode,i=!0===t.prefixIdentifiers||s;!i&&t.cacheHandlers&&r(c(47)),t.scopeId&&!s&&r(c(48));const o=n.isString(e)?Ne(e,t):e,[l,u]=Pr(i);return ct(o,n.extend({},t,{prefixIdentifiers:i,nodeTransforms:[...l,...t.nodeTransforms||[]],directiveTransforms:n.extend({},u,t.directiveTransforms||{})})),ht(o,n.extend({},t,{prefixIdentifiers:i}))},t.baseParse=Ne,t.buildProps=sr,t.buildSlots=Xt,t.checkCompatEnabled=Oe,t.createArrayExpression=H,t.createAssignmentExpression=function(e,t){return{type:24,left:e,right:t,loc:W}},t.createBlockStatement=function(e){return{type:21,body:e,loc:W}},t.createCacheExpression=te,t.createCallExpression=Q,t.createCompilerError=c,t.createCompoundExpression=z,t.createConditionalExpression=ee,t.createForLoopParams=Kt,t.createFunctionExpression=Z,t.createIfStatement=function(e,t,r){return{type:23,test:e,consequent:t,alternate:r,loc:W}},t.createInterpolation=function(e,t){return{type:5,loc:t,content:n.isString(e)?X(e,!1,t):e}},t.createObjectExpression=J,t.createObjectProperty=Y,t.createReturnStatement=function(e){return{type:26,returns:e,loc:W}},t.createRoot=K,t.createSequenceExpression=function(e){return{type:25,expressions:e,loc:W}},t.createSimpleExpression=X,t.createStructuralDirectiveTransform=pt,t.createTemplateLiteral=function(e){return{type:22,elements:e,loc:W}},t.createTransformContext=lt,t.createVNodeCall=G,t.findDir=he,t.findProp=me,t.generate=ht,t.getBaseTransformPreset=Pr,t.getInnerRange=pe,t.hasDynamicKeyVBind=function(e){return e.props.some((e=>!(7!==e.type||\"bind\"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))},t.hasScopeRef=Te,t.helperNameMap=V,t.injectProp=xe,t.isBindKey=ye,t.isBuiltInType=ne,t.isCoreComponent=se,t.isMemberExpression=ue,t.isSimpleIdentifier=oe,t.isSlotOutlet=Ee,t.isStaticExp=re,t.isTemplateNode=ve,t.isText=ge,t.isVSlot=be,t.locStub=W,t.noopDirectiveTransform=()=>({props:[]}),t.processExpression=At,t.processFor=Ft,t.processIf=jt,t.processSlotOutlet=pr,t.registerRuntimeHelpers=function(e){Object.getOwnPropertySymbols(e).forEach((t=>{V[t]=e[t]}))},t.resolveComponentType=rr,t.toValidAssetId=Se,t.trackSlotScopes=Ht,t.trackVForSlotScopes=Jt,t.transform=ct,t.transformBind=hr,t.transformElement=tr,t.transformExpression=Pt,t.transformModel=br,t.transformOn=dr,t.traverseNode=ut,t.warnDeprecation=function(e,t,r,...n){if(\"suppress-warning\"===Pe(e,t))return;const{message:s,link:i}=we[e],o=`(deprecation ${e}) ${\"function\"==typeof s?s(...n):s}${i?`\\n  Details: ${i}`:\"\"}`,a=new SyntaxError(o);a.code=e,r&&(a.loc=r),t.onWarn(a)}},(e,t,r)=>{\"use strict\";function n(e,t){const r=Object.create(null),n=e.split(\",\");for(let e=0;e<n.length;e++)r[n[e]]=!0;return t?e=>!!r[e.toLowerCase()]:e=>!!r[e]}Object.defineProperty(t,\"__esModule\",{value:!0});const s={1:\"TEXT\",2:\"CLASS\",4:\"STYLE\",8:\"PROPS\",16:\"FULL_PROPS\",32:\"HYDRATE_EVENTS\",64:\"STABLE_FRAGMENT\",128:\"KEYED_FRAGMENT\",256:\"UNKEYED_FRAGMENT\",512:\"NEED_PATCH\",1024:\"DYNAMIC_SLOTS\",2048:\"DEV_ROOT_FRAGMENT\",[-1]:\"HOISTED\",[-2]:\"BAIL\"},i=n(\"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt\"),o=\"itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly\",a=n(o),l=n(o+\",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected\"),c=/[>/=\"'\\u0009\\u000a\\u000c\\u0020]/,u={},p=n(\"animation-iteration-count,border-image-outset,border-image-slice,border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-miterlimit,stroke-opacity,stroke-width\"),f=n(\"accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap\"),d=/;(?![^(]*\\))/g,h=/:(.+)/;function m(e){const t={};return e.split(d).forEach((e=>{if(e){const r=e.split(h);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}const y=n(\"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\"),g=n(\"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\"),b=n(\"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\"),v=/[\"'&<>]/,E=/^-?>|<!--|-->|--!>|<!-$/g;function x(e,t){if(e===t)return!0;let r=I(e),n=I(t);if(r||n)return!(!r||!n)&&e.getTime()===t.getTime();if(r=A(e),n=A(t),r||n)return!(!r||!n)&&function(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=x(e[n],t[n]);return r}(e,t);if(r=_(e),n=_(t),r||n){if(!r||!n)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e){const n=e.hasOwnProperty(r),s=t.hasOwnProperty(r);if(n&&!s||!n&&s||!x(e[r],t[r]))return!1}}return String(e)===String(t)}const S=(e,t)=>O(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,r])=>(e[`${t} =>`]=r,e)),{})}:C(t)?{[`Set(${t.size})`]:[...t.values()]}:!_(t)||A(t)||L(t)?t:String(t),T=/^on[^a-z]/,w=Object.assign,P=Object.prototype.hasOwnProperty,A=Array.isArray,O=e=>\"[object Map]\"===D(e),C=e=>\"[object Set]\"===D(e),I=e=>e instanceof Date,k=e=>\"function\"==typeof e,N=e=>\"string\"==typeof e,_=e=>null!==e&&\"object\"==typeof e,j=Object.prototype.toString,D=e=>j.call(e),L=e=>\"[object Object]\"===D(e),M=n(\",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"),B=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},R=/-(\\w)/g,F=B((e=>e.replace(R,((e,t)=>t?t.toUpperCase():\"\")))),U=/\\B([A-Z])/g,$=B((e=>e.replace(U,\"-$1\").toLowerCase())),q=B((e=>e.charAt(0).toUpperCase()+e.slice(1))),V=B((e=>e?`on${q(e)}`:\"\"));let W;t.EMPTY_ARR=[],t.EMPTY_OBJ={},t.NO=()=>!1,t.NOOP=()=>{},t.PatchFlagNames=s,t.babelParserDefaultPlugins=[\"bigInt\",\"optionalChaining\",\"nullishCoalescingOperator\"],t.camelize=F,t.capitalize=q,t.def=(e,t,r)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r})},t.escapeHtml=function(e){const t=\"\"+e,r=v.exec(t);if(!r)return t;let n,s,i=\"\",o=0;for(s=r.index;s<t.length;s++){switch(t.charCodeAt(s)){case 34:n=\"&quot;\";break;case 38:n=\"&amp;\";break;case 39:n=\"&#39;\";break;case 60:n=\"&lt;\";break;case 62:n=\"&gt;\";break;default:continue}o!==s&&(i+=t.substring(o,s)),o=s+1,i+=n}return o!==s?i+t.substring(o,s):i},t.escapeHtmlComment=function(e){return e.replace(E,\"\")},t.extend=w,t.generateCodeFrame=function(e,t=0,r=e.length){const n=e.split(/\\r?\\n/);let s=0;const i=[];for(let e=0;e<n.length;e++)if(s+=n[e].length+1,s>=t){for(let o=e-2;o<=e+2||r>s;o++){if(o<0||o>=n.length)continue;const a=o+1;i.push(`${a}${\" \".repeat(Math.max(3-String(a).length,0))}|  ${n[o]}`);const l=n[o].length;if(o===e){const e=t-(s-l)+1,n=Math.max(1,r>s?l-e:r-t);i.push(\"   |  \"+\" \".repeat(e)+\"^\".repeat(n))}else if(o>e){if(r>s){const e=Math.max(Math.min(r-s,l),1);i.push(\"   |  \"+\"^\".repeat(e))}s+=l+1}}break}return i.join(\"\\n\")},t.getGlobalThis=()=>W||(W=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==r.g?r.g:{}),t.hasChanged=(e,t)=>e!==t&&(e==e||t==t),t.hasOwn=(e,t)=>P.call(e,t),t.hyphenate=$,t.invokeArrayFns=(e,t)=>{for(let r=0;r<e.length;r++)e[r](t)},t.isArray=A,t.isBooleanAttr=l,t.isDate=I,t.isFunction=k,t.isGloballyWhitelisted=i,t.isHTMLTag=y,t.isIntegerKey=e=>N(e)&&\"NaN\"!==e&&\"-\"!==e[0]&&\"\"+parseInt(e,10)===e,t.isKnownAttr=f,t.isMap=O,t.isModelListener=e=>e.startsWith(\"onUpdate:\"),t.isNoUnitNumericStyleProp=p,t.isObject=_,t.isOn=e=>T.test(e),t.isPlainObject=L,t.isPromise=e=>_(e)&&k(e.then)&&k(e.catch),t.isReservedProp=M,t.isSSRSafeAttrName=function(e){if(u.hasOwnProperty(e))return u[e];const t=c.test(e);return u[e]=!t},t.isSVGTag=g,t.isSet=C,t.isSpecialBooleanAttr=a,t.isString=N,t.isSymbol=e=>\"symbol\"==typeof e,t.isVoidTag=b,t.looseEqual=x,t.looseIndexOf=function(e,t){return e.findIndex((e=>x(e,t)))},t.makeMap=n,t.normalizeClass=function e(t){let r=\"\";if(N(t))r=t;else if(A(t))for(let n=0;n<t.length;n++){const s=e(t[n]);s&&(r+=s+\" \")}else if(_(t))for(const e in t)t[e]&&(r+=e+\" \");return r.trim()},t.normalizeStyle=function e(t){if(A(t)){const r={};for(let n=0;n<t.length;n++){const s=t[n],i=e(N(s)?m(s):s);if(i)for(const e in i)r[e]=i[e]}return r}if(_(t))return t},t.objectToString=j,t.parseStringStyle=m,t.propsToAttrMap={acceptCharset:\"accept-charset\",className:\"class\",htmlFor:\"for\",httpEquiv:\"http-equiv\"},t.remove=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},t.slotFlagsText={1:\"STABLE\",2:\"DYNAMIC\",3:\"FORWARDED\"},t.stringifyStyle=function(e){let t=\"\";if(!e)return t;for(const r in e){const n=e[r],s=r.startsWith(\"--\")?r:$(r);(N(n)||\"number\"==typeof n&&p(s))&&(t+=`${s}:${n};`)}return t},t.toDisplayString=e=>null==e?\"\":_(e)?JSON.stringify(e,S,2):String(e),t.toHandlerKey=V,t.toNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t},t.toRawType=e=>D(e).slice(8,-1),t.toTypeString=D},()=>{},()=>{},(e,t,r)=>{\"use strict\";var n=r(168),s=r(307);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return s.isString(e)&&(e=v(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,l=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,c=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),u=[\"'\"].concat(c),p=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(u),f=[\"/\",\"?\",\"#\"],d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,\"javascript:\":!0},y={javascript:!0,\"javascript:\":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},b=r(511);function v(e,t,r){if(e&&s.isObject(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if(!s.isString(e))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof e);var i=e.indexOf(\"?\"),a=-1!==i&&i<e.indexOf(\"#\")?\"?\":\"#\",c=e.split(a);c[0]=c[0].replace(/\\\\/g,\"/\");var v=e=c.join(a);if(v=v.trim(),!r&&1===e.split(\"#\").length){var E=l.exec(v);if(E)return this.path=v,this.href=v,this.pathname=E[1],E[2]?(this.search=E[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search=\"\",this.query={}),this}var x=o.exec(v);if(x){var S=(x=x[0]).toLowerCase();this.protocol=S,v=v.substr(x.length)}if(r||x||v.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)){var T=\"//\"===v.substr(0,2);!T||x&&y[x]||(v=v.substr(2),this.slashes=!0)}if(!y[x]&&(T||x&&!g[x])){for(var w,P,A=-1,O=0;O<f.length;O++)-1!==(C=v.indexOf(f[O]))&&(-1===A||C<A)&&(A=C);for(-1!==(P=-1===A?v.lastIndexOf(\"@\"):v.lastIndexOf(\"@\",A))&&(w=v.slice(0,P),v=v.slice(P+1),this.auth=decodeURIComponent(w)),A=-1,O=0;O<p.length;O++){var C;-1!==(C=v.indexOf(p[O]))&&(-1===A||C<A)&&(A=C)}-1===A&&(A=v.length),this.host=v.slice(0,A),v=v.slice(A),this.parseHost(),this.hostname=this.hostname||\"\";var I=\"[\"===this.hostname[0]&&\"]\"===this.hostname[this.hostname.length-1];if(!I)for(var k=this.hostname.split(/\\./),N=(O=0,k.length);O<N;O++){var _=k[O];if(_&&!_.match(d)){for(var j=\"\",D=0,L=_.length;D<L;D++)_.charCodeAt(D)>127?j+=\"x\":j+=_[D];if(!j.match(d)){var M=k.slice(0,O),B=k.slice(O+1),R=_.match(h);R&&(M.push(R[1]),B.unshift(R[2])),B.length&&(v=\"/\"+B.join(\".\")+v),this.hostname=M.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=n.toASCII(this.hostname));var F=this.port?\":\"+this.port:\"\",U=this.hostname||\"\";this.host=U+F,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==v[0]&&(v=\"/\"+v))}if(!m[S])for(O=0,N=u.length;O<N;O++){var $=u[O];if(-1!==v.indexOf($)){var q=encodeURIComponent($);q===$&&(q=escape($)),v=v.split($).join(q)}}var V=v.indexOf(\"#\");-1!==V&&(this.hash=v.substr(V),v=v.slice(0,V));var W=v.indexOf(\"?\");if(-1!==W?(this.search=v.substr(W),this.query=v.substr(W+1),t&&(this.query=b.parse(this.query)),v=v.slice(0,W)):t&&(this.search=\"\",this.query={}),v&&(this.pathname=v),g[S]&&this.hostname&&!this.pathname&&(this.pathname=\"/\"),this.pathname||this.search){F=this.pathname||\"\";var K=this.search||\"\";this.path=F+K}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||\"\";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,\":\"),e+=\"@\");var t=this.protocol||\"\",r=this.pathname||\"\",n=this.hash||\"\",i=!1,o=\"\";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(\":\")?this.hostname:\"[\"+this.hostname+\"]\"),this.port&&(i+=\":\"+this.port)),this.query&&s.isObject(this.query)&&Object.keys(this.query).length&&(o=b.stringify(this.query));var a=this.search||o&&\"?\"+o||\"\";return t&&\":\"!==t.substr(-1)&&(t+=\":\"),this.slashes||(!t||g[t])&&!1!==i?(i=\"//\"+(i||\"\"),r&&\"/\"!==r.charAt(0)&&(r=\"/\"+r)):i||(i=\"\"),n&&\"#\"!==n.charAt(0)&&(n=\"#\"+n),a&&\"?\"!==a.charAt(0)&&(a=\"?\"+a),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace(\"#\",\"%23\"))+n},i.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(s.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),o=0;o<n.length;o++){var a=n[o];r[a]=this[a]}if(r.hash=e.hash,\"\"===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];\"protocol\"!==u&&(r[u]=e[u])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname=\"/\"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var p=Object.keys(e),f=0;f<p.length;f++){var d=p[f];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[e.protocol])r.pathname=e.pathname;else{for(var h=(e.pathname||\"\").split(\"/\");h.length&&!(e.host=h.shift()););e.host||(e.host=\"\"),e.hostname||(e.hostname=\"\"),\"\"!==h[0]&&h.unshift(\"\"),h.length<2&&h.unshift(\"\"),r.pathname=h.join(\"/\")}if(r.search=e.search,r.query=e.query,r.host=e.host||\"\",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||\"\",b=r.search||\"\";r.path=m+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&\"/\"===r.pathname.charAt(0),E=e.host||e.pathname&&\"/\"===e.pathname.charAt(0),x=E||v||r.host&&e.pathname,S=x,T=r.pathname&&r.pathname.split(\"/\")||[],w=(h=e.pathname&&e.pathname.split(\"/\")||[],r.protocol&&!g[r.protocol]);if(w&&(r.hostname=\"\",r.port=null,r.host&&(\"\"===T[0]?T[0]=r.host:T.unshift(r.host)),r.host=\"\",e.protocol&&(e.hostname=null,e.port=null,e.host&&(\"\"===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),x=x&&(\"\"===h[0]||\"\"===T[0])),E)r.host=e.host||\"\"===e.host?e.host:r.host,r.hostname=e.hostname||\"\"===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,T=h;else if(h.length)T||(T=[]),T.pop(),T=T.concat(h),r.search=e.search,r.query=e.query;else if(!s.isNullOrUndefined(e.search))return w&&(r.hostname=r.host=T.shift(),(I=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),r.search=e.search,r.query=e.query,s.isNull(r.pathname)&&s.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r;if(!T.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var P=T.slice(-1)[0],A=(r.host||e.host||T.length>1)&&(\".\"===P||\"..\"===P)||\"\"===P,O=0,C=T.length;C>=0;C--)\".\"===(P=T[C])?T.splice(C,1):\"..\"===P?(T.splice(C,1),O++):O&&(T.splice(C,1),O--);if(!x&&!S)for(;O--;O)T.unshift(\"..\");!x||\"\"===T[0]||T[0]&&\"/\"===T[0].charAt(0)||T.unshift(\"\"),A&&\"/\"!==T.join(\"/\").substr(-1)&&T.push(\"\");var I,k=\"\"===T[0]||T[0]&&\"/\"===T[0].charAt(0);return w&&(r.hostname=r.host=k?\"\":T.length?T.shift():\"\",(I=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),(x=x||r.host&&T.length)&&!k&&T.unshift(\"\"),T.length?r.pathname=T.join(\"/\"):(r.pathname=null,r.path=null),s.isNull(r.pathname)&&s.isNull(r.search)||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(\":\"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},(e,t,r)=>{\"use strict\";t.decode=t.parse=r(317),t.encode=t.stringify=r(318)},()=>{},()=>{},()=>{},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=function(e){var t,r,n,s,o,a,l,c,u,p,d,h,m=[],y=e.css.valueOf(),g=y.length,b=-1,v=1,E=0,x=0;function S(t,r){if(!e.safe)throw e.error(\"Unclosed \"+t,v,E-b,E);c=(y+=r).length-1}for(;E<g;){switch((t=y.charCodeAt(E))===i.newline&&(b=E,v+=1),t){case i.space:case i.tab:case i.newline:case i.cr:case i.feed:c=E;do{c+=1,(t=y.charCodeAt(c))===i.newline&&(b=c,v+=1)}while(t===i.space||t===i.newline||t===i.tab||t===i.cr||t===i.feed);h=i.space,n=v,r=c-b-1,x=c;break;case i.plus:case i.greaterThan:case i.tilde:case i.pipe:c=E;do{c+=1,t=y.charCodeAt(c)}while(t===i.plus||t===i.greaterThan||t===i.tilde||t===i.pipe);h=i.combinator,n=v,r=E-b,x=c;break;case i.asterisk:case i.ampersand:case i.bang:case i.comma:case i.equals:case i.dollar:case i.caret:case i.openSquare:case i.closeSquare:case i.colon:case i.semicolon:case i.openParenthesis:case i.closeParenthesis:h=t,n=v,r=E-b,x=(c=E)+1;break;case i.singleQuote:case i.doubleQuote:d=t===i.singleQuote?\"'\":'\"',c=E;do{for(s=!1,-1===(c=y.indexOf(d,c+1))&&S(\"quote\",d),o=c;y.charCodeAt(o-1)===i.backslash;)o-=1,s=!s}while(s);h=i.str,n=v,r=E-b,x=c+1;break;default:t===i.slash&&y.charCodeAt(E+1)===i.asterisk?(0===(c=y.indexOf(\"*/\",E+2)+1)&&S(\"comment\",\"*/\"),(a=(l=y.slice(E,c+1).split(\"\\n\")).length-1)>0?(u=v+a,p=c-l[a].length):(u=v,p=b),h=i.comment,v=u,n=u,r=c-p):t===i.slash?(h=t,n=v,r=E-b,x=(c=E)+1):(c=f(y,E),h=i.word,n=v,r=c-b),x=c+1}m.push([h,v,E-b,n,r,E,x]),p&&(b=p,p=null),E=x}return m},t.FIELDS=void 0;var n,s,i=function(e){if(e&&e.__esModule)return e;if(null===e||\"object\"!=typeof e&&\"function\"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=n?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}(r(328));function o(){if(\"function\"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}for(var a=((n={})[i.tab]=!0,n[i.newline]=!0,n[i.cr]=!0,n[i.feed]=!0,n),l=((s={})[i.space]=!0,s[i.tab]=!0,s[i.newline]=!0,s[i.cr]=!0,s[i.feed]=!0,s[i.ampersand]=!0,s[i.asterisk]=!0,s[i.bang]=!0,s[i.comma]=!0,s[i.colon]=!0,s[i.semicolon]=!0,s[i.openParenthesis]=!0,s[i.closeParenthesis]=!0,s[i.openSquare]=!0,s[i.closeSquare]=!0,s[i.singleQuote]=!0,s[i.doubleQuote]=!0,s[i.plus]=!0,s[i.pipe]=!0,s[i.tilde]=!0,s[i.greaterThan]=!0,s[i.equals]=!0,s[i.dollar]=!0,s[i.caret]=!0,s[i.slash]=!0,s),c={},u=\"0123456789abcdefABCDEF\",p=0;p<u.length;p++)c[u.charCodeAt(p)]=!0;function f(e,t){var r,n=t;do{if(r=e.charCodeAt(n),l[r])return n-1;r===i.backslash?n=d(e,n)+1:n++}while(n<e.length);return n-1}function d(e,t){var r=t,n=e.charCodeAt(r+1);if(a[n]);else if(c[n]){var s=0;do{r++,s++,n=e.charCodeAt(r+1)}while(c[n]&&s<6);s<6&&n===i.space&&r++}else r++;return r}t.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6}},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.universal=t.tag=t.string=t.selector=t.root=t.pseudo=t.nesting=t.id=t.comment=t.combinator=t.className=t.attribute=void 0;var n=m(r(326)),s=m(r(100)),i=m(r(107)),o=m(r(101)),a=m(r(102)),l=m(r(108)),c=m(r(105)),u=m(r(97)),p=m(r(99)),f=m(r(104)),d=m(r(103)),h=m(r(106));function m(e){return e&&e.__esModule?e:{default:e}}t.attribute=function(e){return new n.default(e)},t.className=function(e){return new s.default(e)},t.combinator=function(e){return new i.default(e)},t.comment=function(e){return new o.default(e)},t.id=function(e){return new a.default(e)},t.nesting=function(e){return new l.default(e)},t.pseudo=function(e){return new c.default(e)},t.root=function(e){return new u.default(e)},t.selector=function(e){return new p.default(e)},t.string=function(e){return new f.default(e)},t.tag=function(e){return new d.default(e)},t.universal=function(e){return new h.default(e)}},(e,t,r)=>{\"use strict\";t.__esModule=!0,t.isNode=o,t.isPseudoElement=E,t.isPseudoClass=function(e){return h(e)&&!E(e)},t.isContainer=function(e){return!(!o(e)||!e.walk)},t.isNamespace=function(e){return l(e)||b(e)},t.isUniversal=t.isTag=t.isString=t.isSelector=t.isRoot=t.isPseudo=t.isNesting=t.isIdentifier=t.isComment=t.isCombinator=t.isClassName=t.isAttribute=void 0;var n,s=r(5),i=((n={})[s.ATTRIBUTE]=!0,n[s.CLASS]=!0,n[s.COMBINATOR]=!0,n[s.COMMENT]=!0,n[s.ID]=!0,n[s.NESTING]=!0,n[s.PSEUDO]=!0,n[s.ROOT]=!0,n[s.SELECTOR]=!0,n[s.STRING]=!0,n[s.TAG]=!0,n[s.UNIVERSAL]=!0,n);function o(e){return\"object\"==typeof e&&i[e.type]}function a(e,t){return o(t)&&t.type===e}var l=a.bind(null,s.ATTRIBUTE);t.isAttribute=l;var c=a.bind(null,s.CLASS);t.isClassName=c;var u=a.bind(null,s.COMBINATOR);t.isCombinator=u;var p=a.bind(null,s.COMMENT);t.isComment=p;var f=a.bind(null,s.ID);t.isIdentifier=f;var d=a.bind(null,s.NESTING);t.isNesting=d;var h=a.bind(null,s.PSEUDO);t.isPseudo=h;var m=a.bind(null,s.ROOT);t.isRoot=m;var y=a.bind(null,s.SELECTOR);t.isSelector=y;var g=a.bind(null,s.STRING);t.isString=g;var b=a.bind(null,s.TAG);t.isTag=b;var v=a.bind(null,s.UNIVERSAL);function E(e){return h(e)&&e.value&&(e.value.startsWith(\"::\")||\":before\"===e.value.toLowerCase()||\":after\"===e.value.toLowerCase())}t.isUniversal=v},()=>{},()=>{},()=>{},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.replaceAll=n;var r=/[$#]?[\\w-\\.]+/g;function n(e,t){for(var n=void 0;n=r.exec(t);){var s=e[n[0]];s&&(t=t.slice(0,n.index)+s+t.slice(r.lastIndex),r.lastIndex-=n[0].length-s.length)}return t}t.default=function(e,t){e.walkDecls((function(e){return e.value=n(t,e.value)})),e.walkAtRules(\"media\",(function(e){return e.params=n(t,e.params)}))}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=a(r(84)),s=a(r(523)),i=a(r(8)),o=a(r(332));function a(e){return e&&e.__esModule?e:{default:e}}class l{constructor(e){this.plugins=e||l.defaultPlugins}load(e,t,r,s){let i=new o.default(s,r);return(0,n.default)(this.plugins.concat([i.plugin()])).process(e,{from:\"/\"+t}).then((e=>({injectableSource:e.css,exportTokens:i.exportTokens})))}}const c=(e,t)=>e.length<t.length?e<t.substring(0,e.length)?-1:1:e.length>t.length?e.substring(0,t.length)<=t?-1:1:e<t?-1:1;t.default=class{constructor(e,t){this.root=e,this.sources={},this.traces={},this.importNr=0,this.core=new l(t),this.tokensByFile={}}fetch(e,t,n){let o=e.replace(/^[\"']|[\"']$/g,\"\"),a=n||String.fromCharCode(this.importNr++);return new Promise(((e,n)=>{let l=i.default.dirname(t),c=i.default.resolve(l,o),u=i.default.resolve(i.default.join(this.root,l),o);if(\".\"!==o[0]&&\"/\"!==o[0])try{u=r(524).resolve(o)}catch(e){}const p=this.tokensByFile[u];if(p)return e(p);s.default.readFile(u,\"utf-8\",((t,r)=>{t&&n(t),this.core.load(r,c,a,this.fetch.bind(this)).then((({injectableSource:t,exportTokens:r})=>{this.sources[u]=t,this.traces[a]=u,this.tokensByFile[u]=r,e(r)}),n)}))}))}get finalSource(){const e=this.traces,t=this.sources;let r=new Set;return Object.keys(e).sort(c).map((n=>{const s=e[n];return r.has(s)?null:(r.add(s),t[s])})).join(\"\")}}},()=>{},e=>{function t(e){var t=new Error(\"Cannot find module '\"+e+\"'\");throw t.code=\"MODULE_NOT_FOUND\",t}t.keys=()=>[],t.resolve=t,t.id=524,e.exports=t},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){const n=r.indexOf(`.${e}`),i=r.substr(0,n).split(/[\\r\\n]/).length;return`_${e}_${(0,s.default)(r).toString(36).substr(0,5)}_${i}`};var n,s=(n=r(333))&&n.__esModule?n:{default:n}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return new Promise(((r,s)=>{(0,n.writeFile)(`${e}.json`,JSON.stringify(t),(e=>e?s(e):r(t)))}))};var n=r(527)},()=>{},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.behaviours=void 0,t.getDefaultPlugins=function({behaviour:e,generateScopedName:t,exportGlobals:r}){const a=(0,i.default)({generateScopedName:t,exportGlobals:r});return{[l.LOCAL]:[o.default,n.default,s.default,a],[l.GLOBAL]:[o.default,s.default,a]}[e]},t.isValidBehaviour=function(e){return Object.keys(l).map((e=>l[e])).indexOf(e)>-1};var n=a(r(334)),s=a(r(344)),i=a(r(529)),o=a(r(530));function a(e){return e&&e.__esModule?e:{default:e}}const l=t.behaviours={LOCAL:\"local\",GLOBAL:\"global\"}},()=>{},()=>{},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=(0,r(4).declare)((e=>(e.assertVersion(7),{name:\"syntax-jsx\",manipulateOptions(e,t){t.plugins.some((e=>\"typescript\"===(Array.isArray(e)?e[0]:e)))||t.plugins.push(\"jsx\")}})));t.default=n},(e,t,r)=>{\"use strict\";e.exports=r(533)},e=>{\"use strict\";e.exports=JSON.parse('[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"math\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rb\",\"rp\",\"rt\",\"rtc\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"slot\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"svg\",\"table\",\"tbody\",\"td\",\"template\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"]')},(e,t,r)=>{e.exports=r(535)},e=>{\"use strict\";e.exports=JSON.parse('[\"a\",\"altGlyph\",\"altGlyphDef\",\"altGlyphItem\",\"animate\",\"animateColor\",\"animateMotion\",\"animateTransform\",\"circle\",\"clipPath\",\"color-profile\",\"cursor\",\"defs\",\"desc\",\"ellipse\",\"feBlend\",\"feColorMatrix\",\"feComponentTransfer\",\"feComposite\",\"feConvolveMatrix\",\"feDiffuseLighting\",\"feDisplacementMap\",\"feDistantLight\",\"feFlood\",\"feFuncA\",\"feFuncB\",\"feFuncG\",\"feFuncR\",\"feGaussianBlur\",\"feImage\",\"feMerge\",\"feMergeNode\",\"feMorphology\",\"feOffset\",\"fePointLight\",\"feSpecularLighting\",\"feSpotLight\",\"feTile\",\"feTurbulence\",\"filter\",\"font\",\"font-face\",\"font-face-format\",\"font-face-name\",\"font-face-src\",\"font-face-uri\",\"foreignObject\",\"g\",\"glyph\",\"glyphRef\",\"hkern\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"metadata\",\"missing-glyph\",\"mpath\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"script\",\"set\",\"stop\",\"style\",\"svg\",\"switch\",\"symbol\",\"text\",\"textPath\",\"title\",\"tref\",\"tspan\",\"use\",\"view\",\"vkern\"]')},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=(0,r(4).declare)((e=>(e.assertVersion(7),{name:\"syntax-class-static-block\",manipulateOptions(e,t){t.plugins.push(\"classStaticBlock\")}})));t.default=n},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.buildPrivateNamesMap=function(e){const t=new Map;for(const r of e){const e=r.isPrivate(),n=!r.isProperty(),s=!r.node.static;if(e){const{name:e}=r.node.key.id,i=t.has(e)?t.get(e):{id:r.scope.generateUidIdentifier(e),static:!s,method:n};\"get\"===r.node.kind?i.getId=r.scope.generateUidIdentifier(`get_${e}`):\"set\"===r.node.kind?i.setId=r.scope.generateUidIdentifier(`set_${e}`):\"method\"===r.node.kind&&(i.methodId=r.scope.generateUidIdentifier(e)),t.set(e,i)}}return t},t.buildPrivateNamesNodes=function(e,t,r){const s=[];for(const[i,o]of e){const{static:e,method:l,getId:c,setId:u}=o,p=c||u,f=n.types.cloneNode(o.id);let d;t?d=n.types.callExpression(r.addHelper(\"classPrivateFieldLooseKey\"),[n.types.stringLiteral(i)]):e||(d=n.types.newExpression(n.types.identifier(!l||p?\"WeakMap\":\"WeakSet\"),[])),d&&((0,a.default)(d),s.push(n.template.statement.ast`var ${f} = ${d}`))}return s},t.transformPrivateNamesUsage=function(e,t,r,{privateFieldsAsProperties:n,noDocumentAll:s},o){if(!r.size)return;const a=t.get(\"body\"),l=n?d:f;(0,i.default)(a,u,Object.assign({privateNamesMap:r,classRef:e,file:o},l,{noDocumentAll:s})),a.traverse(p,{privateNamesMap:r,classRef:e,file:o,privateFieldsAsProperties:n})},t.buildFieldsInitNodes=function(e,t,r,s,i,o,a,c,u){let p,f=!1;const d=[],T=[],w=[],A=n.types.isIdentifier(t)?()=>t:()=>(null!=p||(p=r[0].scope.generateUidIdentifierBasedOnNode(t)),p);for(const t of r){l.assertFieldTransformed(t);const r=t.node.static,p=!r,O=t.isPrivate(),C=!O,I=t.isProperty(),k=!I,N=null==t.isStaticBlock?void 0:t.isStaticBlock();if(r||k&&O||N){const r=P(t,e,A,i,N,c,u);f=f||r}switch(!0){case N:d.push(n.template.statement.ast`(() => ${n.types.blockStatement(t.node.body)})()`);break;case r&&O&&I&&a:f=!0,d.push(h(n.types.cloneNode(e),t,s));break;case r&&O&&I&&!a:f=!0,d.push(y(t,s));break;case r&&C&&I&&o:f=!0,d.push(v(n.types.cloneNode(e),t));break;case r&&C&&I&&!o:f=!0,d.push(E(n.types.cloneNode(e),t,i));break;case p&&O&&I&&a:T.push(h(n.types.thisExpression(),t,s));break;case p&&O&&I&&!a:T.push(m(n.types.thisExpression(),t,s));break;case p&&O&&k&&a:T.unshift(g(n.types.thisExpression(),t,s)),w.push(S(t,s,a));break;case p&&O&&k&&!a:T.unshift(b(n.types.thisExpression(),t,s)),w.push(S(t,s,a));break;case r&&O&&k&&!a:f=!0,d.unshift(y(t,s)),w.push(S(t,s,a));break;case r&&O&&k&&a:f=!0,d.unshift(x(n.types.cloneNode(e),t,0,s)),w.push(S(t,s,a));break;case p&&C&&I&&o:T.push(v(n.types.thisExpression(),t));break;case p&&C&&I&&!o:T.push(E(n.types.thisExpression(),t,i));break;default:throw new Error(\"Unreachable.\")}}return{staticNodes:d.filter(Boolean),instanceNodes:T.filter(Boolean),pureStaticNodes:w.filter(Boolean),wrapClass(t){for(const e of r)e.remove();return p&&(t.scope.push({id:n.types.cloneNode(p)}),t.set(\"superClass\",n.types.assignmentExpression(\"=\",p,t.node.superClass))),f?(t.isClassExpression()?(t.scope.push({id:e}),t.replaceWith(n.types.assignmentExpression(\"=\",n.types.cloneNode(e),t.node))):t.node.id||(t.node.id=e),t):t}}};var n=r(9),s=r(70),i=r(258),o=r(259),a=r(347),l=r(538);function c(e){const t=Object.assign({},e,{Class(e){const{privateNamesMap:n}=this,s=e.get(\"body.body\"),i=new Map(n),o=[];for(const e of s){if(!e.isPrivate())continue;const{name:t}=e.node.key.id;i.delete(t),o.push(t)}o.length&&(e.get(\"body\").traverse(r,Object.assign({},this,{redeclared:o})),e.traverse(t,Object.assign({},this,{privateNamesMap:i})),e.skipKey(\"body\"))}}),r=n.traverse.visitors.merge([Object.assign({},e),s.environmentVisitor]);return t}const u=c({PrivateName(e,{noDocumentAll:t}){const{privateNamesMap:r,redeclared:n}=this,{node:s,parentPath:i}=e;if(!i.isMemberExpression({property:s})&&!i.isOptionalMemberExpression({property:s}))return;const{name:o}=s.id;r.has(o)&&(n&&n.includes(o)||this.handle(i,t))}}),p=c({BinaryExpression(e){const{operator:t,left:r,right:s}=e.node;if(\"in\"!==t)return;if(!e.get(\"left\").isPrivateName())return;const{privateFieldsAsProperties:i,privateNamesMap:o,redeclared:a}=this,{name:l}=r.id;if(!o.has(l))return;if(a&&a.includes(l))return;if(i){const{id:t}=o.get(l);return void e.replaceWith(n.template.expression.ast`\n        Object.prototype.hasOwnProperty.call(${s}, ${n.types.cloneNode(t)})\n      `)}const{id:c,static:u}=o.get(l);u?e.replaceWith(n.template.expression.ast`${s} === ${this.classRef}`):e.replaceWith(n.template.expression.ast`${n.types.cloneNode(c)}.has(${s})`)}}),f={memoise(e,t){const{scope:r}=e,{object:n}=e.node,s=r.maybeGenerateMemoised(n);s&&this.memoiser.set(n,s,t)},receiver(e){const{object:t}=e.node;return this.memoiser.has(t)?n.types.cloneNode(this.memoiser.get(t)):n.types.cloneNode(t)},get(e){const{classRef:t,privateNamesMap:r,file:s}=this,{name:i}=e.node.property.id,{id:o,static:a,method:l,methodId:c,getId:u,setId:p}=r.get(i),f=u||p;if(a){const r=l&&!f?\"classStaticPrivateMethodGet\":\"classStaticPrivateFieldSpecGet\";return n.types.callExpression(s.addHelper(r),[this.receiver(e),n.types.cloneNode(t),n.types.cloneNode(o)])}return l?f?!u&&p&&s.availableHelper(\"writeOnlyError\")?n.types.sequenceExpression([this.receiver(e),n.types.callExpression(s.addHelper(\"writeOnlyError\"),[n.types.stringLiteral(`#${i}`)])]):n.types.callExpression(s.addHelper(\"classPrivateFieldGet\"),[this.receiver(e),n.types.cloneNode(o)]):n.types.callExpression(s.addHelper(\"classPrivateMethodGet\"),[this.receiver(e),n.types.cloneNode(o),n.types.cloneNode(c)]):n.types.callExpression(s.addHelper(\"classPrivateFieldGet\"),[this.receiver(e),n.types.cloneNode(o)])},boundGet(e){return this.memoise(e,1),n.types.callExpression(n.types.memberExpression(this.get(e),n.types.identifier(\"bind\")),[this.receiver(e)])},set(e,t){const{classRef:r,privateNamesMap:s,file:i}=this,{name:o}=e.node.property.id,{id:a,static:l,method:c,setId:u,getId:p}=s.get(o);if(l){const s=!c||p||u?\"classStaticPrivateFieldSpecSet\":\"classStaticPrivateMethodSet\";return n.types.callExpression(i.addHelper(s),[this.receiver(e),n.types.cloneNode(r),n.types.cloneNode(a),t])}return c?u?n.types.callExpression(i.addHelper(\"classPrivateFieldSet\"),[this.receiver(e),n.types.cloneNode(a),t]):n.types.sequenceExpression([this.receiver(e),t,n.types.callExpression(i.addHelper(\"readOnlyError\"),[n.types.stringLiteral(`#${o}`)])]):n.types.callExpression(i.addHelper(\"classPrivateFieldSet\"),[this.receiver(e),n.types.cloneNode(a),t])},destructureSet(e){const{classRef:t,privateNamesMap:r,file:s}=this,{name:i}=e.node.property.id,{id:o,static:a}=r.get(i);if(a){try{var l=s.addHelper(\"classStaticPrivateFieldDestructureSet\")}catch(e){throw new Error(\"Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \\nplease update @babel/helpers to the latest version.\")}return n.types.memberExpression(n.types.callExpression(l,[this.receiver(e),n.types.cloneNode(t),n.types.cloneNode(o)]),n.types.identifier(\"value\"))}return n.types.memberExpression(n.types.callExpression(s.addHelper(\"classPrivateFieldDestructureSet\"),[this.receiver(e),n.types.cloneNode(o)]),n.types.identifier(\"value\"))},call(e,t){return this.memoise(e,1),(0,o.default)(this.get(e),this.receiver(e),t,!1)},optionalCall(e,t){return this.memoise(e,1),(0,o.default)(this.get(e),this.receiver(e),t,!0)}},d={get(e){const{privateNamesMap:t,file:r}=this,{object:s}=e.node,{name:i}=e.node.property.id;return n.template.expression`BASE(REF, PROP)[PROP]`({BASE:r.addHelper(\"classPrivateFieldLooseBase\"),REF:n.types.cloneNode(s),PROP:n.types.cloneNode(t.get(i).id)})},boundGet(e){return n.types.callExpression(n.types.memberExpression(this.get(e),n.types.identifier(\"bind\")),[n.types.cloneNode(e.node.object)])},simpleSet(e){return this.get(e)},destructureSet(e){return this.get(e)},call(e,t){return n.types.callExpression(this.get(e),t)},optionalCall(e,t){return n.types.optionalCallExpression(this.get(e),t,!0)}};function h(e,t,r){const{id:s}=r.get(t.node.key.id.name),i=t.node.value||t.scope.buildUndefinedNode();return n.template.statement.ast`\n    Object.defineProperty(${e}, ${n.types.cloneNode(s)}, {\n      // configurable is false by default\n      // enumerable is false by default\n      writable: true,\n      value: ${i}\n    });\n  `}function m(e,t,r){const{id:s}=r.get(t.node.key.id.name),i=t.node.value||t.scope.buildUndefinedNode();return n.template.statement.ast`${n.types.cloneNode(s)}.set(${e}, {\n    // configurable is always false for private elements\n    // enumerable is always false for private elements\n    writable: true,\n    value: ${i},\n  })`}function y(e,t){const r=t.get(e.node.key.id.name),{id:s,getId:i,setId:o,initAdded:a}=r,l=i||o;if(!e.isProperty()&&(a||!l))return;if(l)return t.set(e.node.key.id.name,Object.assign({},r,{initAdded:!0})),n.template.statement.ast`\n      var ${n.types.cloneNode(s)} = {\n        // configurable is false by default\n        // enumerable is false by default\n        // writable is false by default\n        get: ${i?i.name:e.scope.buildUndefinedNode()},\n        set: ${o?o.name:e.scope.buildUndefinedNode()}\n      }\n    `;const c=e.node.value||e.scope.buildUndefinedNode();return n.template.statement.ast`\n    var ${n.types.cloneNode(s)} = {\n      // configurable is false by default\n      // enumerable is false by default\n      writable: true,\n      value: ${c}\n    };\n  `}function g(e,t,r){const s=r.get(t.node.key.id.name),{methodId:i,id:o,getId:a,setId:l,initAdded:c}=s;if(!c)return i?n.template.statement.ast`\n        Object.defineProperty(${e}, ${o}, {\n          // configurable is false by default\n          // enumerable is false by default\n          // writable is false by default\n          value: ${i.name}\n        });\n      `:a||l?(r.set(t.node.key.id.name,Object.assign({},s,{initAdded:!0})),n.template.statement.ast`\n      Object.defineProperty(${e}, ${o}, {\n        // configurable is false by default\n        // enumerable is false by default\n        // writable is false by default\n        get: ${a?a.name:t.scope.buildUndefinedNode()},\n        set: ${l?l.name:t.scope.buildUndefinedNode()}\n      });\n    `):void 0}function b(e,t,r){const s=r.get(t.node.key.id.name),{id:i,getId:o,setId:a,initAdded:l}=s;if(!l)return o||a?(r.set(t.node.key.id.name,Object.assign({},s,{initAdded:!0})),n.template.statement.ast`\n      ${i}.set(${e}, {\n        get: ${o?o.name:t.scope.buildUndefinedNode()},\n        set: ${a?a.name:t.scope.buildUndefinedNode()}\n      });\n    `):n.template.statement.ast`${i}.add(${e})`}function v(e,t){const{key:r,computed:s}=t.node,i=t.node.value||t.scope.buildUndefinedNode();return n.types.expressionStatement(n.types.assignmentExpression(\"=\",n.types.memberExpression(e,r,s||n.types.isLiteral(r)),i))}function E(e,t,r){const{key:s,computed:i}=t.node,o=t.node.value||t.scope.buildUndefinedNode();return n.types.expressionStatement(n.types.callExpression(r.addHelper(\"defineProperty\"),[e,i||n.types.isLiteral(s)?s:n.types.stringLiteral(s.name),o]))}function x(e,t,r,s){const i=s.get(t.node.key.id.name),{id:o,methodId:a,getId:l,setId:c,initAdded:u}=i;if(!u)return l||c?(s.set(t.node.key.id.name,Object.assign({},i,{initAdded:!0})),n.template.statement.ast`\n      Object.defineProperty(${e}, ${o}, {\n        // configurable is false by default\n        // enumerable is false by default\n        // writable is false by default\n        get: ${l?l.name:t.scope.buildUndefinedNode()},\n        set: ${c?c.name:t.scope.buildUndefinedNode()}\n      })\n    `):n.template.statement.ast`\n    Object.defineProperty(${e}, ${o}, {\n      // configurable is false by default\n      // enumerable is false by default\n      // writable is false by default\n      value: ${a.name}\n    });\n  `}function S(e,t,r=!1){const s=t.get(e.node.key.id.name),{id:i,methodId:o,getId:a,setId:l,getterDeclared:c,setterDeclared:u,static:p}=s,{params:f,body:d,generator:h,async:m}=e.node,y=a&&!c&&0===f.length,g=l&&!u&&f.length>0;let b=o;return y?(t.set(e.node.key.id.name,Object.assign({},s,{getterDeclared:!0})),b=a):g?(t.set(e.node.key.id.name,Object.assign({},s,{setterDeclared:!0})),b=l):p&&!r&&(b=i),n.types.functionDeclaration(n.types.cloneNode(b),f,d,h,m)}const T=n.traverse.visitors.merge([{ThisExpression(e,t){t.needsClassRef=!0,e.replaceWith(n.types.cloneNode(t.classRef))}},s.environmentVisitor]),w={ReferencedIdentifier(e,t){e.scope.bindingIdentifierEquals(e.node.name,t.innerBinding)&&(t.needsClassRef=!0,e.node.name=t.classRef.name)}};function P(e,t,r,i,o,a,l){var c;const u={classRef:t,needsClassRef:!1,innerBinding:l};return new s.default({methodPath:e,constantSuper:a,file:i,refToPreserve:t,getSuperRef:r,getObjectRef:()=>(u.needsClassRef=!0,o||e.node.static?t:n.types.memberExpression(t,n.types.identifier(\"prototype\")))}).replace(),(o||e.isProperty())&&e.traverse(T,u),null!=(c=u.classRef)&&c.name&&u.classRef.name!==(null==l?void 0:l.name)&&e.traverse(w,u),u.needsClassRef}},(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.assertFieldTransformed=function(e){if(e.node.declare)throw e.buildCodeFrameError(\"TypeScript 'declare' fields must first be transformed by @babel/plugin-transform-typescript.\\nIf you have already enabled that plugin (or '@babel/preset-typescript'), make sure that it runs before any plugin related to additional class features:\\n - @babel/plugin-proposal-class-properties\\n - @babel/plugin-proposal-private-methods\\n - @babel/plugin-proposal-decorators\")}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.injectInitialization=function(e,t,r,s){if(!r.length)return;const a=!!e.node.superClass;if(!t){const r=n.types.classMethod(\"constructor\",n.types.identifier(\"constructor\"),[],n.types.blockStatement([]));a&&(r.params=[n.types.restElement(n.types.identifier(\"args\"))],r.body.body.push(n.template.statement.ast`super(...args)`)),[t]=e.get(\"body\").unshiftContainer(\"body\",r)}if(s&&s(o,{scope:t.scope}),a){const e=[];t.traverse(i,e);let s=!0;for(const t of e)s?(t.insertAfter(r),s=!1):t.insertAfter(r.map((e=>n.types.cloneNode(e))))}else t.get(\"body\").unshiftContainer(\"body\",r)},t.extractComputedKeys=function(e,t,r,s){const i=[],o={classBinding:t.node.id&&t.scope.getBinding(t.node.id.name),file:s};for(const e of r){const r=e.get(\"key\");r.isReferencedIdentifier()?a(r,o):r.traverse(l,o);const s=e.node;if(!r.isConstantExpression()){const e=t.scope.generateUidIdentifierBasedOnNode(s.key);t.scope.push({id:e,kind:\"let\"}),i.push(n.types.expressionStatement(n.types.assignmentExpression(\"=\",n.types.cloneNode(e),s.key))),s.key=n.types.cloneNode(e)}}return i};var n=r(9),s=r(70);const i=n.traverse.visitors.merge([{Super(e){const{node:t,parentPath:r}=e;r.isCallExpression({callee:t})&&this.push(r)}},s.environmentVisitor]),o={\"TSTypeAnnotation|TypeAnnotation\"(e){e.skip()},ReferencedIdentifier(e){this.scope.hasOwnBinding(e.node.name)&&(this.scope.rename(e.node.name),e.skip())}};function a(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const r=t.file.addHelper(\"classNameTDZError\"),s=n.types.callExpression(r,[n.types.stringLiteral(e.node.name)]);e.replaceWith(n.types.sequenceExpression([s,e.node])),e.skip()}}const l={ReferencedIdentifier:a}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.enableFeature=function(e,t,r){let n,s;c(e,t)&&!f(e,t)||(e.set(o,e.get(o)|t),\"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error\"===r?(p(e,t,!0),e.set(l,e.get(l)|t)):\"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error\"===r?(p(e,t,!1),e.set(l,e.get(l)|t)):p(e,t,r));for(const[t,r]of i){if(!c(e,t))continue;const i=u(e,t);if(!f(e,t)){if(n===!i)throw new Error(\"'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled).\");n=i,s=r}}if(void 0!==n)for(const[t,r]of i)c(e,t)&&u(e,t)!==n&&p(e,t,n)},t.isLoose=u,t.verifyUsedFeatures=function(e,t){if((0,n.hasOwnDecorators)(e.node)){if(!c(t,s.decorators))throw e.buildCodeFrameError('Decorators are not enabled.\\nIf you are using [\"@babel/plugin-proposal-decorators\", { \"legacy\": true }], make sure it comes *before* \"@babel/plugin-proposal-class-properties\" and enable loose mode, like so:\\n\\t[\"@babel/plugin-proposal-decorators\", { \"legacy\": true }]\\n\\t[\"@babel/plugin-proposal-class-properties\", { \"loose\": true }]');if(e.isPrivate())throw e.buildCodeFrameError(`Private ${e.isClassMethod()?\"methods\":\"fields\"} in decorated classes are not supported yet.`)}if(null!=e.isPrivateMethod&&e.isPrivateMethod()&&!c(t,s.privateMethods))throw e.buildCodeFrameError(\"Class private methods are not enabled.\");if(e.isPrivateName()&&e.parentPath.isBinaryExpression({operator:\"in\",left:e.node})&&!c(t,s.privateIn))throw e.buildCodeFrameError(\"Private property in checks are not enabled.\");if(e.isProperty()&&!c(t,s.fields))throw e.buildCodeFrameError(\"Class fields are not enabled.\");if(null!=e.isStaticBlock&&e.isStaticBlock()&&!c(t,s.staticBlocks))throw e.buildCodeFrameError(\"Static class blocks are not enabled. Please add `@babel/plugin-proposal-class-static-block` to your configuration.\")},t.FEATURES=void 0;var n=r(311);const s=Object.freeze({fields:2,privateMethods:4,decorators:8,privateIn:16,staticBlocks:32});t.FEATURES=s;const i=new Map([[s.fields,\"@babel/plugin-proposal-class-properties\"],[s.privateMethods,\"@babel/plugin-proposal-private-methods\"],[s.privateIn,\"@babel/plugin-proposal-private-property-in-object\"]]),o=\"@babel/plugin-class-features/featuresKey\",a=\"@babel/plugin-class-features/looseKey\",l=\"@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing\";function c(e,t){return!!(e.get(o)&t)}function u(e,t){return!!(e.get(a)&t)}function p(e,t,r){r?e.set(a,e.get(a)|t):e.set(a,e.get(a)&~t),e.set(l,e.get(l)&~t)}function f(e,t){return!!(e.get(l)&t)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=(0,r(4).declare)((e=>(e.assertVersion(7),{name:\"syntax-private-property-in-object\",manipulateOptions(e,t){t.plugins.push(\"privateIn\")}})));t.default=n},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=(0,r(4).declare)((e=>(e.assertVersion(7),{name:\"syntax-logical-assignment-operators\",manipulateOptions(e,t){t.plugins.push(\"logicalAssignment\")}})));t.default=n},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=(0,r(4).declare)((e=>(e.assertVersion(7),{name:\"syntax-nullish-coalescing-operator\",manipulateOptions(e,t){t.plugins.push(\"nullishCoalescingOperator\")}})));t.default=n},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=(0,r(4).declare)((e=>(e.assertVersion(7),{name:\"syntax-optional-chaining\",manipulateOptions(e,t){t.plugins.push(\"optionalChaining\")}})));t.default=n},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.isTransparentExprWrapper=s,t.skipTransparentExprWrappers=function(e){for(;s(e.node);)e=e.get(\"expression\");return e};var n=r(0);function s(e){return n.isTSAsExpression(e)||n.isTSTypeAssertion(e)||n.isTSNonNullExpression(e)||n.isTypeCastExpression(e)||n.isParenthesizedExpression(e)}},(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=(0,r(4).declare)((e=>(e.assertVersion(7),{name:\"syntax-export-namespace-from\",manipulateOptions(e,t){t.plugins.push(\"exportNamespaceFrom\")}})));t.default=n}],t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(355),r(361)})()}));\n//# sourceMappingURL=vue3-sfc-loader.js.map\n"
  },
  {
    "path": "frontend/src/main.ts",
    "content": "import 'crawlab-ui/dist/style.css';\nimport 'vue';\nimport {createApp} from 'crawlab-ui';\n\n(async function () {\n  await createApp();\n})();\n"
  },
  {
    "path": "frontend/src/shims-vue.d.ts",
    "content": "declare module '*.scss';\ndeclare module '*.vue' {\n  import {DefineComponent} from 'vue';\n  const component: DefineComponent<{}, {}, any>;\n  export default component;\n}\n"
  },
  {
    "path": "frontend/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"declaration\": true,\n    \"target\": \"esnext\",\n    \"module\": \"esnext\",\n    \"strict\": true,\n    \"jsx\": \"preserve\",\n    \"importHelpers\": true,\n    \"moduleResolution\": \"node\",\n    \"skipLibCheck\": true,\n    \"esModuleInterop\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"sourceMap\": true,\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\n        \"src/*\"\n      ]\n    },\n    \"lib\": [\n      \"esnext\",\n      \"dom\",\n      \"dom.iterable\",\n      \"scripthost\"\n    ],\n    \"typeRoots\": [\n      \"src/interfaces\"\n    ]\n  },\n  \"include\": [\n    \"src/shims-vue.d.ts\",\n    \"src/**/*.ts\",\n    \"src/**/*.tsx\",\n    \"src/**/*.vue\",\n    \"__test__/**/*.spec.ts\"\n  ],\n  \"exclude\": [\n    \"node_modules\",\n    \"src/**/*.js\"\n  ]\n}\n"
  },
  {
    "path": "frontend/vite.config.ts",
    "content": "import {resolve} from 'path';\nimport {defineConfig, splitVendorChunkPlugin} from 'vite';\nimport vue from '@vitejs/plugin-vue';\nimport dynamicImport from 'vite-plugin-dynamic-import';\nimport {visualizer} from 'rollup-plugin-visualizer';\nimport externalGlobals from 'rollup-plugin-external-globals';\nimport {externalizeDeps} from 'vite-plugin-externalize-deps';\n\nexport default defineConfig({\n  build: {\n    rollupOptions: {\n      output: {\n        manualChunks: (id) => {\n          if (id.includes('node_modules')) {\n            if (id.includes('@fortawesome')) return '@fortawesome';\n            if (id.includes('element-plus')) return 'element-plus';\n            if (id.includes('zrender')) return 'zrender';\n            if (id.includes('echarts')) return 'echarts';\n            if (id.includes('codemirror')) return 'codemirror';\n            if (id.includes('atom-material-icons')) return 'atom-material-icons';\n            if (id.includes('crawlab-ui')) return 'crawlab-ui';;\n            return 'vendor.[hash]';\n          }\n        }\n      },\n      external: [\n        // 'codemirror',\n        // 'echarts',\n      ],\n      plugins: [\n        // @ts-ignore\n        // externalGlobals({\n        //   // codemirror: 'CodeMirror',\n        //   echarts: 'echarts',\n        // })\n      ],\n    }\n  },\n  resolve: {\n    dedupe: ['vue', 'element-plus', 'codemirror'],\n    alias: [\n      {find: '@', replacement: resolve(__dirname, 'src')},\n    ],\n    extensions: [\n      '.js',\n      '.ts',\n      '.jsx',\n      '.tsx',\n      '.json',\n      '.vue',\n      '.scss',\n    ]\n  },\n  plugins: [\n    vue(),\n    dynamicImport(),\n    // splitVendorChunkPlugin(),\n    // externalizeDeps(),\n    // @ts-ignore\n    visualizer({\n      open: true,\n      // open: false,\n    }),\n  ],\n  server: {\n    cors: true,\n  },\n});\n"
  },
  {
    "path": "frontend/vue.config.js",
    "content": "const path = require(\"path\")\nconst CopyWebpackPlugin = require('copy-webpack-plugin')\nconst BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin\n\nconst alias = {\n  'crawlab-ui$': 'crawlab-ui/dist/crawlab-ui.umd.min.js',\n  'element-plus$': 'element-plus/dist/index.full.min.js',\n  'echarts$': 'echarts/dist/echarts.min.js',\n  'codemirror$': 'codemirror/lib/codemirror.js',\n}\n\nconst optimization = {\n  splitChunks: {\n    chunks: 'initial',\n    minSize: 20000,\n    minChunks: 1,\n    maxAsyncRequests: 3,\n    cacheGroups: {\n      defaultVendors: {\n        test: /[\\\\/]node_modules[\\\\/]/,\n        priority: -10,\n        reuseExistingChunk: true,\n      },\n      default: {\n        minChunks: 2,\n        priority: -20,\n        reuseExistingChunk: true,\n      },\n    },\n  },\n}\n\nconst config = {\n  pages: {\n    index: {\n      entry: 'src/main.ts',\n      template: 'public/index.html',\n      filename: 'index.html',\n      title: 'Crawlab | Distributed Web Crawler Platform'\n    }\n  },\n  outputDir: './dist',\n  configureWebpack: {\n    optimization,\n    resolve: {\n      alias,\n    },\n    plugins: []\n  }\n}\n\nif (['development', 'local'].includes(process.env.NODE_ENV)) {\n  // do nothing\n} else if (['production', 'docker'].includes(process.env.NODE_ENV)) {\n  config.configureWebpack.plugins.push(new CopyWebpackPlugin({\n    patterns: [\n      {\n        from: path.resolve(__dirname, 'public/js'),\n      }\n    ]\n  }))\n} else if (['analyze'].includes(process.env.NODE_ENV)) {\n  config.configureWebpack.plugins.push(new BundleAnalyzerPlugin({\n    analyzePort: 8890,\n  }))\n}\n\nmodule.exports = config\n"
  },
  {
    "path": "fs/.editorconfig",
    "content": "root = true\n\n[*.go]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = tab\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": "fs/.github/workflows/test.yml",
    "content": "name: Test and coverage\n\non: [ push, pull_request ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n      - name: Setup Go environment\n        uses: actions/setup-go@v2.1.3\n        with:\n          # The Go version to download (if necessary) and use. Supports semver spec and ranges.\n          go-version: 1.15\n\n#      - name: Download Binary Files\n#        run: |\n#          mkdir -p $GITHUB_WORKSPACE/seaweedfs\n#          curl https://github.com/chrislusf/seaweedfs/releases/download/2.48/linux_amd64.tar.gz -o $GITHUB_WORKSPACE/seaweedfs/linux_amd64.tar.gz\n#          cd $GITHUB_WORKSPACE/seaweedfs\n#          ls -l\n#          tar -zxf linux_amd64.tar.gz\n      - name: Download Binary Files\n        uses: fabriciobastian/download-release-asset-action@v1.0.6\n        with:\n          # A specific release version. Defaults to latest\n          version: 2.48 # default is latest\n          # Relative path to the repository in the format user/repo e.g.: myuser/my-repository\n          repository: chrislusf/seaweedfs # default is\n          # The name of the asset to download from the release\n          file: linux_amd64.tar.gz\n          # Path to the directory where to download the asset\n          out: seaweedfs # optional, default is .\n\n      - name: Extract Binary Files\n        run: |\n          cd $GITHUB_WORKSPACE/seaweedfs\n          tar -zxf linux_amd64.tar.gz\n\n      - name: Validate Binary Files\n        run: |\n          cd $GITHUB_WORKSPACE/seaweedfs\n          ls -l weed\n\n      - name: Run Tests\n        run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg github.com/crawlab-team/crawlab/fs\n\n      - name: Codecov\n        uses: codecov/codecov-action@v1.5.0\n        with:\n          # Repository upload token - get it from codecov.io. Required only for private repositories\n          token: ${{ secrets.CODECOV_TOKEN }}\n          # Comma-separated list of files to upload\n"
  },
  {
    "path": "fs/.gitignore",
    "content": "# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built with `go test -c`\n*.test\n\n# Output of the go coverage tool, specifically when used with LiteIDE\n*.out\n\n# Dependency directories (remove the comment below to include it)\nvendor/\ntmp/\n.idea/\n.DS_Store\ncoverage.txt\n\nfilerldb2\nseaweedfs\n*.txt"
  },
  {
    "path": "fs/Dockerfile",
    "content": "FROM golang:1.15\n\nWORKDIR /app\nADD ./go.mod /app\nADD ./go.sum /app\nRUN go mod download\n\nCMD [\"sh\", \"./bin/test.sh\"]\n"
  },
  {
    "path": "fs/LICENSE",
    "content": "BSD 3-Clause License\n\nCopyright (c) 2020, Crawlab Team\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "fs/README.md",
    "content": "# crawlab-fs\n\n[![codecov](https://codecov.io/gh/crawlab-team/crawlab-fs/branch/main/graph/badge.svg?token=KOXJPXWAKI)](https://codecov.io/gh/crawlab-team/crawlab-fs)\n\nBackend file system module for Crawlab\n"
  },
  {
    "path": "fs/bin/start.sh",
    "content": "#!/bin/sh\nif [ -e ./tmp ]; then\n  :\nelse\n  mkdir ./tmp\nfi\n\nif [ -x /usr/local/bin/weed ]; then\n  weed server \\\n    -dir ./tmp \\\n    -master.dir ./tmp \\\n    -volume.dir.idx ./tmp \\\n    -ip localhost \\\n    -ip.bind 0.0.0.0 \\\n    -filer\nelse\n  ./seaweedfs/weed server \\\n    -dir ./tmp \\\n    -master.dir ./tmp \\\n    -volume.dir.idx ./tmp \\\n    -ip localhost \\\n    -ip.bind 0.0.0.0 \\\n    -filer\nfi\n"
  },
  {
    "path": "fs/bin/stop.sh",
    "content": "#!/bin/sh\n\nkill -9 `ps axu|grep weed|grep -v grep|awk '{print \\$2}'|xargs`"
  },
  {
    "path": "fs/constants.go",
    "content": "package fs\n\nimport \"os\"\n\nconst (\n\tFilerResponseNotFoundErrorMessage = \"response status code: 404\"\n\tFilerStatusNotFoundErrorMessage   = \"Status:404 Not Found\"\n)\n\nconst (\n\tDefaultDirMode  = os.FileMode(0766)\n\tDefaultFileMode = os.FileMode(0666)\n)\n\nconst (\n\tMethodUpdateFile = \"update-file\"\n\tMethodUploadFile = \"upload-file\"\n\tMethodUploadDir  = \"upload-dir\"\n)\n"
  },
  {
    "path": "fs/docker-compose.yml",
    "content": "version: '2'\n\nservices:\n  server:\n    image: chrislusf/seaweedfs # use a remote image\n    container_name: seaweedfs-server\n    restart: always\n#    command: \"server -dir /data -master.dir /data -volume.dir.idx /data -ip localhost -ip.bind 0.0.0.0 -filer -encryptVolumeData\"\n    command: \"server -dir /data -master.dir /data -volume.dir.idx /data -ip localhost -ip.bind 0.0.0.0 -filer\"\n    ports:\n      - 8888:8888\n    #volumes:\n    #  - /data/seaweedfs:/data\n"
  },
  {
    "path": "fs/errors.go",
    "content": "package fs\n\nimport \"errors\"\n\nvar ErrorFsNotExists = errors.New(\"not exists\")\n"
  },
  {
    "path": "fs/go.mod",
    "content": "module github.com/crawlab-team/crawlab/fs\n\ngo 1.22\n\nreplace github.com/crawlab-team/crawlab/trace => ../trace\n\nrequire (\n\tgithub.com/apex/log v1.9.0\n\tgithub.com/cenkalti/backoff/v4 v4.3.0\n\tgithub.com/crawlab-team/crawlab/trace v0.0.0-20240614095218-7b4ee8399ab0\n\tgithub.com/crawlab-team/goseaweedfs v0.6.3\n\tgithub.com/emirpasic/gods v1.18.1\n\tgithub.com/google/uuid v1.6.0\n\tgithub.com/stretchr/testify v1.9.0\n)\n\nrequire (\n\tgithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect\n\tgithub.com/kr/pretty v0.3.1 // indirect\n\tgithub.com/pkg/errors v0.9.1 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect\n\tgithub.com/rogpeppe/go-internal v1.11.0 // indirect\n\tgithub.com/ztrue/tracerr v0.4.0 // indirect\n\tgopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "fs/go.sum",
    "content": "github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0=\ngithub.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=\ngithub.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=\ngithub.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE=\ngithub.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=\ngithub.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=\ngithub.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=\ngithub.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=\ngithub.com/crawlab-team/goseaweedfs v0.6.3 h1:f96H2QCLrZpof9na1mhIKouKrv8p32XRUyouSVm4YHU=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=\ngithub.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=\ngithub.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=\ngithub.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0=\ngithub.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=\ngithub.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=\ngithub.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=\ngithub.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=\ngithub.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=\ngithub.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=\ngithub.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=\ngithub.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=\ngithub.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk=\ngithub.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk=\ngithub.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc=\ngithub.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=\ngithub.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=\ngithub.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=\ngithub.com/ztrue/tracerr v0.4.0 h1:vT5PFxwIGs7rCg9ZgJ/y0NmOpJkPCPFK8x0vVIYzd04=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\n"
  },
  {
    "path": "fs/interface.go",
    "content": "package fs\n\nimport (\n\t\"github.com/crawlab-team/goseaweedfs\"\n\t\"time\"\n)\n\ntype Manager interface {\n\tInit() (err error)\n\tClose() (err error)\n\tListDir(remotePath string, isRecursive bool) (files []goseaweedfs.FilerFileInfo, err error)\n\tUploadFile(localPath, remotePath string, args ...interface{}) (err error)\n\tUploadDir(localPath, remotePath string, args ...interface{}) (err error)\n\tDownloadFile(remotePath, localPath string, args ...interface{}) (err error)\n\tDownloadDir(remotePath, localPath string, args ...interface{}) (err error)\n\tDeleteFile(remotePath string) (err error)\n\tDeleteDir(remotePath string) (err error)\n\tSyncLocalToRemote(localPath, remotePath string, args ...interface{}) (err error)\n\tSyncRemoteToLocal(remotePath, localPath string, args ...interface{}) (err error)\n\tGetFile(remotePath string, args ...interface{}) (data []byte, err error)\n\tGetFileInfo(remotePath string) (file *goseaweedfs.FilerFileInfo, err error)\n\tUpdateFile(remotePath string, data []byte, args ...interface{}) (err error)\n\tExists(remotePath string, args ...interface{}) (ok bool, err error)\n\tSetFilerUrl(url string)\n\tSetFilerAuthKey(authKey string)\n\tSetTimeout(timeout time.Duration)\n\tSetWorkerNum(num int)\n\tSetRetryInterval(interval time.Duration)\n\tSetRetryNum(num int)\n\tSetMaxQps(qps int)\n}\n"
  },
  {
    "path": "fs/lib/copy/copy.go",
    "content": "package copy\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"syscall\"\n)\n\nfunc CopyDirectory(scrDir, dest string) error {\n\tentries, err := ioutil.ReadDir(scrDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, entry := range entries {\n\t\tsourcePath := filepath.Join(scrDir, entry.Name())\n\t\tdestPath := filepath.Join(dest, entry.Name())\n\n\t\tfileInfo, err := os.Stat(sourcePath)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tstat, ok := fileInfo.Sys().(*syscall.Stat_t)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"failed to get raw syscall.Stat_t data for '%s'\", sourcePath)\n\t\t}\n\n\t\tswitch fileInfo.Mode() & os.ModeType {\n\t\tcase os.ModeDir:\n\t\t\tif err := CreateIfNotExists(destPath, 0755); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif err := CopyDirectory(sourcePath, destPath); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tcase os.ModeSymlink:\n\t\t\tif err := CopySymLink(sourcePath, destPath); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tdefault:\n\t\t\tif err := Copy(sourcePath, destPath); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tif err := os.Lchown(destPath, int(stat.Uid), int(stat.Gid)); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tisSymlink := entry.Mode()&os.ModeSymlink != 0\n\t\tif !isSymlink {\n\t\t\tif err := os.Chmod(destPath, entry.Mode()); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc Copy(srcFile, dstFile string) error {\n\tout, err := os.Create(dstFile)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer out.Close()\n\n\tin, err := os.Open(srcFile)\n\tdefer in.Close()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = io.Copy(out, in)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc Exists(filePath string) bool {\n\tif _, err := os.Stat(filePath); os.IsNotExist(err) {\n\t\treturn false\n\t}\n\n\treturn true\n}\n\nfunc CreateIfNotExists(dir string, perm os.FileMode) error {\n\tif Exists(dir) {\n\t\treturn nil\n\t}\n\n\tif err := os.MkdirAll(dir, perm); err != nil {\n\t\treturn fmt.Errorf(\"failed to create directory: '%s', error: '%s'\", dir, err.Error())\n\t}\n\n\treturn nil\n}\n\nfunc CopySymLink(source, dest string) error {\n\tlink, err := os.Readlink(source)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn os.Symlink(link, dest)\n}\n"
  },
  {
    "path": "fs/options.go",
    "content": "package fs\n\nimport \"time\"\n\ntype Option func(m Manager)\n\nfunc WithFilerUrl(url string) Option {\n\treturn func(m Manager) {\n\t\tm.SetFilerUrl(url)\n\t}\n}\n\nfunc WithFilerAuthKey(authKey string) Option {\n\treturn func(m Manager) {\n\t\tm.SetFilerAuthKey(authKey)\n\t}\n}\n\nfunc WithTimeout(timeout time.Duration) Option {\n\treturn func(m Manager) {\n\t\tm.SetTimeout(timeout)\n\t}\n}\n\nfunc WithWorkerNum(num int) Option {\n\treturn func(m Manager) {\n\t\tm.SetWorkerNum(num)\n\t}\n}\n\nfunc WithRetryInterval(interval time.Duration) Option {\n\treturn func(m Manager) {\n\t\tm.SetRetryInterval(interval)\n\t}\n}\n\nfunc WithRetryNum(num int) Option {\n\treturn func(m Manager) {\n\t\tm.SetRetryNum(num)\n\t}\n}\n\nfunc WithMaxQps(qps int) Option {\n\treturn func(m Manager) {\n\t\tm.SetMaxQps(qps)\n\t}\n}\n"
  },
  {
    "path": "fs/seaweedfs_manager.go",
    "content": "package fs\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/crawlab-team/goseaweedfs\"\n\t\"github.com/emirpasic/gods/queues/linkedlistqueue\"\n\t\"github.com/google/uuid\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n)\n\ntype seaweedFsManagerFn func(params seaweedFsManagerParams) (res seaweedFsManagerResults)\n\ntype seaweedFsManagerHandle struct {\n\tparams  seaweedFsManagerParams\n\tfn      seaweedFsManagerFn\n\tresChan chan seaweedFsManagerResults\n}\n\ntype seaweedFsManagerParams struct {\n\tlocalPath   string\n\tremotePath  string\n\tisRecursive bool\n\tcollection  string\n\tttl         string\n\turlValues   url.Values\n\tdata        []byte\n}\n\ntype seaweedFsManagerResults struct {\n\tfiles []goseaweedfs.FilerFileInfo\n\tfile  *goseaweedfs.FilerFileInfo\n\tdata  []byte\n\tok    bool\n\terr   error\n}\n\ntype SeaweedFsManager struct {\n\t// settings variables\n\tfilerUrl      string\n\ttimeout       time.Duration\n\tauthKey       string\n\tworkerNum     int\n\tretryNum      uint64\n\tretryInterval time.Duration\n\tmaxQps        int\n\n\t// internals\n\tf      *goseaweedfs.Filer\n\tq      *linkedlistqueue.Queue\n\tcr     int\n\tch     chan seaweedFsManagerHandle\n\tclosed bool\n}\n\nfunc (m *SeaweedFsManager) Init() (err error) {\n\t// filer options\n\tvar filerOpts []goseaweedfs.FilerOption\n\n\t// auth key\n\tif m.authKey != \"\" {\n\t\tfilerOpts = append(filerOpts, goseaweedfs.WithFilerAuthKey(m.authKey))\n\t}\n\n\t// handle channel\n\tm.ch = make(chan seaweedFsManagerHandle, m.workerNum)\n\n\t// filer instance\n\tm.f, err = goseaweedfs.NewFiler(m.filerUrl, &http.Client{Timeout: m.timeout}, filerOpts...)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// start async\n\tgo m.start()\n\n\treturn nil\n}\n\nfunc (m *SeaweedFsManager) Close() (err error) {\n\tm.closed = true\n\tif err := m.f.Close(); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (m *SeaweedFsManager) ListDir(remotePath string, isRecursive bool) (files []goseaweedfs.FilerFileInfo, err error) {\n\tparams := seaweedFsManagerParams{\n\t\tremotePath:  remotePath,\n\t\tisRecursive: isRecursive,\n\t}\n\tres := m.process(params, m.listDir)\n\treturn res.files, res.err\n}\n\nfunc (m *SeaweedFsManager) ListDirRecursive(remotePath string) (files []goseaweedfs.FilerFileInfo, err error) {\n\tparams := seaweedFsManagerParams{\n\t\tremotePath: remotePath,\n\t}\n\tres := m.process(params, m.listDirRecursive)\n\treturn res.files, res.err\n}\n\nfunc (m *SeaweedFsManager) UploadFile(localPath, remotePath string, args ...interface{}) (err error) {\n\tlocalPath, err = filepath.Abs(localPath)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tcollection, ttl := getCollectionAndTtlFromArgs(args...)\n\tparams := seaweedFsManagerParams{\n\t\tlocalPath:  localPath,\n\t\tremotePath: remotePath,\n\t\tcollection: collection,\n\t\tttl:        ttl,\n\t}\n\tres := m.process(params, m.uploadFile)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) UploadDir(localPath, remotePath string, args ...interface{}) (err error) {\n\tlocalPath, err = filepath.Abs(localPath)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tcollection, ttl := getCollectionAndTtlFromArgs(args...)\n\tparams := seaweedFsManagerParams{\n\t\tlocalPath:  localPath,\n\t\tremotePath: remotePath,\n\t\tcollection: collection,\n\t\tttl:        ttl,\n\t}\n\tres := m.process(params, m.uploadDir)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) DownloadFile(remotePath, localPath string, args ...interface{}) (err error) {\n\tlocalPath, err = filepath.Abs(localPath)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tcollection, ttl := getCollectionAndTtlFromArgs(args...)\n\turlValues := getUrlValuesFromArgs(args...)\n\tparams := seaweedFsManagerParams{\n\t\tlocalPath:  localPath,\n\t\tremotePath: remotePath,\n\t\tcollection: collection,\n\t\tttl:        ttl,\n\t\turlValues:  urlValues,\n\t}\n\tres := m.process(params, m.downloadFile)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) DownloadDir(remotePath, localPath string, args ...interface{}) (err error) {\n\tlocalPath, err = filepath.Abs(localPath)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tparams := seaweedFsManagerParams{\n\t\tremotePath: remotePath,\n\t}\n\tres := m.process(params, m.downloadDir)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) DeleteFile(remotePath string) (err error) {\n\tparams := seaweedFsManagerParams{\n\t\tremotePath: remotePath,\n\t}\n\tres := m.process(params, m.deleteFile)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) DeleteDir(remotePath string) (err error) {\n\tparams := seaweedFsManagerParams{\n\t\tremotePath: remotePath,\n\t}\n\tres := m.process(params, m.deleteDir)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) SyncLocalToRemote(localPath, remotePath string, args ...interface{}) (err error) {\n\tlocalPath, err = filepath.Abs(localPath)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tcollection, ttl := getCollectionAndTtlFromArgs(args...)\n\tparams := seaweedFsManagerParams{\n\t\tlocalPath:  localPath,\n\t\tremotePath: remotePath,\n\t\tcollection: collection,\n\t\tttl:        ttl,\n\t}\n\tres := m.process(params, m.syncLocalToRemote)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) SyncRemoteToLocal(remotePath, localPath string, args ...interface{}) (err error) {\n\tcollection, ttl := getCollectionAndTtlFromArgs(args...)\n\tparams := seaweedFsManagerParams{\n\t\tlocalPath:  localPath,\n\t\tremotePath: remotePath,\n\t\tcollection: collection,\n\t\tttl:        ttl,\n\t}\n\tres := m.process(params, m.syncRemoteToLocal)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) GetFile(remotePath string, args ...interface{}) (data []byte, err error) {\n\turlValues := getUrlValuesFromArgs(args...)\n\tparams := seaweedFsManagerParams{\n\t\tremotePath: remotePath,\n\t\turlValues:  urlValues,\n\t}\n\tres := m.process(params, m.getFile)\n\treturn res.data, res.err\n}\n\nfunc (m *SeaweedFsManager) GetFileInfo(remotePath string) (file *goseaweedfs.FilerFileInfo, err error) {\n\tparams := seaweedFsManagerParams{\n\t\tremotePath: remotePath,\n\t}\n\tres := m.process(params, m.getFileInfo)\n\treturn res.file, res.err\n}\n\nfunc (m *SeaweedFsManager) UpdateFile(remotePath string, data []byte, args ...interface{}) (err error) {\n\tcollection, ttl := getCollectionAndTtlFromArgs(args...)\n\tparams := seaweedFsManagerParams{\n\t\tremotePath: remotePath,\n\t\tcollection: collection,\n\t\tttl:        ttl,\n\t\tdata:       data,\n\t}\n\tres := m.process(params, m.updateFile)\n\treturn res.err\n}\n\nfunc (m *SeaweedFsManager) Exists(remotePath string, args ...interface{}) (ok bool, err error) {\n\t_, err = m.GetFile(remotePath, args...)\n\tif err == nil {\n\t\t// exists\n\t\treturn true, nil\n\t}\n\tif strings.Contains(err.Error(), FilerStatusNotFoundErrorMessage) {\n\t\t// not exists\n\t\treturn false, nil\n\t}\n\treturn ok, trace.TraceError(err)\n}\n\nfunc (m *SeaweedFsManager) SetFilerUrl(url string) {\n\tm.filerUrl = url\n}\n\nfunc (m *SeaweedFsManager) SetFilerAuthKey(authKey string) {\n\tm.authKey = authKey\n}\n\nfunc (m *SeaweedFsManager) SetTimeout(timeout time.Duration) {\n\tm.timeout = timeout\n}\n\nfunc (m *SeaweedFsManager) SetWorkerNum(num int) {\n\tm.workerNum = num\n}\n\nfunc (m *SeaweedFsManager) SetRetryInterval(interval time.Duration) {\n\tm.retryInterval = interval\n}\n\nfunc (m *SeaweedFsManager) SetRetryNum(num int) {\n\tm.retryNum = uint64(num)\n}\n\nfunc (m *SeaweedFsManager) SetMaxQps(qps int) {\n\tm.maxQps = qps\n}\n\nfunc (m *SeaweedFsManager) newHandle(params seaweedFsManagerParams, fn seaweedFsManagerFn) (handle seaweedFsManagerHandle) {\n\treturn seaweedFsManagerHandle{\n\t\tparams:  params,\n\t\tfn:      fn,\n\t\tresChan: make(chan seaweedFsManagerResults),\n\t}\n}\n\nfunc (m *SeaweedFsManager) start() {\n\tfor {\n\t\tif m.closed {\n\t\t\treturn\n\t\t}\n\t\thandle := <-m.ch\n\t\tgo func() {\n\t\t\tif err := backoff.Retry(func() error {\n\t\t\t\tres := handle.fn(handle.params)\n\t\t\t\tif res.err != nil {\n\t\t\t\t\treturn res.err\n\t\t\t\t}\n\t\t\t\thandle.resChan <- res\n\t\t\t\treturn nil\n\t\t\t}, backoff.WithMaxRetries(\n\t\t\t\tbackoff.NewConstantBackOff(m.retryInterval), m.retryNum),\n\t\t\t); err != nil {\n\t\t\t\thandle.resChan <- m.error(err)\n\t\t\t}\n\t\t\tm.wait()\n\t\t}()\n\t}\n}\n\nfunc (m *SeaweedFsManager) process(params seaweedFsManagerParams, fn seaweedFsManagerFn) (res seaweedFsManagerResults) {\n\thandle := m.newHandle(params, fn)\n\t//log.Infof(\"handle: %v\", handle)\n\tm.ch <- handle\n\tres = <-handle.resChan\n\treturn\n}\n\nfunc (m *SeaweedFsManager) error(err error) (res seaweedFsManagerResults) {\n\tif err != nil {\n\t\ttrace.PrintError(err)\n\t}\n\treturn seaweedFsManagerResults{err: err}\n}\n\nfunc (m *SeaweedFsManager) wait() {\n\tms := float32(1) / float32(m.maxQps) * 1e3\n\td := time.Duration(ms) * time.Millisecond\n\ttime.Sleep(d)\n}\n\nfunc (m *SeaweedFsManager) getCollectionAndTtlArgsFromParams(params seaweedFsManagerParams) (args []interface{}) {\n\tif params.collection != \"\" {\n\t\targs = append(args, params.collection)\n\t}\n\tif params.ttl != \"\" {\n\t\targs = append(args, params.ttl)\n\t}\n\treturn args\n}\n\nfunc (m *SeaweedFsManager) listDir(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\tvar err error\n\tif params.isRecursive {\n\t\tres.files, err = m.ListDirRecursive(params.remotePath)\n\t} else {\n\t\tres.files, err = m.f.ListDir(params.remotePath)\n\t}\n\tif err != nil {\n\t\treturn m.error(err)\n\t}\n\treturn\n}\n\nfunc (m *SeaweedFsManager) listDirRecursive(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\tentries, err := m.f.ListDir(params.remotePath)\n\tif err != nil {\n\t\treturn m.error(err)\n\t}\n\tfor _, file := range entries {\n\t\tfile = goseaweedfs.GetFileWithExtendedFields(file)\n\t\tif file.IsDir {\n\t\t\tfile.Children, err = m.ListDirRecursive(file.FullPath)\n\t\t\tif err != nil {\n\t\t\t\treturn m.error(err)\n\t\t\t}\n\t\t}\n\t\tres.files = append(res.files, file)\n\t}\n\treturn\n}\n\nfunc (m *SeaweedFsManager) uploadFile(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\tr, err := m.f.UploadFile(params.localPath, params.remotePath, params.collection, params.ttl)\n\tif err != nil {\n\t\treturn m.error(err)\n\t}\n\tif r.Error != \"\" {\n\t\terr = errors.New(r.Error)\n\t\treturn m.error(err)\n\t}\n\treturn\n}\n\nfunc (m *SeaweedFsManager) uploadDir(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\targs := m.getCollectionAndTtlArgsFromParams(params)\n\tif strings.HasSuffix(params.localPath, \"/\") {\n\t\tparams.localPath = params.localPath[:(len(params.localPath) - 1)]\n\t}\n\tif !strings.HasPrefix(params.remotePath, \"/\") {\n\t\tparams.remotePath = \"/\" + params.remotePath\n\t}\n\tfiles, err := goseaweedfs.ListFilesRecursive(params.localPath)\n\tif err != nil {\n\t\treturn m.error(err)\n\t}\n\tfor _, info := range files {\n\t\tnewFilePath := params.remotePath + strings.Replace(info.Path, params.localPath, \"\", -1)\n\t\tif err := m.UploadFile(info.Path, newFilePath, args...); err != nil {\n\t\t\treturn m.error(err)\n\t\t}\n\t}\n\treturn\n}\n\nfunc (m *SeaweedFsManager) downloadFile(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\terr := m.f.Download(params.remotePath, params.urlValues, func(reader io.Reader) error {\n\t\tdata, err := ioutil.ReadAll(reader)\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\tdirPath := filepath.Dir(params.localPath)\n\t\t_, err = os.Stat(dirPath)\n\t\tif err != nil {\n\t\t\t// if not exists, create a new directory\n\t\t\tif err := os.MkdirAll(dirPath, DefaultDirMode); err != nil {\n\t\t\t\treturn trace.TraceError(err)\n\t\t\t}\n\t\t}\n\t\tfileMode := DefaultFileMode\n\t\tfileInfo, err := os.Stat(params.localPath)\n\t\tif err == nil {\n\t\t\t// if file already exists, save file mode and remove it\n\t\t\tfileMode = fileInfo.Mode()\n\t\t\tif err := os.Remove(params.localPath); err != nil {\n\t\t\t\treturn trace.TraceError(err)\n\t\t\t}\n\t\t}\n\t\tif err := ioutil.WriteFile(params.localPath, data, fileMode); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn m.error(err)\n\t}\n\treturn\n}\n\nfunc (m *SeaweedFsManager) downloadDir(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\targs := m.getCollectionAndTtlArgsFromParams(params)\n\tvar files []goseaweedfs.FilerFileInfo\n\tfiles, res.err = m.ListDir(params.remotePath, true)\n\tfor _, file := range files {\n\t\tif file.IsDir {\n\t\t\tif err := m.DownloadDir(file.FullPath, path.Join(params.localPath, file.Name), args...); err != nil {\n\t\t\t\treturn m.error(err)\n\t\t\t}\n\t\t} else {\n\t\t\tif err := m.DownloadFile(file.FullPath, path.Join(params.localPath, file.Name), args...); err != nil {\n\t\t\t\treturn m.error(err)\n\t\t\t}\n\t\t}\n\t}\n\treturn\n}\n\nfunc (m *SeaweedFsManager) deleteFile(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\tif err := m.f.DeleteFile(params.remotePath); err != nil {\n\t\treturn m.error(err)\n\t}\n\treturn\n}\n\nfunc (m *SeaweedFsManager) deleteDir(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\tif err := m.f.DeleteDir(params.remotePath); err != nil {\n\t\treturn m.error(err)\n\t}\n\treturn\n}\n\nfunc (m *SeaweedFsManager) syncLocalToRemote(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\t// args\n\targs := m.getCollectionAndTtlArgsFromParams(params)\n\n\t// raise error if local path does not exist\n\tif _, err := os.Stat(params.localPath); err != nil {\n\t\treturn m.error(err)\n\t}\n\n\t// get files and maps\n\tlocalFiles, remoteFiles, localFilesMap, remoteFilesMap, err := getFilesAndFilesMaps(m.f, params.localPath, params.remotePath)\n\tif err != nil {\n\t\treturn m.error(err)\n\t}\n\n\t// compare remote files with local files and delete files absent in local files\n\tfor _, remoteFile := range remoteFiles {\n\t\t// attempt to get corresponding local file\n\t\t_, ok := localFilesMap[remoteFile.FullPath]\n\n\t\tif !ok {\n\t\t\t// file does not exist on local, delete\n\t\t\tif remoteFile.IsDir {\n\t\t\t\tif err := m.DeleteDir(remoteFile.FullPath); err != nil {\n\t\t\t\t\treturn m.error(err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif err := m.DeleteFile(remoteFile.FullPath); err != nil {\n\t\t\t\t\treturn m.error(err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// compare local files with remote files and upload files with difference\n\tfor _, localFile := range localFiles {\n\t\t// skip .git\n\t\tif IsGitFile(localFile) {\n\t\t\tcontinue\n\t\t}\n\n\t\t// corresponding remote file path\n\t\tfileRemotePath := fmt.Sprintf(\"%s%s\", params.remotePath, strings.Replace(localFile.Path, params.localPath, \"\", -1))\n\n\t\t// attempt to get corresponding remote file\n\t\tremoteFile, ok := remoteFilesMap[fileRemotePath]\n\n\t\tif !ok {\n\t\t\t// file does not exist on remote, upload\n\t\t\tif err := m.UploadFile(localFile.Path, fileRemotePath, args...); err != nil {\n\t\t\t\treturn m.error(err)\n\t\t\t}\n\t\t} else {\n\t\t\t// file exists on remote, upload if md5sum values are different\n\t\t\tif remoteFile.Md5 != localFile.Md5 {\n\t\t\t\tif err := m.UploadFile(localFile.Path, fileRemotePath, args...); err != nil {\n\t\t\t\t\treturn m.error(err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc (m *SeaweedFsManager) syncRemoteToLocal(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\t// args\n\targs := m.getCollectionAndTtlArgsFromParams(params)\n\n\t// create directory if local path does not exist\n\tif _, err := os.Stat(params.localPath); err != nil {\n\t\tif err := os.MkdirAll(params.localPath, os.ModePerm); err != nil {\n\t\t\treturn m.error(err)\n\t\t}\n\t}\n\n\t// get files and maps\n\tlocalFiles, remoteFiles, localFilesMap, remoteFilesMap, err := getFilesAndFilesMaps(m.f, params.localPath, params.remotePath)\n\tif err != nil {\n\t\treturn m.error(err)\n\t}\n\n\t// compare local files with remote files and delete files absent on remote\n\tfor _, localFile := range localFiles {\n\t\t// skip .git\n\t\tif IsGitFile(localFile) {\n\t\t\tcontinue\n\t\t}\n\n\t\t// corresponding remote file path\n\t\tfileRemotePath := fmt.Sprintf(\"%s%s\", params.remotePath, strings.Replace(localFile.Path, params.localPath, \"\", -1))\n\n\t\t// attempt to get corresponding remote file\n\t\t_, ok := remoteFilesMap[fileRemotePath]\n\n\t\tif !ok {\n\t\t\t// file does not exist on remote, upload\n\t\t\tif err := os.Remove(localFile.Path); err != nil {\n\t\t\t\treturn m.error(err)\n\t\t\t}\n\t\t}\n\t}\n\n\t// compare remote files with local files and download if files with difference\n\tfor _, remoteFile := range remoteFiles {\n\t\t// directory\n\t\tif remoteFile.IsDir {\n\t\t\tlocalDirRelativePath := strings.Replace(remoteFile.FullPath, params.remotePath, \"\", 1)\n\t\t\tlocalDirPath := fmt.Sprintf(\"%s%s\", params.localPath, localDirRelativePath)\n\t\t\tif err := m.SyncRemoteToLocal(remoteFile.FullPath, localDirPath); err != nil {\n\t\t\t\treturn m.error(err)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// local file path\n\t\tlocalFileRelativePath := strings.Replace(remoteFile.FullPath, params.remotePath, \"\", 1)\n\t\tlocalFilePath := fmt.Sprintf(\"%s%s\", params.localPath, localFileRelativePath)\n\n\t\t// attempt to get corresponding local file\n\t\tlocalFile, ok := localFilesMap[remoteFile.FullPath]\n\n\t\tif !ok {\n\t\t\t// file does not exist on local, download\n\t\t\tif err := m.DownloadFile(remoteFile.FullPath, localFilePath); err != nil {\n\t\t\t\treturn m.error(err)\n\t\t\t}\n\t\t} else {\n\t\t\t// file exists on remote, download if md5sum values are different\n\t\t\tif remoteFile.Md5 != localFile.Md5 {\n\t\t\t\tif err := m.DownloadFile(remoteFile.FullPath, localFilePath, args...); err != nil {\n\t\t\t\t\treturn m.error(err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc (m *SeaweedFsManager) getFile(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\tvar buf bytes.Buffer\n\tres.err = m.f.Download(params.remotePath, params.urlValues, func(reader io.Reader) error {\n\t\t_, err := io.Copy(&buf, reader)\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\treturn nil\n\t})\n\tres.data = buf.Bytes()\n\treturn\n}\n\nfunc (m *SeaweedFsManager) getFileInfo(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\tarr := strings.Split(params.remotePath, \"/\")\n\tdirName := strings.Join(arr[:(len(arr)-1)], \"/\")\n\tfiles, err := m.f.ListDir(dirName)\n\tif err != nil {\n\t\treturn m.error(err)\n\t}\n\tfor _, f := range files {\n\t\tif f.FullPath == params.remotePath {\n\t\t\tres.file = &f\n\t\t\treturn\n\t\t}\n\t}\n\treturn m.error(ErrorFsNotExists)\n}\n\nfunc (m *SeaweedFsManager) updateFile(params seaweedFsManagerParams) (res seaweedFsManagerResults) {\n\ttmpRootDir := os.TempDir()\n\ttmpDirPath := path.Join(tmpRootDir, \".seaweedfs\")\n\tif _, err := os.Stat(tmpDirPath); err != nil {\n\t\tif err := os.MkdirAll(tmpDirPath, os.ModePerm); err != nil {\n\t\t\treturn m.error(err)\n\t\t}\n\t}\n\ttmpFilePath := path.Join(tmpDirPath, fmt.Sprintf(\".%s\", uuid.New().String()))\n\tif _, err := os.Stat(tmpFilePath); err == nil {\n\t\tif err := os.Remove(tmpFilePath); err != nil {\n\t\t\treturn m.error(err)\n\t\t}\n\t}\n\tif err := ioutil.WriteFile(tmpFilePath, params.data, os.ModePerm); err != nil {\n\t\treturn m.error(err)\n\t}\n\tparams2 := seaweedFsManagerParams{\n\t\tlocalPath:  tmpFilePath,\n\t\tremotePath: params.remotePath,\n\t\tcollection: params.collection,\n\t\tttl:        params.ttl,\n\t}\n\tif res := m.uploadFile(params2); res.err != nil {\n\t\treturn m.error(res.err)\n\t}\n\tif err := os.Remove(tmpFilePath); err != nil {\n\t\treturn m.error(err)\n\t}\n\treturn\n}\n\nfunc NewSeaweedFsManager(opts ...Option) (m2 Manager, err error) {\n\t// manager\n\tm := &SeaweedFsManager{\n\t\tfilerUrl:      \"http://localhost:8888\",\n\t\ttimeout:       5 * time.Minute,\n\t\tworkerNum:     1,\n\t\tretryInterval: 500 * time.Millisecond,\n\t\tretryNum:      3,\n\t\tmaxQps:        5,\n\t\tq:             linkedlistqueue.New(),\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(m)\n\t}\n\n\t// initialize\n\tif err := m.Init(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn m, nil\n}\n\nvar _seaweedFsManager Manager\n\nfunc GetSeaweedFsManager(opts ...Option) (m2 Manager, err error) {\n\tif _seaweedFsManager == nil {\n\t\t_seaweedFsManager, err = NewSeaweedFsManager(opts...)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn _seaweedFsManager, nil\n}\n"
  },
  {
    "path": "fs/test/base.go",
    "content": "package test\n\nimport (\n\tfs \"github.com/crawlab-team/crawlab/fs\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc init() {\n\tvar err error\n\tT, err = NewTest()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nvar T *Test\n\ntype Test struct {\n\tm fs.Manager\n}\n\nfunc (t *Test) Setup(t2 *testing.T) {\n\tt.Cleanup()\n\tt2.Cleanup(t.Cleanup)\n}\n\nfunc (t *Test) Cleanup() {\n\t_ = T.m.DeleteDir(\"/test\")\n\n\t// wait to avoid caching\n\ttime.Sleep(200 * time.Millisecond)\n}\n\nfunc NewTest() (res *Test, err error) {\n\t// test\n\tt := &Test{}\n\n\t// filer url\n\tfilerUrl := os.Getenv(\"CRAWLAB_FILER_URL\")\n\tif filerUrl == \"\" {\n\t\tfilerUrl = \"http://localhost:8888\"\n\t}\n\n\t// manager\n\tt.m, err = fs.NewSeaweedFsManager(\n\t\tfs.WithFilerUrl(filerUrl),\n\t\tfs.WithTimeout(10*time.Second),\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn t, nil\n}\n"
  },
  {
    "path": "fs/test/bindata.go",
    "content": "// Code generated for package test by go-bindata DO NOT EDIT. (@generated)\n// sources:\n// bin/start.sh\n// bin/stop.sh\npackage test\n\nimport (\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n)\n\nfunc bindataRead(data []byte, name string) ([]byte, error) {\n\tgz, err := gzip.NewReader(bytes.NewBuffer(data))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Read %q: %v\", name, err)\n\t}\n\n\tvar buf bytes.Buffer\n\t_, err = io.Copy(&buf, gz)\n\tclErr := gz.Close()\n\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Read %q: %v\", name, err)\n\t}\n\tif clErr != nil {\n\t\treturn nil, err\n\t}\n\n\treturn buf.Bytes(), nil\n}\n\ntype asset struct {\n\tbytes []byte\n\tinfo  os.FileInfo\n}\n\ntype bindataFileInfo struct {\n\tname    string\n\tsize    int64\n\tmode    os.FileMode\n\tmodTime time.Time\n}\n\n// Name return file name\nfunc (fi bindataFileInfo) Name() string {\n\treturn fi.name\n}\n\n// Size return file size\nfunc (fi bindataFileInfo) Size() int64 {\n\treturn fi.size\n}\n\n// Mode return file mode\nfunc (fi bindataFileInfo) Mode() os.FileMode {\n\treturn fi.mode\n}\n\n// Mode return file modify time\nfunc (fi bindataFileInfo) ModTime() time.Time {\n\treturn fi.modTime\n}\n\n// IsDir return file whether a directory\nfunc (fi bindataFileInfo) IsDir() bool {\n\treturn fi.mode&os.ModeDir != 0\n}\n\n// Sys return file is sys mode\nfunc (fi bindataFileInfo) Sys() interface{} {\n\treturn nil\n}\n\nvar _binStartSh = []byte(\"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xcc\\x8f\\x4b\\x0e\\xc2\\x30\\x0c\\x44\\xf7\\x3e\\xc5\\x20\\xd6\\x4d\\x58\\xc3\\x51\\x80\\x45\\x4b\\x1c\\xd5\\x22\\x69\\xab\\x38\\x2d\\x3d\\x3e\\x6a\\xa0\\x7c\\xc4\\x05\\x90\\x57\\x7e\\xa3\\x19\\x8f\\xb7\\x1b\\xdb\\x48\\x67\\xb5\\x25\\xf1\\x38\\xa2\\x62\\x18\\x9b\\xe3\\x80\\xf3\\x01\\xb9\\xe5\\x8e\\x80\\x3d\\x71\\x50\\x26\\x20\\x5e\\x9d\\xa4\\x87\\x4c\\x5e\\xe8\\x69\\x98\\x61\\x47\\x4d\\x36\\xf4\\x97\\x3a\\x94\\xa8\\x1b\\xb3\\xfb\\xb0\\x97\\x55\\x39\\x4d\\x9c\\x70\\x22\\x00\\xa8\\x5e\\x31\\x2b\\x88\\xb5\\x66\\x4e\\xe6\\x87\\x4f\\x7d\\x18\\x23\\x2f\\xdc\\x88\\x9b\\xbf\\x35\\x19\\x50\\x6e\\xb6\\xbd\\xe6\\x37\\x33\\x8d\\x74\\x0e\\x3b\\x53\\x66\\xc5\\x5e\\x02\\xa7\\xf5\\x0b\\x63\\x95\\xeb\\xa5\\x94\\x57\\xfb\\x37\\xdd\\xbc\\xd0\\x3d\\x00\\x00\\xff\\xff\\x09\\xef\\x85\\x28\\x89\\x01\\x00\\x00\")\n\nfunc binStartShBytes() ([]byte, error) {\n\treturn bindataRead(\n\t\t_binStartSh,\n\t\t\"bin/start.sh\",\n\t)\n}\n\nfunc binStartSh() (*asset, error) {\n\tbytes, err := binStartShBytes()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tinfo := bindataFileInfo{name: \"bin/start.sh\", size: 393, mode: os.FileMode(493), modTime: time.Unix(1621153670, 0)}\n\ta := &asset{bytes: bytes, info: info}\n\treturn a, nil\n}\n\nvar _binStopSh = []byte(\"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\x52\\x56\\xd4\\x4f\\xca\\xcc\\xd3\\x2f\\xce\\xe0\\xe2\\xca\\xce\\xcc\\xc9\\x51\\xd0\\xb5\\x54\\x48\\x28\\x28\\x56\\x48\\xac\\x28\\xad\\x49\\x2f\\x4a\\x2d\\x50\\x28\\x4f\\x4d\\x4d\\x81\\xb0\\x74\\xcb\\x14\\x40\\x74\\x4d\\x62\\x79\\xb6\\x82\\x7a\\x75\\x41\\x51\\x66\\x5e\\x89\\x42\\x8c\\x8a\\x51\\xad\\x7a\\x4d\\x45\\x62\\x51\\x7a\\x71\\x02\\x20\\x00\\x00\\xff\\xff\\x6b\\x5f\\x02\\x48\\x4a\\x00\\x00\\x00\")\n\nfunc binStopShBytes() ([]byte, error) {\n\treturn bindataRead(\n\t\t_binStopSh,\n\t\t\"bin/stop.sh\",\n\t)\n}\n\nfunc binStopSh() (*asset, error) {\n\tbytes, err := binStopShBytes()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tinfo := bindataFileInfo{name: \"bin/stop.sh\", size: 74, mode: os.FileMode(493), modTime: time.Unix(1621154552, 0)}\n\ta := &asset{bytes: bytes, info: info}\n\treturn a, nil\n}\n\n// Asset loads and returns the asset for the given name.\n// It returns an error if the asset could not be found or\n// could not be loaded.\nfunc Asset(name string) ([]byte, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"Asset %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.bytes, nil\n\t}\n\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n}\n\n// MustAsset is like Asset but panics when Asset would return an error.\n// It simplifies safe initialization of global variables.\nfunc MustAsset(name string) []byte {\n\ta, err := Asset(name)\n\tif err != nil {\n\t\tpanic(\"asset: Asset(\" + name + \"): \" + err.Error())\n\t}\n\n\treturn a\n}\n\n// AssetInfo loads and returns the asset info for the given name.\n// It returns an error if the asset could not be found or\n// could not be loaded.\nfunc AssetInfo(name string) (os.FileInfo, error) {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\tif f, ok := _bindata[cannonicalName]; ok {\n\t\ta, err := f()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"AssetInfo %s can't read by error: %v\", name, err)\n\t\t}\n\t\treturn a.info, nil\n\t}\n\treturn nil, fmt.Errorf(\"AssetInfo %s not found\", name)\n}\n\n// AssetNames returns the names of the assets.\nfunc AssetNames() []string {\n\tnames := make([]string, 0, len(_bindata))\n\tfor name := range _bindata {\n\t\tnames = append(names, name)\n\t}\n\treturn names\n}\n\n// _bindata is a table, holding each asset generator, mapped to its name.\nvar _bindata = map[string]func() (*asset, error){\n\t\"bin/start.sh\": binStartSh,\n\t\"bin/stop.sh\":  binStopSh,\n}\n\n// AssetDir returns the file names below a certain\n// directory embedded in the file by go-bindata.\n// For example if you run go-bindata on data/... and data contains the\n// following hierarchy:\n//     data/\n//       foo.txt\n//       img/\n//         a.png\n//         b.png\n// then AssetDir(\"data\") would return []string{\"foo.txt\", \"img\"}\n// AssetDir(\"data/img\") would return []string{\"a.png\", \"b.png\"}\n// AssetDir(\"foo.txt\") and AssetDir(\"notexist\") would return an error\n// AssetDir(\"\") will return []string{\"data\"}.\nfunc AssetDir(name string) ([]string, error) {\n\tnode := _bintree\n\tif len(name) != 0 {\n\t\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\t\tpathList := strings.Split(cannonicalName, \"/\")\n\t\tfor _, p := range pathList {\n\t\t\tnode = node.Children[p]\n\t\t\tif node == nil {\n\t\t\t\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n\t\t\t}\n\t\t}\n\t}\n\tif node.Func != nil {\n\t\treturn nil, fmt.Errorf(\"Asset %s not found\", name)\n\t}\n\trv := make([]string, 0, len(node.Children))\n\tfor childName := range node.Children {\n\t\trv = append(rv, childName)\n\t}\n\treturn rv, nil\n}\n\ntype bintree struct {\n\tFunc     func() (*asset, error)\n\tChildren map[string]*bintree\n}\n\nvar _bintree = &bintree{nil, map[string]*bintree{\n\t\"bin\": &bintree{nil, map[string]*bintree{\n\t\t\"start.sh\": &bintree{binStartSh, map[string]*bintree{}},\n\t\t\"stop.sh\":  &bintree{binStopSh, map[string]*bintree{}},\n\t}},\n}}\n\n// RestoreAsset restores an asset under the given directory\nfunc RestoreAsset(dir, name string) error {\n\tdata, err := Asset(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tinfo, err := AssetInfo(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// RestoreAssets restores an asset under the given directory recursively\nfunc RestoreAssets(dir, name string) error {\n\tchildren, err := AssetDir(name)\n\t// File\n\tif err != nil {\n\t\treturn RestoreAsset(dir, name)\n\t}\n\t// Dir\n\tfor _, child := range children {\n\t\terr = RestoreAssets(dir, filepath.Join(name, child))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc _filePath(dir, name string) string {\n\tcannonicalName := strings.Replace(name, \"\\\\\", \"/\", -1)\n\treturn filepath.Join(append([]string{dir}, strings.Split(cannonicalName, \"/\")...)...)\n}\n"
  },
  {
    "path": "fs/test/main_test.go",
    "content": "package test\n\nimport (\n\t\"testing\"\n)\n\nfunc TestMain(m *testing.M) {\n\t// before test\n\t//if err := StartTestSeaweedFs(); err != nil {\n\t//\tpanic(err)\n\t//}\n\n\t// test\n\tm.Run()\n\n\t// close\n\t_ = T.m.Close()\n\n\t// after test\n\t//_ = StopTestSeaweedFs()\n}\n"
  },
  {
    "path": "fs/test/seaweedfs_test.go",
    "content": "package test\n\nimport (\n\t\"fmt\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/fs\"\n\t\"github.com/crawlab-team/crawlab/fs/lib/copy\"\n\t\"github.com/stretchr/testify/require\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestNewSeaweedFsManager(t *testing.T) {\n\t_, err := fs.NewSeaweedFsManager()\n\trequire.Nil(t, err)\n}\n\nfunc TestSeaweedFsManager_ListDir(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadDir(\"./data/nested\", \"/test/data/nested\")\n\trequire.Nil(t, err)\n\n\tvalid := false\n\tfiles, err := T.m.ListDir(\"/test/data\", true)\n\trequire.Nil(t, err)\n\tfor _, f1 := range files {\n\t\tif f1.Name == \"nested\" && f1.Children != nil {\n\t\t\tfor _, f2 := range f1.Children {\n\t\t\t\tif f2.Name == \"nested_test_data.txt\" {\n\t\t\t\t\tvalid = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\trequire.True(t, valid)\n}\n\nfunc TestSeaweedFsManager_UploadFile(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadFile(\"./data/test_data.txt\", \"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\n\tfiles, err := T.m.ListDir(\"/test/data\", true)\n\trequire.Nil(t, err)\n\tvalid := false\n\tfor _, file := range files {\n\t\tif file.Name == \"test_data.txt\" {\n\t\t\tvalid = true\n\t\t}\n\t}\n\trequire.True(t, valid)\n}\n\nfunc TestSeaweedFsManager_UploadDir(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadDir(\"./data/nested\", \"/test/data/nested\")\n\trequire.Nil(t, err)\n\n\tvalid := false\n\tfiles, err := T.m.ListDir(\"/test/data\", true)\n\trequire.Nil(t, err)\n\tfor _, f1 := range files {\n\t\tif f1.Name == \"nested\" && f1.Children != nil {\n\t\t\tfor _, f2 := range f1.Children {\n\t\t\t\tif f2.Name == \"nested_test_data.txt\" {\n\t\t\t\t\tvalid = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\trequire.True(t, valid)\n}\n\nfunc TestSeaweedFsManager_GetFile(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadFile(\"./data/test_data.txt\", \"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\n\tdata, err := T.m.GetFile(\"/test/data/test_data.txt\")\n\trequire.Equal(t, \"this is a test data\", string(data))\n}\n\nfunc TestSeaweedFsManager_DownloadFile(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadFile(\"./data/test_data.txt\", \"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\n\terr = T.m.DownloadFile(\"/test/data/test_data.txt\", \"./tmp/test_data.txt\")\n\trequire.Nil(t, err)\n\n\tdata, err := ioutil.ReadFile(\"./tmp/test_data.txt\")\n\trequire.Nil(t, err)\n\trequire.NotEmpty(t, data)\n}\n\nfunc TestSeaweedFsManager_DownloadDir(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadDir(\"./data/nested\", \"/test/data/nested\")\n\trequire.Nil(t, err)\n\n\terr = T.m.DownloadDir(\"/test/data\", \"./tmp/data\")\n\trequire.Nil(t, err)\n\n\tdata, err := ioutil.ReadFile(\"./data/nested/nested_test_data.txt\")\n\trequire.Nil(t, err)\n\trequire.NotEmpty(t, data)\n}\n\nfunc TestSeaweedFsManager_DeleteFile(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadFile(\"./data/test_data.txt\", \"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\n\terr = T.m.DeleteFile(\"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\n\tfiles, err := T.m.ListDir(\"/test/data\", true)\n\trequire.Nil(t, err)\n\trequire.Equal(t, 0, len(files))\n}\n\nfunc TestSeaweedFsManager_DeleteDir(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadDir(\"./data\", \"/test/data\")\n\trequire.Nil(t, err)\n\n\terr = T.m.DeleteDir(\"/test/data/nested\")\n\trequire.Nil(t, err)\n\n\tfiles, err := T.m.ListDir(\"/test/data\", true)\n\trequire.Nil(t, err)\n\tvalid := true\n\tfor _, file := range files {\n\t\tif file.Name == \"nested\" && file.IsDir {\n\t\t\tvalid = false\n\t\t}\n\t}\n\trequire.True(t, valid)\n}\n\nfunc TestSeaweedFsManager_SyncLocalToRemote(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = copy.CopyDirectory(\"./data\", \"./tmp/data\")\n\trequire.Nil(t, err)\n\n\terr = T.m.SyncLocalToRemote(\"./tmp/data\", \"/test/data\")\n\trequire.Nil(t, err)\n\n\tdata, err := T.m.GetFile(\"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"this is a test data\", string(data))\n\n\tdata, err = T.m.GetFile(\"/test/data/nested/nested_test_data.txt\")\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"this is nested test data\", string(data))\n\n\terr = ioutil.WriteFile(\"./tmp/data/test_data.txt\", []byte(\"this is changed data\"), os.ModePerm)\n\trequire.Nil(t, err)\n\n\terr = T.m.SyncLocalToRemote(\"./tmp/data\", \"/test/data\")\n\trequire.Nil(t, err)\n\n\tdata, err = T.m.GetFile(\"/test/data/test_data.txt\")\n\trequire.Equal(t, \"this is changed data\", string(data))\n\n\terr = os.Remove(\"./tmp/data/test_data.txt\")\n\trequire.Nil(t, err)\n\n\terr = T.m.SyncLocalToRemote(\"./tmp/data\", \"/test/data\")\n\trequire.Nil(t, err)\n\n\tvalid := true\n\tfiles, err := T.m.ListDir(\"/test/data\", true)\n\tfor _, file := range files {\n\t\tif file.Name == \"test_data.txt\" {\n\t\t\tvalid = false\n\t\t}\n\t}\n\trequire.True(t, valid)\n\n\t// check if directory is deleted after sync\n\terr = ioutil.WriteFile(\"./tmp/test.txt\", []byte(\"test\"), os.ModePerm)\n\trequire.Nil(t, err)\n\terr = T.m.UploadFile(\"./tmp/test.txt\", \"/test/data/folder1/test.txt\")\n\trequire.Nil(t, err)\n\ttime.Sleep(1 * time.Second)\n\terr = T.m.SyncLocalToRemote(\"./tmp/data\", \"/test/data\")\n\trequire.Nil(t, err)\n\tvalid = true\n\tfiles, err = T.m.ListDir(\"/test/data\", true)\n\tfor _, file := range files {\n\t\tif strings.Contains(file.FullPath, \"folder1\") {\n\t\t\tvalid = false\n\t\t}\n\t}\n\trequire.True(t, valid)\n}\n\nfunc TestSeaweedFsManager_SyncRemoteToLocal(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tif _, err := os.Stat(\"./tmp/data\"); err == nil {\n\t\terr = os.RemoveAll(\"./tmp/data\")\n\t\trequire.Nil(t, err)\n\t}\n\n\terr = T.m.UploadDir(\"./data\", \"/test/data\")\n\trequire.Nil(t, err)\n\n\terr = T.m.SyncRemoteToLocal(\"/test/data\", \"./tmp/data\")\n\trequire.Nil(t, err)\n\n\tdata, err := ioutil.ReadFile(\"./tmp/data/test_data.txt\")\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"this is a test data\", string(data))\n\n\tdata, err = ioutil.ReadFile(\"./tmp/data/nested/nested_test_data.txt\")\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"this is nested test data\", string(data))\n\n\terr = T.m.UpdateFile(\"/test/data/test_data.txt\", []byte(\"this is changed data\"))\n\trequire.Nil(t, err)\n\n\terr = T.m.SyncRemoteToLocal(\"/test/data\", \"./tmp/data\")\n\trequire.Nil(t, err)\n\n\tdata, err = ioutil.ReadFile(\"./tmp/data/test_data.txt\")\n\trequire.Equal(t, \"this is changed data\", string(data))\n\n\terr = T.m.DeleteFile(\"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\n\terr = T.m.SyncRemoteToLocal(\"/test/data\", \"./tmp/data\")\n\trequire.Nil(t, err)\n\n\t_, err = os.Stat(\"./tmp/data/test_data.txt\")\n\trequire.NotNil(t, err)\n}\n\nfunc TestSeaweedFsManager_UpdateFile(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadDir(\"./data\", \"/test/data\")\n\trequire.Nil(t, err)\n\n\terr = T.m.UpdateFile(\"/test/data/test_data.txt\", []byte(\"this is changed data\"))\n\trequire.Nil(t, err)\n\n\tdata, err := T.m.GetFile(\"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\trequire.Equal(t, \"this is changed data\", string(data))\n}\n\nfunc TestSeaweedFsManager_Exists(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadDir(\"./data\", \"/test/data\")\n\trequire.Nil(t, err)\n\n\tok, err := T.m.Exists(\"/test/data/test_data.txt\")\n\trequire.Nil(t, err)\n\trequire.True(t, ok)\n\n\tok, err = T.m.Exists(\"/test/data/test_data_404.txt\")\n\trequire.Nil(t, err)\n\trequire.False(t, ok)\n}\n\nfunc TestSeaweedFsManager_ListDirPressure(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\terr = T.m.UploadDir(\"./data/nested\", \"/test/data/nested\")\n\trequire.Nil(t, err)\n\n\tn := int(1e3)\n\tdoneNum := 0\n\terrNum := 0\n\tstartTs := time.Now()\n\n\twg := sync.WaitGroup{}\n\twg.Add(n)\n\tfor i := 0; i < n; i++ {\n\t\tgo func(i int) {\n\t\t\t_, err := T.m.ListDir(\"test/data\", true)\n\t\t\twg.Done()\n\t\t\tif err != nil {\n\t\t\t\terrNum++\n\t\t\t}\n\t\t\tdoneNum++\n\t\t\tlog.Infof(\"list dir: %d/%d\", doneNum, n)\n\t\t\trequire.Nil(t, err)\n\t\t}(i)\n\t}\n\twg.Wait()\n\n\tendTs := time.Now()\n\tduration := endTs.Sub(startTs).Milliseconds()\n\n\tfmt.Println(fmt.Sprintf(\"total: %d\", n))\n\tfmt.Println(fmt.Sprintf(\"errors: %d\", errNum))\n\tfmt.Println(fmt.Sprintf(\"error rate: %.3f\", float32(errNum)/float32(n)))\n\tfmt.Println(fmt.Sprintf(\"duration: %dms\", duration))\n}\n\nfunc TestSeaweedFsManager_UploadFilePressure(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tn := int(1e3)\n\tdoneNum := 0\n\terrNum := 0\n\tstartTs := time.Now()\n\n\twg := sync.WaitGroup{}\n\twg.Add(n)\n\tfor i := 0; i < n; i++ {\n\t\tgo func(i int) {\n\t\t\terr = T.m.UploadFile(\"./data/test_data.txt\", fmt.Sprintf(\"/test/data/test_data_%d.txt\", i))\n\t\t\twg.Done()\n\t\t\tif err != nil {\n\t\t\t\terrNum++\n\t\t\t}\n\t\t\tdoneNum++\n\t\t\tlog.Infof(\"upload file: %d/%d\", doneNum, n)\n\t\t\trequire.Nil(t, err)\n\t\t}(i)\n\t}\n\twg.Wait()\n\n\tendTs := time.Now()\n\tduration := endTs.Sub(startTs).Milliseconds()\n\n\tfmt.Println(fmt.Sprintf(\"total: %d\", n))\n\tfmt.Println(fmt.Sprintf(\"errors: %d\", errNum))\n\tfmt.Println(fmt.Sprintf(\"error rate: %.3f\", float32(errNum)/float32(n)))\n\tfmt.Println(fmt.Sprintf(\"duration: %dms\", duration))\n}\n\nfunc TestSeaweedFsManager_UploadDirPressure(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tn := int(1e3)\n\tdoneNum := 0\n\terrNum := 0\n\tstartTs := time.Now()\n\n\twg := sync.WaitGroup{}\n\twg.Add(n)\n\tfor i := 0; i < n; i++ {\n\t\tgo func(i int) {\n\t\t\terr = T.m.UploadDir(\"./data/nested\", \"/test/data\")\n\t\t\twg.Done()\n\t\t\tif err != nil {\n\t\t\t\terrNum++\n\t\t\t}\n\t\t\tdoneNum++\n\t\t\tlog.Infof(\"upload dir: %d/%d\", doneNum, n)\n\t\t\trequire.Nil(t, err)\n\t\t}(i)\n\t}\n\twg.Wait()\n\n\tendTs := time.Now()\n\tduration := endTs.Sub(startTs).Milliseconds()\n\n\tfmt.Println(fmt.Sprintf(\"total: %d\", n))\n\tfmt.Println(fmt.Sprintf(\"errors: %d\", errNum))\n\tfmt.Println(fmt.Sprintf(\"error rate: %.3f\", float32(errNum)/float32(n)))\n\tfmt.Println(fmt.Sprintf(\"duration: %dms\", duration))\n}\n\nfunc TestSeaweedFsManager_SyncRemoteToLocalPressure(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tif _, err := os.Stat(\"./tmp/data\"); err == nil {\n\t\terr = os.RemoveAll(\"./tmp/data\")\n\t\trequire.Nil(t, err)\n\t}\n\n\terr = T.m.UploadDir(\"./data\", \"/test/data\")\n\trequire.Nil(t, err)\n\n\tn := int(1e3)\n\tdoneNum := 0\n\terrNum := 0\n\tstartTs := time.Now()\n\n\twg := sync.WaitGroup{}\n\twg.Add(n)\n\tfor i := 0; i < n; i++ {\n\t\tgo func(i int) {\n\t\t\terr = T.m.SyncRemoteToLocal(\"/test/data\", fmt.Sprintf(\"./tmp/data_%d\", i))\n\t\t\twg.Done()\n\t\t\tif err != nil {\n\t\t\t\terrNum++\n\t\t\t}\n\t\t\tdoneNum++\n\t\t\tlog.Infof(\"updated: %d/%d\", doneNum, n)\n\t\t\trequire.Nil(t, err)\n\t\t}(i)\n\t}\n\twg.Wait()\n\n\tendTs := time.Now()\n\tduration := endTs.Sub(startTs).Milliseconds()\n\n\tfmt.Println(fmt.Sprintf(\"total: %d\", n))\n\tfmt.Println(fmt.Sprintf(\"errors: %d\", errNum))\n\tfmt.Println(fmt.Sprintf(\"error rate: %.3f\", float32(errNum)/float32(n)))\n\tfmt.Println(fmt.Sprintf(\"duration: %dms\", duration))\n}\n\nfunc TestSeaweedFsManager_UpdateFilePressure(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\tn := int(5e3)\n\tdoneNum := 0\n\terrNum := 0\n\tstartTs := time.Now()\n\n\twg := sync.WaitGroup{}\n\twg.Add(n)\n\tfor i := 0; i < n; i++ {\n\t\tgo func(i int) {\n\t\t\terr = T.m.UpdateFile(fmt.Sprintf(\"/test/data/test_data_%5d.txt\", i), []byte(fmt.Sprintf(\"this is test data: %5d\", i)))\n\t\t\twg.Done()\n\t\t\tif err != nil {\n\t\t\t\terrNum++\n\t\t\t}\n\t\t\tdoneNum++\n\t\t\tlog.Infof(\"updated: %d/%d\", doneNum, n)\n\t\t\trequire.Nil(t, err)\n\t\t}(i)\n\t}\n\twg.Wait()\n\n\tendTs := time.Now()\n\tduration := endTs.Sub(startTs).Milliseconds()\n\n\tfmt.Println(fmt.Sprintf(\"total: %d\", n))\n\tfmt.Println(fmt.Sprintf(\"errors: %d\", errNum))\n\tfmt.Println(fmt.Sprintf(\"error rate: %.3f\", float32(errNum)/float32(n)))\n\tfmt.Println(fmt.Sprintf(\"duration: %dms\", duration))\n}\n"
  },
  {
    "path": "fs/test/utils.go",
    "content": "package test\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/cenkalti/backoff/v4\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/google/uuid\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"time\"\n)\n\nfunc init() {\n\tvar err error\n\tTmpDir, err = filepath.Abs(\"tmp\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tif _, err := os.Stat(TmpDir); err != nil {\n\t\tif err := os.MkdirAll(TmpDir, os.ModePerm); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\t//TmpDir = getTmpDir()\n}\n\nvar TmpDir string\n\nfunc StartTestSeaweedFs() (err error) {\n\t// skip if CRAWLAB_IGNORE_WEED is set true\n\tif os.Getenv(\"CRAWLAB_IGNORE_WEED\") != \"\" {\n\t\treturn nil\n\t}\n\n\t// write to start.sh and stop.sh\n\tif err := writeShFiles(TmpDir); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// run weed\n\tgo runCmd(exec.Command(\"sh\", \"./start.sh\"), TmpDir)\n\n\t// wait for containers to be ready\n\ttime.Sleep(5 * time.Second)\n\tf := func() error {\n\t\t_, err := T.m.ListDir(\"/\", true)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}\n\tb := backoff.WithMaxRetries(backoff.NewConstantBackOff(5*time.Second), 5)\n\tnt := func(err error, duration time.Duration) {\n\t\tlog.Infof(\"seaweedfs services not ready, re-attempt in %.1f seconds\", duration.Seconds())\n\t}\n\terr = backoff.RetryNotify(f, b, nt)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc StopTestSeaweedFs() (err error) {\n\t// skip if CRAWLAB_IGNORE_WEED is set true\n\tif os.Getenv(\"CRAWLAB_IGNORE_WEED\") != \"\" {\n\t\treturn nil\n\t}\n\n\t// stop seaweedfs\n\tif err := runCmd(exec.Command(\"sh\", \"./stop.sh\"), TmpDir); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\ttime.Sleep(5 * time.Second)\n\n\t// remove tmp folder\n\tif err := os.RemoveAll(TmpDir); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc writeShFiles(dirPath string) (err error) {\n\tfileNames := []string{\n\t\t\"start.sh\",\n\t\t\"stop.sh\",\n\t}\n\n\tfor _, fileName := range fileNames {\n\t\tdata, err := Asset(\"bin/\" + fileName)\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\tfilePath := path.Join(dirPath, fileName)\n\t\tif err := ioutil.WriteFile(filePath, data, os.FileMode(0766)); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc runCmd(cmd *exec.Cmd, dirPath string) (err error) {\n\tlog.Infof(\"running cmd: %v\", cmd)\n\tcmd.Dir = dirPath\n\t//cmd.Stdout = os.Stdout\n\t//cmd.Stderr = os.Stdout\n\treturn cmd.Run()\n}\n\nfunc getTmpDir() string {\n\tid, _ := uuid.NewUUID()\n\ttmpDir := path.Join(os.TempDir(), id.String())\n\tif _, err := os.Stat(tmpDir); err != nil {\n\t\tif err := os.MkdirAll(tmpDir, os.FileMode(0766)); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\treturn tmpDir\n}\n"
  },
  {
    "path": "fs/utils.go",
    "content": "package fs\n\nimport (\n\t\"fmt\"\n\t\"github.com/crawlab-team/goseaweedfs\"\n\t\"net/url\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n)\n\nfunc IsGitFile(file goseaweedfs.FileInfo) (res bool) {\n\t// skip .git\n\tres, err := regexp.MatchString(\"/?\\\\.git/\", file.Path)\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn res\n}\n\nfunc getCollectionAndTtlFromArgs(args ...interface{}) (collection, ttl string) {\n\tif len(args) > 0 {\n\t\tcollection = args[0].(string)\n\t}\n\tif len(args) > 1 {\n\t\tttl = args[1].(string)\n\t}\n\treturn\n}\n\nfunc getUrlValuesFromArgs(args ...interface{}) (values url.Values) {\n\tif len(args) > 0 {\n\t\tvalues = args[0].(url.Values)\n\t}\n\treturn values\n}\n\nfunc getFilesAndFilesMaps(f *goseaweedfs.Filer, localPath, remotePath string) (localFiles []goseaweedfs.FileInfo, remoteFiles []goseaweedfs.FilerFileInfo, localFilesMap map[string]goseaweedfs.FileInfo, remoteFilesMap map[string]goseaweedfs.FilerFileInfo, err error) {\n\t// declare maps\n\tlocalFilesMap = map[string]goseaweedfs.FileInfo{}\n\tremoteFilesMap = map[string]goseaweedfs.FilerFileInfo{}\n\n\t// cache local files info\n\tlocalFiles, err = goseaweedfs.ListFilesRecursive(localPath)\n\tif err != nil {\n\t\treturn localFiles, remoteFiles, localFilesMap, remoteFilesMap, err\n\t}\n\tfor _, file := range localFiles {\n\t\tfileRemotePath := fmt.Sprintf(\"%s%s\", remotePath, strings.Replace(file.Path, localPath, \"\", -1))\n\t\tlocalFilesMap[fileRemotePath] = file\n\n\t\t// directory\n\t\tdirRemotePath := filepath.Dir(fileRemotePath)\n\t\t_, ok := localFilesMap[dirRemotePath]\n\t\tif !ok {\n\t\t\tlocalFilesMap[dirRemotePath] = goseaweedfs.FileInfo{\n\t\t\t\tName: filepath.Base(dirRemotePath),\n\t\t\t\tPath: dirRemotePath,\n\t\t\t}\n\t\t}\n\t}\n\n\t// cache remote files info\n\tremoteFiles, err = f.ListDirRecursive(remotePath)\n\tif err != nil {\n\t\tif err.Error() != FilerResponseNotFoundErrorMessage {\n\t\t\treturn localFiles, remoteFiles, localFilesMap, remoteFilesMap, err\n\t\t}\n\t\terr = nil\n\t}\n\tremoteFiles = getFlattenRemoteFiles(remoteFiles)\n\tfor _, file := range remoteFiles {\n\t\tremoteFilesMap[file.FullPath] = file\n\t}\n\n\treturn\n}\n\nfunc getFlattenRemoteFiles(files []goseaweedfs.FilerFileInfo) (flattenFiles []goseaweedfs.FilerFileInfo) {\n\tflattenFiles = []goseaweedfs.FilerFileInfo{}\n\tfor _, file := range files {\n\t\tflattenFiles = append(flattenFiles, file)\n\n\t\tif file.IsDir {\n\t\t\tflattenFiles = append(flattenFiles, getFlattenRemoteFiles(file.Children)...)\n\t\t}\n\t}\n\treturn\n}\n"
  },
  {
    "path": "go.work",
    "content": "go 1.22\n\nuse (\n\tbackend\n\tcore\n\tdb\n\tfs\n\tgrpc\n\ttemplate-parser\n\ttrace\n\tvcs\n)\n"
  },
  {
    "path": "go.work.sum",
    "content": "cel.dev/expr v0.15.0 h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w=\ncel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg=\ncloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=\ncloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=\ncloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY=\ncloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw=\ncloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic=\ncloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4=\ncloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4=\ncloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms=\ncloud.google.com/go v0.113.0/go.mod h1:glEqlogERKYeePz6ZdkcLJ28Q2I6aERgDDErBg9GzO8=\ncloud.google.com/go v0.114.0 h1:OIPFAdfrFDFO2ve2U7r/H5SwSbBzEdrBdE7xkgwc+kY=\ncloud.google.com/go v0.114.0/go.mod h1:ZV9La5YYxctro1HTPug5lXH/GefROyW8PPD4T8n9J8E=\ncloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14=\ncloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU=\ncloud.google.com/go/accessapproval v1.7.5 h1:uzmAMSgYcnlHa9X9YSQZ4Q1wlfl4NNkZyQgho1Z6p04=\ncloud.google.com/go/accessapproval v1.7.5/go.mod h1:g88i1ok5dvQ9XJsxpUInWWvUBrIZhyPDPbk4T01OoJ0=\ncloud.google.com/go/accessapproval v1.7.7 h1:vO95gvBi7qUgfA9SflexQs9hB4U4tnri/GwADIrLQy8=\ncloud.google.com/go/accessapproval v1.7.7/go.mod h1:10ZDPYiTm8tgxuMPid8s2DL93BfCt6xBh/Vg0Xd8pU0=\ncloud.google.com/go/accessapproval v1.7.9 h1:mp1X2FsNRdTYTVw4b6eF4OQ+7l6EpLnZlcatXiFWJTg=\ncloud.google.com/go/accessapproval v1.7.9/go.mod h1:teNI+P/xzZ3dppGXEYFvSmuOvmTjLE9toPq21WHssYc=\ncloud.google.com/go/accesscontextmanager v1.8.5 h1:2GLNaNu9KRJhJBFTIVRoPwk6xE5mUDgD47abBq4Zp/I=\ncloud.google.com/go/accesscontextmanager v1.8.5/go.mod h1:TInEhcZ7V9jptGNqN3EzZ5XMhT6ijWxTGjzyETwmL0Q=\ncloud.google.com/go/accesscontextmanager v1.8.7 h1:GgdNoDwZR5RIO3j8XwXqa6Gc6q5mP3KYMdFC7FEVyG4=\ncloud.google.com/go/accesscontextmanager v1.8.7/go.mod h1:jSvChL1NBQ+uLY9zUBdPy9VIlozPoHptdBnRYeWuQoM=\ncloud.google.com/go/accesscontextmanager v1.8.9 h1:oVjc3eFQP92zezKsof5ly6ENhuNSsgadRdFKhUn7L9g=\ncloud.google.com/go/accesscontextmanager v1.8.9/go.mod h1:IXvQesVgOC7aXgK9OpYFn5eWnzz8fazegIiJ5WnCOVw=\ncloud.google.com/go/aiplatform v1.60.0 h1:0cSrii1ZeLr16MbBoocyy5KVnrSdiQ3KN/vtrTe7RqE=\ncloud.google.com/go/aiplatform v1.60.0/go.mod h1:eTlGuHOahHprZw3Hio5VKmtThIOak5/qy6pzdsqcQnM=\ncloud.google.com/go/aiplatform v1.67.0 h1:YWeqD4BjYwrmY4fa+isGcw0P81lJ3dKVxbWxdBchoiU=\ncloud.google.com/go/aiplatform v1.67.0/go.mod h1:s/sJ6btBEr6bKnrNWdK9ZgHCvwbZNdP90b3DDtxxw+Y=\ncloud.google.com/go/aiplatform v1.68.0 h1:EPPqgHDJpBZKRvv+OsB3cr0jYz3EL2pZ+802rBPcG8U=\ncloud.google.com/go/aiplatform v1.68.0/go.mod h1:105MFA3svHjC3Oazl7yjXAmIR89LKhRAeNdnDKJczME=\ncloud.google.com/go/analytics v0.23.0 h1:Q+y94XH84jM8SK8O7qiY/PJRexb6n7dRbQ6PiUa4YGM=\ncloud.google.com/go/analytics v0.23.0/go.mod h1:YPd7Bvik3WS95KBok2gPXDqQPHy08TsCQG6CdUCb+u0=\ncloud.google.com/go/analytics v0.23.2 h1:O0fj88npvQFxg8LfXo7fArcSrC/wtAstGuWQ7dCHWjg=\ncloud.google.com/go/analytics v0.23.2/go.mod h1:vtE3olAXZ6edJYk1UOndEs6EfaEc9T2B28Y4G5/a7Fo=\ncloud.google.com/go/analytics v0.23.4 h1:5c425wSQBb+YAGr7ukgRFRAKa8SwlqTSapbb+CTJAEA=\ncloud.google.com/go/analytics v0.23.4/go.mod h1:1iTnQMOr6zRdkecW+gkxJpwV0Q/djEIII3YlXmyf7UY=\ncloud.google.com/go/apigateway v1.6.5 h1:sPXnpk+6TneKIrjCjcpX5YGsAKy3PTdpIchoj8/74OE=\ncloud.google.com/go/apigateway v1.6.5/go.mod h1:6wCwvYRckRQogyDDltpANi3zsCDl6kWi0b4Je+w2UiI=\ncloud.google.com/go/apigateway v1.6.7 h1:DO5Vn3zmY1aDyfoqni8e8+x+lwrfLCoAAbEui9NB0y8=\ncloud.google.com/go/apigateway v1.6.7/go.mod h1:7wAMb/33Rzln+PrGK16GbGOfA1zAO5Pq6wp19jtIt7c=\ncloud.google.com/go/apigateway v1.6.9 h1:vxZBKroYYCplsNrjggtniokb83Rk9mDitaiBN9nppdQ=\ncloud.google.com/go/apigateway v1.6.9/go.mod h1:YE9XDTFwq859O6TpZNtatBMDWnMRZOiTVF+Ru3oCBeY=\ncloud.google.com/go/apigeeconnect v1.6.5 h1:CrfIKv9Go3fh/QfQgisU3MeP90Ww7l/sVGmr3TpECo8=\ncloud.google.com/go/apigeeconnect v1.6.5/go.mod h1:MEKm3AiT7s11PqTfKE3KZluZA9O91FNysvd3E6SJ6Ow=\ncloud.google.com/go/apigeeconnect v1.6.7 h1:z08Xuv7ZtaB2d4jsJi9/WhbnnI5s19wlLDZpssn3Fus=\ncloud.google.com/go/apigeeconnect v1.6.7/go.mod h1:hZxCKvAvDdKX8+eT0g5eEAbRSS9Gkzi+MPWbgAMAy5U=\ncloud.google.com/go/apigeeconnect v1.6.9 h1:WO8XlUGugxvdKBj5hQnv8l7+SsVXgJVA97iNXyFgUb8=\ncloud.google.com/go/apigeeconnect v1.6.9/go.mod h1:tl53uGgVG1A00qK1dF6wGIji0CQIMrLdNccJ6+R221U=\ncloud.google.com/go/apigeeregistry v0.8.3 h1:C+QU2K+DzDjk4g074ouwHQGkoff1h5OMQp6sblCVreQ=\ncloud.google.com/go/apigeeregistry v0.8.3/go.mod h1:aInOWnqF4yMQx8kTjDqHNXjZGh/mxeNlAf52YqtASUs=\ncloud.google.com/go/apigeeregistry v0.8.5 h1:o1C/+IvzwYeV1doum61XmJQ/Bwpk/4+2DT1JyVu2x64=\ncloud.google.com/go/apigeeregistry v0.8.5/go.mod h1:ZMg60hq2K35tlqZ1VVywb9yjFzk9AJ7zqxrysOxLi3o=\ncloud.google.com/go/apigeeregistry v0.8.7 h1:K05SFNKzwvApZqVUcwg/6oFzn/b9WUrDN8pIdfD51qU=\ncloud.google.com/go/apigeeregistry v0.8.7/go.mod h1:Jge1HQaIkNU8JYSDY7l5SveeSKvGPvtLjzNjLU2+0N8=\ncloud.google.com/go/appengine v1.8.5 h1:l2SviT44zWQiOv8bPoMBzW0vOcMO22iO0s+nVtVhdts=\ncloud.google.com/go/appengine v1.8.5/go.mod h1:uHBgNoGLTS5di7BvU25NFDuKa82v0qQLjyMJLuPQrVo=\ncloud.google.com/go/appengine v1.8.7 h1:qYrjEHEFY7+CL4QlHIHuwTgrTnZbSKzdPFqgjZDsQNo=\ncloud.google.com/go/appengine v1.8.7/go.mod h1:1Fwg2+QTgkmN6Y+ALGwV8INLbdkI7+vIvhcKPZCML0g=\ncloud.google.com/go/appengine v1.8.9 h1:rI/aezyrwereUE0i/umbA6rZIgpJpBImFcy3JJEcQd0=\ncloud.google.com/go/appengine v1.8.9/go.mod h1:sw8T321TAto/u6tMinv3AV63olGH/hw7RhG4ZgNhqFs=\ncloud.google.com/go/area120 v0.8.5 h1:vTs08KPLN/iMzTbxpu5ciL06KcsrVPMjz4IwcQyZ4uY=\ncloud.google.com/go/area120 v0.8.5/go.mod h1:BcoFCbDLZjsfe4EkCnEq1LKvHSK0Ew/zk5UFu6GMyA0=\ncloud.google.com/go/area120 v0.8.7 h1:sUrR96yokdL6tTTXK0X13V1TLMta8/1u328bRG5lWZc=\ncloud.google.com/go/area120 v0.8.7/go.mod h1:L/xTq4NLP9mmxiGdcsVz7y1JLc9DI8pfaXRXbnjkR6w=\ncloud.google.com/go/area120 v0.8.9 h1:38uHviqcdB2S83yPfOXzDxf0KTG/W2DsXMuY/uf2T8c=\ncloud.google.com/go/area120 v0.8.9/go.mod h1:epLvbmajRp919r1LGdvS1zgcHJt/1MTQJJ9+r0/NBQc=\ncloud.google.com/go/artifactregistry v1.14.7 h1:W9sVlyb1VRcUf83w7aM3yMsnp4HS4PoyGqYQNG0O5lI=\ncloud.google.com/go/artifactregistry v1.14.7/go.mod h1:0AUKhzWQzfmeTvT4SjfI4zjot72EMfrkvL9g9aRjnnM=\ncloud.google.com/go/artifactregistry v1.14.9 h1:SSvoD0ofOydm5gA1++15pW9VPgQbk0OmNlcb7JczoO4=\ncloud.google.com/go/artifactregistry v1.14.9/go.mod h1:n2OsUqbYoUI2KxpzQZumm6TtBgtRf++QulEohdnlsvI=\ncloud.google.com/go/artifactregistry v1.14.11 h1:NZzHn5lPKyi2kgtM9Atu6IBvqslL7Fu1+5EkOYZd+yk=\ncloud.google.com/go/artifactregistry v1.14.11/go.mod h1:ahyKXer42EOIddYzk2zYfvZnByGPdAYhXqBbRBsGizE=\ncloud.google.com/go/asset v1.17.2 h1:xgFnBP3luSbUcC9RWJvb3Zkt+y/wW6PKwPHr3ssnIP8=\ncloud.google.com/go/asset v1.17.2/go.mod h1:SVbzde67ehddSoKf5uebOD1sYw8Ab/jD/9EIeWg99q4=\ncloud.google.com/go/asset v1.19.1 h1:mCqyoaDjDzaW1RqmmQtCJuawb9nca5bEu7HvVcpZDwg=\ncloud.google.com/go/asset v1.19.1/go.mod h1:kGOS8DiCXv6wU/JWmHWCgaErtSZ6uN5noCy0YwVaGfs=\ncloud.google.com/go/asset v1.19.3 h1:vl8wy3jpRa3ATctym5tiICp70iymSyOVbpKb3tKA668=\ncloud.google.com/go/asset v1.19.3/go.mod h1:1j8NNcHsbSE/KeHMZrizPIS6c8nm0WjEAPoFXzXNCj4=\ncloud.google.com/go/assuredworkloads v1.11.5 h1:gCrN3IyvqY3cP0wh2h43d99CgH3G+WYs9CeuFVKChR8=\ncloud.google.com/go/assuredworkloads v1.11.5/go.mod h1:FKJ3g3ZvkL2D7qtqIGnDufFkHxwIpNM9vtmhvt+6wqk=\ncloud.google.com/go/assuredworkloads v1.11.7 h1:xieyFA+JKyTDkO/Z9UyVEpkHW8pDYykU51O4G0pvXEg=\ncloud.google.com/go/assuredworkloads v1.11.7/go.mod h1:CqXcRH9N0KCDtHhFisv7kk+cl//lyV+pYXGi1h8rCEU=\ncloud.google.com/go/assuredworkloads v1.11.9 h1:xMjLtM24zy8yWGZlNtYxXo9fBj7ArWTsNkXKlRBZlqw=\ncloud.google.com/go/assuredworkloads v1.11.9/go.mod h1:uZ6+WHiT4iGn1iM1wk5njKnKJWiM3v/aYhDoCoHxs1w=\ncloud.google.com/go/auth v0.3.0/go.mod h1:lBv6NKTWp8E3LPzmO1TbiiRKc4drLOfHsgmlH9ogv5w=\ncloud.google.com/go/auth v0.4.1/go.mod h1:QVBuVEKpCn4Zp58hzRGvL0tjRGU0YqdRTdCHM1IHnro=\ncloud.google.com/go/auth v0.4.2 h1:sb0eyLkhRtpq5jA+a8KWw0W70YcdVca7KJ8TM0AFYDg=\ncloud.google.com/go/auth v0.4.2/go.mod h1:Kqvlz1cf1sNA0D+sYJnkPQOP+JMHkuHeIgVmCRtZOLc=\ncloud.google.com/go/auth v0.5.1/go.mod h1:vbZT8GjzDf3AVqCcQmqeeM32U9HBFc32vVVAbwDsa6s=\ncloud.google.com/go/auth v0.6.1/go.mod h1:eFHG7zDzbXHKmjJddFG/rBlcGp6t25SwRUiEQSlO4x4=\ncloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4=\ncloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q=\ncloud.google.com/go/automl v1.13.5 h1:ijiJy9sYWh75WrqImXsfWc1e3HR3iO+ef9fvW03Ig/4=\ncloud.google.com/go/automl v1.13.5/go.mod h1:MDw3vLem3yh+SvmSgeYUmUKqyls6NzSumDm9OJ3xJ1Y=\ncloud.google.com/go/automl v1.13.7 h1:w9AyogtMLXbcy5kzXPvk/Q3MGQkgJH7ZDB8fAUUxTt8=\ncloud.google.com/go/automl v1.13.7/go.mod h1:E+s0VOsYXUdXpq0y4gNZpi0A/s6y9+lAarmV5Eqlg40=\ncloud.google.com/go/automl v1.13.9 h1:GzYpU33Zo2tQ+8amLasjeBPawpKfBYnLGHVMQcyiFv4=\ncloud.google.com/go/automl v1.13.9/go.mod h1:KECCWW2AFsRuEVxUJEIXxcm3yPLf1rxS+qsBamyacMc=\ncloud.google.com/go/baremetalsolution v1.2.4 h1:LFydisRmS7hQk9P/YhekwuZGqb45TW4QavcrMToWo5A=\ncloud.google.com/go/baremetalsolution v1.2.4/go.mod h1:BHCmxgpevw9IEryE99HbYEfxXkAEA3hkMJbYYsHtIuY=\ncloud.google.com/go/baremetalsolution v1.2.6 h1:W4oSMS6vRCo9DLr1RPyDP8oeLverbvhJRzaZSsipft8=\ncloud.google.com/go/baremetalsolution v1.2.6/go.mod h1:KkS2BtYXC7YGbr42067nzFr+ABFMs6cxEcA1F+cedIw=\ncloud.google.com/go/baremetalsolution v1.2.8 h1:mM8zaxertfV5gaNGloJdJY87z7l8WcNkhw96VB1IGTQ=\ncloud.google.com/go/baremetalsolution v1.2.8/go.mod h1:Ai8ENs7ADMYWQ45DtfygUc6WblhShfi3kNPvuGv8/ok=\ncloud.google.com/go/batch v1.8.0 h1:2HK4JerwVaIcCh/lJiHwh6+uswPthiMMWhiSWLELayk=\ncloud.google.com/go/batch v1.8.0/go.mod h1:k8V7f6VE2Suc0zUM4WtoibNrA6D3dqBpB+++e3vSGYc=\ncloud.google.com/go/batch v1.8.7 h1:zaQwOAd7TlE84pwPHavNMsnv5zRyRV8ym2DJ4iQ2cV0=\ncloud.google.com/go/batch v1.8.7/go.mod h1:O5/u2z8Wc7E90Bh4yQVLQIr800/0PM5Qzvjac3Jxt4k=\ncloud.google.com/go/batch v1.9.0 h1:WlOqpQMOtWvOLIs7vCxBwYZGaB76i3olsBCVUvszY3M=\ncloud.google.com/go/batch v1.9.0/go.mod h1:VhRaG/bX2EmeaPSHvtptP5OAhgYuTrvtTAulKM68oiI=\ncloud.google.com/go/beyondcorp v1.0.4 h1:qs0J0O9Ol2h1yA0AU+r7l3hOCPzs2MjE1d6d/kaHIKo=\ncloud.google.com/go/beyondcorp v1.0.4/go.mod h1:Gx8/Rk2MxrvWfn4WIhHIG1NV7IBfg14pTKv1+EArVcc=\ncloud.google.com/go/beyondcorp v1.0.6 h1:KBcujO3QRvBIwzZLtvQEPB9SXdovHnMBx0V/uhucH9o=\ncloud.google.com/go/beyondcorp v1.0.6/go.mod h1:wRkenqrVRtnGFfnyvIg0zBFUdN2jIfeojFF9JJDwVIA=\ncloud.google.com/go/beyondcorp v1.0.8 h1:Dw9VO8fzZ2GWsfgx4wST03hjaZmRNv09lt0GZuzyVxM=\ncloud.google.com/go/beyondcorp v1.0.8/go.mod h1:2WaEvUnw+1ZIUNu227h71X/Q8ypcWWowii9TQ4xlfo0=\ncloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA=\ncloud.google.com/go/bigquery v1.59.1 h1:CpT+/njKuKT3CEmswm6IbhNu9u35zt5dO4yPDLW+nG4=\ncloud.google.com/go/bigquery v1.59.1/go.mod h1:VP1UJYgevyTwsV7desjzNzDND5p6hZB+Z8gZJN1GQUc=\ncloud.google.com/go/bigquery v1.61.0 h1:w2Goy9n6gh91LVi6B2Sc+HpBl8WbWhIyzdvVvrAuEIw=\ncloud.google.com/go/bigquery v1.61.0/go.mod h1:PjZUje0IocbuTOdq4DBOJLNYB0WF3pAKBHzAYyxCwFo=\ncloud.google.com/go/billing v1.18.2 h1:oWUEQvuC4JvtnqLZ35zgzdbuHt4Itbftvzbe6aEyFdE=\ncloud.google.com/go/billing v1.18.2/go.mod h1:PPIwVsOOQ7xzbADCwNe8nvK776QpfrOAUkvKjCUcpSE=\ncloud.google.com/go/billing v1.18.5 h1:GbOg1uGvoV8FXxMStFoNcq5z9AEUwCpKt/6GNcuDSZM=\ncloud.google.com/go/billing v1.18.5/go.mod h1:lHw7fxS6p7hLWEPzdIolMtOd0ahLwlokW06BzbleKP8=\ncloud.google.com/go/billing v1.18.7 h1:1Y7DdC2i8JQctWpd1ycra5iK+2LzwgFi+TxTqF3Yyp8=\ncloud.google.com/go/billing v1.18.7/go.mod h1:RreCBJPmaN/lzCz/2Xl1hA+OzWGqrzDsax4Qjjp0CbA=\ncloud.google.com/go/binaryauthorization v1.8.1 h1:1jcyh2uIUwSZkJ/JmL8kd5SUkL/Krbv8zmYLEbAz6kY=\ncloud.google.com/go/binaryauthorization v1.8.1/go.mod h1:1HVRyBerREA/nhI7yLang4Zn7vfNVA3okoAR9qYQJAQ=\ncloud.google.com/go/binaryauthorization v1.8.3 h1:RHnEM4HXbWShlGhPA0Jzj2YYETCHxmisNMU0OE2fXQM=\ncloud.google.com/go/binaryauthorization v1.8.3/go.mod h1:Cul4SsGlbzEsWPOz2sH8m+g2Xergb6ikspUyQ7iOThE=\ncloud.google.com/go/binaryauthorization v1.8.5 h1:ly5gQoJGHbuOM7E+pND38pTiQ0pZ4zTEOfJlfyfIIew=\ncloud.google.com/go/binaryauthorization v1.8.5/go.mod h1:2npTMgNJPsmUg0jfmDDORuqBkTPEW6ZSTHXzfxTvN1M=\ncloud.google.com/go/certificatemanager v1.7.5 h1:UMBr/twXvH3jcT5J5/YjRxf2tvwTYIfrpemTebe0txc=\ncloud.google.com/go/certificatemanager v1.7.5/go.mod h1:uX+v7kWqy0Y3NG/ZhNvffh0kuqkKZIXdvlZRO7z0VtM=\ncloud.google.com/go/certificatemanager v1.8.1 h1:XURrQhj5COWAEvICivbGID/Hu67AvMYHAhMRIyc3Ux8=\ncloud.google.com/go/certificatemanager v1.8.1/go.mod h1:hDQzr50Vx2gDB+dOfmDSsQzJy/UPrYRdzBdJ5gAVFIc=\ncloud.google.com/go/certificatemanager v1.8.3 h1:feyxS5Q8eWQNXQcVAcdooQEKGT/1B/qCcYvamOen7fc=\ncloud.google.com/go/certificatemanager v1.8.3/go.mod h1:QS0jxTu5wgEbzaYgGs/GBYKvVgAgc9jnYaaTFH8jRtE=\ncloud.google.com/go/channel v1.17.5 h1:/omiBnyFjm4S1ETHoOmJbL7LH7Ljcei4rYG6Sj3hc80=\ncloud.google.com/go/channel v1.17.5/go.mod h1:FlpaOSINDAXgEext0KMaBq/vwpLMkkPAw9b2mApQeHc=\ncloud.google.com/go/channel v1.17.7 h1:PrplNaAS6Dn187e+OcGzyEKETX8iL3tCaDqcPPW7Zoo=\ncloud.google.com/go/channel v1.17.7/go.mod h1:b+FkgBrhMKM3GOqKUvqHFY/vwgp+rwsAuaMd54wCdN4=\ncloud.google.com/go/channel v1.17.9 h1:rqF5CjW6KnOmlVZ75PNkuXYh5nh8dIsIWQjHLLwPy3Y=\ncloud.google.com/go/channel v1.17.9/go.mod h1:h9emIJm+06sK1FxqC3etsWdG87tg92T24wimlJs6lhY=\ncloud.google.com/go/cloudbuild v1.15.1 h1:ZB6oOmJo+MTov9n629fiCrO9YZPOg25FZvQ7gIHu5ng=\ncloud.google.com/go/cloudbuild v1.15.1/go.mod h1:gIofXZSu+XD2Uy+qkOrGKEx45zd7s28u/k8f99qKals=\ncloud.google.com/go/cloudbuild v1.16.1 h1:zkCG1dBezxRM3dtgQ9h1Y+IJ7V+lARWgp0l9k/SZsfU=\ncloud.google.com/go/cloudbuild v1.16.1/go.mod h1:c2KUANTtCBD8AsRavpPout6Vx8W+fsn5zTsWxCpWgq4=\ncloud.google.com/go/cloudbuild v1.16.3 h1:BIT0cFWQDT4XTVMyyZsjXvltVqBwvJ/RAKIRBqkgXf0=\ncloud.google.com/go/cloudbuild v1.16.3/go.mod h1:KJYZAwTUaDKDdEHwLj/EmnpmwLkMuq+fGnBEHA1LlE4=\ncloud.google.com/go/clouddms v1.7.4 h1:Sr0Zo5EAcPQiCBgHWICg3VGkcdS/LLP1d9SR7qQBM/s=\ncloud.google.com/go/clouddms v1.7.4/go.mod h1:RdrVqoFG9RWI5AvZ81SxJ/xvxPdtcRhFotwdE79DieY=\ncloud.google.com/go/clouddms v1.7.6 h1:Q47KKoA0zsNcC9U5aCmop5TPPItVq4cx7Wwqgra+5PU=\ncloud.google.com/go/clouddms v1.7.6/go.mod h1:8HWZ2tznZ0mNAtTpfnRNT0QOThqn9MBUqTj0Lx8npIs=\ncloud.google.com/go/clouddms v1.7.8 h1:WEz8ECgv4ZinRc84xcW1wTsFfLNb60yrSsIdsEJFRDk=\ncloud.google.com/go/clouddms v1.7.8/go.mod h1:KQpBMxH99ZTPK4LgXkYUntzRQ5hcNkjpGRbNSRzW9Nk=\ncloud.google.com/go/cloudtasks v1.12.6 h1:EUt1hIZ9bLv8Iz9yWaCrqgMnIU+Tdh0yXM1MMVGhjfE=\ncloud.google.com/go/cloudtasks v1.12.6/go.mod h1:b7c7fe4+TJsFZfDyzO51F7cjq7HLUlRi/KZQLQjDsaY=\ncloud.google.com/go/cloudtasks v1.12.8 h1:Y0HUuiCAVk9BojLItOycBl91tY25NXH8oFsyi1IC/U4=\ncloud.google.com/go/cloudtasks v1.12.8/go.mod h1:aX8qWCtmVf4H4SDYUbeZth9C0n9dBj4dwiTYi4Or/P4=\ncloud.google.com/go/cloudtasks v1.12.10 h1:2mdGqvYFm9HwPh//ckbcX8mZJgyG+F1TWk+82+eLuwM=\ncloud.google.com/go/cloudtasks v1.12.10/go.mod h1:OHJzRAdE+7H00cdsINhb21ugVLDgk3Uh4r0holCB5XQ=\ncloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI=\ncloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=\ncloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI=\ncloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI=\ncloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40=\ncloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU=\ncloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls=\ncloud.google.com/go/compute v1.27.0 h1:EGawh2RUnfHT5g8f/FX3Ds6KZuIBC77hZoDrBvEZw94=\ncloud.google.com/go/compute v1.27.0/go.mod h1:LG5HwRmWFKM2C5XxHRiNzkLLXW48WwvyVC0mfWsYPOM=\ncloud.google.com/go/compute v1.27.2 h1:5cE5hdrwJV/92ravlwIFRGnyH9CpLGhh4N0ZDVTU+BA=\ncloud.google.com/go/compute v1.27.2/go.mod h1:YQuHkNEwP3bIz4LBYQqf4DIMfFtTDtnEgnwG0mJQQ9I=\ncloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=\ncloud.google.com/go/contactcenterinsights v1.13.0 h1:6Vs/YnDG5STGjlWMEjN/xtmft7MrOTOnOZYUZtGTx0w=\ncloud.google.com/go/contactcenterinsights v1.13.0/go.mod h1:ieq5d5EtHsu8vhe2y3amtZ+BE+AQwX5qAy7cpo0POsI=\ncloud.google.com/go/contactcenterinsights v1.13.2 h1:46ertIh+cGkTg/lN7fN+TOx09SoM65dpdUp96vXBcMY=\ncloud.google.com/go/contactcenterinsights v1.13.2/go.mod h1:AfkSB8t7mt2sIY6WpfO61nD9J9fcidIchtxm9FqJVXk=\ncloud.google.com/go/contactcenterinsights v1.13.4 h1:BvtC33BbX+3p+v+VB0AZ6djRrcXP+qPqfWsIR+kz5v8=\ncloud.google.com/go/contactcenterinsights v1.13.4/go.mod h1:6OWSyQxeaQRxhkyMhtE+RFOOlsMcKOTukv8nnjxbNCQ=\ncloud.google.com/go/container v1.31.0 h1:MAaNH7VRNPWEhvqOypq2j+7ONJKrKzon4v9nS3nLZe0=\ncloud.google.com/go/container v1.31.0/go.mod h1:7yABn5s3Iv3lmw7oMmyGbeV6tQj86njcTijkkGuvdZA=\ncloud.google.com/go/container v1.35.1 h1:Vbu/3PZNrgV1Z5DGcRubQdUccX/uMUDNc+NgHNIfbEk=\ncloud.google.com/go/container v1.35.1/go.mod h1:udm8fgLm3TtpnjFN4QLLjZezAIIp/VnMo316yIRVRQU=\ncloud.google.com/go/container v1.37.2 h1:g5zm1SUBZ+q7IvtI5hM/6xcpf2C/bFfN2EXzS07Iz9k=\ncloud.google.com/go/container v1.37.2/go.mod h1:2ly7zpBmWtYjjuoB3fHyq8Gqrxaj2NIwzwVRpUcKYXk=\ncloud.google.com/go/containeranalysis v0.11.4 h1:doJ0M1ljS4hS0D2UbHywlHGwB7sQLNrt9vFk9Zyi7vY=\ncloud.google.com/go/containeranalysis v0.11.4/go.mod h1:cVZT7rXYBS9NG1rhQbWL9pWbXCKHWJPYraE8/FTSYPE=\ncloud.google.com/go/containeranalysis v0.11.6 h1:mSrneOVadcpnDZHJebg+ts/10azGTUKOCSQET7KdT7g=\ncloud.google.com/go/containeranalysis v0.11.6/go.mod h1:YRf7nxcTcN63/Kz9f86efzvrV33g/UV8JDdudRbYEUI=\ncloud.google.com/go/containeranalysis v0.11.8 h1:1rkYgK2szbRH311mRw/3lkeEOqrjN+2gOD7AZhMUxZw=\ncloud.google.com/go/containeranalysis v0.11.8/go.mod h1:2ru4oxs6dCcaG3ZsmKAy4yMmG68ukOuS/IRCMEHYpLo=\ncloud.google.com/go/datacatalog v1.19.3 h1:A0vKYCQdxQuV4Pi0LL9p39Vwvg4jH5yYveMv50gU5Tw=\ncloud.google.com/go/datacatalog v1.19.3/go.mod h1:ra8V3UAsciBpJKQ+z9Whkxzxv7jmQg1hfODr3N3YPJ4=\ncloud.google.com/go/datacatalog v1.20.1 h1:czcba5mxwRM5V//jSadyig0y+8aOHmN7gUl9GbHu59E=\ncloud.google.com/go/datacatalog v1.20.1/go.mod h1:Jzc2CoHudhuZhpv78UBAjMEg3w7I9jHA11SbRshWUjk=\ncloud.google.com/go/datacatalog v1.20.3 h1:lzMtWaUlaz9Bd9anvq2KBZwcFujzhVuxhIz1MsqRJv8=\ncloud.google.com/go/datacatalog v1.20.3/go.mod h1:AKC6vAy5urnMg5eJK3oUjy8oa5zMbiY33h125l8lmlo=\ncloud.google.com/go/dataflow v0.9.5 h1:RYHtcPhmE664+F0Je46p+NvFbG8z//KCXp+uEqB4jZU=\ncloud.google.com/go/dataflow v0.9.5/go.mod h1:udl6oi8pfUHnL0z6UN9Lf9chGqzDMVqcYTcZ1aPnCZQ=\ncloud.google.com/go/dataflow v0.9.7 h1:wKEakCbRevlwsWqTn34pWJUFmdbx0HKwpRH6HhU7NIs=\ncloud.google.com/go/dataflow v0.9.7/go.mod h1:3BjkOxANrm1G3+/EBnEsTEEgJu1f79mFqoOOZfz3v+E=\ncloud.google.com/go/dataflow v0.9.9 h1:7qTWGXfpM2z3assRznIXJLw+XJNlucHFcvFAYhclQ+o=\ncloud.google.com/go/dataflow v0.9.9/go.mod h1:Wk/92E1BvhV7qs/dWb+3dN26uGgyp/H1Jr5ZJxeD3dw=\ncloud.google.com/go/dataform v0.9.2 h1:5e4eqGrd0iDTCg4Q+VlAao5j2naKAA7xRurNtwmUknU=\ncloud.google.com/go/dataform v0.9.2/go.mod h1:S8cQUwPNWXo7m/g3DhWHsLBoufRNn9EgFrMgne2j7cI=\ncloud.google.com/go/dataform v0.9.4 h1:MiK1Us7YP9+sdNViUE4X2B2vLScrKcjOPw5b6uamZvE=\ncloud.google.com/go/dataform v0.9.4/go.mod h1:jjo4XY+56UrNE0wsEQsfAw4caUs4DLJVSyFBDelRDtQ=\ncloud.google.com/go/dataform v0.9.6 h1:8BMoPO9CD3qmPqnunVi73JcvwQrkjLILPXZKFExsjZc=\ncloud.google.com/go/dataform v0.9.6/go.mod h1:JKDPMfcYMu9oUMubIvvAGWTBX0sw4o/JIjCcczzbHmk=\ncloud.google.com/go/datafusion v1.7.5 h1:HQ/BUOP8OIGJxuztpYvNvlb+/U+/Bfs9SO8tQbh61fk=\ncloud.google.com/go/datafusion v1.7.5/go.mod h1:bYH53Oa5UiqahfbNK9YuYKteeD4RbQSNMx7JF7peGHc=\ncloud.google.com/go/datafusion v1.7.7 h1:ViFnMnUK7LNcWvisZgihxXit76JxSHFeijYI5U/gjOE=\ncloud.google.com/go/datafusion v1.7.7/go.mod h1:qGTtQcUs8l51lFA9ywuxmZJhS4ozxsBSus6ItqCUWMU=\ncloud.google.com/go/datafusion v1.7.9 h1:ZwicZskyu64L8Y6+zvZQjIav5A1xYwM0nqpk88HKLmY=\ncloud.google.com/go/datafusion v1.7.9/go.mod h1:ciYV8FL0JmrwgoJ7CH64oUHiI0oOf2VLE45LWKT51Ls=\ncloud.google.com/go/datalabeling v0.8.5 h1:GpIFRdm0qIZNsxqURFJwHt0ZBJZ0nF/mUVEigR7PH/8=\ncloud.google.com/go/datalabeling v0.8.5/go.mod h1:IABB2lxQnkdUbMnQaOl2prCOfms20mcPxDBm36lps+s=\ncloud.google.com/go/datalabeling v0.8.7 h1:M6irSHns6VxMro+IbvDxDJLD6tkfjlW+mo2MPaM23KA=\ncloud.google.com/go/datalabeling v0.8.7/go.mod h1:/PPncW5gxrU15UzJEGQoOT3IobeudHGvoExrtZ8ZBwo=\ncloud.google.com/go/datalabeling v0.8.9 h1:4ndOrLlhYErzhJGciRJx+s33+6P4cS23GnROnfaJ6hE=\ncloud.google.com/go/datalabeling v0.8.9/go.mod h1:61QutR66VZFgN8boHhl4/FTfxenNzihykv18BgxwSrg=\ncloud.google.com/go/dataplex v1.14.2 h1:fxIfdU8fxzR3clhOoNI7XFppvAmndxDu1AMH+qX9WKQ=\ncloud.google.com/go/dataplex v1.14.2/go.mod h1:0oGOSFlEKef1cQeAHXy4GZPB/Ife0fz/PxBf+ZymA2U=\ncloud.google.com/go/dataplex v1.16.0 h1:e8SV0yKuSjgHEZaQcZwjKXe0ta1jZrvLxX/2i/IAG+8=\ncloud.google.com/go/dataplex v1.16.0/go.mod h1:OlBoytuQ56+7aUCC03D34CtoF/4TJ5SiIrLsBdDu87Q=\ncloud.google.com/go/dataplex v1.18.0 h1:kXCHm9TqTr5BhZnsSD32iCRmf1S+Hho+UDqXr3Gdw7s=\ncloud.google.com/go/dataplex v1.18.0/go.mod h1:THLDVG07lcY1NgqVvjTV1mvec+rFHwpDwvSd+196MMc=\ncloud.google.com/go/dataproc v1.12.0 h1:W47qHL3W4BPkAIbk4SWmIERwsWBaNnWm0P2sdx3YgGU=\ncloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4=\ncloud.google.com/go/dataproc/v2 v2.4.0 h1:/u81Fd+BvCLp+xjctI1DiWVJn6cn9/s3Akc8xPH02yk=\ncloud.google.com/go/dataproc/v2 v2.4.0/go.mod h1:3B1Ht2aRB8VZIteGxQS/iNSJGzt9+CA0WGnDVMEm7Z4=\ncloud.google.com/go/dataproc/v2 v2.4.2 h1:RNMG5ffWKdbWOkwvjC4GqxLaxEaWFpm2hQCF2WFW/vo=\ncloud.google.com/go/dataproc/v2 v2.4.2/go.mod h1:smGSj1LZP3wtnsM9eyRuDYftNAroAl6gvKp/Wk64XDE=\ncloud.google.com/go/dataproc/v2 v2.5.1 h1:AYq1wJCKHrSG4KtxMQPkn1b0/uaHULHbXXTukCgou90=\ncloud.google.com/go/dataproc/v2 v2.5.1/go.mod h1:5s2CuQyTPX7e19ZRMLicfPFNgXrvsVct3xz94UvWFeQ=\ncloud.google.com/go/dataqna v0.8.5 h1:9ybXs3nr9BzxSGC04SsvtuXaHY0qmJSLIpIAbZo9GqQ=\ncloud.google.com/go/dataqna v0.8.5/go.mod h1:vgihg1mz6n7pb5q2YJF7KlXve6tCglInd6XO0JGOlWM=\ncloud.google.com/go/dataqna v0.8.7 h1:qM60MGNTGsSJuzAziVJjtRA7pGby2dA8OuqdVRe/lYo=\ncloud.google.com/go/dataqna v0.8.7/go.mod h1:hvxGaSvINAVH5EJJsONIwT1y+B7OQogjHPjizOFoWOo=\ncloud.google.com/go/dataqna v0.8.9 h1:7kiDfd4c/pSW8jmeeOac/H+PYgwLrIt4L88s4JiFRZU=\ncloud.google.com/go/dataqna v0.8.9/go.mod h1:wrw1SL/zLRlVgf0d8P0ZBJ2hhGaLbwoNRsW6m1mn64g=\ncloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ=\ncloud.google.com/go/datastore v1.15.0 h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg=\ncloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8=\ncloud.google.com/go/datastore v1.17.0 h1:UEmzuUdyDE58HV2jcb0BoqwCAwsJS2mtHapCsMmhVh0=\ncloud.google.com/go/datastore v1.17.0/go.mod h1:RiRZU0G6VVlIVlv1HRo3vSAPFHULV0ddBNsXO+Sony4=\ncloud.google.com/go/datastore v1.17.1 h1:6Me8ugrAOAxssGhSo8im0YSuy4YvYk4mbGvCadAH5aE=\ncloud.google.com/go/datastore v1.17.1/go.mod h1:mtzZ2HcVtz90OVrEXXGDc2pO4NM1kiBQy8YV4qGe0ZM=\ncloud.google.com/go/datastream v1.10.4 h1:o1QDKMo/hk0FN7vhoUQURREuA0rgKmnYapB+1M+7Qz4=\ncloud.google.com/go/datastream v1.10.4/go.mod h1:7kRxPdxZxhPg3MFeCSulmAJnil8NJGGvSNdn4p1sRZo=\ncloud.google.com/go/datastream v1.10.6 h1:FfNUy9j3aRQ99L4a5Rdm82RMuiw0BIe3lpPn2ykom8k=\ncloud.google.com/go/datastream v1.10.6/go.mod h1:lPeXWNbQ1rfRPjBFBLUdi+5r7XrniabdIiEaCaAU55o=\ncloud.google.com/go/datastream v1.10.8 h1:INvIDTnuti68Lmdizp2GUyRFjN9k3X7IowX0Ixy9Vto=\ncloud.google.com/go/datastream v1.10.8/go.mod h1:6nkPjnk5Qr602Wq+YQ+/RWUOX5h4voMTz5abgEOYPCM=\ncloud.google.com/go/deploy v1.17.1 h1:m27Ojwj03gvpJqCbodLYiVmE9x4/LrHGGMjzc0LBfM4=\ncloud.google.com/go/deploy v1.17.1/go.mod h1:SXQyfsXrk0fBmgBHRzBjQbZhMfKZ3hMQBw5ym7MN/50=\ncloud.google.com/go/deploy v1.19.0 h1:fzbObuGgoViO0ArFuOQIJ2yr5bH5YzbORVvMDBrDC5I=\ncloud.google.com/go/deploy v1.19.0/go.mod h1:BW9vAujmxi4b/+S7ViEuYR65GiEsqL6Mhf5S/9TeDRU=\ncloud.google.com/go/deploy v1.19.2 h1:C8T/Hna2lDE8qbwP75G+iJclnrIj7oblBoQoc1cfDWc=\ncloud.google.com/go/deploy v1.19.2/go.mod h1:i6zfU9FZkqFgWIvO2/gsodGU9qF4tF9mBgoMdfnf6as=\ncloud.google.com/go/dialogflow v1.49.0 h1:KqG0oxGE71qo0lRVyAoeBozefCvsMfcDzDjoLYSY0F4=\ncloud.google.com/go/dialogflow v1.49.0/go.mod h1:dhVrXKETtdPlpPhE7+2/k4Z8FRNUp6kMV3EW3oz/fe0=\ncloud.google.com/go/dialogflow v1.53.0 h1:C9wQ0odRYQsar0XqwCQb0c13BkRBsoSjOaejOg5ntgQ=\ncloud.google.com/go/dialogflow v1.53.0/go.mod h1:LqAvxq7bXiiGC3/DWIz9XXCxth2z2qpSnBAAmlNOj6U=\ncloud.google.com/go/dialogflow v1.54.2 h1:uS7IDkXIUR5EduLfyPmgTpZ27RcUIHby7JKsk4fBPdo=\ncloud.google.com/go/dialogflow v1.54.2/go.mod h1:avkFNYog+U127jKpGzW1FOllBwZy3OfCz1K1eE9RGh8=\ncloud.google.com/go/dlp v1.11.2 h1:lTipOuJaSjlYnnotPMbEhKURLC6GzCMDDzVbJAEbmYM=\ncloud.google.com/go/dlp v1.11.2/go.mod h1:9Czi+8Y/FegpWzgSfkRlyz+jwW6Te9Rv26P3UfU/h/w=\ncloud.google.com/go/dlp v1.14.0 h1:/GQVl5gOPR2dUemrR2YJxZG5D9MCE3AYgmDxjzP54jI=\ncloud.google.com/go/dlp v1.14.0/go.mod h1:4fvEu3EbLsHrgH3QFdFlTNIiCP5mHwdYhS/8KChDIC4=\ncloud.google.com/go/dlp v1.14.2 h1:oR15Jcd/grn//eftZ/B0DJ99lTaeN8vOf8TK5xhKEvc=\ncloud.google.com/go/dlp v1.14.2/go.mod h1:+uwRt+6wZ3PL0wsmZ1cUAj0Mt9kyeV3WcIKPW03wJVU=\ncloud.google.com/go/documentai v1.25.0 h1:lI62GMEEPO6vXJI9hj+G9WjOvnR0hEjvjokrnex4cxA=\ncloud.google.com/go/documentai v1.25.0/go.mod h1:ftLnzw5VcXkLItp6pw1mFic91tMRyfv6hHEY5br4KzY=\ncloud.google.com/go/documentai v1.30.0 h1:6KI6P04WExzrfbciW5RTEQScBEY98Fc4VtS04ufT3Js=\ncloud.google.com/go/documentai v1.30.0/go.mod h1:3Qt8PMt3S8W6w3VeoYFraaMS2GJRrXFnvkyn+GpB1n0=\ncloud.google.com/go/documentai v1.30.3 h1:D75r7hqnc9Zz6aRV8fzs/1V94R5YIv+FDJivUT4r+n4=\ncloud.google.com/go/documentai v1.30.3/go.mod h1:aMxiOouLr36hyahLhI3OwAcsy7plOTiXR/RmK+MHbSg=\ncloud.google.com/go/domains v0.9.5 h1:Mml/R6s3vQQvFPpi/9oX3O5dRirgjyJ8cksK8N19Y7g=\ncloud.google.com/go/domains v0.9.5/go.mod h1:dBzlxgepazdFhvG7u23XMhmMKBjrkoUNaw0A8AQB55Y=\ncloud.google.com/go/domains v0.9.7 h1:IixFIMRzUJWZUAOe8s/K2X4Bvtp0A3xjHLljfNC4aSo=\ncloud.google.com/go/domains v0.9.7/go.mod h1:u/yVf3BgfPJW3QDZl51qTJcDXo9PLqnEIxfGmGgbHEc=\ncloud.google.com/go/domains v0.9.9 h1:kIqgwkIph6Mw+m1nWafdEBrGqPPZ1J98hqO11gkL4BM=\ncloud.google.com/go/domains v0.9.9/go.mod h1:/ewEPIaNmTrElY7u9BZPcLPnoP1NJJXGvISDDapwVNU=\ncloud.google.com/go/edgecontainer v1.1.5 h1:tBY32km78ScpK2aOP84JoW/+wtpx5WluyPUSEE3270U=\ncloud.google.com/go/edgecontainer v1.1.5/go.mod h1:rgcjrba3DEDEQAidT4yuzaKWTbkTI5zAMu3yy6ZWS0M=\ncloud.google.com/go/edgecontainer v1.2.1 h1:xa6MIQhGylE24QdWaxhfIfAJE3Pupcr+i77WEx3NJrg=\ncloud.google.com/go/edgecontainer v1.2.1/go.mod h1:OE2D0lbkmGDVYLCvpj8Y0M4a4K076QB7E2JupqOR/qU=\ncloud.google.com/go/edgecontainer v1.2.3 h1:F5UsQ/A4GjkV9dTBi3KMFGXPa/6OdTk5/Dce2bdYonM=\ncloud.google.com/go/edgecontainer v1.2.3/go.mod h1:gMKe2JfE0OT0WuCJArzIndAmMWDPCIYGSWYIpJ6M7oM=\ncloud.google.com/go/errorreporting v0.3.0 h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0=\ncloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU=\ncloud.google.com/go/errorreporting v0.3.1 h1:E/gLk+rL7u5JZB9oq72iL1bnhVlLrnfslrgcptjJEUE=\ncloud.google.com/go/errorreporting v0.3.1/go.mod h1:6xVQXU1UuntfAf+bVkFk6nld41+CPyF2NSPCyXE3Ztk=\ncloud.google.com/go/essentialcontacts v1.6.6 h1:13eHn5qBnsawxI7mIrv4jRIEmQ1xg0Ztqw5ZGqtUNfA=\ncloud.google.com/go/essentialcontacts v1.6.6/go.mod h1:XbqHJGaiH0v2UvtuucfOzFXN+rpL/aU5BCZLn4DYl1Q=\ncloud.google.com/go/essentialcontacts v1.6.8 h1:p5Y7ZNVPiV9pEAHzvWiPcSiQRMQqcuHxOP0ZOP0vVww=\ncloud.google.com/go/essentialcontacts v1.6.8/go.mod h1:EHONVDSum2xxG2p+myyVda/FwwvGbY58ZYC4XqI/lDQ=\ncloud.google.com/go/essentialcontacts v1.6.10 h1:zI+3LgjRcv7StB7O35sWqCg79OKDx5sRR4GAq36fi+s=\ncloud.google.com/go/essentialcontacts v1.6.10/go.mod h1:wQlXvEb/0hB0C0d4H6/90P8CiZcYewkvJ3VoUVFPi4E=\ncloud.google.com/go/eventarc v1.13.4 h1:ORkd6/UV5FIdA8KZQDLNZYKS7BBOrj0p01DXPmT4tE4=\ncloud.google.com/go/eventarc v1.13.4/go.mod h1:zV5sFVoAa9orc/52Q+OuYUG9xL2IIZTbbuTHC6JSY8s=\ncloud.google.com/go/eventarc v1.13.6 h1:we+qx5uCZ88aQzQS3MJXRvAh/ik+EmqVyjcW1oYFW44=\ncloud.google.com/go/eventarc v1.13.6/go.mod h1:QReOaYnDNdjwAQQWNC7nfr63WnaKFUw7MSdQ9PXJYj0=\ncloud.google.com/go/eventarc v1.13.8 h1:2sbz7e95cv6zm2mNrMJlAQ6J93qQsGCQzw4lYa5GWJQ=\ncloud.google.com/go/eventarc v1.13.8/go.mod h1:Xq3SsMoOAn7RmacXgJO7kq818iRLFF0bVhH780qlmTs=\ncloud.google.com/go/filestore v1.8.1 h1:X5G4y/vrUo1B8Nsz93qSWTMAcM8LXbGUldq33OdcdCw=\ncloud.google.com/go/filestore v1.8.1/go.mod h1:MbN9KcaM47DRTIuLfQhJEsjaocVebNtNQhSLhKCF5GM=\ncloud.google.com/go/filestore v1.8.3 h1:CpRnsUpMU5gxUKyfh7TD0SM+E+7E4ORaDea2JctKfpY=\ncloud.google.com/go/filestore v1.8.3/go.mod h1:QTpkYpKBF6jlPRmJwhLqXfJQjVrQisplyb4e2CwfJWc=\ncloud.google.com/go/filestore v1.8.5 h1:yAHY3pGq6/IX4sLQqPpfaqfnSk1LmCdVkWNwzIP4X7c=\ncloud.google.com/go/filestore v1.8.5/go.mod h1:o8KvHyl5V30kIdrPX6hE+RknscXCUFXWSxYsEWeFfRU=\ncloud.google.com/go/firestore v1.6.1 h1:8rBq3zRjnHx8UtBvaOWqBB1xq9jH6/wltfQLlTMh2Fw=\ncloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4=\ncloud.google.com/go/firestore v1.14.0 h1:8aLcKnMPoldYU3YHgu4t2exrKhLQkqaXAGqT0ljrFVw=\ncloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ=\ncloud.google.com/go/firestore v1.15.0 h1:/k8ppuWOtNuDHt2tsRV42yI21uaGnKDEQnRFeBpbFF8=\ncloud.google.com/go/firestore v1.15.0/go.mod h1:GWOxFXcv8GZUtYpWHw/w6IuYNux/BtmeVTMmjrm4yhk=\ncloud.google.com/go/functions v1.16.0 h1:IWVylmK5F6hJ3R5zaRW7jI5PrWhCvtBVU4axQLmXSo4=\ncloud.google.com/go/functions v1.16.0/go.mod h1:nbNpfAG7SG7Duw/o1iZ6ohvL7mc6MapWQVpqtM29n8k=\ncloud.google.com/go/functions v1.16.2 h1:83bd2lCgtu2nLbX2jrqsrQhIs7VuVA1N6Op5syeRVIg=\ncloud.google.com/go/functions v1.16.2/go.mod h1:+gMvV5E3nMb9EPqX6XwRb646jTyVz8q4yk3DD6xxHpg=\ncloud.google.com/go/functions v1.16.4 h1:+mNEYegIO1ToQXsWEhEI6cI1lm+VAeu0pAmc+atYOaY=\ncloud.google.com/go/functions v1.16.4/go.mod h1:uDp5MbH0kCtXe3uBluq3Zi7bEDuHqcn60mAHxUsNezI=\ncloud.google.com/go/gaming v1.9.0 h1:7vEhFnZmd931Mo7sZ6pJy7uQPDxF7m7v8xtBheG08tc=\ncloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0=\ncloud.google.com/go/gkebackup v1.3.5 h1:iuE8KNtTsPOc79qeWoNS8zOWoXPD9SAdOmwgxtlCmh8=\ncloud.google.com/go/gkebackup v1.3.5/go.mod h1:KJ77KkNN7Wm1LdMopOelV6OodM01pMuK2/5Zt1t4Tvc=\ncloud.google.com/go/gkebackup v1.5.0 h1:wysUXEkggPwENZY3BXroOyWoyVfPypzaqNHgOZD9Kck=\ncloud.google.com/go/gkebackup v1.5.0/go.mod h1:eLaf/+n8jEmIvOvDriGjo99SN7wRvVadoqzbZu0WzEw=\ncloud.google.com/go/gkebackup v1.5.2 h1:sdGeTG6O+JPI7rRiVNy7wO4r4CELChfNe7C8BWPOJRM=\ncloud.google.com/go/gkebackup v1.5.2/go.mod h1:ZuWJKacdXtjiO8ry9RrdT57gvcsU7c7/FTqqwjdNUjk=\ncloud.google.com/go/gkeconnect v0.8.5 h1:17d+ZSSXKqG/RwZCq3oFMIWLPI8Zw3b8+a9/BEVlwH0=\ncloud.google.com/go/gkeconnect v0.8.5/go.mod h1:LC/rS7+CuJ5fgIbXv8tCD/mdfnlAadTaUufgOkmijuk=\ncloud.google.com/go/gkeconnect v0.8.7 h1:BfXsTXYs5xlicAlgbtlo8Cw+YdzU3PrlBg7dATJUwrk=\ncloud.google.com/go/gkeconnect v0.8.7/go.mod h1:iUH1jgQpTyNFMK5LgXEq2o0beIJ2p7KKUUFerkf/eGc=\ncloud.google.com/go/gkeconnect v0.8.9 h1:cXA4NWFlB174ub2kIaGLGrKxgTFjDWPzEs766i6Frww=\ncloud.google.com/go/gkeconnect v0.8.9/go.mod h1:gl758q5FLXewQZIsxQ7vHyYmLcGBuubvQO6J3yFDh08=\ncloud.google.com/go/gkehub v0.14.5 h1:RboLNFzf9wEMSo7DrKVBlf+YhK/A/jrLN454L5Tz99Q=\ncloud.google.com/go/gkehub v0.14.5/go.mod h1:6bzqxM+a+vEH/h8W8ec4OJl4r36laxTs3A/fMNHJ0wA=\ncloud.google.com/go/gkehub v0.14.7 h1:bHwcvgh8AmcYm6p6/ZrWW3a7J7sKBDtqtsyVXKssnPs=\ncloud.google.com/go/gkehub v0.14.7/go.mod h1:NLORJVTQeCdxyAjDgUwUp0A6BLEaNLq84mCiulsM4OE=\ncloud.google.com/go/gkehub v0.14.9 h1:fWHBKtPwH7Wp5JjNxlPLanYYmXj6XuHjIRk6oa4yqkY=\ncloud.google.com/go/gkehub v0.14.9/go.mod h1:W2rDU2n2xgMpf3/BqpT6ffUX/I8yez87rrW/iGRz6Kk=\ncloud.google.com/go/gkemulticloud v1.1.1 h1:rsSZAGLhyjyE/bE2ToT5fqo1qSW7S+Ubsc9jFOcbhSI=\ncloud.google.com/go/gkemulticloud v1.1.1/go.mod h1:C+a4vcHlWeEIf45IB5FFR5XGjTeYhF83+AYIpTy4i2Q=\ncloud.google.com/go/gkemulticloud v1.2.0 h1:zaWBakKPT6mPHVn5iefuRqttjpbNsb8LlMw9KgfyfyU=\ncloud.google.com/go/gkemulticloud v1.2.0/go.mod h1:iN5wBxTLPR6VTBWpkUsOP2zuPOLqZ/KbgG1bZir1Cng=\ncloud.google.com/go/gkemulticloud v1.2.2 h1:Msgg//raevqYlNZ+N8HFfO707wYVCyUnPKQPkt1g288=\ncloud.google.com/go/gkemulticloud v1.2.2/go.mod h1:VMsMYDKpUVYNrhese31TVJMVXPLEtFT/AnIarqlcwVo=\ncloud.google.com/go/grafeas v0.3.4 h1:D4x32R/cHX3MTofKwirz015uEdVk4uAxvZkZCZkOrF4=\ncloud.google.com/go/grafeas v0.3.4/go.mod h1:A5m316hcG+AulafjAbPKXBO/+I5itU4LOdKO2R/uDIc=\ncloud.google.com/go/grafeas v0.3.5 h1:Z87HxC4vnjR1kWWtzP6BuQXa6xBmndRK/kaz4iu6oMA=\ncloud.google.com/go/grafeas v0.3.5/go.mod h1:y54iTBcI+lgUdI+kAPKb8jtPqeTkA2dsYzWSrQtpc5s=\ncloud.google.com/go/grafeas v0.3.6 h1:7bcA10EBgTsxeAVypJhz2Dv3fhrdlO7Ml8l7ZZA2IkE=\ncloud.google.com/go/grafeas v0.3.6/go.mod h1:to6ECAPgRO2xeqD8ISXHc70nObJuaKZThreQOjeOH3o=\ncloud.google.com/go/gsuiteaddons v1.6.5 h1:CZEbaBwmbYdhFw21Fwbo+C35HMe36fTE0FBSR4KSfWg=\ncloud.google.com/go/gsuiteaddons v1.6.5/go.mod h1:Lo4P2IvO8uZ9W+RaC6s1JVxo42vgy+TX5a6hfBZ0ubs=\ncloud.google.com/go/gsuiteaddons v1.6.7 h1:06Jg3JeLslEfBYX1sDqOPLnF7a3wmhNcDUXF/fVOb50=\ncloud.google.com/go/gsuiteaddons v1.6.7/go.mod h1:u+sGBvr07OKNnOnQiB/Co1q4U2cjo50ERQwvnlcpNis=\ncloud.google.com/go/gsuiteaddons v1.6.9 h1:uezUQ2jCcW4jkvB0tbJkMCNVdIa/qGgqnxEqOF8IvwY=\ncloud.google.com/go/gsuiteaddons v1.6.9/go.mod h1:qITZZoLzQhMQ6Re+izKEvz4C+M1AP13S+XuEpS26824=\ncloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI=\ncloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8=\ncloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc=\ncloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI=\ncloud.google.com/go/iam v1.1.7/go.mod h1:J4PMPg8TtyurAUvSmPj8FF3EDgY1SPRZxcUGrn7WXGA=\ncloud.google.com/go/iam v1.1.8 h1:r7umDwhj+BQyz0ScZMp4QrGXjSTI3ZINnpgU2nlB/K0=\ncloud.google.com/go/iam v1.1.8/go.mod h1:GvE6lyMmfxXauzNq8NbgJbeVQNspG+tcdL/W8QO1+zE=\ncloud.google.com/go/iam v1.1.10 h1:ZSAr64oEhQSClwBL670MsJAW5/RLiC6kfw3Bqmd5ZDI=\ncloud.google.com/go/iam v1.1.10/go.mod h1:iEgMq62sg8zx446GCaijmA2Miwg5o3UbO+nI47WHJps=\ncloud.google.com/go/iap v1.9.4 h1:94zirc2r4t6KzhAMW0R6Dme005eTP6yf7g6vN4IhRrA=\ncloud.google.com/go/iap v1.9.4/go.mod h1:vO4mSq0xNf/Pu6E5paORLASBwEmphXEjgCFg7aeNu1w=\ncloud.google.com/go/iap v1.9.6 h1:rcuRS9XfOgr1v6TAoihVeSXntOnpVhFlVHtPfgOkLAo=\ncloud.google.com/go/iap v1.9.6/go.mod h1:YiK+tbhDszhaVifvzt2zTEF2ch9duHtp6xzxj9a0sQk=\ncloud.google.com/go/iap v1.9.8 h1:oqS5GMxyEDFndqwURKMIaRJ0GXygLJf/2bzue0WkrOU=\ncloud.google.com/go/iap v1.9.8/go.mod h1:jQzSbtpYRbBoMdOINr/OqUxBY9rhyqLx04utTCmJ6oo=\ncloud.google.com/go/ids v1.4.5 h1:xd4U7pgl3GHV+MABnv1BF4/Vy/zBF7CYC8XngkOLzag=\ncloud.google.com/go/ids v1.4.5/go.mod h1:p0ZnyzjMWxww6d2DvMGnFwCsSxDJM666Iir1bK1UuBo=\ncloud.google.com/go/ids v1.4.7 h1:wtd+r415yrfZ8LsB6yH6WrOZ26tYt7w6wy3i5a4HQZ8=\ncloud.google.com/go/ids v1.4.7/go.mod h1:yUkDC71u73lJoTaoONy0dsA0T7foekvg6ZRg9IJL0AA=\ncloud.google.com/go/ids v1.4.9 h1:JIYwGad3q7kADDAIMw0E/3OR3vtDqjSliRBlWAm+WNk=\ncloud.google.com/go/ids v1.4.9/go.mod h1:1pL+mhlvtUNphwBSK91yO8NoTVQYwOpqim1anIVBwbM=\ncloud.google.com/go/iot v1.7.5 h1:munTeBlbqI33iuTYgXy7S8lW2TCgi5l1hA4roSIY+EE=\ncloud.google.com/go/iot v1.7.5/go.mod h1:nq3/sqTz3HGaWJi1xNiX7F41ThOzpud67vwk0YsSsqs=\ncloud.google.com/go/iot v1.7.7 h1:M9SKIj9eoxoXCzytkLZVAuf5wmoui1OeDqEjC97wRbY=\ncloud.google.com/go/iot v1.7.7/go.mod h1:tr0bCOSPXtsg64TwwZ/1x+ReTWKlQRVXbM+DnrE54yM=\ncloud.google.com/go/iot v1.7.9 h1:dsroR14QUU7i2/GC4AcEv1MvKS0VZCYWWTCxxyq2iYo=\ncloud.google.com/go/iot v1.7.9/go.mod h1:1fi6x4CexbygNgRPn+tcxCjOZFTl+4G6Adbo6sLPR7c=\ncloud.google.com/go/kms v1.15.7 h1:7caV9K3yIxvlQPAcaFffhlT7d1qpxjB1wHBtjWa13SM=\ncloud.google.com/go/kms v1.15.7/go.mod h1:ub54lbsa6tDkUwnu4W7Yt1aAIFLnspgh0kPGToDukeI=\ncloud.google.com/go/kms v1.17.1 h1:5k0wXqkxL+YcXd4viQzTqCgzzVKKxzgrK+rCZJytEQs=\ncloud.google.com/go/kms v1.17.1/go.mod h1:DCMnCF/apA6fZk5Cj4XsD979OyHAqFasPuA5Sd0kGlQ=\ncloud.google.com/go/kms v1.18.2 h1:EGgD0B9k9tOOkbPhYW1PHo2W0teamAUYMOUIcDRMfPk=\ncloud.google.com/go/kms v1.18.2/go.mod h1:YFz1LYrnGsXARuRePL729oINmN5J/5e7nYijgvfiIeY=\ncloud.google.com/go/language v1.12.3 h1:iaJZg6K4j/2PvZZVcjeO/btcWWIllVRBhuTFjGO4LXs=\ncloud.google.com/go/language v1.12.3/go.mod h1:evFX9wECX6mksEva8RbRnr/4wi/vKGYnAJrTRXU8+f8=\ncloud.google.com/go/language v1.12.5 h1:kOYJEcuZgyUX/i/4DFrfXPcrddm1XCQD2lDI5hIFmZQ=\ncloud.google.com/go/language v1.12.5/go.mod h1:w/6a7+Rhg6Bc2Uzw6thRdKKNjnOzfKTJuxzD0JZZ0nM=\ncloud.google.com/go/language v1.12.7 h1:b8Ilb9pBrXj6aMMD0s8EEp28MSiBMo3FWPHAPNImIy4=\ncloud.google.com/go/language v1.12.7/go.mod h1:4s/11zABvI/gv+li/+ICe+cErIaN9hYmilf9wrc5Py0=\ncloud.google.com/go/lifesciences v0.9.5 h1:gXvN70m2p+4zgJFzaz6gMKaxTuF9WJ0USYoMLWAOm8g=\ncloud.google.com/go/lifesciences v0.9.5/go.mod h1:OdBm0n7C0Osh5yZB7j9BXyrMnTRGBJIZonUMxo5CzPw=\ncloud.google.com/go/lifesciences v0.9.7 h1:qqEmApr5YFOQjkrU8Jy6o6QpkESqfGbfrE6bnUZZbV8=\ncloud.google.com/go/lifesciences v0.9.7/go.mod h1:FQ713PhjAOHqUVnuwsCe1KPi9oAdaTfh58h1xPiW13g=\ncloud.google.com/go/lifesciences v0.9.9 h1:b9AaxLtWOu9IShII4fdLVDOS03CVCsqWX5zXufyRrDU=\ncloud.google.com/go/lifesciences v0.9.9/go.mod h1:4c8eLVKz7/FPw6lvoHx2/JQX1rVM8+LlYmBp8h5H3MQ=\ncloud.google.com/go/logging v1.9.0 h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw=\ncloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE=\ncloud.google.com/go/logging v1.10.0 h1:f+ZXMqyrSJ5vZ5pE/zr0xC8y/M9BLNzQeLBwfeZ+wY4=\ncloud.google.com/go/logging v1.10.0/go.mod h1:EHOwcxlltJrYGqMGfghSet736KR3hX1MAj614mrMk9I=\ncloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc=\ncloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI=\ncloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg=\ncloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s=\ncloud.google.com/go/longrunning v0.5.6 h1:xAe8+0YaWoCKr9t1+aWe+OeQgN/iJK1fEgZSXmjuEaE=\ncloud.google.com/go/longrunning v0.5.6/go.mod h1:vUaDrWYOMKRuhiv6JBnn49YxCPz2Ayn9GqyjaBT8/mA=\ncloud.google.com/go/longrunning v0.5.7 h1:WLbHekDbjK1fVFD3ibpFFVoyizlLRl73I7YKuAKilhU=\ncloud.google.com/go/longrunning v0.5.7/go.mod h1:8GClkudohy1Fxm3owmBGid8W0pSgodEMwEAztp38Xng=\ncloud.google.com/go/longrunning v0.5.9 h1:haH9pAuXdPAMqHvzX0zlWQigXT7B0+CL4/2nXXdBo5k=\ncloud.google.com/go/longrunning v0.5.9/go.mod h1:HD+0l9/OOW0za6UWdKJtXoFAX/BGg/3Wj8p10NeWF7c=\ncloud.google.com/go/managedidentities v1.6.5 h1:+bpih1piZVLxla/XBqeSUzJBp8gv9plGHIMAI7DLpDM=\ncloud.google.com/go/managedidentities v1.6.5/go.mod h1:fkFI2PwwyRQbjLxlm5bQ8SjtObFMW3ChBGNqaMcgZjI=\ncloud.google.com/go/managedidentities v1.6.7 h1:uWA9WQyfA0JdkeAFymWUsa3qE9tC33LUElla790Ou1A=\ncloud.google.com/go/managedidentities v1.6.7/go.mod h1:UzslJgHnc6luoyx2JV19cTCi2Fni/7UtlcLeSYRzTV8=\ncloud.google.com/go/managedidentities v1.6.9 h1:ktrpu0TWbtLm2wHUUOxXCftD2e8qZvtQZlFLjKyQXUA=\ncloud.google.com/go/managedidentities v1.6.9/go.mod h1:R7+78iH2j/SCTInutWINxGxEY0PH5rpbWt6uRq0Tn+Y=\ncloud.google.com/go/maps v1.6.4 h1:EVCZAiDvog9So46460BGbCasPhi613exoaQbpilMVlk=\ncloud.google.com/go/maps v1.6.4/go.mod h1:rhjqRy8NWmDJ53saCfsXQ0LKwBHfi6OSh5wkq6BaMhI=\ncloud.google.com/go/maps v1.11.0 h1:+//LeUr5ARVau1wVsxLkLnFtYviq9YFS+fB/mhfAOGQ=\ncloud.google.com/go/maps v1.11.0/go.mod h1:XcSsd8lg4ZhLPCtJ2YHcu/xLVePBzZOlI7GmR2cRCws=\ncloud.google.com/go/maps v1.11.3 h1:Un4DDZMLfvQT0kAne82lScQib5QJoBg2NDRVJkBokMg=\ncloud.google.com/go/maps v1.11.3/go.mod h1:4iKNrUzFISQ4RoiWCqIFEAAVtgKb2oQ09AVx8GheOUg=\ncloud.google.com/go/mediatranslation v0.8.5 h1:c76KdIXljQHSCb/Cy47S8H4s05A4zbK3pAFGzwcczZo=\ncloud.google.com/go/mediatranslation v0.8.5/go.mod h1:y7kTHYIPCIfgyLbKncgqouXJtLsU+26hZhHEEy80fSs=\ncloud.google.com/go/mediatranslation v0.8.7 h1:izgww3TlyvWyDWdFKnrASpbh12IkAuw8o2ION8sAjX0=\ncloud.google.com/go/mediatranslation v0.8.7/go.mod h1:6eJbPj1QJwiCP8R4K413qMx6ZHZJUi9QFpApqY88xWU=\ncloud.google.com/go/mediatranslation v0.8.9 h1:ptRvYRCZPwEk1oHIlSUg7a74czyS7VUP8869PXeaIT8=\ncloud.google.com/go/mediatranslation v0.8.9/go.mod h1:3MjXTUsEzrMC9My6e9o7TOmgIUGlyrkVAxjzcmxBUdU=\ncloud.google.com/go/memcache v1.10.5 h1:yeDv5qxRedFosvpMSEswrqUsJM5OdWvssPHFliNFTc4=\ncloud.google.com/go/memcache v1.10.5/go.mod h1:/FcblbNd0FdMsx4natdj+2GWzTq+cjZvMa1I+9QsuMA=\ncloud.google.com/go/memcache v1.10.7 h1:hE7f3ze3+eWh/EbYXEz7oXkm0LXcr7UCoLklwi7gsLU=\ncloud.google.com/go/memcache v1.10.7/go.mod h1:SrU6+QBhvXJV0TA59+B3oCHtLkPx37eqdKmRUlmSE1k=\ncloud.google.com/go/memcache v1.10.9 h1:Wks0hJCdprJkYn0kYTW5oto3NodsGqn98Urvj3fJgX4=\ncloud.google.com/go/memcache v1.10.9/go.mod h1:06evGxt9E1Mf/tYsXJNdXuRj5qzspVd0Tt18kXYDD5c=\ncloud.google.com/go/metastore v1.13.4 h1:dR7vqWXlK6IYR8Wbu9mdFfwlVjodIBhd1JRrpZftTEg=\ncloud.google.com/go/metastore v1.13.4/go.mod h1:FMv9bvPInEfX9Ac1cVcRXp8EBBQnBcqH6gz3KvJ9BAE=\ncloud.google.com/go/metastore v1.13.6 h1:otHcJkci5f/sNRedrSM7eM81QRnu0yZ3HvkvWGphABA=\ncloud.google.com/go/metastore v1.13.6/go.mod h1:OBCVMCP7X9vA4KKD+5J4Q3d+tiyKxalQZnksQMq5MKY=\ncloud.google.com/go/metastore v1.13.8 h1:aGLOZ6tPsGveXVST2c6tf2mjFm5bEcBij8qh4qInz+I=\ncloud.google.com/go/metastore v1.13.8/go.mod h1:2uLJBAXn5EDYJx9r7mZtxZifCKpakZUCvNfzI7ejUiE=\ncloud.google.com/go/monitoring v1.18.0 h1:NfkDLQDG2UR3WYZVQE8kwSbUIEyIqJUPl+aOQdFH1T4=\ncloud.google.com/go/monitoring v1.18.0/go.mod h1:c92vVBCeq/OB4Ioyo+NbN2U7tlg5ZH41PZcdvfc+Lcg=\ncloud.google.com/go/monitoring v1.19.0 h1:NCXf8hfQi+Kmr56QJezXRZ6GPb80ZI7El1XztyUuLQI=\ncloud.google.com/go/monitoring v1.19.0/go.mod h1:25IeMR5cQ5BoZ8j1eogHE5VPJLlReQ7zFp5OiLgiGZw=\ncloud.google.com/go/monitoring v1.20.1 h1:XmM6uk4+mI2ZhWdI2n/2GNhJdpeQN+1VdG2UWEDhX48=\ncloud.google.com/go/monitoring v1.20.1/go.mod h1:FYSe/brgfuaXiEzOQFhTjsEsJv+WePyK71X7Y8qo6uQ=\ncloud.google.com/go/networkconnectivity v1.14.4 h1:GBfXFhLyPspnaBE3nI/BRjdhW8vcbpT9QjE/4kDCDdc=\ncloud.google.com/go/networkconnectivity v1.14.4/go.mod h1:PU12q++/IMnDJAB+3r+tJtuCXCfwfN+C6Niyj6ji1Po=\ncloud.google.com/go/networkconnectivity v1.14.6 h1:jYpQ86mZ7OYZc7WadvCIlIaPXmXhr5nD7wgE/ekMVpM=\ncloud.google.com/go/networkconnectivity v1.14.6/go.mod h1:/azB7+oCSmyBs74Z26EogZ2N3UcXxdCHkCPcz8G32bU=\ncloud.google.com/go/networkconnectivity v1.14.8 h1:PSOYigOrl3pTFfRBPQk5uRlxSxn0G1HY7FNZPGz5Quw=\ncloud.google.com/go/networkconnectivity v1.14.8/go.mod h1:QQ/XTMk7U5fzv1cVNUCQJEjpkVEE+nYOK7mg3hVTuiI=\ncloud.google.com/go/networkmanagement v1.9.4 h1:aLV5GcosBNmd6M8+a0ekB0XlLRexv4fvnJJrYnqeBcg=\ncloud.google.com/go/networkmanagement v1.9.4/go.mod h1:daWJAl0KTFytFL7ar33I6R/oNBH8eEOX/rBNHrC/8TA=\ncloud.google.com/go/networkmanagement v1.13.2 h1:Ex1/aYkA0areleSmOGXHvEFBGohteIYJr2SGPrjOUe0=\ncloud.google.com/go/networkmanagement v1.13.2/go.mod h1:24VrV/5HFIOXMEtVQEUoB4m/w8UWvUPAYjfnYZcBc4c=\ncloud.google.com/go/networkmanagement v1.13.4 h1:CUX6YYtC6DpV0BzsaovqWExieVPDxmUxvQVlEjf0mwQ=\ncloud.google.com/go/networkmanagement v1.13.4/go.mod h1:dGTeJfDPQv0yGDt6gncj4XAPwxktjpCn5ZxQajStW8g=\ncloud.google.com/go/networksecurity v0.9.5 h1:+caSxBTj0E8OYVh/5wElFdjEMO1S/rZtE1152Cepchc=\ncloud.google.com/go/networksecurity v0.9.5/go.mod h1:KNkjH/RsylSGyyZ8wXpue8xpCEK+bTtvof8SBfIhMG8=\ncloud.google.com/go/networksecurity v0.9.7 h1:aepEkfiwOvUL9eu3ginVZhTaXDRHncQKi9lTT1BycH0=\ncloud.google.com/go/networksecurity v0.9.7/go.mod h1:aB6UiPnh/l32+TRvgTeOxVRVAHAFFqvK+ll3idU5BoY=\ncloud.google.com/go/networksecurity v0.9.9 h1:DDqzpqx1u1vDiYW2bBr0r3A5kIw3D5f4RtQkWiRd7Jg=\ncloud.google.com/go/networksecurity v0.9.9/go.mod h1:aLS+6sLeZkMhLx9ntTMJG4qWHdvDPctqMOb6ggz9m5s=\ncloud.google.com/go/notebooks v1.11.3 h1:FH48boYmrWVQ6k0Mx/WrnNafXncT5iSYxA8CNyWTgy0=\ncloud.google.com/go/notebooks v1.11.3/go.mod h1:0wQyI2dQC3AZyQqWnRsp+yA+kY4gC7ZIVP4Qg3AQcgo=\ncloud.google.com/go/notebooks v1.11.5 h1:sFU1ETg1HfIN/Tev8gD0dleAITLv7cHp0JClwFmJ6bo=\ncloud.google.com/go/notebooks v1.11.5/go.mod h1:pz6P8l2TvhWqAW3sysIsS0g2IUJKOzEklsjWJfi8sd4=\ncloud.google.com/go/notebooks v1.11.7 h1:/SeTEbFaU3cwzvc0ycM3nJ+8DvSTS8oeOWKi0bzEItM=\ncloud.google.com/go/notebooks v1.11.7/go.mod h1:lTjloYceMboZanBFC/JSZYet/K+JuO0mLAXVVhb/6bQ=\ncloud.google.com/go/optimization v1.6.3 h1:63NZaWyN+5rZEKHPX4ACpw3BjgyeuY8+rCehiCMaGPY=\ncloud.google.com/go/optimization v1.6.3/go.mod h1:8ve3svp3W6NFcAEFr4SfJxrldzhUl4VMUJmhrqVKtYA=\ncloud.google.com/go/optimization v1.6.5 h1:FPfowA/LEckKTQT0A4NJMI2bSou999c2ZyFX1zGiYxY=\ncloud.google.com/go/optimization v1.6.5/go.mod h1:eiJjNge1NqqLYyY75AtIGeQWKO0cvzD1ct/moCFaP2Q=\ncloud.google.com/go/optimization v1.6.7 h1:HFaCNq1upokZP4cPelqszhUShkmIypWma5IGe4fh4CA=\ncloud.google.com/go/optimization v1.6.7/go.mod h1:FREForRqqjTsJbElYyWSgb54WXUzTMTRyjVT+Tl80v8=\ncloud.google.com/go/orchestration v1.8.5 h1:YHgWMlrPttIVGItgGfuvO2KM7x+y9ivN/Yk92pMm1a4=\ncloud.google.com/go/orchestration v1.8.5/go.mod h1:C1J7HesE96Ba8/hZ71ISTV2UAat0bwN+pi85ky38Yq8=\ncloud.google.com/go/orchestration v1.9.2 h1:C2WL4ZnclXsh4XickGhKYKlPjqVZj35y1sbRjdsZ3g4=\ncloud.google.com/go/orchestration v1.9.2/go.mod h1:8bGNigqCQb/O1kK7PeStSNlyi58rQvZqDiuXT9KAcbg=\ncloud.google.com/go/orchestration v1.9.4 h1:xwqKYWlnDMLETKpZmPg+edCehC7w4G11d/8JSqutC5I=\ncloud.google.com/go/orchestration v1.9.4/go.mod h1:jk5hczI8Tciq+WCkN32GpjWJs67GSmAA0XHFUlELJLw=\ncloud.google.com/go/orgpolicy v1.12.1 h1:2JbXigqBJVp8Dx5dONUttFqewu4fP0p3pgOdIZAhpYU=\ncloud.google.com/go/orgpolicy v1.12.1/go.mod h1:aibX78RDl5pcK3jA8ysDQCFkVxLj3aOQqrbBaUL2V5I=\ncloud.google.com/go/orgpolicy v1.12.3 h1:fGftW2bPi8vTjQm57xlwtLBZQcrgC+c3HMFBzJ+KWPc=\ncloud.google.com/go/orgpolicy v1.12.3/go.mod h1:6BOgIgFjWfJzTsVcib/4QNHOAeOjCdaBj69aJVs//MA=\ncloud.google.com/go/orgpolicy v1.12.5 h1:NEbK9U6HuhjXOUI1+fJVdIEh0FHiJtGVq4kYQQ5B8t8=\ncloud.google.com/go/orgpolicy v1.12.5/go.mod h1:f778/jOHKp6cP6NbbQgjy4SDfQf6BoVGiSWdxky3ONQ=\ncloud.google.com/go/osconfig v1.12.5 h1:Mo5jGAxOMKH/PmDY7fgY19yFcVbvwREb5D5zMPQjFfo=\ncloud.google.com/go/osconfig v1.12.5/go.mod h1:D9QFdxzfjgw3h/+ZaAb5NypM8bhOMqBzgmbhzWViiW8=\ncloud.google.com/go/osconfig v1.12.7 h1:HXsXGFaFaLTklwKgSob/GSE+c3verYDQDgreFaosxyc=\ncloud.google.com/go/osconfig v1.12.7/go.mod h1:ID7Lbqr0fiihKMwAOoPomWRqsZYKWxfiuafNZ9j1Y1M=\ncloud.google.com/go/osconfig v1.13.0 h1:k+nAmaTcJ08BSR1yGadRZyLwRSvk5XgaZJinS1sEz4Q=\ncloud.google.com/go/osconfig v1.13.0/go.mod h1:tlACnQi1rtSLnHRYzfw9SH9zXs0M7S1jqiW2EOCn2Y0=\ncloud.google.com/go/oslogin v1.13.1 h1:1K4nOT5VEZNt7XkhaTXupBYos5HjzvJMfhvyD2wWdFs=\ncloud.google.com/go/oslogin v1.13.1/go.mod h1:vS8Sr/jR7QvPWpCjNqy6LYZr5Zs1e8ZGW/KPn9gmhws=\ncloud.google.com/go/oslogin v1.13.3 h1:7AgOWH1oMPrB1AVU0/f47ADdOt+XfdBY7QRb8tcMUp8=\ncloud.google.com/go/oslogin v1.13.3/go.mod h1:WW7Rs1OJQ1iSUckZDilvNBSNPE8on740zF+4ZDR4o8U=\ncloud.google.com/go/oslogin v1.13.5 h1:IptgM0b9yNJzEbC5rEetbRAcxsuRXDMuSX/65qASvE8=\ncloud.google.com/go/oslogin v1.13.5/go.mod h1:V+QzBAbZBZJq9CmTyzKrh3rpMiWIr1OBn6RL4mMVWXI=\ncloud.google.com/go/phishingprotection v0.8.5 h1:DH3WFLzEoJdW/6xgsmoDqOwT1xddFi7gKu0QGZQhpGU=\ncloud.google.com/go/phishingprotection v0.8.5/go.mod h1:g1smd68F7mF1hgQPuYn3z8HDbNre8L6Z0b7XMYFmX7I=\ncloud.google.com/go/phishingprotection v0.8.7 h1:CbCjfR/pgDHyRMu94o9nuGwaONEcarWnUfSGGw+I2ZI=\ncloud.google.com/go/phishingprotection v0.8.7/go.mod h1:FtYaOyGc/HQQU7wY4sfwYZBFDKAL+YtVBjUj8E3A3/I=\ncloud.google.com/go/phishingprotection v0.8.9 h1:Gg3XeqWW0g97MKvexeMytrxu31UHDjUd0bbzHa40D8o=\ncloud.google.com/go/phishingprotection v0.8.9/go.mod h1:xNojFKIdq+hNGNpOZOEGVGA4Mdhm2yByMli2Ni/RV0w=\ncloud.google.com/go/policytroubleshooter v1.10.3 h1:c0WOzC6hz964QWNBkyKfna8A2jOIx1zzZa43Gx/P09o=\ncloud.google.com/go/policytroubleshooter v1.10.3/go.mod h1:+ZqG3agHT7WPb4EBIRqUv4OyIwRTZvsVDHZ8GlZaoxk=\ncloud.google.com/go/policytroubleshooter v1.10.5 h1:LGt85MZUKlq9oqsbBL9+M6jAyeuR1TtCx6k5HfAQxTY=\ncloud.google.com/go/policytroubleshooter v1.10.5/go.mod h1:bpOf94YxjWUqsVKokzPBibMSAx937Jp2UNGVoMAtGYI=\ncloud.google.com/go/policytroubleshooter v1.10.7 h1:A3KZBrc2Qzq5jQI8M8hW4GscOBZzIvoOhwRiE41pqcY=\ncloud.google.com/go/policytroubleshooter v1.10.7/go.mod h1:/JxxZOSCT8nASvH/SP4Bj81EnDFwZhFThG7mgVWIoPY=\ncloud.google.com/go/privatecatalog v0.9.5 h1:UZ0assTnATXSggoxUIh61RjTQ4P9zCMk/kEMbn0nMYA=\ncloud.google.com/go/privatecatalog v0.9.5/go.mod h1:fVWeBOVe7uj2n3kWRGlUQqR/pOd450J9yZoOECcQqJk=\ncloud.google.com/go/privatecatalog v0.9.7 h1:wGZKKJhYyuf4gcAEywQqQ6F19yxhBJGnzgyxOTbJjBw=\ncloud.google.com/go/privatecatalog v0.9.7/go.mod h1:NWLa8MCL6NkRSt8jhL8Goy2A/oHkvkeAxiA0gv0rIXI=\ncloud.google.com/go/privatecatalog v0.9.9 h1:fV9+FuZuN6pup4h3qh/0HGpssJrkI5EyZVLQEEvzrA4=\ncloud.google.com/go/privatecatalog v0.9.9/go.mod h1:attFfOEf8ECrCuCdT3WYY8wyMKRZt4iB1bEWYFzPn50=\ncloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU=\ncloud.google.com/go/pubsub v1.36.1 h1:dfEPuGCHGbWUhaMCTHUFjfroILEkx55iUmKBZTP5f+Y=\ncloud.google.com/go/pubsub v1.36.1/go.mod h1:iYjCa9EzWOoBiTdd4ps7QoMtMln5NwaZQpK1hbRfBDE=\ncloud.google.com/go/pubsub v1.38.0 h1:J1OT7h51ifATIedjqk/uBNPh+1hkvUaH4VKbz4UuAsc=\ncloud.google.com/go/pubsub v1.38.0/go.mod h1:IPMJSWSus/cu57UyR01Jqa/bNOQA+XnPF6Z4dKW4fAA=\ncloud.google.com/go/pubsub v1.40.0 h1:0LdP+zj5XaPAGtWr2V6r88VXJlmtaB/+fde1q3TU8M0=\ncloud.google.com/go/pubsub v1.40.0/go.mod h1:BVJI4sI2FyXp36KFKvFwcfDRDfR8MiLT8mMhmIhdAeA=\ncloud.google.com/go/pubsublite v1.8.1 h1:pX+idpWMIH30/K7c0epN6V703xpIcMXWRjKJsz0tYGY=\ncloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0=\ncloud.google.com/go/pubsublite v1.8.2 h1:jLQozsEVr+c6tOU13vDugtnaBSUy/PD5zK6mhm+uF1Y=\ncloud.google.com/go/pubsublite v1.8.2/go.mod h1:4r8GSa9NznExjuLPEJlF1VjOPOpgf3IT6k8x/YgaOPI=\ncloud.google.com/go/recaptchaenterprise/v2 v2.9.2 h1:U3Wfq12X9cVMuTpsWDSURnXF0Z9hSPTHj+xsnXDRLsw=\ncloud.google.com/go/recaptchaenterprise/v2 v2.9.2/go.mod h1:trwwGkfhCmp05Ll5MSJPXY7yvnO0p4v3orGANAFHAuU=\ncloud.google.com/go/recaptchaenterprise/v2 v2.13.0 h1:+QG02kE63W13vXI+rwAxFF3EhGX6K7gXwFz9OKwKcHw=\ncloud.google.com/go/recaptchaenterprise/v2 v2.13.0/go.mod h1:jNYyn2ScR4DTg+VNhjhv/vJQdaU8qz+NpmpIzEE7HFQ=\ncloud.google.com/go/recaptchaenterprise/v2 v2.14.0 h1:revhoyewcQrpKccogfKNO2ul3aQbD11BU+ZsRpOWlgw=\ncloud.google.com/go/recaptchaenterprise/v2 v2.14.0/go.mod h1:pwC/eCyXq37YV3NSaiJsfOmuoTDkzURnVKAWGSkjDUY=\ncloud.google.com/go/recommendationengine v0.8.5 h1:ineqLswaCSBY0csYv5/wuXJMBlxATK6Xc5jJkpiTEdM=\ncloud.google.com/go/recommendationengine v0.8.5/go.mod h1:A38rIXHGFvoPvmy6pZLozr0g59NRNREz4cx7F58HAsQ=\ncloud.google.com/go/recommendationengine v0.8.7 h1:N6n/TEr0FQzeP4ZtvF5daMszOhdZI94uMiPiAi9kFMo=\ncloud.google.com/go/recommendationengine v0.8.7/go.mod h1:YsUIbweUcpm46OzpVEsV5/z+kjuV6GzMxl7OAKIGgKE=\ncloud.google.com/go/recommendationengine v0.8.9 h1:jewIoRtf1F4WgtIDdPEKDqpvPU+utN02sFw3iYbmvwM=\ncloud.google.com/go/recommendationengine v0.8.9/go.mod h1:QgE5f6s20QhCXf4UR9KMI/Q6Spykd2zEYXX2oBz6Cbs=\ncloud.google.com/go/recommender v1.12.1 h1:LVLYS3r3u0MSCxQSDUtLSkporEGi9OAE6hGvayrZNPs=\ncloud.google.com/go/recommender v1.12.1/go.mod h1:gf95SInWNND5aPas3yjwl0I572dtudMhMIG4ni8nr+0=\ncloud.google.com/go/recommender v1.12.3 h1:v9x75vXP5wMXw3QG3xmgjVHLlqYufuLn/ht3oNWCA3w=\ncloud.google.com/go/recommender v1.12.3/go.mod h1:OgN0MjV7/6FZUUPgF2QPQtYErtZdZc4u+5onvurcGEI=\ncloud.google.com/go/recommender v1.12.5 h1:91NMrObmes2zA+gI0+QhCFH1oTPHlMGFTAJy5MTD2eg=\ncloud.google.com/go/recommender v1.12.5/go.mod h1:ggh5JNuG5ajpRqqcEkgni/DjpS7x12ktO+Edu8bmCJM=\ncloud.google.com/go/redis v1.14.2 h1:QF0maEdVv0Fj/2roU8sX3NpiDBzP9ICYTO+5F32gQNo=\ncloud.google.com/go/redis v1.14.2/go.mod h1:g0Lu7RRRz46ENdFKQ2EcQZBAJ2PtJHJLuiiRuEXwyQw=\ncloud.google.com/go/redis v1.16.0 h1:1veL/h/x5bgzG2CLK2cdG3plWdgO0p1qoHgwFBqG7+c=\ncloud.google.com/go/redis v1.16.0/go.mod h1:NLzG3Ur8ykVIZk+i5ienRnycsvWzQ0uCLcil6Htc544=\ncloud.google.com/go/redis v1.16.2 h1:QbarPMu22tuUOqi3ynNKk2mQWl7xitMTxAaAUaBUFsE=\ncloud.google.com/go/redis v1.16.2/go.mod h1:bn/4nXSZkoH4QTXRjqWR2AZ0WA1b13ct354nul2SSiU=\ncloud.google.com/go/resourcemanager v1.9.5 h1:AZWr1vWVDKGwfLsVhcN+vcwOz3xqqYxtmMa0aABCMms=\ncloud.google.com/go/resourcemanager v1.9.5/go.mod h1:hep6KjelHA+ToEjOfO3garMKi/CLYwTqeAw7YiEI9x8=\ncloud.google.com/go/resourcemanager v1.9.7 h1:SdvD0PaPX60+yeKoSe16mawFpM0EPuiPPihTIVlhRsY=\ncloud.google.com/go/resourcemanager v1.9.7/go.mod h1:cQH6lJwESufxEu6KepsoNAsjrUtYYNXRwxm4QFE5g8A=\ncloud.google.com/go/resourcemanager v1.9.9 h1:9JgRo4uBdCLJpWb6c+1+q7QPyWzH0LSCKUcF/IliKNk=\ncloud.google.com/go/resourcemanager v1.9.9/go.mod h1:vCBRKurJv+XVvRZ0XFhI/eBrBM7uBOPFjMEwSDMIflY=\ncloud.google.com/go/resourcesettings v1.6.5 h1:BTr5MVykJwClASci/7Og4Qfx70aQ4n3epsNLj94ZYgw=\ncloud.google.com/go/resourcesettings v1.6.5/go.mod h1:WBOIWZraXZOGAgoR4ukNj0o0HiSMO62H9RpFi9WjP9I=\ncloud.google.com/go/resourcesettings v1.7.0 h1:yEuByg5XBHhTG9wPEU7GiEtC9Orp1wSEyiiX4IPqoSY=\ncloud.google.com/go/resourcesettings v1.7.0/go.mod h1:pFzZYOQMyf1hco9pbNWGEms6N/2E7nwh0oVU1Tz+4qA=\ncloud.google.com/go/resourcesettings v1.7.2 h1:Q3udMNHhYLrzVNrCYEpZ6f70Rf6nHpiPFay1ILwcQ80=\ncloud.google.com/go/resourcesettings v1.7.2/go.mod h1:mNdB5Wl9/oVr9Da3OrEstSyXCT949ignvO6ZrmYdmGU=\ncloud.google.com/go/retail v1.16.0 h1:Fn1GuAua1c6crCGqfJ1qMxG1Xh10Tg/x5EUODEHMqkw=\ncloud.google.com/go/retail v1.16.0/go.mod h1:LW7tllVveZo4ReWt68VnldZFWJRzsh9np+01J9dYWzE=\ncloud.google.com/go/retail v1.16.2 h1:msP5a8BOxVym2DvoubeWAxAeV6VhYkKnYHc2XOkd/+U=\ncloud.google.com/go/retail v1.16.2/go.mod h1:T7UcBh4/eoxRBpP3vwZCoa+PYA9/qWRTmOCsV8DRdZ0=\ncloud.google.com/go/retail v1.17.2 h1:RovE7VK3TEFDECBXwVWItL21+QQ4WY6otLCZHqExMBQ=\ncloud.google.com/go/retail v1.17.2/go.mod h1:Ad6D8tkDZatI1X7szhhYWiatZmH6nSUfZ3WeCECyA0E=\ncloud.google.com/go/run v1.3.4 h1:m9WDA7DzTpczhZggwYlZcBWgCRb+kgSIisWn1sbw2rQ=\ncloud.google.com/go/run v1.3.4/go.mod h1:FGieuZvQ3tj1e9GnzXqrMABSuir38AJg5xhiYq+SF3o=\ncloud.google.com/go/run v1.3.7 h1:E4Z5e681Qh7UJrJRMCgYhp+3tkcoXiaKGh3UZmUPaAQ=\ncloud.google.com/go/run v1.3.7/go.mod h1:iEUflDx4Js+wK0NzF5o7hE9Dj7QqJKnRj0/b6rhVq20=\ncloud.google.com/go/run v1.3.9 h1:De6XlIBjzEFXPzDQ/hJgvieh4H/105mhkkwxL5DmH0o=\ncloud.google.com/go/run v1.3.9/go.mod h1:Ep/xsiUt5ZOwNptGl1FBlHb+asAgqB+9RDJKBa/c1mI=\ncloud.google.com/go/scheduler v1.10.6 h1:5U8iXLoQ03qOB+ZXlAecU7fiE33+u3QiM9nh4cd0eTE=\ncloud.google.com/go/scheduler v1.10.6/go.mod h1:pe2pNCtJ+R01E06XCDOJs1XvAMbv28ZsQEbqknxGOuE=\ncloud.google.com/go/scheduler v1.10.8 h1:Jn/unfNUgRiNJRc1nrApzimKiVj91UYlLT8mMfpUu48=\ncloud.google.com/go/scheduler v1.10.8/go.mod h1:0YXHjROF1f5qTMvGTm4o7GH1PGAcmu/H/7J7cHOiHl0=\ncloud.google.com/go/scheduler v1.10.10 h1:KYdENFZip7O2Jk/zuNzEPIv+ZQokkWnNZ5AnrIuooYo=\ncloud.google.com/go/scheduler v1.10.10/go.mod h1:nOLkchaee8EY0g73hpv613pfnrZwn/dU2URYjJbRLR0=\ncloud.google.com/go/secretmanager v1.11.5 h1:82fpF5vBBvu9XW4qj0FU2C6qVMtj1RM/XHwKXUEAfYY=\ncloud.google.com/go/secretmanager v1.11.5/go.mod h1:eAGv+DaCHkeVyQi0BeXgAHOU0RdrMeZIASKc+S7VqH4=\ncloud.google.com/go/secretmanager v1.13.1 h1:TTGo2Vz7ZxYn2QbmuFP7Zo4lDm5VsbzBjDReo3SA5h4=\ncloud.google.com/go/secretmanager v1.13.1/go.mod h1:y9Ioh7EHp1aqEKGYXk3BOC+vkhlHm9ujL7bURT4oI/4=\ncloud.google.com/go/secretmanager v1.13.3 h1:VqUVYY3U6uFXOhPdZgAoZH9m8E6p7eK02TsDRj2SBf4=\ncloud.google.com/go/secretmanager v1.13.3/go.mod h1:e45+CxK0w6GaL4hS+KabgQskl4RdSS30b+HRf0TH0kk=\ncloud.google.com/go/security v1.15.5 h1:wTKJQ10j8EYgvE8Y+KhovxDRVDk2iv/OsxZ6GrLP3kE=\ncloud.google.com/go/security v1.15.5/go.mod h1:KS6X2eG3ynWjqcIX976fuToN5juVkF6Ra6c7MPnldtc=\ncloud.google.com/go/security v1.17.0 h1:u4RCnEQPvlrrnFRFinU0T3WsjtrsQErkWBfqTM5oUQI=\ncloud.google.com/go/security v1.17.0/go.mod h1:eSuFs0SlBv1gWg7gHIoF0hYOvcSwJCek/GFXtgO6aA0=\ncloud.google.com/go/security v1.17.2 h1:pEkUeR1PFNwoFAIXPMa4PBCYb75UT8LmNfjQy1fm/Co=\ncloud.google.com/go/security v1.17.2/go.mod h1:6eqX/AgDw56KwguEBfFNiNQ+Vzi+V6+GopklexYuJ0U=\ncloud.google.com/go/securitycenter v1.24.4 h1:/5jjkZ+uGe8hZ7pvd7pO30VW/a+pT2MrrdgOqjyucKQ=\ncloud.google.com/go/securitycenter v1.24.4/go.mod h1:PSccin+o1EMYKcFQzz9HMMnZ2r9+7jbc+LvPjXhpwcU=\ncloud.google.com/go/securitycenter v1.30.0 h1:Y8C0I/mzLbaxAl5cw3EaLox0Rvpy+VUwEuCGWIQDMU8=\ncloud.google.com/go/securitycenter v1.30.0/go.mod h1:/tmosjS/dfTnzJxOzZhTXdX3MXWsCmPWfcYOgkJmaJk=\ncloud.google.com/go/securitycenter v1.32.0 h1:UJvalA9NoLhU0DWLa10qMSvMucEe+iQOqxC4/KGqMys=\ncloud.google.com/go/securitycenter v1.32.0/go.mod h1:s1dN6hM6HZyzUyJrqBoGvhxR/GecT5u48sidMIgDxTo=\ncloud.google.com/go/servicedirectory v1.11.4 h1:da7HFI1229kyzIyuVEzHXip0cw0d+E0s8mjQby0WN+k=\ncloud.google.com/go/servicedirectory v1.11.4/go.mod h1:Bz2T9t+/Ehg6x+Y7Ycq5xiShYLD96NfEsWNHyitj1qM=\ncloud.google.com/go/servicedirectory v1.11.7 h1:c3OAhTcZ8LbIiKps5T3p6i0QcPI8/aWYwOfoZobICKo=\ncloud.google.com/go/servicedirectory v1.11.7/go.mod h1:fiO/tM0jBpVhpCAe7Yp5HmEsmxSUcOoc4vPrO02v68I=\ncloud.google.com/go/servicedirectory v1.11.9 h1:KivmF5S9i6av+7tgkHgcosC51jEtmC9UvgayezP2Uqo=\ncloud.google.com/go/servicedirectory v1.11.9/go.mod h1:qiDNuIS2qxuuroSmPNuXWxoFMvsEudKXP62Wos24BsU=\ncloud.google.com/go/shell v1.7.5 h1:3Fq2hzO0ZSyaqBboJrFkwwf/qMufDtqwwA6ep8EZxEI=\ncloud.google.com/go/shell v1.7.5/go.mod h1:hL2++7F47/IfpfTO53KYf1EC+F56k3ThfNEXd4zcuiE=\ncloud.google.com/go/shell v1.7.7 h1:HxCzcUxSsCh6FJWkmbOUrGI1sKe4E1Yy4vaykn4RhJ4=\ncloud.google.com/go/shell v1.7.7/go.mod h1:7OYaMm3TFMSZBh8+QYw6Qef+fdklp7CjjpxYAoJpZbQ=\ncloud.google.com/go/shell v1.7.9 h1:CPn8dHSJgZsIaMtGw5iMoF/6Ab7l5A2g34CIjVxlU3c=\ncloud.google.com/go/shell v1.7.9/go.mod h1:h3wVC6qaQ1nIlSWMasl1e/uwmepVbZpjSk/Bn7ZafSc=\ncloud.google.com/go/spanner v1.56.0 h1:o/Cv7/zZ1WgRXVCd5g3Nc23ZI39p/1pWFqFwvg6Wcu8=\ncloud.google.com/go/spanner v1.56.0/go.mod h1:DndqtUKQAt3VLuV2Le+9Y3WTnq5cNKrnLb/Piqcj+h0=\ncloud.google.com/go/spanner v1.63.0 h1:P6+BY70Wtol4MtryBgnXZVTZfsdySEvWfz0EpyLwHi4=\ncloud.google.com/go/spanner v1.63.0/go.mod h1:iqDx7urZpgD7RekZ+CFvBRH6kVTW1ZSEb2HMDKOp5Cc=\ncloud.google.com/go/spanner v1.64.0 h1:ltyPbHA/nRAtAhU/o742dXBCI1eNHPeaRY09Ja8B+hM=\ncloud.google.com/go/spanner v1.64.0/go.mod h1:TOFx3pb2UwPsDGlE1gTehW+y6YlU4IFk+VdDHSGQS/M=\ncloud.google.com/go/speech v1.21.1 h1:nuFc+Kj5B8de75nN4FdPyUbI2SiBoHZG6BLurXL56Q0=\ncloud.google.com/go/speech v1.21.1/go.mod h1:E5GHZXYQlkqWQwY5xRSLHw2ci5NMQNG52FfMU1aZrIA=\ncloud.google.com/go/speech v1.23.1 h1:TcWEAOLQH1Lb2fhHS6/GjvAh+ue0dt4xUDHXHG6vF04=\ncloud.google.com/go/speech v1.23.1/go.mod h1:UNgzNxhNBuo/OxpF1rMhA/U2rdai7ILL6PBXFs70wq0=\ncloud.google.com/go/speech v1.23.3 h1:zuiX3ExV9jv1rrTFFyYZF5DvYys0/JByeErC50Hyw+g=\ncloud.google.com/go/speech v1.23.3/go.mod h1:u7tK/jxhzRZwZ5Nujhau7iLI3+VfJKYhpoZTjU7hRsE=\ncloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA=\ncloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU=\ncloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=\ncloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w=\ncloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8=\ncloud.google.com/go/storage v1.37.0/go.mod h1:i34TiT2IhiNDmcj65PqwCjcoUX7Z5pLzS8DEmoiFq1k=\ncloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg=\ncloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY=\ncloud.google.com/go/storage v1.40.0 h1:VEpDQV5CJxFmJ6ueWNsKxcr1QAYOXEgxDa+sBbJahPw=\ncloud.google.com/go/storage v1.40.0/go.mod h1:Rrj7/hKlG87BLqDJYtwR0fbPld8uJPbQ2ucUMY7Ir0g=\ncloud.google.com/go/storage v1.41.0 h1:RusiwatSu6lHeEXe3kglxakAmAbfV+rhtPqA6i8RBx0=\ncloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80=\ncloud.google.com/go/storagetransfer v1.10.4 h1:dy4fL3wO0VABvzM05ycMUPFHxTPbJz9Em8ikAJVqSbI=\ncloud.google.com/go/storagetransfer v1.10.4/go.mod h1:vef30rZKu5HSEf/x1tK3WfWrL0XVoUQN/EPDRGPzjZs=\ncloud.google.com/go/storagetransfer v1.10.6 h1:CXmoNEvz7y2NtHFZuH3Z8ASN43rxRINWa2Q/IlBzM2k=\ncloud.google.com/go/storagetransfer v1.10.6/go.mod h1:3sAgY1bx1TpIzfSzdvNGHrGYldeCTyGI/Rzk6Lc6A7w=\ncloud.google.com/go/storagetransfer v1.10.8 h1:hFCYNbls3DoAA49BZ8bWfmdUPfwLa708h1F6gPy76OE=\ncloud.google.com/go/storagetransfer v1.10.8/go.mod h1:fEGWYffkV9OYOKms8nxyJWIZA7iEWPl2Mybk6bpQnEk=\ncloud.google.com/go/talent v1.6.6 h1:JssV0CE3FNujuSWn7SkosOzg7qrMxVnt6txOfGcMSa4=\ncloud.google.com/go/talent v1.6.6/go.mod h1:y/WQDKrhVz12WagoarpAIyKKMeKGKHWPoReZ0g8tseQ=\ncloud.google.com/go/talent v1.6.8 h1:RoyEtftfJrbwJcu63zuWE4IjC76xMyVsJBhmleIp3bE=\ncloud.google.com/go/talent v1.6.8/go.mod h1:kqPAJvhxmhoUTuqxjjk2KqA8zUEeTDmH+qKztVubGlQ=\ncloud.google.com/go/talent v1.6.10 h1:Zc1FO2NTLjCNztqnyll7DwKobFYomyCijRlqbJj+7mc=\ncloud.google.com/go/talent v1.6.10/go.mod h1:q2/qIb2Eb2svmeBfkCGIia/NGmkcScdyYSyNNOgFRLI=\ncloud.google.com/go/texttospeech v1.7.5 h1:dxY2Q5mHCbrGa3oPR2O3PCicdnvKa1JmwGQK36EFLOw=\ncloud.google.com/go/texttospeech v1.7.5/go.mod h1:tzpCuNWPwrNJnEa4Pu5taALuZL4QRRLcb+K9pbhXT6M=\ncloud.google.com/go/texttospeech v1.7.7 h1:qR6Mu+EM2OfaZR1/Rl8BDBTVfi2X5OtwKKvJRSQyG+o=\ncloud.google.com/go/texttospeech v1.7.7/go.mod h1:XO4Wr2VzWHjzQpMe3gS58Oj68nmtXMyuuH+4t0wy9eA=\ncloud.google.com/go/texttospeech v1.7.9 h1:wn9UNRlEw+vCDFd2NBVPrNGFwB+n/cV20i81MBlbwas=\ncloud.google.com/go/texttospeech v1.7.9/go.mod h1:nuo7l7CVWUMvaTgswbn/hhn2Tv73/WbenqGyc236xpo=\ncloud.google.com/go/tpu v1.6.5 h1:C8YyYda8WtNdBoCgFwwBzZd+S6+EScHOxM/z1h0NNp8=\ncloud.google.com/go/tpu v1.6.5/go.mod h1:P9DFOEBIBhuEcZhXi+wPoVy/cji+0ICFi4TtTkMHSSs=\ncloud.google.com/go/tpu v1.6.7 h1:ngQokxUB1z2gvHn3vAf04m7SFnNYMiQIIpny81fCGAs=\ncloud.google.com/go/tpu v1.6.7/go.mod h1:o8qxg7/Jgt7TCgZc3jNkd4kTsDwuYD3c4JTMqXZ36hU=\ncloud.google.com/go/tpu v1.6.9 h1:e6TbpIGmKdFFjW/OH8uQl0U0+t0K4TVN5mO2C+zBBtQ=\ncloud.google.com/go/tpu v1.6.9/go.mod h1:6C7Ed7Le5Y1vWGR+8lQWsh/gmqK6l53lgji0YXBU40o=\ncloud.google.com/go/trace v1.10.5 h1:0pr4lIKJ5XZFYD9GtxXEWr0KkVeigc3wlGpZco0X1oA=\ncloud.google.com/go/trace v1.10.5/go.mod h1:9hjCV1nGBCtXbAE4YK7OqJ8pmPYSxPA0I67JwRd5s3M=\ncloud.google.com/go/trace v1.10.7 h1:gK8z2BIJQ3KIYGddw9RJLne5Fx0FEXkrEQzPaeEYVvk=\ncloud.google.com/go/trace v1.10.7/go.mod h1:qk3eiKmZX0ar2dzIJN/3QhY2PIFh1eqcIdaN5uEjQPM=\ncloud.google.com/go/trace v1.10.9 h1:Cy6D1Zdz8up4mIPUWModTuIGDr3fh7AZaCnR+uyxpgA=\ncloud.google.com/go/trace v1.10.9/go.mod h1:vtWRnvEh+d8h2xljwxVwsdxxpoWZkxcNYnJF3FuJUV8=\ncloud.google.com/go/translate v1.10.1 h1:upovZ0wRMdzZvXnu+RPam41B0mRJ+coRXFP2cYFJ7ew=\ncloud.google.com/go/translate v1.10.1/go.mod h1:adGZcQNom/3ogU65N9UXHOnnSvjPwA/jKQUMnsYXOyk=\ncloud.google.com/go/translate v1.10.3 h1:g+B29z4gtRGsiKDoTF+bNeH25bLRokAaElygX2FcZkE=\ncloud.google.com/go/translate v1.10.3/go.mod h1:GW0vC1qvPtd3pgtypCv4k4U8B7EdgK9/QEF2aJEUovs=\ncloud.google.com/go/translate v1.10.5 h1:HGFw8dhEp6xYCDWG5fRNwZHfY6MiyCh97RHBBkzsuNM=\ncloud.google.com/go/translate v1.10.5/go.mod h1:n9fFca4U/EKr2GzJKrnQXemlYhfo1mT1nSt7Rt4l/VA=\ncloud.google.com/go/video v1.20.4 h1:TXwotxkShP1OqgKsbd+b8N5hrIHavSyLGvYnLGCZ7xc=\ncloud.google.com/go/video v1.20.4/go.mod h1:LyUVjyW+Bwj7dh3UJnUGZfyqjEto9DnrvTe1f/+QrW0=\ncloud.google.com/go/video v1.21.0 h1:ue/1C8TF8H2TMzKMBdNnFxT7QaeWMtqfDr9TSQGgUhA=\ncloud.google.com/go/video v1.21.0/go.mod h1:Kqh97xHXZ/bIClgDHf5zkKvU3cvYnLyRefmC8yCBqKI=\ncloud.google.com/go/video v1.21.2 h1:f/Ez6k2aeN+1+XoAaFCTTqOD+oq8c38fHDi8vd9D3tg=\ncloud.google.com/go/video v1.21.2/go.mod h1:UNXGQj3Hdyb70uaF9JeeM8Y8BAmAzLEMSWmyBKY2iVM=\ncloud.google.com/go/videointelligence v1.11.5 h1:mYaWH8uhUCXLJCN3gdXswKzRa2+lK0zN6/KsIubm6pE=\ncloud.google.com/go/videointelligence v1.11.5/go.mod h1:/PkeQjpRponmOerPeJxNPuxvi12HlW7Em0lJO14FC3I=\ncloud.google.com/go/videointelligence v1.11.7 h1:SKBkFTuOclESLjQL1LwraqVFm2fL5oL9tbzKITU+FOY=\ncloud.google.com/go/videointelligence v1.11.7/go.mod h1:iMCXbfjurmBVgKuyLedTzv90kcnppOJ6ttb0+rLDID0=\ncloud.google.com/go/videointelligence v1.11.9 h1:fGlVXtrk3mIh2DFIggTQ4xoA2VruiTkXZHCl6IDY0Bk=\ncloud.google.com/go/videointelligence v1.11.9/go.mod h1:Mv0dgb6U12BfBRPj39nM/7gcAFS1+VVGpTiyMJ/ShPo=\ncloud.google.com/go/vision/v2 v2.8.0 h1:W52z1b6LdGI66MVhE70g/NFty9zCYYcjdKuycqmlhtg=\ncloud.google.com/go/vision/v2 v2.8.0/go.mod h1:ocqDiA2j97pvgogdyhoxiQp2ZkDCyr0HWpicywGGRhU=\ncloud.google.com/go/vision/v2 v2.8.2 h1:j9RxG8DcyJO/D7/ps2pOey8VZys+TMqF79bWAhuM7QU=\ncloud.google.com/go/vision/v2 v2.8.2/go.mod h1:BHZA1LC7dcHjSr9U9OVhxMtLKd5l2jKPzLRALEJvuaw=\ncloud.google.com/go/vision/v2 v2.8.4 h1:kBZ62LquS8V8u+N8wWTLgn2tHqaC4poQuGjRaaR+WGE=\ncloud.google.com/go/vision/v2 v2.8.4/go.mod h1:qlmeVbmCfPNuD1Kwa7/evqCJYoJ7WhiZ2XeVSYwiOaA=\ncloud.google.com/go/vmmigration v1.7.5 h1:5v9RT2vWyuw3pK2ox0HQpkoftO7Q7/8591dTxxQc79g=\ncloud.google.com/go/vmmigration v1.7.5/go.mod h1:pkvO6huVnVWzkFioxSghZxIGcsstDvYiVCxQ9ZH3eYI=\ncloud.google.com/go/vmmigration v1.7.7 h1:bf2qKqEN7iqT62IptQ/FDadoDLJI9sthyrW3PVaH8bY=\ncloud.google.com/go/vmmigration v1.7.7/go.mod h1:qYIK5caZY3IDMXQK+A09dy81QU8qBW0/JDTc39OaKRw=\ncloud.google.com/go/vmmigration v1.7.9 h1:+X5Frseyehz8ZvnVSRZYXAwEEQXjS4oKK4EV/0KbS9s=\ncloud.google.com/go/vmmigration v1.7.9/go.mod h1:x5LQyAESUXsI7/QAQY6BV8xEjIrlkGI+S+oau/Sb0Gs=\ncloud.google.com/go/vmwareengine v1.1.1 h1:EGdDi9QbqThfZq3ILcDK5g+m9jTevc34AY5tACx5v7k=\ncloud.google.com/go/vmwareengine v1.1.1/go.mod h1:nMpdsIVkUrSaX8UvmnBhzVzG7PPvNYc5BszcvIVudYs=\ncloud.google.com/go/vmwareengine v1.1.3 h1:x4KwHB4JlBEzMaITVhrbbpHrU+2I5LrlvHGEEluT0vc=\ncloud.google.com/go/vmwareengine v1.1.3/go.mod h1:UoyF6LTdrIJRvDN8uUB8d0yimP5A5Ehkr1SRzL1APZw=\ncloud.google.com/go/vmwareengine v1.1.5 h1:tzqTbh5CAqZDVJrEgbRGDFgPyCx5bjIPH5Cm0xqVamA=\ncloud.google.com/go/vmwareengine v1.1.5/go.mod h1:Js6QbSeC1OgpyygalCrMj90wa93O3kFgcs/u1YzCKsU=\ncloud.google.com/go/vpcaccess v1.7.5 h1:XyL6hTLtEM/eE4F1GEge8xUN9ZCkiVWn44K/YA7z1rQ=\ncloud.google.com/go/vpcaccess v1.7.5/go.mod h1:slc5ZRvvjP78c2dnL7m4l4R9GwL3wDLcpIWz6P/ziig=\ncloud.google.com/go/vpcaccess v1.7.7 h1:F5woMLufKnshmDvPVxCzoC+Di12RYXQ1W8kNmpBT8z0=\ncloud.google.com/go/vpcaccess v1.7.7/go.mod h1:EzfSlgkoAnFWEMznZW0dVNvdjFjEW97vFlKk4VNBhwY=\ncloud.google.com/go/vpcaccess v1.7.9 h1:LbQaXRQMTPCPmJKoVIW/2vvj80FCiGG+lAyOzNpKs6M=\ncloud.google.com/go/vpcaccess v1.7.9/go.mod h1:Y0BlcnG9yTkoM6IL6auBeKvVEXL4LmNIxzscekrn/uk=\ncloud.google.com/go/webrisk v1.9.5 h1:251MvGuC8wisNN7+jqu9DDDZAi38KiMXxOpA/EWy4dE=\ncloud.google.com/go/webrisk v1.9.5/go.mod h1:aako0Fzep1Q714cPEM5E+mtYX8/jsfegAuS8aivxy3U=\ncloud.google.com/go/webrisk v1.9.7 h1:EWTSVagWWeQjVAsebiF/wJMwC5bq6Zz3LqOmD9Uid4s=\ncloud.google.com/go/webrisk v1.9.7/go.mod h1:7FkQtqcKLeNwXCdhthdXHIQNcFWPF/OubrlyRcLHNuQ=\ncloud.google.com/go/webrisk v1.9.9 h1:WmSWTAIpQEKscbnbVUeWWdq+p11Q8P1Gn6ADI8yAQCI=\ncloud.google.com/go/webrisk v1.9.9/go.mod h1:Wre67XdNQbt0LCBrvwVNBS5ORb8ssixq/u04CCZoO+k=\ncloud.google.com/go/websecurityscanner v1.6.5 h1:YqWZrZYabG88TZt7364XWRJGhxmxhony2ZUyZEYMF2k=\ncloud.google.com/go/websecurityscanner v1.6.5/go.mod h1:QR+DWaxAz2pWooylsBF854/Ijvuoa3FCyS1zBa1rAVQ=\ncloud.google.com/go/websecurityscanner v1.6.7 h1:R5OW5SNRqD0DSEmyWLUMNYAXWYnz/NLSXBawVFrc9a0=\ncloud.google.com/go/websecurityscanner v1.6.7/go.mod h1:EpiW84G5KXxsjtFKK7fSMQNt8JcuLA8tQp7j0cyV458=\ncloud.google.com/go/websecurityscanner v1.6.9 h1:4tbX6llT8kBqUJbpB4Wjj9sqWNYwCUGt3WP6uVVv00w=\ncloud.google.com/go/websecurityscanner v1.6.9/go.mod h1:xrMxPiHB5iFxvc2tqbfUr6inPox6q6y7Wg0LTyZOKTw=\ncloud.google.com/go/workflows v1.12.4 h1:uHNmUiatTbPQ4H1pabwfzpfEYD4BBnqDHqMm2IesOh4=\ncloud.google.com/go/workflows v1.12.4/go.mod h1:yQ7HUqOkdJK4duVtMeBCAOPiN1ZF1E9pAMX51vpwB/w=\ncloud.google.com/go/workflows v1.12.6 h1:2bE69mh68law1UZWPjgmvOQsjsGSppRudABAXwNAy58=\ncloud.google.com/go/workflows v1.12.6/go.mod h1:oDbEHKa4otYg4abwdw2Z094jB0TLLiFGAPA78EDAKag=\ncloud.google.com/go/workflows v1.12.8 h1:n5SOGamA/HtlpWAIXxKXpuGq1ta3wDpyOftDgjIcNHU=\ncloud.google.com/go/workflows v1.12.8/go.mod h1:b7akG38W6lHmyPc+WYJxIYl1rEv79bBMYVwEZmp3aJQ=\ndmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=\ngithub.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=\ngithub.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4=\ngithub.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0 h1:oVLqHXhnYtUwM89y9T1fXGaK9wTkXHgNp8/ZNMQzUxE=\ngithub.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0/go.mod h1:dppbR7CwXD4pgtV9t3wD1812RaLDcBjtblcDF5f1vI0=\ngithub.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=\ngithub.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=\ngithub.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 h1:Hs82Z41s6SdL1CELW+XaDYmOH4hkBN4/N9og/AsOv7E=\ngithub.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=\ngithub.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=\ngithub.com/apache/arrow/go/v14 v14.0.2 h1:N8OkaJEOfI3mEZt07BIkvo4sC6XDbL+48MBPWO5IONw=\ngithub.com/apache/arrow/go/v14 v14.0.2/go.mod h1:u3fgh3EdgN/YQ8cVQRguVW3R+seMybFg8QBQ5LU+eBY=\ngithub.com/apache/arrow/go/v15 v15.0.2 h1:60IliRbiyTWCWjERBCkO1W4Qun9svcYoZrSLcyOsMLE=\ngithub.com/apache/arrow/go/v15 v15.0.2/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+yea1jass9YXgjA=\ngithub.com/apex/logs v1.0.0 h1:adOwhOTeXzZTnVuEK13wuJNBFutP0sOfutRS8NY+G6A=\ngithub.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a h1:2KLQMJ8msqoPHIPDufkxVcoTtcmE5+1sL9950m4R9Pk=\ngithub.com/aphistic/sweet v0.2.0 h1:I4z+fAUqvKfvZV/CHi5dV0QuwbmIvYYFDjG0Ss5QpAs=\ngithub.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=\ngithub.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo=\ngithub.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA=\ngithub.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4=\ngithub.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=\ngithub.com/aws/aws-sdk-go v1.20.6 h1:kmy4Gvdlyez1fV4kw5RYxZzWKVyuHZHgPWeU/YvRsV4=\ngithub.com/aws/aws-sdk-go v1.30.7 h1:IaXfqtioP6p9SFAnNfsqdNczbR5UNbYqvcZUSsCAdTY=\ngithub.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo=\ngithub.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=\ngithub.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=\ngithub.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=\ngithub.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=\ngithub.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc=\ngithub.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw=\ngithub.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=\ngithub.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=\ngithub.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=\ngithub.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=\ngithub.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=\ngithub.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=\ngithub.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=\ngithub.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=\ngithub.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY=\ngithub.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA=\ngithub.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=\ngithub.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI=\ngithub.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk=\ngithub.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=\ngithub.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=\ngithub.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50 h1:DBmgJDC9dTfkVyGgipamEh2BpGYxScCH1TOF1LL1cXc=\ngithub.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50/go.mod h1:5e1+Vvlzido69INQaVO6d87Qn543Xr6nooe9Kz7oBFM=\ngithub.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw=\ngithub.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8=\ngithub.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=\ngithub.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ=\ngithub.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=\ngithub.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c=\ngithub.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=\ngithub.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=\ngithub.com/creack/pty v1.1.7 h1:6pwm8kMQKCmgUg0ZHTm5+/YvRK0s3THD/28+T6/kk4A=\ngithub.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=\ngithub.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=\ngithub.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4=\ngithub.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=\ngithub.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=\ngithub.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=\ngithub.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM=\ngithub.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=\ngithub.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI=\ngithub.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0=\ngithub.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=\ngithub.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=\ngithub.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=\ngithub.com/fasthttp/websocket v1.4.3-rc.6 h1:omHqsl8j+KXpmzRjF8bmzOSYJ8GnS0E3efi1wYT+niY=\ngithub.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc=\ngithub.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=\ngithub.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=\ngithub.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=\ngithub.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I=\ngithub.com/go-gomail/gomail v0.0.0-20160411212932-81ebce5c23df h1:Bao6dhmbTA1KFVxmJ6nBoMuOJit2yjEgLJpIMYpop0E=\ngithub.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk=\ngithub.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ=\ngithub.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4=\ngithub.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=\ngithub.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=\ngithub.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=\ngithub.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=\ngithub.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=\ngithub.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=\ngithub.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=\ngithub.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=\ngithub.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=\ngithub.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ=\ngithub.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=\ngithub.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=\ngithub.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=\ngithub.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=\ngithub.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=\ngithub.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=\ngithub.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=\ngithub.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=\ngithub.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=\ngithub.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=\ngithub.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg=\ngithub.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=\ngithub.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngithub.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9 h1:OF1IPgv+F4NmqmJ98KTjdN97Vs1JxDPB3vbmYzV2dpk=\ngithub.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY=\ngithub.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=\ngithub.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=\ngithub.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ=\ngithub.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=\ngithub.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=\ngithub.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc=\ngithub.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0=\ngithub.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=\ngithub.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=\ngithub.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=\ngithub.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=\ngithub.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=\ngithub.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU=\ngithub.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI=\ngithub.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=\ngithub.com/googleapis/gax-go/v2 v2.12.1/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc=\ngithub.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA=\ngithub.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc=\ngithub.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA=\ngithub.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4=\ngithub.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg=\ngithub.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI=\ngithub.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4=\ngithub.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=\ngithub.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 h1:zC34cGQu69FG7qzJ3WiKW244WfhDC3xxYMeNOX2gtUQ=\ngithub.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=\ngithub.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=\ngithub.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=\ngithub.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk=\ngithub.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=\ngithub.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=\ngithub.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=\ngithub.com/hashicorp/consul/api v1.11.0 h1:Hw/G8TtRvOElqxVIhBzXciiSTbapq8hZ2XKZsXk5ZCE=\ngithub.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8=\ngithub.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE=\ngithub.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU=\ngithub.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8=\ngithub.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A=\ngithub.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=\ngithub.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=\ngithub.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=\ngithub.com/hashicorp/go-hclog v1.0.0 h1:bkKf0BeBXcSYa7f5Fyi9gMuQ8gNsxeiNpZjR6VxNZeo=\ngithub.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=\ngithub.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=\ngithub.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=\ngithub.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=\ngithub.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI=\ngithub.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=\ngithub.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI=\ngithub.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=\ngithub.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=\ngithub.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s=\ngithub.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=\ngithub.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=\ngithub.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc=\ngithub.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=\ngithub.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE=\ngithub.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI=\ngithub.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=\ngithub.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw=\ngithub.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=\ngithub.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=\ngithub.com/hashicorp/mdns v1.0.4 h1:sY0CMhFmjIPDMlTB+HfymFHCaYLhgifZ0QhjaYKD/UQ=\ngithub.com/hashicorp/memberlist v0.3.0 h1:8+567mCcFDnS5ADl7lrpxPMWiFCElyUEeW0gtj34fMA=\ngithub.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM=\ngithub.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0=\ngithub.com/hashicorp/serf v0.9.6 h1:uuEX1kLR6aoda1TBttmJQKDLZE1Ob7KN0NPdE7EtCDc=\ngithub.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY=\ngithub.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4=\ngithub.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=\ngithub.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=\ngithub.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=\ngithub.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=\ngithub.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI=\ngithub.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=\ngithub.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E=\ngithub.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=\ngithub.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgx/v4 v4.18.0/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE=\ngithub.com/jackc/puddle v1.2.1 h1:gI8os0wpRXFd4FiAY2dWiqRK037tjj3t7rKFeO4X5iw=\ngithub.com/jackc/puddle v1.3.0 h1:eHK/5clGOatcjX3oWGBO/MpxpbHzSwud5EWTSCI+MX0=\ngithub.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=\ngithub.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=\ngithub.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=\ngithub.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc=\ngithub.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA=\ngithub.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=\ngithub.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=\ngithub.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7 h1:K//n/AqR5HjG3qxbrBCL4vJPW0MVFSs9CPK1OOJdRME=\ngithub.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o=\ngithub.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g=\ngithub.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY=\ngithub.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=\ngithub.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=\ngithub.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=\ngithub.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=\ngithub.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=\ngithub.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=\ngithub.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=\ngithub.com/lyft/protoc-gen-star v0.5.3 h1:zSGLzsUew8RT+ZKPHc3jnf8XLaVyHzTcAFBzHtCNR20=\ngithub.com/lyft/protoc-gen-star/v2 v2.0.3 h1:/3+/2sWyXeMLzKd1bX+ixWKgEMsULrIivpDsuaF441o=\ngithub.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk=\ngithub.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8=\ngithub.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=\ngithub.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=\ngithub.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=\ngithub.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=\ngithub.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY=\ngithub.com/mitchellh/cli v1.1.0 h1:tEElEatulEHDeedTxwckzyYMA5c86fbmNIUL1hBIiTg=\ngithub.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=\ngithub.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc=\ngithub.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=\ngithub.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=\ngithub.com/mmcloughlin/avo v0.5.0 h1:nAco9/aI9Lg2kiuROBY6BhCI/z0t5jEvJfjWbL8qXLU=\ngithub.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM=\ngithub.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc=\ngithub.com/nats-io/nats.go v1.34.0 h1:fnxnPCNiwIG5w08rlMcEKTUw4AV/nKyGCOJE8TdhSPk=\ngithub.com/nats-io/nats.go v1.34.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=\ngithub.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=\ngithub.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=\ngithub.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=\ngithub.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=\ngithub.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=\ngithub.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=\ngithub.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=\ngithub.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=\ngithub.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=\ngithub.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=\ngithub.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=\ngithub.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=\ngithub.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=\ngithub.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=\ngithub.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7 h1:+/+DxvQaYifJ+grD4klzrS5y+KJXldn/2YTl5JG+vZ8=\ngithub.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A=\ngithub.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=\ngithub.com/pkg/sftp v1.10.1 h1:VasscCm72135zRysgrJDKsntdmPN+OuU3+nnHYA9wyc=\ngithub.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs=\ngithub.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=\ngithub.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo=\ngithub.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk=\ngithub.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo=\ngithub.com/prometheus/client_golang v1.4.0 h1:YVIb/fVcOTMSqtqZWSKnHpSLBxu8DKgxq8z6RuBZwqI=\ngithub.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s=\ngithub.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=\ngithub.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=\ngithub.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=\ngithub.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=\ngithub.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U=\ngithub.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ=\ngithub.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=\ngithub.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=\ngithub.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=\ngithub.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=\ngithub.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=\ngithub.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=\ngithub.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=\ngithub.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4 h1:BN/Nyn2nWMoqGRA7G7paDNDqTXE30mXGqzzybrfo05w=\ngithub.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc=\ngithub.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=\ngithub.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc=\ngithub.com/rs/zerolog v1.15.0 h1:uPRuwkWF4J6fGsJ2R0Gn2jB1EQiav9k3S6CSdygQJXY=\ngithub.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M=\ngithub.com/sagikazarmark/crypt v0.3.0 h1:TV5DVog+pihN4Rr0rN1IClv4ePpkzdg9sPrw7WDofZ8=\ngithub.com/sagikazarmark/crypt v0.19.0 h1:WMyLTjHBo64UvNcWqpzY3pbZTYgnemZU8FBZigKc42E=\ngithub.com/sagikazarmark/crypt v0.19.0/go.mod h1:c6vimRziqqERhtSe0MhIvzE1w54FrCHtrXb5NH/ja78=\ngithub.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=\ngithub.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873 h1:N3Af8f13ooDKcIhsmFT7Z05CStZWu4C7Md0uDEy4q6o=\ngithub.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873/go.mod h1:dmPawKuiAeG/aFYVs2i+Dyosoo7FNcm+Pi8iK6ZUrX8=\ngithub.com/scryner/lfreequeue v0.0.0-20121212074822-473f33702129 h1:ORfYNrFCM8HMZkU8QFX9Z8M6NWMlQnamJpSI5s0l4cM=\ngithub.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=\ngithub.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=\ngithub.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 h1:hp2CYQUINdZMHdvTdXtPOY2ainKl4IoMcpAXEf2xj3Q=\ngithub.com/smartystreets/gunit v1.0.0 h1:RyPDUFcJbvtXlhJPk7v+wnxZRY2EUokhEYl2EJOPToI=\ngithub.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=\ngithub.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=\ngithub.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=\ngithub.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=\ngithub.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=\ngithub.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngithub.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502 h1:34icjjmqJ2HPjrSuJYEkdZ+0ItmGQAQ75cRHIiftIyE=\ngithub.com/tj/go-buffer v1.1.0 h1:Lo2OsPHlIxXF24zApe15AbK3bJLAOvkkxEA6Ux4c47M=\ngithub.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2 h1:eGaGNxrtoZf/mBURsnNQKDR7u50Klgcf2eFDQEnc8Bc=\ngithub.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b h1:m74UWYy+HBs+jMFR9mdZU6shPewugMyH5+GV6LNgW8w=\ngithub.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds=\ngithub.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=\ngithub.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8=\ngithub.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI=\ngithub.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=\ngithub.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=\ngithub.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=\ngithub.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=\ngithub.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=\ngithub.com/zenazn/goji v0.9.0 h1:RSQQAbXGArQ0dIDEq+PI6WqN6if+5KHu6x2Cx/GXLTQ=\ngo.einride.tech/aip v0.66.0 h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8=\ngo.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M=\ngo.einride.tech/aip v0.67.1 h1:d/4TW92OxXBngkSOwWS2CH5rez869KpKMaN44mdxkFI=\ngo.einride.tech/aip v0.67.1/go.mod h1:ZGX4/zKw8dcgzdLsrvpOOGxfxI2QSk12SlP7d6c0/XI=\ngo.etcd.io/bbolt v1.3.2 h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk=\ngo.etcd.io/etcd/api/v3 v3.5.1 h1:v28cktvBq+7vGyJXF8G+rWJmj+1XUmMtqcLnH8hDocM=\ngo.etcd.io/etcd/api/v3 v3.5.12 h1:W4sw5ZoU2Juc9gBWuLk5U6fHfNVyY1WC5g9uiXZio/c=\ngo.etcd.io/etcd/api/v3 v3.5.12/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.1 h1:XIQcHCFSG53bJETYeRJtIxdLv2EWRGxcfzR8lSnTH4E=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.12 h1:EYDL6pWwyOsylrQyLp2w+HkQ46ATiOvoEdMarindU2A=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.12/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4=\ngo.etcd.io/etcd/client/v2 v2.305.1 h1:vtxYCKWA9x31w0WJj7DdqsHFNjhkigdAnziDtkZb/l4=\ngo.etcd.io/etcd/client/v2 v2.305.12 h1:0m4ovXYo1CHaA/Mp3X/Fak5sRNIWf01wk/X1/G3sGKI=\ngo.etcd.io/etcd/client/v2 v2.305.12/go.mod h1:aQ/yhsxMu+Oht1FOupSr60oBvcS9cKXHrzBpDsPTf9E=\ngo.etcd.io/etcd/client/v3 v3.5.12 h1:v5lCPXn1pf1Uu3M4laUE2hp/geOTc5uPcYYsNe1lDxg=\ngo.etcd.io/etcd/client/v3 v3.5.12/go.mod h1:tSbBCakoWmmddL+BKVAJHa9km+O/E+bumDe9mSbPiqw=\ngo.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg=\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw=\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA=\ngo.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=\ngo.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI=\ngo.opentelemetry.io/otel v1.23.0/go.mod h1:YCycw9ZeKhcJFrb34iVSkyT0iczq/zYDtZYFufObyB0=\ngo.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=\ngo.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=\ngo.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY=\ngo.opentelemetry.io/otel/metric v1.23.0/go.mod h1:MqUW2X2a6Q8RN96E2/nqNoT+z9BSms20Jb7Bbp+HiTo=\ngo.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=\ngo.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw=\ngo.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc=\ngo.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=\ngo.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo=\ngo.opentelemetry.io/otel/trace v1.23.0/go.mod h1:GSGTbIClEsuZrGIzoEHqsVfxgn5UkggkflQwDScNUsk=\ngo.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=\ngo.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8=\ngo.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=\ngo.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=\ngo.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=\ngo.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=\ngo.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=\ngo.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=\ngo.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=\ngo.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=\ngolang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=\ngolang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=\ngolang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=\ngolang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=\ngolang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=\ngolang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=\ngolang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=\ngolang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=\ngolang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=\ngolang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=\ngolang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=\ngolang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=\ngolang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=\ngolang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y=\ngolang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=\ngolang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=\ngolang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=\ngolang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=\ngolang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=\ngolang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=\ngolang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=\ngolang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=\ngolang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=\ngolang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=\ngolang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=\ngolang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=\ngolang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=\ngolang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=\ngolang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=\ngolang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=\ngolang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=\ngolang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM=\ngolang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o=\ngolang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA=\ngolang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=\ngolang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8=\ngolang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=\ngolang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=\ngolang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY=\ngolang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=\ngolang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=\ngolang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=\ngolang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=\ngolang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=\ngolang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=\ngolang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=\ngolang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=\ngolang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=\ngolang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=\ngolang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=\ngolang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=\ngoogle.golang.org/api v0.62.0 h1:PhGymJMXfGBzc4lBRmrx9+1w4w2wEzURHNGF/sD/xGc=\ngoogle.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw=\ngoogle.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750=\ngoogle.golang.org/api v0.152.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY=\ngoogle.golang.org/api v0.157.0/go.mod h1:+z4v4ufbZ1WEpld6yMGHyggs+PmAHiaLNj5ytP3N01g=\ngoogle.golang.org/api v0.160.0/go.mod h1:0mu0TpK33qnydLvWqbImq2b1eQ5FHRSDCBzAxX9ZHyw=\ngoogle.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0=\ngoogle.golang.org/api v0.164.0/go.mod h1:2OatzO7ZDQsoS7IFf3rvsE17/TldiU3F/zxFHeqUB5o=\ngoogle.golang.org/api v0.166.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe/bSA=\ngoogle.golang.org/api v0.167.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe/bSA=\ngoogle.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY=\ngoogle.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg=\ngoogle.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU=\ngoogle.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o=\ngoogle.golang.org/api v0.176.1/go.mod h1:j2MaSDYcvYV1lkZ1+SMW4IeF90SrEyFA+tluDYWRrFg=\ngoogle.golang.org/api v0.177.0/go.mod h1:srbhue4MLjkjbkux5p3dw/ocYOSZTaIEvf7bCOnFQDw=\ngoogle.golang.org/api v0.180.0/go.mod h1:51AiyoEg1MJPSZ9zvklA8VnRILPXxn1iVen9v25XHAE=\ngoogle.golang.org/api v0.182.0 h1:if5fPvudRQ78GeRx3RayIoiuV7modtErPIZC/T2bIvE=\ngoogle.golang.org/api v0.182.0/go.mod h1:cGhjy4caqA5yXRzEhkHI8Y9mfyC2VLTlER2l08xaqtM=\ngoogle.golang.org/api v0.187.0/go.mod h1:KIHlTc4x7N7gKKuVsdmfBXN13yEEWXWFURWY6SBp2gk=\ngoogle.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=\ngoogle.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=\ngoogle.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0=\ngoogle.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=\ngoogle.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk=\ngoogle.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64=\ngoogle.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0=\ngoogle.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY=\ngoogle.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k=\ngoogle.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro=\ngoogle.golang.org/genproto v0.0.0-20240205150955-31a09d347014/go.mod h1:xEgQu1e4stdSSsxPDK8Azkrk/ECl5HvdPf6nbZrTS5M=\ngoogle.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y=\ngoogle.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s=\ngoogle.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw=\ngoogle.golang.org/genproto v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:s7iA721uChleev562UJO2OYB0PPT9CMFjV+Ce7VJH5M=\ngoogle.golang.org/genproto v0.0.0-20240722135656-d784300faade/go.mod h1:FfBgJBJg9GcpPvKIuHSZ/aE1g2ecGL74upMzGZjiGEY=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240122161410-6c6643bf1457/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be/go.mod h1:dvdCTIoAGbkWbcIKBniID56/7XHTt6WfxXNMxuziJ+w=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6/go.mod h1:10yRODfgim2/T8csjQsMPgZOMvtytXKTDRzH6HRGzRw=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8/go.mod h1:vPrPUTsDCYxXWjP7clS81mZ6/803D8K4iM9Ma27VKas=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo=\ngoogle.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c=\ngoogle.golang.org/genproto/googleapis/bytestream v0.0.0-20240304161311-37d4d3c04a78 h1:YqFWYZXim8bG9v68xU8WjTZmYKb5M5dMeSOWIp6jogI=\ngoogle.golang.org/genproto/googleapis/bytestream v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:vh/N7795ftP0AkN1w8XKqN4w1OdUKXW5Eummda+ofv8=\ngoogle.golang.org/genproto/googleapis/bytestream v0.0.0-20240314234333-6e1732d8331c h1:4z0DVWmDWWZ4OeQHLrb6lLBE3uCgSLs9DDA5Zb36DFg=\ngoogle.golang.org/genproto/googleapis/bytestream v0.0.0-20240314234333-6e1732d8331c/go.mod h1:IN9OQUXZ0xT+26MDwZL8fJcYw+y99b0eYPA2U15Jt8o=\ngoogle.golang.org/genproto/googleapis/bytestream v0.0.0-20240521202816-d264139d666e h1:Px+x8PNp8izq1ORW6jI007V/fRZ3bWrgcWHImtBduXc=\ngoogle.golang.org/genproto/googleapis/bytestream v0.0.0-20240521202816-d264139d666e/go.mod h1:0J6mmn3XAEjfNbPvpH63c0RXCjGNFcCzlEfWSN4In+k=\ngoogle.golang.org/genproto/googleapis/bytestream v0.0.0-20240722135656-d784300faade h1:fc+h2kSr2nW2DHxAdGYeX3bnkr4iFsKHUu9Fi6Rh4Y8=\ngoogle.golang.org/genproto/googleapis/bytestream v0.0.0-20240722135656-d784300faade/go.mod h1:5/MT647Cn/GGhwTpXC7QqcaR5Cnee4v4MKCU1/nwnIQ=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014/go.mod h1:SaPjaZGWb0lPqs6Ittu0spdfrOArqji4ZdeP5IC/9N4=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240311132316-a219d84964c2/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=\ngoogle.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=\ngoogle.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=\ngoogle.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=\ngoogle.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=\ngoogle.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=\ngoogle.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=\ngoogle.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=\ngoogle.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=\ngoogle.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=\ngoogle.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs=\ngoogle.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=\ngoogle.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=\ngoogle.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=\ngoogle.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0=\ngoogle.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE=\ngoogle.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=\ngoogle.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=\ngoogle.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=\ngoogle.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=\ngoogle.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=\ngoogle.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=\ngopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=\ngopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=\ngopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=\ngopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec h1:RlWgLqCMMIYYEVcAR5MDsuHlVkaIPDAF+5Dehzg8L5A=\ngopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\nhonnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=\nmodernc.org/b v1.0.2 h1:iPC2u39ebzq12GOC2yXT4mve0HrWcH85cz+midWjzeo=\nmodernc.org/db v1.0.3 h1:apxOlWU69je04bY22OT6J0RL23mzvUy22EgTAVyw+Yg=\nmodernc.org/file v1.0.3 h1:McYGAMMuqjRp6ptmpcLr3r5yw3gNPsonFCAJ0tNK74U=\nmodernc.org/fileutil v1.0.0 h1:Z1AFLZwl6BO8A5NldQg/xTSjGLetp+1Ubvl4alfGx8w=\nmodernc.org/golex v1.0.1 h1:EYKY1a3wStt0RzHaH8mdSRNg78Ub0OHxYfCRWw35YtM=\nmodernc.org/internal v1.0.2 h1:Sn3+ojjMRnPaOR6jFISs6KAdRHnR4q9KNuwfKINKmZA=\nmodernc.org/lex v1.0.0 h1:w0dxp18i1q+aSE7GkepvwzvVWTLoCIQ2oDgTFAV2JZU=\nmodernc.org/lexer v1.0.0 h1:D2xE6YTaH7aiEC7o/+rbx6qTAEr1uY83peKwkamIdQ0=\nmodernc.org/lldb v1.0.2 h1:LBw58xVFl01OuM5U9++tLy3wmu+PoWok6T3dHuNjcZk=\nmodernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8=\nmodernc.org/ql v1.4.0 h1:CqLAho+y4N8JwvqT7NJsYsp7YPwiRv6RE2n0n1ksSCU=\nmodernc.org/sortutil v1.1.0 h1:oP3U4uM+NT/qBQcbg/K2iqAX0Nx7B1b6YZtq3Gk/PjM=\nmodernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs=\nmodernc.org/zappy v1.0.3 h1:Tr+P3kclDSrvC6zYBW2hWmOmu5SjG6PtvCt3RCjRmss=\nnullprogram.com/x/optparse v1.0.0 h1:xGFgVi5ZaWOnYdac2foDT3vg0ZZC9ErXFV57mr4OHrI=\nrsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=\nrsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4=\nrsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY=\nrsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=\nsigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=\nsigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=\n"
  },
  {
    "path": "grpc/.gitignore",
    "content": ".idea/\n.DS_Store\n"
  },
  {
    "path": "grpc/LICENSE",
    "content": "BSD 3-Clause License\n\nCopyright (c) 2021, Crawlab Team\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "grpc/README.md",
    "content": "# crawlab-grpc\ngRPC for Crawlab\n"
  },
  {
    "path": "grpc/bin/compile.sh",
    "content": "#!/bin/bash\n\nif [ -L $0 ]\nthen\n    BASE_DIR=`dirname $(readlink $0)`\nelse\n    BASE_DIR=`dirname $0`\nfi\nbase_path=$(cd $BASE_DIR/..; pwd)\n\ncd $base_path && \\\n  protoc -I ./proto \\\n  --go_out=. \\\n  --go-grpc_out=. \\\n  ./proto/**/*.proto"
  },
  {
    "path": "grpc/bin/compile_all.sh",
    "content": "#!/bin/bash\n\nif [ -L $0 ]\nthen\n    BASE_DIR=`dirname $(readlink $0)`\nelse\n    BASE_DIR=`dirname $0`\nfi\nbase_path=$(cd $BASE_DIR/..; pwd)\n\ncd $base_path && \\\n  rm -rf dist | true\n\ncd $base_path && \\\n  mkdir -p dist/python | true && \\\n  mkdir -p dist/js | true && \\\n  mkdir -p dist/ts | true && \\\n  mkdir -p dist/java | true && \\\n  mkdir -p dist/csharp | true && \\\n  mkdir -p dist/php | true && \\\n  mkdir -p dist/ruby | true\n\ncd $base_path && \\\n  protoc -I ./proto \\\n  --go_out=. \\\n  --go-grpc_out=. \\\n  --python_out=dist/python \\\n  --js_out=dist/js \\\n  --java_out=dist/java \\\n  --csharp_out=dist/csharp \\\n  ./proto/**/*.proto\n\n# python\ncd $base_path && \\\n  python3 -m grpc_tools.protoc -I ./proto \\\n  --grpc_python_out=dist/python \\\n  ./proto/**/*.proto\n"
  },
  {
    "path": "grpc/dependencies_service_v2.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/dependencies_service_v2.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype DependenciesServiceV2Code int32\n\nconst (\n\tDependenciesServiceV2Code_SYNC      DependenciesServiceV2Code = 0\n\tDependenciesServiceV2Code_INSTALL   DependenciesServiceV2Code = 1\n\tDependenciesServiceV2Code_UNINSTALL DependenciesServiceV2Code = 2\n)\n\n// Enum value maps for DependenciesServiceV2Code.\nvar (\n\tDependenciesServiceV2Code_name = map[int32]string{\n\t\t0: \"SYNC\",\n\t\t1: \"INSTALL\",\n\t\t2: \"UNINSTALL\",\n\t}\n\tDependenciesServiceV2Code_value = map[string]int32{\n\t\t\"SYNC\":      0,\n\t\t\"INSTALL\":   1,\n\t\t\"UNINSTALL\": 2,\n\t}\n)\n\nfunc (x DependenciesServiceV2Code) Enum() *DependenciesServiceV2Code {\n\tp := new(DependenciesServiceV2Code)\n\t*p = x\n\treturn p\n}\n\nfunc (x DependenciesServiceV2Code) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (DependenciesServiceV2Code) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_services_dependencies_service_v2_proto_enumTypes[0].Descriptor()\n}\n\nfunc (DependenciesServiceV2Code) Type() protoreflect.EnumType {\n\treturn &file_services_dependencies_service_v2_proto_enumTypes[0]\n}\n\nfunc (x DependenciesServiceV2Code) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use DependenciesServiceV2Code.Descriptor instead.\nfunc (DependenciesServiceV2Code) EnumDescriptor() ([]byte, []int) {\n\treturn file_services_dependencies_service_v2_proto_rawDescGZIP(), []int{0}\n}\n\ntype Dependency struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName    string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\tVersion string `protobuf:\"bytes,2,opt,name=version,proto3\" json:\"version,omitempty\"`\n}\n\nfunc (x *Dependency) Reset() {\n\t*x = Dependency{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_dependencies_service_v2_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Dependency) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Dependency) ProtoMessage() {}\n\nfunc (x *Dependency) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_dependencies_service_v2_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Dependency.ProtoReflect.Descriptor instead.\nfunc (*Dependency) Descriptor() ([]byte, []int) {\n\treturn file_services_dependencies_service_v2_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Dependency) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *Dependency) GetVersion() string {\n\tif x != nil {\n\t\treturn x.Version\n\t}\n\treturn \"\"\n}\n\ntype DependenciesServiceV2ConnectRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n}\n\nfunc (x *DependenciesServiceV2ConnectRequest) Reset() {\n\t*x = DependenciesServiceV2ConnectRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_dependencies_service_v2_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DependenciesServiceV2ConnectRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DependenciesServiceV2ConnectRequest) ProtoMessage() {}\n\nfunc (x *DependenciesServiceV2ConnectRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_dependencies_service_v2_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DependenciesServiceV2ConnectRequest.ProtoReflect.Descriptor instead.\nfunc (*DependenciesServiceV2ConnectRequest) Descriptor() ([]byte, []int) {\n\treturn file_services_dependencies_service_v2_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *DependenciesServiceV2ConnectRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\ntype DependenciesServiceV2ConnectResponse struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tCode         DependenciesServiceV2Code `protobuf:\"varint,1,opt,name=code,proto3,enum=grpc.DependenciesServiceV2Code\" json:\"code,omitempty\"`\n\tTaskId       string                    `protobuf:\"bytes,2,opt,name=task_id,json=taskId,proto3\" json:\"task_id,omitempty\"`\n\tLang         string                    `protobuf:\"bytes,3,opt,name=lang,proto3\" json:\"lang,omitempty\"`\n\tProxy        string                    `protobuf:\"bytes,4,opt,name=proxy,proto3\" json:\"proxy,omitempty\"`\n\tDependencies []*Dependency             `protobuf:\"bytes,5,rep,name=dependencies,proto3\" json:\"dependencies,omitempty\"`\n}\n\nfunc (x *DependenciesServiceV2ConnectResponse) Reset() {\n\t*x = DependenciesServiceV2ConnectResponse{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_dependencies_service_v2_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DependenciesServiceV2ConnectResponse) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DependenciesServiceV2ConnectResponse) ProtoMessage() {}\n\nfunc (x *DependenciesServiceV2ConnectResponse) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_dependencies_service_v2_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DependenciesServiceV2ConnectResponse.ProtoReflect.Descriptor instead.\nfunc (*DependenciesServiceV2ConnectResponse) Descriptor() ([]byte, []int) {\n\treturn file_services_dependencies_service_v2_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *DependenciesServiceV2ConnectResponse) GetCode() DependenciesServiceV2Code {\n\tif x != nil {\n\t\treturn x.Code\n\t}\n\treturn DependenciesServiceV2Code_SYNC\n}\n\nfunc (x *DependenciesServiceV2ConnectResponse) GetTaskId() string {\n\tif x != nil {\n\t\treturn x.TaskId\n\t}\n\treturn \"\"\n}\n\nfunc (x *DependenciesServiceV2ConnectResponse) GetLang() string {\n\tif x != nil {\n\t\treturn x.Lang\n\t}\n\treturn \"\"\n}\n\nfunc (x *DependenciesServiceV2ConnectResponse) GetProxy() string {\n\tif x != nil {\n\t\treturn x.Proxy\n\t}\n\treturn \"\"\n}\n\nfunc (x *DependenciesServiceV2ConnectResponse) GetDependencies() []*Dependency {\n\tif x != nil {\n\t\treturn x.Dependencies\n\t}\n\treturn nil\n}\n\ntype DependenciesServiceV2SyncRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey      string        `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tLang         string        `protobuf:\"bytes,2,opt,name=lang,proto3\" json:\"lang,omitempty\"`\n\tDependencies []*Dependency `protobuf:\"bytes,3,rep,name=dependencies,proto3\" json:\"dependencies,omitempty\"`\n}\n\nfunc (x *DependenciesServiceV2SyncRequest) Reset() {\n\t*x = DependenciesServiceV2SyncRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_dependencies_service_v2_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DependenciesServiceV2SyncRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DependenciesServiceV2SyncRequest) ProtoMessage() {}\n\nfunc (x *DependenciesServiceV2SyncRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_dependencies_service_v2_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DependenciesServiceV2SyncRequest.ProtoReflect.Descriptor instead.\nfunc (*DependenciesServiceV2SyncRequest) Descriptor() ([]byte, []int) {\n\treturn file_services_dependencies_service_v2_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *DependenciesServiceV2SyncRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *DependenciesServiceV2SyncRequest) GetLang() string {\n\tif x != nil {\n\t\treturn x.Lang\n\t}\n\treturn \"\"\n}\n\nfunc (x *DependenciesServiceV2SyncRequest) GetDependencies() []*Dependency {\n\tif x != nil {\n\t\treturn x.Dependencies\n\t}\n\treturn nil\n}\n\ntype DependenciesServiceV2UpdateTaskLogRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tTaskId   string   `protobuf:\"bytes,1,opt,name=task_id,json=taskId,proto3\" json:\"task_id,omitempty\"`\n\tLogLines []string `protobuf:\"bytes,2,rep,name=log_lines,json=logLines,proto3\" json:\"log_lines,omitempty\"`\n}\n\nfunc (x *DependenciesServiceV2UpdateTaskLogRequest) Reset() {\n\t*x = DependenciesServiceV2UpdateTaskLogRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_dependencies_service_v2_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *DependenciesServiceV2UpdateTaskLogRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*DependenciesServiceV2UpdateTaskLogRequest) ProtoMessage() {}\n\nfunc (x *DependenciesServiceV2UpdateTaskLogRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_dependencies_service_v2_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use DependenciesServiceV2UpdateTaskLogRequest.ProtoReflect.Descriptor instead.\nfunc (*DependenciesServiceV2UpdateTaskLogRequest) Descriptor() ([]byte, []int) {\n\treturn file_services_dependencies_service_v2_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *DependenciesServiceV2UpdateTaskLogRequest) GetTaskId() string {\n\tif x != nil {\n\t\treturn x.TaskId\n\t}\n\treturn \"\"\n}\n\nfunc (x *DependenciesServiceV2UpdateTaskLogRequest) GetLogLines() []string {\n\tif x != nil {\n\t\treturn x.LogLines\n\t}\n\treturn nil\n}\n\nvar File_services_dependencies_service_v2_proto protoreflect.FileDescriptor\n\nvar file_services_dependencies_service_v2_proto_rawDesc = []byte{\n\t0x0a, 0x26, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x65, 0x6e,\n\t0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f,\n\t0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x15,\n\t0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65,\n\t0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,\n\t0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,\n\t0x6e, 0x22, 0x40, 0x0a, 0x23, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65,\n\t0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,\n\t0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65,\n\t0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65,\n\t0x4b, 0x65, 0x79, 0x22, 0xd4, 0x01, 0x0a, 0x24, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,\n\t0x63, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e,\n\t0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04,\n\t0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x70,\n\t0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x53, 0x65,\n\t0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64,\n\t0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61,\n\t0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x14,\n\t0x0a, 0x05, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70,\n\t0x72, 0x6f, 0x78, 0x79, 0x12, 0x34, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,\n\t0x63, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70,\n\t0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65,\n\t0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x20, 0x44,\n\t0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,\n\t0x63, 0x65, 0x56, 0x32, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,\n\t0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61,\n\t0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x34,\n\t0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03,\n\t0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65,\n\t0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,\n\t0x63, 0x69, 0x65, 0x73, 0x22, 0x61, 0x0a, 0x29, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,\n\t0x63, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x55, 0x70, 0x64,\n\t0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f,\n\t0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6c,\n\t0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x2a, 0x41, 0x0a, 0x19, 0x44, 0x65, 0x70, 0x65, 0x6e,\n\t0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32,\n\t0x43, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x00, 0x12, 0x0b,\n\t0x0a, 0x07, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55,\n\t0x4e, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0x95, 0x02, 0x0a, 0x15, 0x44,\n\t0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,\n\t0x63, 0x65, 0x56, 0x32, 0x12, 0x64, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12,\n\t0x29, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63,\n\t0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e,\n\t0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x72, 0x70,\n\t0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x53, 0x65,\n\t0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x40, 0x0a, 0x04, 0x53, 0x79,\n\t0x6e, 0x63, 0x12, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64,\n\t0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x53,\n\t0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70,\n\t0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d,\n\t0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x12, 0x2f, 0x2e,\n\t0x67, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65,\n\t0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,\n\t0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,\n\t0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,\n\t0x28, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_services_dependencies_service_v2_proto_rawDescOnce sync.Once\n\tfile_services_dependencies_service_v2_proto_rawDescData = file_services_dependencies_service_v2_proto_rawDesc\n)\n\nfunc file_services_dependencies_service_v2_proto_rawDescGZIP() []byte {\n\tfile_services_dependencies_service_v2_proto_rawDescOnce.Do(func() {\n\t\tfile_services_dependencies_service_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_dependencies_service_v2_proto_rawDescData)\n\t})\n\treturn file_services_dependencies_service_v2_proto_rawDescData\n}\n\nvar file_services_dependencies_service_v2_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_services_dependencies_service_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 5)\nvar file_services_dependencies_service_v2_proto_goTypes = []any{\n\t(DependenciesServiceV2Code)(0),                    // 0: grpc.DependenciesServiceV2Code\n\t(*Dependency)(nil),                                // 1: grpc.Dependency\n\t(*DependenciesServiceV2ConnectRequest)(nil),       // 2: grpc.DependenciesServiceV2ConnectRequest\n\t(*DependenciesServiceV2ConnectResponse)(nil),      // 3: grpc.DependenciesServiceV2ConnectResponse\n\t(*DependenciesServiceV2SyncRequest)(nil),          // 4: grpc.DependenciesServiceV2SyncRequest\n\t(*DependenciesServiceV2UpdateTaskLogRequest)(nil), // 5: grpc.DependenciesServiceV2UpdateTaskLogRequest\n\t(*Response)(nil),                                  // 6: grpc.Response\n}\nvar file_services_dependencies_service_v2_proto_depIdxs = []int32{\n\t0, // 0: grpc.DependenciesServiceV2ConnectResponse.code:type_name -> grpc.DependenciesServiceV2Code\n\t1, // 1: grpc.DependenciesServiceV2ConnectResponse.dependencies:type_name -> grpc.Dependency\n\t1, // 2: grpc.DependenciesServiceV2SyncRequest.dependencies:type_name -> grpc.Dependency\n\t2, // 3: grpc.DependenciesServiceV2.Connect:input_type -> grpc.DependenciesServiceV2ConnectRequest\n\t4, // 4: grpc.DependenciesServiceV2.Sync:input_type -> grpc.DependenciesServiceV2SyncRequest\n\t5, // 5: grpc.DependenciesServiceV2.UpdateTaskLog:input_type -> grpc.DependenciesServiceV2UpdateTaskLogRequest\n\t3, // 6: grpc.DependenciesServiceV2.Connect:output_type -> grpc.DependenciesServiceV2ConnectResponse\n\t6, // 7: grpc.DependenciesServiceV2.Sync:output_type -> grpc.Response\n\t6, // 8: grpc.DependenciesServiceV2.UpdateTaskLog:output_type -> grpc.Response\n\t6, // [6:9] is the sub-list for method output_type\n\t3, // [3:6] is the sub-list for method input_type\n\t3, // [3:3] is the sub-list for extension type_name\n\t3, // [3:3] is the sub-list for extension extendee\n\t0, // [0:3] is the sub-list for field type_name\n}\n\nfunc init() { file_services_dependencies_service_v2_proto_init() }\nfunc file_services_dependencies_service_v2_proto_init() {\n\tif File_services_dependencies_service_v2_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_response_proto_init()\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_services_dependencies_service_v2_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*Dependency); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_services_dependencies_service_v2_proto_msgTypes[1].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*DependenciesServiceV2ConnectRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_services_dependencies_service_v2_proto_msgTypes[2].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*DependenciesServiceV2ConnectResponse); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_services_dependencies_service_v2_proto_msgTypes[3].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*DependenciesServiceV2SyncRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_services_dependencies_service_v2_proto_msgTypes[4].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*DependenciesServiceV2UpdateTaskLogRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_dependencies_service_v2_proto_rawDesc,\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   5,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_dependencies_service_v2_proto_goTypes,\n\t\tDependencyIndexes: file_services_dependencies_service_v2_proto_depIdxs,\n\t\tEnumInfos:         file_services_dependencies_service_v2_proto_enumTypes,\n\t\tMessageInfos:      file_services_dependencies_service_v2_proto_msgTypes,\n\t}.Build()\n\tFile_services_dependencies_service_v2_proto = out.File\n\tfile_services_dependencies_service_v2_proto_rawDesc = nil\n\tfile_services_dependencies_service_v2_proto_goTypes = nil\n\tfile_services_dependencies_service_v2_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/dependencies_service_v2_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/dependencies_service_v2.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tDependenciesServiceV2_Connect_FullMethodName       = \"/grpc.DependenciesServiceV2/Connect\"\n\tDependenciesServiceV2_Sync_FullMethodName          = \"/grpc.DependenciesServiceV2/Sync\"\n\tDependenciesServiceV2_UpdateTaskLog_FullMethodName = \"/grpc.DependenciesServiceV2/UpdateTaskLog\"\n)\n\n// DependenciesServiceV2Client is the client API for DependenciesServiceV2 service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype DependenciesServiceV2Client interface {\n\tConnect(ctx context.Context, in *DependenciesServiceV2ConnectRequest, opts ...grpc.CallOption) (DependenciesServiceV2_ConnectClient, error)\n\tSync(ctx context.Context, in *DependenciesServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error)\n\tUpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependenciesServiceV2_UpdateTaskLogClient, error)\n}\n\ntype dependenciesServiceV2Client struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewDependenciesServiceV2Client(cc grpc.ClientConnInterface) DependenciesServiceV2Client {\n\treturn &dependenciesServiceV2Client{cc}\n}\n\nfunc (c *dependenciesServiceV2Client) Connect(ctx context.Context, in *DependenciesServiceV2ConnectRequest, opts ...grpc.CallOption) (DependenciesServiceV2_ConnectClient, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tstream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[0], DependenciesServiceV2_Connect_FullMethodName, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &dependenciesServiceV2ConnectClient{ClientStream: stream}\n\tif err := x.ClientStream.SendMsg(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn x, nil\n}\n\ntype DependenciesServiceV2_ConnectClient interface {\n\tRecv() (*DependenciesServiceV2ConnectResponse, error)\n\tgrpc.ClientStream\n}\n\ntype dependenciesServiceV2ConnectClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *dependenciesServiceV2ConnectClient) Recv() (*DependenciesServiceV2ConnectResponse, error) {\n\tm := new(DependenciesServiceV2ConnectResponse)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *dependenciesServiceV2Client) Sync(ctx context.Context, in *DependenciesServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, DependenciesServiceV2_Sync_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *dependenciesServiceV2Client) UpdateTaskLog(ctx context.Context, opts ...grpc.CallOption) (DependenciesServiceV2_UpdateTaskLogClient, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tstream, err := c.cc.NewStream(ctx, &DependenciesServiceV2_ServiceDesc.Streams[1], DependenciesServiceV2_UpdateTaskLog_FullMethodName, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &dependenciesServiceV2UpdateTaskLogClient{ClientStream: stream}\n\treturn x, nil\n}\n\ntype DependenciesServiceV2_UpdateTaskLogClient interface {\n\tSend(*DependenciesServiceV2UpdateTaskLogRequest) error\n\tCloseAndRecv() (*Response, error)\n\tgrpc.ClientStream\n}\n\ntype dependenciesServiceV2UpdateTaskLogClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *dependenciesServiceV2UpdateTaskLogClient) Send(m *DependenciesServiceV2UpdateTaskLogRequest) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\nfunc (x *dependenciesServiceV2UpdateTaskLogClient) CloseAndRecv() (*Response, error) {\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\tm := new(Response)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// DependenciesServiceV2Server is the server API for DependenciesServiceV2 service.\n// All implementations must embed UnimplementedDependenciesServiceV2Server\n// for forward compatibility\ntype DependenciesServiceV2Server interface {\n\tConnect(*DependenciesServiceV2ConnectRequest, DependenciesServiceV2_ConnectServer) error\n\tSync(context.Context, *DependenciesServiceV2SyncRequest) (*Response, error)\n\tUpdateTaskLog(DependenciesServiceV2_UpdateTaskLogServer) error\n\tmustEmbedUnimplementedDependenciesServiceV2Server()\n}\n\n// UnimplementedDependenciesServiceV2Server must be embedded to have forward compatible implementations.\ntype UnimplementedDependenciesServiceV2Server struct {\n}\n\nfunc (UnimplementedDependenciesServiceV2Server) Connect(*DependenciesServiceV2ConnectRequest, DependenciesServiceV2_ConnectServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method Connect not implemented\")\n}\nfunc (UnimplementedDependenciesServiceV2Server) Sync(context.Context, *DependenciesServiceV2SyncRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Sync not implemented\")\n}\nfunc (UnimplementedDependenciesServiceV2Server) UpdateTaskLog(DependenciesServiceV2_UpdateTaskLogServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method UpdateTaskLog not implemented\")\n}\nfunc (UnimplementedDependenciesServiceV2Server) mustEmbedUnimplementedDependenciesServiceV2Server() {}\n\n// UnsafeDependenciesServiceV2Server may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to DependenciesServiceV2Server will\n// result in compilation errors.\ntype UnsafeDependenciesServiceV2Server interface {\n\tmustEmbedUnimplementedDependenciesServiceV2Server()\n}\n\nfunc RegisterDependenciesServiceV2Server(s grpc.ServiceRegistrar, srv DependenciesServiceV2Server) {\n\ts.RegisterService(&DependenciesServiceV2_ServiceDesc, srv)\n}\n\nfunc _DependenciesServiceV2_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {\n\tm := new(DependenciesServiceV2ConnectRequest)\n\tif err := stream.RecvMsg(m); err != nil {\n\t\treturn err\n\t}\n\treturn srv.(DependenciesServiceV2Server).Connect(m, &dependenciesServiceV2ConnectServer{ServerStream: stream})\n}\n\ntype DependenciesServiceV2_ConnectServer interface {\n\tSend(*DependenciesServiceV2ConnectResponse) error\n\tgrpc.ServerStream\n}\n\ntype dependenciesServiceV2ConnectServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *dependenciesServiceV2ConnectServer) Send(m *DependenciesServiceV2ConnectResponse) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc _DependenciesServiceV2_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(DependenciesServiceV2SyncRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(DependenciesServiceV2Server).Sync(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: DependenciesServiceV2_Sync_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(DependenciesServiceV2Server).Sync(ctx, req.(*DependenciesServiceV2SyncRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _DependenciesServiceV2_UpdateTaskLog_Handler(srv interface{}, stream grpc.ServerStream) error {\n\treturn srv.(DependenciesServiceV2Server).UpdateTaskLog(&dependenciesServiceV2UpdateTaskLogServer{ServerStream: stream})\n}\n\ntype DependenciesServiceV2_UpdateTaskLogServer interface {\n\tSendAndClose(*Response) error\n\tRecv() (*DependenciesServiceV2UpdateTaskLogRequest, error)\n\tgrpc.ServerStream\n}\n\ntype dependenciesServiceV2UpdateTaskLogServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *dependenciesServiceV2UpdateTaskLogServer) SendAndClose(m *Response) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc (x *dependenciesServiceV2UpdateTaskLogServer) Recv() (*DependenciesServiceV2UpdateTaskLogRequest, error) {\n\tm := new(DependenciesServiceV2UpdateTaskLogRequest)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// DependenciesServiceV2_ServiceDesc is the grpc.ServiceDesc for DependenciesServiceV2 service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar DependenciesServiceV2_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.DependenciesServiceV2\",\n\tHandlerType: (*DependenciesServiceV2Server)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"Sync\",\n\t\t\tHandler:    _DependenciesServiceV2_Sync_Handler,\n\t\t},\n\t},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName:    \"Connect\",\n\t\t\tHandler:       _DependenciesServiceV2_Connect_Handler,\n\t\t\tServerStreams: true,\n\t\t},\n\t\t{\n\t\t\tStreamName:    \"UpdateTaskLog\",\n\t\t\tHandler:       _DependenciesServiceV2_UpdateTaskLog_Handler,\n\t\t\tClientStreams: true,\n\t\t},\n\t},\n\tMetadata: \"services/dependencies_service_v2.proto\",\n}\n"
  },
  {
    "path": "grpc/go.mod",
    "content": "module github.com/crawlab-team/crawlab/grpc\n\ngo 1.22\n\nrequire (\n\tgoogle.golang.org/grpc v1.64.0\n\tgoogle.golang.org/protobuf v1.34.2\n)\n\nrequire (\n\tgolang.org/x/net v0.25.0 // indirect\n\tgolang.org/x/sys v0.20.0 // indirect\n\tgolang.org/x/text v0.15.0 // indirect\n\tgoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect\n)\n"
  },
  {
    "path": "grpc/go.sum",
    "content": "github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=\ngithub.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=\ngolang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=\ngolang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=\ngolang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=\ngolang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=\ngolang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngoogle.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU=\ngoogle.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=\ngoogle.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=\ngoogle.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=\ngoogle.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=\n"
  },
  {
    "path": "grpc/message_service.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/message_service.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\nvar File_services_message_service_proto protoreflect.FileDescriptor\n\nvar file_services_message_service_proto_rawDesc = []byte{\n\t0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61,\n\t0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73,\n\t0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x32, 0x4b, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65,\n\t0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,\n\t0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65,\n\t0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72,\n\t0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01,\n\t0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,\n\t0x6f, 0x33,\n}\n\nvar file_services_message_service_proto_goTypes = []any{\n\t(*StreamMessage)(nil), // 0: grpc.StreamMessage\n}\nvar file_services_message_service_proto_depIdxs = []int32{\n\t0, // 0: grpc.MessageService.Connect:input_type -> grpc.StreamMessage\n\t0, // 1: grpc.MessageService.Connect:output_type -> grpc.StreamMessage\n\t1, // [1:2] is the sub-list for method output_type\n\t0, // [0:1] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_services_message_service_proto_init() }\nfunc file_services_message_service_proto_init() {\n\tif File_services_message_service_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_stream_message_proto_init()\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_message_service_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_message_service_proto_goTypes,\n\t\tDependencyIndexes: file_services_message_service_proto_depIdxs,\n\t}.Build()\n\tFile_services_message_service_proto = out.File\n\tfile_services_message_service_proto_rawDesc = nil\n\tfile_services_message_service_proto_goTypes = nil\n\tfile_services_message_service_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/message_service_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/message_service.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tMessageService_Connect_FullMethodName = \"/grpc.MessageService/Connect\"\n)\n\n// MessageServiceClient is the client API for MessageService service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype MessageServiceClient interface {\n\tConnect(ctx context.Context, opts ...grpc.CallOption) (MessageService_ConnectClient, error)\n}\n\ntype messageServiceClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewMessageServiceClient(cc grpc.ClientConnInterface) MessageServiceClient {\n\treturn &messageServiceClient{cc}\n}\n\nfunc (c *messageServiceClient) Connect(ctx context.Context, opts ...grpc.CallOption) (MessageService_ConnectClient, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tstream, err := c.cc.NewStream(ctx, &MessageService_ServiceDesc.Streams[0], MessageService_Connect_FullMethodName, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &messageServiceConnectClient{ClientStream: stream}\n\treturn x, nil\n}\n\ntype MessageService_ConnectClient interface {\n\tSend(*StreamMessage) error\n\tRecv() (*StreamMessage, error)\n\tgrpc.ClientStream\n}\n\ntype messageServiceConnectClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *messageServiceConnectClient) Send(m *StreamMessage) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\nfunc (x *messageServiceConnectClient) Recv() (*StreamMessage, error) {\n\tm := new(StreamMessage)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// MessageServiceServer is the server API for MessageService service.\n// All implementations must embed UnimplementedMessageServiceServer\n// for forward compatibility\ntype MessageServiceServer interface {\n\tConnect(MessageService_ConnectServer) error\n\tmustEmbedUnimplementedMessageServiceServer()\n}\n\n// UnimplementedMessageServiceServer must be embedded to have forward compatible implementations.\ntype UnimplementedMessageServiceServer struct {\n}\n\nfunc (UnimplementedMessageServiceServer) Connect(MessageService_ConnectServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method Connect not implemented\")\n}\nfunc (UnimplementedMessageServiceServer) mustEmbedUnimplementedMessageServiceServer() {}\n\n// UnsafeMessageServiceServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to MessageServiceServer will\n// result in compilation errors.\ntype UnsafeMessageServiceServer interface {\n\tmustEmbedUnimplementedMessageServiceServer()\n}\n\nfunc RegisterMessageServiceServer(s grpc.ServiceRegistrar, srv MessageServiceServer) {\n\ts.RegisterService(&MessageService_ServiceDesc, srv)\n}\n\nfunc _MessageService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {\n\treturn srv.(MessageServiceServer).Connect(&messageServiceConnectServer{ServerStream: stream})\n}\n\ntype MessageService_ConnectServer interface {\n\tSend(*StreamMessage) error\n\tRecv() (*StreamMessage, error)\n\tgrpc.ServerStream\n}\n\ntype messageServiceConnectServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *messageServiceConnectServer) Send(m *StreamMessage) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc (x *messageServiceConnectServer) Recv() (*StreamMessage, error) {\n\tm := new(StreamMessage)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// MessageService_ServiceDesc is the grpc.ServiceDesc for MessageService service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar MessageService_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.MessageService\",\n\tHandlerType: (*MessageServiceServer)(nil),\n\tMethods:     []grpc.MethodDesc{},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName:    \"Connect\",\n\t\t\tHandler:       _MessageService_Connect_Handler,\n\t\t\tServerStreams: true,\n\t\t\tClientStreams: true,\n\t\t},\n\t},\n\tMetadata: \"services/message_service.proto\",\n}\n"
  },
  {
    "path": "grpc/metrics_service_v2.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/metrics_service_v2.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype MetricsServiceV2SendRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tType                 string  `protobuf:\"bytes,1,opt,name=type,proto3\" json:\"type,omitempty\"`\n\tNodeKey              string  `protobuf:\"bytes,2,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tTimestamp            int64   `protobuf:\"varint,3,opt,name=timestamp,proto3\" json:\"timestamp,omitempty\"`\n\tCpuUsagePercent      float32 `protobuf:\"fixed32,4,opt,name=cpu_usage_percent,json=cpuUsagePercent,proto3\" json:\"cpu_usage_percent,omitempty\"`\n\tTotalMemory          uint64  `protobuf:\"varint,5,opt,name=total_memory,json=totalMemory,proto3\" json:\"total_memory,omitempty\"`\n\tAvailableMemory      uint64  `protobuf:\"varint,6,opt,name=available_memory,json=availableMemory,proto3\" json:\"available_memory,omitempty\"`\n\tUsedMemory           uint64  `protobuf:\"varint,7,opt,name=used_memory,json=usedMemory,proto3\" json:\"used_memory,omitempty\"`\n\tUsedMemoryPercent    float32 `protobuf:\"fixed32,8,opt,name=used_memory_percent,json=usedMemoryPercent,proto3\" json:\"used_memory_percent,omitempty\"`\n\tTotalDisk            uint64  `protobuf:\"varint,9,opt,name=total_disk,json=totalDisk,proto3\" json:\"total_disk,omitempty\"`\n\tAvailableDisk        uint64  `protobuf:\"varint,10,opt,name=available_disk,json=availableDisk,proto3\" json:\"available_disk,omitempty\"`\n\tUsedDisk             uint64  `protobuf:\"varint,11,opt,name=used_disk,json=usedDisk,proto3\" json:\"used_disk,omitempty\"`\n\tUsedDiskPercent      float32 `protobuf:\"fixed32,12,opt,name=used_disk_percent,json=usedDiskPercent,proto3\" json:\"used_disk_percent,omitempty\"`\n\tDiskReadBytesRate    float32 `protobuf:\"fixed32,15,opt,name=disk_read_bytes_rate,json=diskReadBytesRate,proto3\" json:\"disk_read_bytes_rate,omitempty\"`\n\tDiskWriteBytesRate   float32 `protobuf:\"fixed32,16,opt,name=disk_write_bytes_rate,json=diskWriteBytesRate,proto3\" json:\"disk_write_bytes_rate,omitempty\"`\n\tNetworkBytesSentRate float32 `protobuf:\"fixed32,17,opt,name=network_bytes_sent_rate,json=networkBytesSentRate,proto3\" json:\"network_bytes_sent_rate,omitempty\"`\n\tNetworkBytesRecvRate float32 `protobuf:\"fixed32,18,opt,name=network_bytes_recv_rate,json=networkBytesRecvRate,proto3\" json:\"network_bytes_recv_rate,omitempty\"`\n}\n\nfunc (x *MetricsServiceV2SendRequest) Reset() {\n\t*x = MetricsServiceV2SendRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_metrics_service_v2_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *MetricsServiceV2SendRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*MetricsServiceV2SendRequest) ProtoMessage() {}\n\nfunc (x *MetricsServiceV2SendRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_metrics_service_v2_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use MetricsServiceV2SendRequest.ProtoReflect.Descriptor instead.\nfunc (*MetricsServiceV2SendRequest) Descriptor() ([]byte, []int) {\n\treturn file_services_metrics_service_v2_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetType() string {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn \"\"\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetTimestamp() int64 {\n\tif x != nil {\n\t\treturn x.Timestamp\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetCpuUsagePercent() float32 {\n\tif x != nil {\n\t\treturn x.CpuUsagePercent\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetTotalMemory() uint64 {\n\tif x != nil {\n\t\treturn x.TotalMemory\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetAvailableMemory() uint64 {\n\tif x != nil {\n\t\treturn x.AvailableMemory\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetUsedMemory() uint64 {\n\tif x != nil {\n\t\treturn x.UsedMemory\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetUsedMemoryPercent() float32 {\n\tif x != nil {\n\t\treturn x.UsedMemoryPercent\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetTotalDisk() uint64 {\n\tif x != nil {\n\t\treturn x.TotalDisk\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetAvailableDisk() uint64 {\n\tif x != nil {\n\t\treturn x.AvailableDisk\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetUsedDisk() uint64 {\n\tif x != nil {\n\t\treturn x.UsedDisk\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetUsedDiskPercent() float32 {\n\tif x != nil {\n\t\treturn x.UsedDiskPercent\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetDiskReadBytesRate() float32 {\n\tif x != nil {\n\t\treturn x.DiskReadBytesRate\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetDiskWriteBytesRate() float32 {\n\tif x != nil {\n\t\treturn x.DiskWriteBytesRate\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetNetworkBytesSentRate() float32 {\n\tif x != nil {\n\t\treturn x.NetworkBytesSentRate\n\t}\n\treturn 0\n}\n\nfunc (x *MetricsServiceV2SendRequest) GetNetworkBytesRecvRate() float32 {\n\tif x != nil {\n\t\treturn x.NetworkBytesRecvRate\n\t}\n\treturn 0\n}\n\nvar File_services_metrics_service_v2_proto protoreflect.FileDescriptor\n\nvar file_services_metrics_service_v2_proto_rawDesc = []byte{\n\t0x0a, 0x21, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,\n\t0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x32, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74,\n\t0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x22, 0x96, 0x05, 0x0a, 0x1b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76,\n\t0x69, 0x63, 0x65, 0x56, 0x32, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,\n\t0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79,\n\t0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12,\n\t0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01,\n\t0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a,\n\t0x11, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65,\n\t0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x63, 0x70, 0x75, 0x55, 0x73, 0x61,\n\t0x67, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74,\n\t0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52,\n\t0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x0a, 0x10,\n\t0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79,\n\t0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c,\n\t0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x5f,\n\t0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x75, 0x73,\n\t0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x64,\n\t0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18,\n\t0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72,\n\t0x79, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61,\n\t0x6c, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x6f,\n\t0x74, 0x61, 0x6c, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x76, 0x61, 0x69, 0x6c,\n\t0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52,\n\t0x0d, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x1b,\n\t0x0a, 0x09, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28,\n\t0x04, 0x52, 0x08, 0x75, 0x73, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x75,\n\t0x73, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74,\n\t0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b,\n\t0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x6b, 0x5f,\n\t0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18,\n\t0x0f, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x64, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x61, 0x64, 0x42,\n\t0x79, 0x74, 0x65, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x6b,\n\t0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74,\n\t0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x02, 0x52, 0x12, 0x64, 0x69, 0x73, 0x6b, 0x57, 0x72, 0x69,\n\t0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6e,\n\t0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e,\n\t0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x6e, 0x65,\n\t0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x52, 0x61,\n\t0x74, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x62, 0x79,\n\t0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20,\n\t0x01, 0x28, 0x02, 0x52, 0x14, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79, 0x74, 0x65,\n\t0x73, 0x52, 0x65, 0x63, 0x76, 0x52, 0x61, 0x74, 0x65, 0x32, 0x4f, 0x0a, 0x10, 0x4d, 0x65, 0x74,\n\t0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x12, 0x3b, 0x0a,\n\t0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74,\n\t0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x53, 0x65, 0x6e,\n\t0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,\n\t0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b,\n\t0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_services_metrics_service_v2_proto_rawDescOnce sync.Once\n\tfile_services_metrics_service_v2_proto_rawDescData = file_services_metrics_service_v2_proto_rawDesc\n)\n\nfunc file_services_metrics_service_v2_proto_rawDescGZIP() []byte {\n\tfile_services_metrics_service_v2_proto_rawDescOnce.Do(func() {\n\t\tfile_services_metrics_service_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_metrics_service_v2_proto_rawDescData)\n\t})\n\treturn file_services_metrics_service_v2_proto_rawDescData\n}\n\nvar file_services_metrics_service_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_services_metrics_service_v2_proto_goTypes = []any{\n\t(*MetricsServiceV2SendRequest)(nil), // 0: grpc.MetricsServiceV2SendRequest\n\t(*Response)(nil),                    // 1: grpc.Response\n}\nvar file_services_metrics_service_v2_proto_depIdxs = []int32{\n\t0, // 0: grpc.MetricsServiceV2.Send:input_type -> grpc.MetricsServiceV2SendRequest\n\t1, // 1: grpc.MetricsServiceV2.Send:output_type -> grpc.Response\n\t1, // [1:2] is the sub-list for method output_type\n\t0, // [0:1] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_services_metrics_service_v2_proto_init() }\nfunc file_services_metrics_service_v2_proto_init() {\n\tif File_services_metrics_service_v2_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_response_proto_init()\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_services_metrics_service_v2_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*MetricsServiceV2SendRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_metrics_service_v2_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_metrics_service_v2_proto_goTypes,\n\t\tDependencyIndexes: file_services_metrics_service_v2_proto_depIdxs,\n\t\tMessageInfos:      file_services_metrics_service_v2_proto_msgTypes,\n\t}.Build()\n\tFile_services_metrics_service_v2_proto = out.File\n\tfile_services_metrics_service_v2_proto_rawDesc = nil\n\tfile_services_metrics_service_v2_proto_goTypes = nil\n\tfile_services_metrics_service_v2_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/metrics_service_v2_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/metrics_service_v2.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tMetricsServiceV2_Send_FullMethodName = \"/grpc.MetricsServiceV2/Send\"\n)\n\n// MetricsServiceV2Client is the client API for MetricsServiceV2 service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype MetricsServiceV2Client interface {\n\tSend(ctx context.Context, in *MetricsServiceV2SendRequest, opts ...grpc.CallOption) (*Response, error)\n}\n\ntype metricsServiceV2Client struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewMetricsServiceV2Client(cc grpc.ClientConnInterface) MetricsServiceV2Client {\n\treturn &metricsServiceV2Client{cc}\n}\n\nfunc (c *metricsServiceV2Client) Send(ctx context.Context, in *MetricsServiceV2SendRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, MetricsServiceV2_Send_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// MetricsServiceV2Server is the server API for MetricsServiceV2 service.\n// All implementations must embed UnimplementedMetricsServiceV2Server\n// for forward compatibility\ntype MetricsServiceV2Server interface {\n\tSend(context.Context, *MetricsServiceV2SendRequest) (*Response, error)\n\tmustEmbedUnimplementedMetricsServiceV2Server()\n}\n\n// UnimplementedMetricsServiceV2Server must be embedded to have forward compatible implementations.\ntype UnimplementedMetricsServiceV2Server struct {\n}\n\nfunc (UnimplementedMetricsServiceV2Server) Send(context.Context, *MetricsServiceV2SendRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Send not implemented\")\n}\nfunc (UnimplementedMetricsServiceV2Server) mustEmbedUnimplementedMetricsServiceV2Server() {}\n\n// UnsafeMetricsServiceV2Server may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to MetricsServiceV2Server will\n// result in compilation errors.\ntype UnsafeMetricsServiceV2Server interface {\n\tmustEmbedUnimplementedMetricsServiceV2Server()\n}\n\nfunc RegisterMetricsServiceV2Server(s grpc.ServiceRegistrar, srv MetricsServiceV2Server) {\n\ts.RegisterService(&MetricsServiceV2_ServiceDesc, srv)\n}\n\nfunc _MetricsServiceV2_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(MetricsServiceV2SendRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(MetricsServiceV2Server).Send(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: MetricsServiceV2_Send_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(MetricsServiceV2Server).Send(ctx, req.(*MetricsServiceV2SendRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// MetricsServiceV2_ServiceDesc is the grpc.ServiceDesc for MetricsServiceV2 service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar MetricsServiceV2_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.MetricsServiceV2\",\n\tHandlerType: (*MetricsServiceV2Server)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"Send\",\n\t\t\tHandler:    _MetricsServiceV2_Send_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"services/metrics_service_v2.proto\",\n}\n"
  },
  {
    "path": "grpc/model_base_service.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/model_base_service.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\nvar File_services_model_base_service_proto protoreflect.FileDescriptor\n\nvar file_services_model_base_service_proto_rawDesc = []byte{\n\t0x0a, 0x21, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,\n\t0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x14, 0x65, 0x6e, 0x74, 0x69, 0x74,\n\t0x79, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,\n\t0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xac, 0x04, 0x0a, 0x10, 0x4d, 0x6f, 0x64, 0x65, 0x6c,\n\t0x42, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x47,\n\t0x65, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x26, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0d,\n\t0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,\n\t0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,\n\t0x2a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70,\n\t0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63,\n\t0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2d, 0x0a, 0x0a, 0x44,\n\t0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63,\n\t0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,\n\t0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x29, 0x0a, 0x06, 0x44, 0x65,\n\t0x6c, 0x65, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c,\n\t0x69, 0x73, 0x74, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x0f, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c,\n\t0x65, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2d, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61,\n\t0x74, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x29, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74,\n\t0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x22, 0x00, 0x12, 0x2c, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x12,\n\t0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,\n\t0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,\n\t0x12, 0x29, 0x0a, 0x06, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70,\n\t0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63,\n\t0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x28, 0x0a, 0x05, 0x43,\n\t0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62,\n\t0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar file_services_model_base_service_proto_goTypes = []any{\n\t(*Request)(nil),  // 0: grpc.Request\n\t(*Response)(nil), // 1: grpc.Response\n}\nvar file_services_model_base_service_proto_depIdxs = []int32{\n\t0,  // 0: grpc.ModelBaseService.GetById:input_type -> grpc.Request\n\t0,  // 1: grpc.ModelBaseService.Get:input_type -> grpc.Request\n\t0,  // 2: grpc.ModelBaseService.GetList:input_type -> grpc.Request\n\t0,  // 3: grpc.ModelBaseService.DeleteById:input_type -> grpc.Request\n\t0,  // 4: grpc.ModelBaseService.Delete:input_type -> grpc.Request\n\t0,  // 5: grpc.ModelBaseService.DeleteList:input_type -> grpc.Request\n\t0,  // 6: grpc.ModelBaseService.ForceDeleteList:input_type -> grpc.Request\n\t0,  // 7: grpc.ModelBaseService.UpdateById:input_type -> grpc.Request\n\t0,  // 8: grpc.ModelBaseService.Update:input_type -> grpc.Request\n\t0,  // 9: grpc.ModelBaseService.UpdateDoc:input_type -> grpc.Request\n\t0,  // 10: grpc.ModelBaseService.Insert:input_type -> grpc.Request\n\t0,  // 11: grpc.ModelBaseService.Count:input_type -> grpc.Request\n\t1,  // 12: grpc.ModelBaseService.GetById:output_type -> grpc.Response\n\t1,  // 13: grpc.ModelBaseService.Get:output_type -> grpc.Response\n\t1,  // 14: grpc.ModelBaseService.GetList:output_type -> grpc.Response\n\t1,  // 15: grpc.ModelBaseService.DeleteById:output_type -> grpc.Response\n\t1,  // 16: grpc.ModelBaseService.Delete:output_type -> grpc.Response\n\t1,  // 17: grpc.ModelBaseService.DeleteList:output_type -> grpc.Response\n\t1,  // 18: grpc.ModelBaseService.ForceDeleteList:output_type -> grpc.Response\n\t1,  // 19: grpc.ModelBaseService.UpdateById:output_type -> grpc.Response\n\t1,  // 20: grpc.ModelBaseService.Update:output_type -> grpc.Response\n\t1,  // 21: grpc.ModelBaseService.UpdateDoc:output_type -> grpc.Response\n\t1,  // 22: grpc.ModelBaseService.Insert:output_type -> grpc.Response\n\t1,  // 23: grpc.ModelBaseService.Count:output_type -> grpc.Response\n\t12, // [12:24] is the sub-list for method output_type\n\t0,  // [0:12] is the sub-list for method input_type\n\t0,  // [0:0] is the sub-list for extension type_name\n\t0,  // [0:0] is the sub-list for extension extendee\n\t0,  // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_services_model_base_service_proto_init() }\nfunc file_services_model_base_service_proto_init() {\n\tif File_services_model_base_service_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_request_proto_init()\n\tfile_entity_response_proto_init()\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_model_base_service_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_model_base_service_proto_goTypes,\n\t\tDependencyIndexes: file_services_model_base_service_proto_depIdxs,\n\t}.Build()\n\tFile_services_model_base_service_proto = out.File\n\tfile_services_model_base_service_proto_rawDesc = nil\n\tfile_services_model_base_service_proto_goTypes = nil\n\tfile_services_model_base_service_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/model_base_service_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/model_base_service.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tModelBaseService_GetById_FullMethodName         = \"/grpc.ModelBaseService/GetById\"\n\tModelBaseService_Get_FullMethodName             = \"/grpc.ModelBaseService/Get\"\n\tModelBaseService_GetList_FullMethodName         = \"/grpc.ModelBaseService/GetList\"\n\tModelBaseService_DeleteById_FullMethodName      = \"/grpc.ModelBaseService/DeleteById\"\n\tModelBaseService_Delete_FullMethodName          = \"/grpc.ModelBaseService/Delete\"\n\tModelBaseService_DeleteList_FullMethodName      = \"/grpc.ModelBaseService/DeleteList\"\n\tModelBaseService_ForceDeleteList_FullMethodName = \"/grpc.ModelBaseService/ForceDeleteList\"\n\tModelBaseService_UpdateById_FullMethodName      = \"/grpc.ModelBaseService/UpdateById\"\n\tModelBaseService_Update_FullMethodName          = \"/grpc.ModelBaseService/Update\"\n\tModelBaseService_UpdateDoc_FullMethodName       = \"/grpc.ModelBaseService/UpdateDoc\"\n\tModelBaseService_Insert_FullMethodName          = \"/grpc.ModelBaseService/Insert\"\n\tModelBaseService_Count_FullMethodName           = \"/grpc.ModelBaseService/Count\"\n)\n\n// ModelBaseServiceClient is the client API for ModelBaseService service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype ModelBaseServiceClient interface {\n\tGetById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tGet(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tGetList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tDeleteById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tDelete(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tDeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tForceDeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tUpdateById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tUpdate(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tUpdateDoc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tInsert(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tCount(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n}\n\ntype modelBaseServiceClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewModelBaseServiceClient(cc grpc.ClientConnInterface) ModelBaseServiceClient {\n\treturn &modelBaseServiceClient{cc}\n}\n\nfunc (c *modelBaseServiceClient) GetById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_GetById_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_Get_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) GetList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_GetList_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) DeleteById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_DeleteById_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) Delete(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_Delete_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) DeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_DeleteList_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) ForceDeleteList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_ForceDeleteList_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) UpdateById(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_UpdateById_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) Update(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_Update_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) UpdateDoc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_UpdateDoc_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) Insert(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_Insert_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceClient) Count(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseService_Count_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// ModelBaseServiceServer is the server API for ModelBaseService service.\n// All implementations must embed UnimplementedModelBaseServiceServer\n// for forward compatibility\ntype ModelBaseServiceServer interface {\n\tGetById(context.Context, *Request) (*Response, error)\n\tGet(context.Context, *Request) (*Response, error)\n\tGetList(context.Context, *Request) (*Response, error)\n\tDeleteById(context.Context, *Request) (*Response, error)\n\tDelete(context.Context, *Request) (*Response, error)\n\tDeleteList(context.Context, *Request) (*Response, error)\n\tForceDeleteList(context.Context, *Request) (*Response, error)\n\tUpdateById(context.Context, *Request) (*Response, error)\n\tUpdate(context.Context, *Request) (*Response, error)\n\tUpdateDoc(context.Context, *Request) (*Response, error)\n\tInsert(context.Context, *Request) (*Response, error)\n\tCount(context.Context, *Request) (*Response, error)\n\tmustEmbedUnimplementedModelBaseServiceServer()\n}\n\n// UnimplementedModelBaseServiceServer must be embedded to have forward compatible implementations.\ntype UnimplementedModelBaseServiceServer struct {\n}\n\nfunc (UnimplementedModelBaseServiceServer) GetById(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetById not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) Get(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Get not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) GetList(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetList not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) DeleteById(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteById not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) Delete(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Delete not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) DeleteList(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteList not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) ForceDeleteList(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ForceDeleteList not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) UpdateById(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UpdateById not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) Update(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Update not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) UpdateDoc(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UpdateDoc not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) Insert(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Insert not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) Count(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Count not implemented\")\n}\nfunc (UnimplementedModelBaseServiceServer) mustEmbedUnimplementedModelBaseServiceServer() {}\n\n// UnsafeModelBaseServiceServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to ModelBaseServiceServer will\n// result in compilation errors.\ntype UnsafeModelBaseServiceServer interface {\n\tmustEmbedUnimplementedModelBaseServiceServer()\n}\n\nfunc RegisterModelBaseServiceServer(s grpc.ServiceRegistrar, srv ModelBaseServiceServer) {\n\ts.RegisterService(&ModelBaseService_ServiceDesc, srv)\n}\n\nfunc _ModelBaseService_GetById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).GetById(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_GetById_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).GetById(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).Get(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_Get_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).Get(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_GetList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).GetList(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_GetList_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).GetList(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_DeleteById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).DeleteById(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_DeleteById_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).DeleteById(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).Delete(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_Delete_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).Delete(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_DeleteList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).DeleteList(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_DeleteList_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).DeleteList(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_ForceDeleteList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).ForceDeleteList(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_ForceDeleteList_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).ForceDeleteList(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_UpdateById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).UpdateById(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_UpdateById_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).UpdateById(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).Update(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_Update_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).Update(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_UpdateDoc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).UpdateDoc(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_UpdateDoc_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).UpdateDoc(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).Insert(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_Insert_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).Insert(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseService_Count_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceServer).Count(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseService_Count_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceServer).Count(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// ModelBaseService_ServiceDesc is the grpc.ServiceDesc for ModelBaseService service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar ModelBaseService_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.ModelBaseService\",\n\tHandlerType: (*ModelBaseServiceServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"GetById\",\n\t\t\tHandler:    _ModelBaseService_GetById_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Get\",\n\t\t\tHandler:    _ModelBaseService_Get_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetList\",\n\t\t\tHandler:    _ModelBaseService_GetList_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteById\",\n\t\t\tHandler:    _ModelBaseService_DeleteById_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Delete\",\n\t\t\tHandler:    _ModelBaseService_Delete_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteList\",\n\t\t\tHandler:    _ModelBaseService_DeleteList_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ForceDeleteList\",\n\t\t\tHandler:    _ModelBaseService_ForceDeleteList_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdateById\",\n\t\t\tHandler:    _ModelBaseService_UpdateById_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Update\",\n\t\t\tHandler:    _ModelBaseService_Update_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdateDoc\",\n\t\t\tHandler:    _ModelBaseService_UpdateDoc_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Insert\",\n\t\t\tHandler:    _ModelBaseService_Insert_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Count\",\n\t\t\tHandler:    _ModelBaseService_Count_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"services/model_base_service.proto\",\n}\n"
  },
  {
    "path": "grpc/model_base_service_v2.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/model_base_service_v2.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\nvar File_services_model_base_service_v2_proto protoreflect.FileDescriptor\n\nvar file_services_model_base_service_v2_proto_rawDesc = []byte{\n\t0x0a, 0x24, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,\n\t0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x32,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x25, 0x65, 0x6e,\n\t0x74, 0x69, 0x74, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,\n\t0x63, 0x65, 0x5f, 0x76, 0x32, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70,\n\t0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd4, 0x07, 0x0a, 0x12, 0x4d,\n\t0x6f, 0x64, 0x65, 0x6c, 0x42, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56,\n\t0x32, 0x12, 0x3f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x67,\n\t0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,\n\t0x56, 0x32, 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x65, 0x12, 0x21, 0x2e, 0x67,\n\t0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,\n\t0x56, 0x32, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,\n\t0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,\n\t0x00, 0x12, 0x3f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x22, 0x2e, 0x67,\n\t0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,\n\t0x56, 0x32, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,\n\t0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64,\n\t0x12, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72,\n\t0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52,\n\t0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x09, 0x44, 0x65, 0x6c,\n\t0x65, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f,\n\t0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x44, 0x65, 0x6c, 0x65,\n\t0x74, 0x65, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67,\n\t0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45,\n\t0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x25, 0x2e, 0x67,\n\t0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,\n\t0x56, 0x32, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42,\n\t0x79, 0x49, 0x64, 0x12, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,\n\t0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42,\n\t0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70,\n\t0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x09,\n\t0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63,\n\t0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x55,\n\t0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,\n\t0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,\n\t0x00, 0x12, 0x45, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x12,\n\t0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76,\n\t0x69, 0x63, 0x65, 0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c,\n\t0x61, 0x63, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d,\n\t0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x70,\n\t0x6c, 0x61, 0x63, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,\n\t0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,\n\t0x00, 0x12, 0x45, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4f, 0x6e, 0x65, 0x12,\n\t0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76,\n\t0x69, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4f, 0x6e, 0x65, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x09, 0x49, 0x6e, 0x73, 0x65,\n\t0x72, 0x74, 0x4f, 0x6e, 0x65, 0x12, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64,\n\t0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x49, 0x6e, 0x73, 0x65, 0x72,\n\t0x74, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,\n\t0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a,\n\t0x0a, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x12, 0x25, 0x2e, 0x67, 0x72,\n\t0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56,\n\t0x32, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,\n\t0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x2e,\n\t0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,\n\t0x65, 0x56, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,\n\t0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,\n\t0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x33,\n}\n\nvar file_services_model_base_service_v2_proto_goTypes = []any{\n\t(*ModelServiceV2GetByIdRequest)(nil),     // 0: grpc.ModelServiceV2GetByIdRequest\n\t(*ModelServiceV2GetOneRequest)(nil),      // 1: grpc.ModelServiceV2GetOneRequest\n\t(*ModelServiceV2GetManyRequest)(nil),     // 2: grpc.ModelServiceV2GetManyRequest\n\t(*ModelServiceV2DeleteByIdRequest)(nil),  // 3: grpc.ModelServiceV2DeleteByIdRequest\n\t(*ModelServiceV2DeleteOneRequest)(nil),   // 4: grpc.ModelServiceV2DeleteOneRequest\n\t(*ModelServiceV2DeleteManyRequest)(nil),  // 5: grpc.ModelServiceV2DeleteManyRequest\n\t(*ModelServiceV2UpdateByIdRequest)(nil),  // 6: grpc.ModelServiceV2UpdateByIdRequest\n\t(*ModelServiceV2UpdateOneRequest)(nil),   // 7: grpc.ModelServiceV2UpdateOneRequest\n\t(*ModelServiceV2UpdateManyRequest)(nil),  // 8: grpc.ModelServiceV2UpdateManyRequest\n\t(*ModelServiceV2ReplaceByIdRequest)(nil), // 9: grpc.ModelServiceV2ReplaceByIdRequest\n\t(*ModelServiceV2ReplaceOneRequest)(nil),  // 10: grpc.ModelServiceV2ReplaceOneRequest\n\t(*ModelServiceV2InsertOneRequest)(nil),   // 11: grpc.ModelServiceV2InsertOneRequest\n\t(*ModelServiceV2InsertManyRequest)(nil),  // 12: grpc.ModelServiceV2InsertManyRequest\n\t(*ModelServiceV2CountRequest)(nil),       // 13: grpc.ModelServiceV2CountRequest\n\t(*Response)(nil),                         // 14: grpc.Response\n}\nvar file_services_model_base_service_v2_proto_depIdxs = []int32{\n\t0,  // 0: grpc.ModelBaseServiceV2.GetById:input_type -> grpc.ModelServiceV2GetByIdRequest\n\t1,  // 1: grpc.ModelBaseServiceV2.GetOne:input_type -> grpc.ModelServiceV2GetOneRequest\n\t2,  // 2: grpc.ModelBaseServiceV2.GetMany:input_type -> grpc.ModelServiceV2GetManyRequest\n\t3,  // 3: grpc.ModelBaseServiceV2.DeleteById:input_type -> grpc.ModelServiceV2DeleteByIdRequest\n\t4,  // 4: grpc.ModelBaseServiceV2.DeleteOne:input_type -> grpc.ModelServiceV2DeleteOneRequest\n\t5,  // 5: grpc.ModelBaseServiceV2.DeleteMany:input_type -> grpc.ModelServiceV2DeleteManyRequest\n\t6,  // 6: grpc.ModelBaseServiceV2.UpdateById:input_type -> grpc.ModelServiceV2UpdateByIdRequest\n\t7,  // 7: grpc.ModelBaseServiceV2.UpdateOne:input_type -> grpc.ModelServiceV2UpdateOneRequest\n\t8,  // 8: grpc.ModelBaseServiceV2.UpdateMany:input_type -> grpc.ModelServiceV2UpdateManyRequest\n\t9,  // 9: grpc.ModelBaseServiceV2.ReplaceById:input_type -> grpc.ModelServiceV2ReplaceByIdRequest\n\t10, // 10: grpc.ModelBaseServiceV2.ReplaceOne:input_type -> grpc.ModelServiceV2ReplaceOneRequest\n\t11, // 11: grpc.ModelBaseServiceV2.InsertOne:input_type -> grpc.ModelServiceV2InsertOneRequest\n\t12, // 12: grpc.ModelBaseServiceV2.InsertMany:input_type -> grpc.ModelServiceV2InsertManyRequest\n\t13, // 13: grpc.ModelBaseServiceV2.Count:input_type -> grpc.ModelServiceV2CountRequest\n\t14, // 14: grpc.ModelBaseServiceV2.GetById:output_type -> grpc.Response\n\t14, // 15: grpc.ModelBaseServiceV2.GetOne:output_type -> grpc.Response\n\t14, // 16: grpc.ModelBaseServiceV2.GetMany:output_type -> grpc.Response\n\t14, // 17: grpc.ModelBaseServiceV2.DeleteById:output_type -> grpc.Response\n\t14, // 18: grpc.ModelBaseServiceV2.DeleteOne:output_type -> grpc.Response\n\t14, // 19: grpc.ModelBaseServiceV2.DeleteMany:output_type -> grpc.Response\n\t14, // 20: grpc.ModelBaseServiceV2.UpdateById:output_type -> grpc.Response\n\t14, // 21: grpc.ModelBaseServiceV2.UpdateOne:output_type -> grpc.Response\n\t14, // 22: grpc.ModelBaseServiceV2.UpdateMany:output_type -> grpc.Response\n\t14, // 23: grpc.ModelBaseServiceV2.ReplaceById:output_type -> grpc.Response\n\t14, // 24: grpc.ModelBaseServiceV2.ReplaceOne:output_type -> grpc.Response\n\t14, // 25: grpc.ModelBaseServiceV2.InsertOne:output_type -> grpc.Response\n\t14, // 26: grpc.ModelBaseServiceV2.InsertMany:output_type -> grpc.Response\n\t14, // 27: grpc.ModelBaseServiceV2.Count:output_type -> grpc.Response\n\t14, // [14:28] is the sub-list for method output_type\n\t0,  // [0:14] is the sub-list for method input_type\n\t0,  // [0:0] is the sub-list for extension type_name\n\t0,  // [0:0] is the sub-list for extension extendee\n\t0,  // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_services_model_base_service_v2_proto_init() }\nfunc file_services_model_base_service_v2_proto_init() {\n\tif File_services_model_base_service_v2_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_model_service_v2_request_proto_init()\n\tfile_entity_response_proto_init()\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_model_base_service_v2_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_model_base_service_v2_proto_goTypes,\n\t\tDependencyIndexes: file_services_model_base_service_v2_proto_depIdxs,\n\t}.Build()\n\tFile_services_model_base_service_v2_proto = out.File\n\tfile_services_model_base_service_v2_proto_rawDesc = nil\n\tfile_services_model_base_service_v2_proto_goTypes = nil\n\tfile_services_model_base_service_v2_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/model_base_service_v2_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/model_base_service_v2.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tModelBaseServiceV2_GetById_FullMethodName     = \"/grpc.ModelBaseServiceV2/GetById\"\n\tModelBaseServiceV2_GetOne_FullMethodName      = \"/grpc.ModelBaseServiceV2/GetOne\"\n\tModelBaseServiceV2_GetMany_FullMethodName     = \"/grpc.ModelBaseServiceV2/GetMany\"\n\tModelBaseServiceV2_DeleteById_FullMethodName  = \"/grpc.ModelBaseServiceV2/DeleteById\"\n\tModelBaseServiceV2_DeleteOne_FullMethodName   = \"/grpc.ModelBaseServiceV2/DeleteOne\"\n\tModelBaseServiceV2_DeleteMany_FullMethodName  = \"/grpc.ModelBaseServiceV2/DeleteMany\"\n\tModelBaseServiceV2_UpdateById_FullMethodName  = \"/grpc.ModelBaseServiceV2/UpdateById\"\n\tModelBaseServiceV2_UpdateOne_FullMethodName   = \"/grpc.ModelBaseServiceV2/UpdateOne\"\n\tModelBaseServiceV2_UpdateMany_FullMethodName  = \"/grpc.ModelBaseServiceV2/UpdateMany\"\n\tModelBaseServiceV2_ReplaceById_FullMethodName = \"/grpc.ModelBaseServiceV2/ReplaceById\"\n\tModelBaseServiceV2_ReplaceOne_FullMethodName  = \"/grpc.ModelBaseServiceV2/ReplaceOne\"\n\tModelBaseServiceV2_InsertOne_FullMethodName   = \"/grpc.ModelBaseServiceV2/InsertOne\"\n\tModelBaseServiceV2_InsertMany_FullMethodName  = \"/grpc.ModelBaseServiceV2/InsertMany\"\n\tModelBaseServiceV2_Count_FullMethodName       = \"/grpc.ModelBaseServiceV2/Count\"\n)\n\n// ModelBaseServiceV2Client is the client API for ModelBaseServiceV2 service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype ModelBaseServiceV2Client interface {\n\tGetById(ctx context.Context, in *ModelServiceV2GetByIdRequest, opts ...grpc.CallOption) (*Response, error)\n\tGetOne(ctx context.Context, in *ModelServiceV2GetOneRequest, opts ...grpc.CallOption) (*Response, error)\n\tGetMany(ctx context.Context, in *ModelServiceV2GetManyRequest, opts ...grpc.CallOption) (*Response, error)\n\tDeleteById(ctx context.Context, in *ModelServiceV2DeleteByIdRequest, opts ...grpc.CallOption) (*Response, error)\n\tDeleteOne(ctx context.Context, in *ModelServiceV2DeleteOneRequest, opts ...grpc.CallOption) (*Response, error)\n\tDeleteMany(ctx context.Context, in *ModelServiceV2DeleteManyRequest, opts ...grpc.CallOption) (*Response, error)\n\tUpdateById(ctx context.Context, in *ModelServiceV2UpdateByIdRequest, opts ...grpc.CallOption) (*Response, error)\n\tUpdateOne(ctx context.Context, in *ModelServiceV2UpdateOneRequest, opts ...grpc.CallOption) (*Response, error)\n\tUpdateMany(ctx context.Context, in *ModelServiceV2UpdateManyRequest, opts ...grpc.CallOption) (*Response, error)\n\tReplaceById(ctx context.Context, in *ModelServiceV2ReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error)\n\tReplaceOne(ctx context.Context, in *ModelServiceV2ReplaceOneRequest, opts ...grpc.CallOption) (*Response, error)\n\tInsertOne(ctx context.Context, in *ModelServiceV2InsertOneRequest, opts ...grpc.CallOption) (*Response, error)\n\tInsertMany(ctx context.Context, in *ModelServiceV2InsertManyRequest, opts ...grpc.CallOption) (*Response, error)\n\tCount(ctx context.Context, in *ModelServiceV2CountRequest, opts ...grpc.CallOption) (*Response, error)\n}\n\ntype modelBaseServiceV2Client struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewModelBaseServiceV2Client(cc grpc.ClientConnInterface) ModelBaseServiceV2Client {\n\treturn &modelBaseServiceV2Client{cc}\n}\n\nfunc (c *modelBaseServiceV2Client) GetById(ctx context.Context, in *ModelServiceV2GetByIdRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_GetById_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) GetOne(ctx context.Context, in *ModelServiceV2GetOneRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_GetOne_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) GetMany(ctx context.Context, in *ModelServiceV2GetManyRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_GetMany_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) DeleteById(ctx context.Context, in *ModelServiceV2DeleteByIdRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteById_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) DeleteOne(ctx context.Context, in *ModelServiceV2DeleteOneRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteOne_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) DeleteMany(ctx context.Context, in *ModelServiceV2DeleteManyRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_DeleteMany_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) UpdateById(ctx context.Context, in *ModelServiceV2UpdateByIdRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateById_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) UpdateOne(ctx context.Context, in *ModelServiceV2UpdateOneRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateOne_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) UpdateMany(ctx context.Context, in *ModelServiceV2UpdateManyRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_UpdateMany_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) ReplaceById(ctx context.Context, in *ModelServiceV2ReplaceByIdRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_ReplaceById_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) ReplaceOne(ctx context.Context, in *ModelServiceV2ReplaceOneRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_ReplaceOne_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) InsertOne(ctx context.Context, in *ModelServiceV2InsertOneRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_InsertOne_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) InsertMany(ctx context.Context, in *ModelServiceV2InsertManyRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_InsertMany_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *modelBaseServiceV2Client) Count(ctx context.Context, in *ModelServiceV2CountRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelBaseServiceV2_Count_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// ModelBaseServiceV2Server is the server API for ModelBaseServiceV2 service.\n// All implementations must embed UnimplementedModelBaseServiceV2Server\n// for forward compatibility\ntype ModelBaseServiceV2Server interface {\n\tGetById(context.Context, *ModelServiceV2GetByIdRequest) (*Response, error)\n\tGetOne(context.Context, *ModelServiceV2GetOneRequest) (*Response, error)\n\tGetMany(context.Context, *ModelServiceV2GetManyRequest) (*Response, error)\n\tDeleteById(context.Context, *ModelServiceV2DeleteByIdRequest) (*Response, error)\n\tDeleteOne(context.Context, *ModelServiceV2DeleteOneRequest) (*Response, error)\n\tDeleteMany(context.Context, *ModelServiceV2DeleteManyRequest) (*Response, error)\n\tUpdateById(context.Context, *ModelServiceV2UpdateByIdRequest) (*Response, error)\n\tUpdateOne(context.Context, *ModelServiceV2UpdateOneRequest) (*Response, error)\n\tUpdateMany(context.Context, *ModelServiceV2UpdateManyRequest) (*Response, error)\n\tReplaceById(context.Context, *ModelServiceV2ReplaceByIdRequest) (*Response, error)\n\tReplaceOne(context.Context, *ModelServiceV2ReplaceOneRequest) (*Response, error)\n\tInsertOne(context.Context, *ModelServiceV2InsertOneRequest) (*Response, error)\n\tInsertMany(context.Context, *ModelServiceV2InsertManyRequest) (*Response, error)\n\tCount(context.Context, *ModelServiceV2CountRequest) (*Response, error)\n\tmustEmbedUnimplementedModelBaseServiceV2Server()\n}\n\n// UnimplementedModelBaseServiceV2Server must be embedded to have forward compatible implementations.\ntype UnimplementedModelBaseServiceV2Server struct {\n}\n\nfunc (UnimplementedModelBaseServiceV2Server) GetById(context.Context, *ModelServiceV2GetByIdRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetById not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) GetOne(context.Context, *ModelServiceV2GetOneRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetOne not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) GetMany(context.Context, *ModelServiceV2GetManyRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method GetMany not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) DeleteById(context.Context, *ModelServiceV2DeleteByIdRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteById not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) DeleteOne(context.Context, *ModelServiceV2DeleteOneRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteOne not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) DeleteMany(context.Context, *ModelServiceV2DeleteManyRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method DeleteMany not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) UpdateById(context.Context, *ModelServiceV2UpdateByIdRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UpdateById not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) UpdateOne(context.Context, *ModelServiceV2UpdateOneRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UpdateOne not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) UpdateMany(context.Context, *ModelServiceV2UpdateManyRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method UpdateMany not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) ReplaceById(context.Context, *ModelServiceV2ReplaceByIdRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ReplaceById not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) ReplaceOne(context.Context, *ModelServiceV2ReplaceOneRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method ReplaceOne not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) InsertOne(context.Context, *ModelServiceV2InsertOneRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method InsertOne not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) InsertMany(context.Context, *ModelServiceV2InsertManyRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method InsertMany not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) Count(context.Context, *ModelServiceV2CountRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Count not implemented\")\n}\nfunc (UnimplementedModelBaseServiceV2Server) mustEmbedUnimplementedModelBaseServiceV2Server() {}\n\n// UnsafeModelBaseServiceV2Server may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to ModelBaseServiceV2Server will\n// result in compilation errors.\ntype UnsafeModelBaseServiceV2Server interface {\n\tmustEmbedUnimplementedModelBaseServiceV2Server()\n}\n\nfunc RegisterModelBaseServiceV2Server(s grpc.ServiceRegistrar, srv ModelBaseServiceV2Server) {\n\ts.RegisterService(&ModelBaseServiceV2_ServiceDesc, srv)\n}\n\nfunc _ModelBaseServiceV2_GetById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2GetByIdRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).GetById(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_GetById_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).GetById(ctx, req.(*ModelServiceV2GetByIdRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_GetOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2GetOneRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).GetOne(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_GetOne_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).GetOne(ctx, req.(*ModelServiceV2GetOneRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_GetMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2GetManyRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).GetMany(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_GetMany_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).GetMany(ctx, req.(*ModelServiceV2GetManyRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_DeleteById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2DeleteByIdRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).DeleteById(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_DeleteById_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).DeleteById(ctx, req.(*ModelServiceV2DeleteByIdRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_DeleteOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2DeleteOneRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).DeleteOne(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_DeleteOne_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).DeleteOne(ctx, req.(*ModelServiceV2DeleteOneRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_DeleteMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2DeleteManyRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).DeleteMany(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_DeleteMany_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).DeleteMany(ctx, req.(*ModelServiceV2DeleteManyRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_UpdateById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2UpdateByIdRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).UpdateById(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_UpdateById_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).UpdateById(ctx, req.(*ModelServiceV2UpdateByIdRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_UpdateOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2UpdateOneRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).UpdateOne(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_UpdateOne_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).UpdateOne(ctx, req.(*ModelServiceV2UpdateOneRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_UpdateMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2UpdateManyRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).UpdateMany(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_UpdateMany_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).UpdateMany(ctx, req.(*ModelServiceV2UpdateManyRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_ReplaceById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2ReplaceByIdRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).ReplaceById(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_ReplaceById_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).ReplaceById(ctx, req.(*ModelServiceV2ReplaceByIdRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_ReplaceOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2ReplaceOneRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).ReplaceOne(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_ReplaceOne_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).ReplaceOne(ctx, req.(*ModelServiceV2ReplaceOneRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_InsertOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2InsertOneRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).InsertOne(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_InsertOne_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).InsertOne(ctx, req.(*ModelServiceV2InsertOneRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_InsertMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2InsertManyRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).InsertMany(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_InsertMany_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).InsertMany(ctx, req.(*ModelServiceV2InsertManyRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _ModelBaseServiceV2_Count_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(ModelServiceV2CountRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelBaseServiceV2Server).Count(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelBaseServiceV2_Count_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelBaseServiceV2Server).Count(ctx, req.(*ModelServiceV2CountRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// ModelBaseServiceV2_ServiceDesc is the grpc.ServiceDesc for ModelBaseServiceV2 service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar ModelBaseServiceV2_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.ModelBaseServiceV2\",\n\tHandlerType: (*ModelBaseServiceV2Server)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"GetById\",\n\t\t\tHandler:    _ModelBaseServiceV2_GetById_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetOne\",\n\t\t\tHandler:    _ModelBaseServiceV2_GetOne_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"GetMany\",\n\t\t\tHandler:    _ModelBaseServiceV2_GetMany_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteById\",\n\t\t\tHandler:    _ModelBaseServiceV2_DeleteById_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteOne\",\n\t\t\tHandler:    _ModelBaseServiceV2_DeleteOne_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"DeleteMany\",\n\t\t\tHandler:    _ModelBaseServiceV2_DeleteMany_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdateById\",\n\t\t\tHandler:    _ModelBaseServiceV2_UpdateById_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdateOne\",\n\t\t\tHandler:    _ModelBaseServiceV2_UpdateOne_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"UpdateMany\",\n\t\t\tHandler:    _ModelBaseServiceV2_UpdateMany_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ReplaceById\",\n\t\t\tHandler:    _ModelBaseServiceV2_ReplaceById_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"ReplaceOne\",\n\t\t\tHandler:    _ModelBaseServiceV2_ReplaceOne_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"InsertOne\",\n\t\t\tHandler:    _ModelBaseServiceV2_InsertOne_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"InsertMany\",\n\t\t\tHandler:    _ModelBaseServiceV2_InsertMany_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Count\",\n\t\t\tHandler:    _ModelBaseServiceV2_Count_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"services/model_base_service_v2.proto\",\n}\n"
  },
  {
    "path": "grpc/model_delegate.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/model_delegate.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\nvar File_services_model_delegate_proto protoreflect.FileDescriptor\n\nvar file_services_model_delegate_proto_rawDesc = []byte{\n\t0x0a, 0x1d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,\n\t0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,\n\t0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x14, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74,\n\t0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x32, 0x36, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x67,\n\t0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x02, 0x44, 0x6f, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63,\n\t0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,\n\t0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b,\n\t0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar file_services_model_delegate_proto_goTypes = []any{\n\t(*Request)(nil),  // 0: grpc.Request\n\t(*Response)(nil), // 1: grpc.Response\n}\nvar file_services_model_delegate_proto_depIdxs = []int32{\n\t0, // 0: grpc.ModelDelegate.Do:input_type -> grpc.Request\n\t1, // 1: grpc.ModelDelegate.Do:output_type -> grpc.Response\n\t1, // [1:2] is the sub-list for method output_type\n\t0, // [0:1] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_services_model_delegate_proto_init() }\nfunc file_services_model_delegate_proto_init() {\n\tif File_services_model_delegate_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_request_proto_init()\n\tfile_entity_response_proto_init()\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_model_delegate_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_model_delegate_proto_goTypes,\n\t\tDependencyIndexes: file_services_model_delegate_proto_depIdxs,\n\t}.Build()\n\tFile_services_model_delegate_proto = out.File\n\tfile_services_model_delegate_proto_rawDesc = nil\n\tfile_services_model_delegate_proto_goTypes = nil\n\tfile_services_model_delegate_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/model_delegate_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/model_delegate.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tModelDelegate_Do_FullMethodName = \"/grpc.ModelDelegate/Do\"\n)\n\n// ModelDelegateClient is the client API for ModelDelegate service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype ModelDelegateClient interface {\n\tDo(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n}\n\ntype modelDelegateClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewModelDelegateClient(cc grpc.ClientConnInterface) ModelDelegateClient {\n\treturn &modelDelegateClient{cc}\n}\n\nfunc (c *modelDelegateClient) Do(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, ModelDelegate_Do_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// ModelDelegateServer is the server API for ModelDelegate service.\n// All implementations must embed UnimplementedModelDelegateServer\n// for forward compatibility\ntype ModelDelegateServer interface {\n\tDo(context.Context, *Request) (*Response, error)\n\tmustEmbedUnimplementedModelDelegateServer()\n}\n\n// UnimplementedModelDelegateServer must be embedded to have forward compatible implementations.\ntype UnimplementedModelDelegateServer struct {\n}\n\nfunc (UnimplementedModelDelegateServer) Do(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Do not implemented\")\n}\nfunc (UnimplementedModelDelegateServer) mustEmbedUnimplementedModelDelegateServer() {}\n\n// UnsafeModelDelegateServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to ModelDelegateServer will\n// result in compilation errors.\ntype UnsafeModelDelegateServer interface {\n\tmustEmbedUnimplementedModelDelegateServer()\n}\n\nfunc RegisterModelDelegateServer(s grpc.ServiceRegistrar, srv ModelDelegateServer) {\n\ts.RegisterService(&ModelDelegate_ServiceDesc, srv)\n}\n\nfunc _ModelDelegate_Do_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(ModelDelegateServer).Do(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: ModelDelegate_Do_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(ModelDelegateServer).Do(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// ModelDelegate_ServiceDesc is the grpc.ServiceDesc for ModelDelegate service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar ModelDelegate_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.ModelDelegate\",\n\tHandlerType: (*ModelDelegateServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"Do\",\n\t\t\tHandler:    _ModelDelegate_Do_Handler,\n\t\t},\n\t},\n\tStreams:  []grpc.StreamDesc{},\n\tMetadata: \"services/model_delegate.proto\",\n}\n"
  },
  {
    "path": "grpc/model_service_v2_request.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/model_service_v2_request.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype ModelServiceV2GetByIdRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tId        string `protobuf:\"bytes,3,opt,name=id,proto3\" json:\"id,omitempty\"`\n}\n\nfunc (x *ModelServiceV2GetByIdRequest) Reset() {\n\t*x = ModelServiceV2GetByIdRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2GetByIdRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2GetByIdRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2GetByIdRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2GetByIdRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2GetByIdRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *ModelServiceV2GetByIdRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2GetByIdRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2GetByIdRequest) GetId() string {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn \"\"\n}\n\ntype ModelServiceV2GetOneRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey     string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType   string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tQuery       []byte `protobuf:\"bytes,3,opt,name=query,proto3\" json:\"query,omitempty\"`\n\tFindOptions []byte `protobuf:\"bytes,4,opt,name=find_options,json=findOptions,proto3\" json:\"find_options,omitempty\"`\n}\n\nfunc (x *ModelServiceV2GetOneRequest) Reset() {\n\t*x = ModelServiceV2GetOneRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2GetOneRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2GetOneRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2GetOneRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2GetOneRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2GetOneRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *ModelServiceV2GetOneRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2GetOneRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2GetOneRequest) GetQuery() []byte {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn nil\n}\n\nfunc (x *ModelServiceV2GetOneRequest) GetFindOptions() []byte {\n\tif x != nil {\n\t\treturn x.FindOptions\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2GetManyRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey     string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType   string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tQuery       []byte `protobuf:\"bytes,3,opt,name=query,proto3\" json:\"query,omitempty\"`\n\tFindOptions []byte `protobuf:\"bytes,4,opt,name=find_options,json=findOptions,proto3\" json:\"find_options,omitempty\"`\n}\n\nfunc (x *ModelServiceV2GetManyRequest) Reset() {\n\t*x = ModelServiceV2GetManyRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[2]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2GetManyRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2GetManyRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2GetManyRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[2]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2GetManyRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2GetManyRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{2}\n}\n\nfunc (x *ModelServiceV2GetManyRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2GetManyRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2GetManyRequest) GetQuery() []byte {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn nil\n}\n\nfunc (x *ModelServiceV2GetManyRequest) GetFindOptions() []byte {\n\tif x != nil {\n\t\treturn x.FindOptions\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2DeleteByIdRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tId        string `protobuf:\"bytes,3,opt,name=id,proto3\" json:\"id,omitempty\"`\n}\n\nfunc (x *ModelServiceV2DeleteByIdRequest) Reset() {\n\t*x = ModelServiceV2DeleteByIdRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[3]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2DeleteByIdRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2DeleteByIdRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2DeleteByIdRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[3]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2DeleteByIdRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2DeleteByIdRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{3}\n}\n\nfunc (x *ModelServiceV2DeleteByIdRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2DeleteByIdRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2DeleteByIdRequest) GetId() string {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn \"\"\n}\n\ntype ModelServiceV2DeleteOneRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tQuery     []byte `protobuf:\"bytes,3,opt,name=query,proto3\" json:\"query,omitempty\"`\n}\n\nfunc (x *ModelServiceV2DeleteOneRequest) Reset() {\n\t*x = ModelServiceV2DeleteOneRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[4]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2DeleteOneRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2DeleteOneRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2DeleteOneRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[4]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2DeleteOneRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2DeleteOneRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{4}\n}\n\nfunc (x *ModelServiceV2DeleteOneRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2DeleteOneRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2DeleteOneRequest) GetQuery() []byte {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2DeleteManyRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tQuery     []byte `protobuf:\"bytes,3,opt,name=query,proto3\" json:\"query,omitempty\"`\n}\n\nfunc (x *ModelServiceV2DeleteManyRequest) Reset() {\n\t*x = ModelServiceV2DeleteManyRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[5]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2DeleteManyRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2DeleteManyRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2DeleteManyRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[5]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2DeleteManyRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2DeleteManyRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{5}\n}\n\nfunc (x *ModelServiceV2DeleteManyRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2DeleteManyRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2DeleteManyRequest) GetQuery() []byte {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2UpdateByIdRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tId        string `protobuf:\"bytes,3,opt,name=id,proto3\" json:\"id,omitempty\"`\n\tUpdate    []byte `protobuf:\"bytes,4,opt,name=update,proto3\" json:\"update,omitempty\"`\n}\n\nfunc (x *ModelServiceV2UpdateByIdRequest) Reset() {\n\t*x = ModelServiceV2UpdateByIdRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[6]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2UpdateByIdRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2UpdateByIdRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2UpdateByIdRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[6]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2UpdateByIdRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2UpdateByIdRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{6}\n}\n\nfunc (x *ModelServiceV2UpdateByIdRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2UpdateByIdRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2UpdateByIdRequest) GetId() string {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2UpdateByIdRequest) GetUpdate() []byte {\n\tif x != nil {\n\t\treturn x.Update\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2UpdateOneRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tQuery     []byte `protobuf:\"bytes,3,opt,name=query,proto3\" json:\"query,omitempty\"`\n\tUpdate    []byte `protobuf:\"bytes,4,opt,name=update,proto3\" json:\"update,omitempty\"`\n}\n\nfunc (x *ModelServiceV2UpdateOneRequest) Reset() {\n\t*x = ModelServiceV2UpdateOneRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[7]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2UpdateOneRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2UpdateOneRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2UpdateOneRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[7]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2UpdateOneRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2UpdateOneRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{7}\n}\n\nfunc (x *ModelServiceV2UpdateOneRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2UpdateOneRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2UpdateOneRequest) GetQuery() []byte {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn nil\n}\n\nfunc (x *ModelServiceV2UpdateOneRequest) GetUpdate() []byte {\n\tif x != nil {\n\t\treturn x.Update\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2UpdateManyRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tQuery     []byte `protobuf:\"bytes,3,opt,name=query,proto3\" json:\"query,omitempty\"`\n\tUpdate    []byte `protobuf:\"bytes,4,opt,name=update,proto3\" json:\"update,omitempty\"`\n}\n\nfunc (x *ModelServiceV2UpdateManyRequest) Reset() {\n\t*x = ModelServiceV2UpdateManyRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[8]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2UpdateManyRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2UpdateManyRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2UpdateManyRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[8]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2UpdateManyRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2UpdateManyRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{8}\n}\n\nfunc (x *ModelServiceV2UpdateManyRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2UpdateManyRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2UpdateManyRequest) GetQuery() []byte {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn nil\n}\n\nfunc (x *ModelServiceV2UpdateManyRequest) GetUpdate() []byte {\n\tif x != nil {\n\t\treturn x.Update\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2ReplaceByIdRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tId        string `protobuf:\"bytes,3,opt,name=id,proto3\" json:\"id,omitempty\"`\n\tModel     []byte `protobuf:\"bytes,4,opt,name=model,proto3\" json:\"model,omitempty\"`\n}\n\nfunc (x *ModelServiceV2ReplaceByIdRequest) Reset() {\n\t*x = ModelServiceV2ReplaceByIdRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[9]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2ReplaceByIdRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2ReplaceByIdRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2ReplaceByIdRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[9]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2ReplaceByIdRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2ReplaceByIdRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{9}\n}\n\nfunc (x *ModelServiceV2ReplaceByIdRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2ReplaceByIdRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2ReplaceByIdRequest) GetId() string {\n\tif x != nil {\n\t\treturn x.Id\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2ReplaceByIdRequest) GetModel() []byte {\n\tif x != nil {\n\t\treturn x.Model\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2ReplaceOneRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tQuery     []byte `protobuf:\"bytes,3,opt,name=query,proto3\" json:\"query,omitempty\"`\n\tModel     []byte `protobuf:\"bytes,4,opt,name=model,proto3\" json:\"model,omitempty\"`\n}\n\nfunc (x *ModelServiceV2ReplaceOneRequest) Reset() {\n\t*x = ModelServiceV2ReplaceOneRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[10]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2ReplaceOneRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2ReplaceOneRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2ReplaceOneRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[10]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2ReplaceOneRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2ReplaceOneRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{10}\n}\n\nfunc (x *ModelServiceV2ReplaceOneRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2ReplaceOneRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2ReplaceOneRequest) GetQuery() []byte {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn nil\n}\n\nfunc (x *ModelServiceV2ReplaceOneRequest) GetModel() []byte {\n\tif x != nil {\n\t\treturn x.Model\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2InsertOneRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tModel     []byte `protobuf:\"bytes,3,opt,name=model,proto3\" json:\"model,omitempty\"`\n}\n\nfunc (x *ModelServiceV2InsertOneRequest) Reset() {\n\t*x = ModelServiceV2InsertOneRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[11]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2InsertOneRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2InsertOneRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2InsertOneRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[11]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2InsertOneRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2InsertOneRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{11}\n}\n\nfunc (x *ModelServiceV2InsertOneRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2InsertOneRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2InsertOneRequest) GetModel() []byte {\n\tif x != nil {\n\t\treturn x.Model\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2InsertManyRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tModels    []byte `protobuf:\"bytes,3,opt,name=models,proto3\" json:\"models,omitempty\"`\n}\n\nfunc (x *ModelServiceV2InsertManyRequest) Reset() {\n\t*x = ModelServiceV2InsertManyRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[12]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2InsertManyRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2InsertManyRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2InsertManyRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[12]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2InsertManyRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2InsertManyRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{12}\n}\n\nfunc (x *ModelServiceV2InsertManyRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2InsertManyRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2InsertManyRequest) GetModels() []byte {\n\tif x != nil {\n\t\treturn x.Models\n\t}\n\treturn nil\n}\n\ntype ModelServiceV2CountRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey   string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tModelType string `protobuf:\"bytes,2,opt,name=model_type,json=modelType,proto3\" json:\"model_type,omitempty\"`\n\tQuery     []byte `protobuf:\"bytes,3,opt,name=query,proto3\" json:\"query,omitempty\"`\n}\n\nfunc (x *ModelServiceV2CountRequest) Reset() {\n\t*x = ModelServiceV2CountRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_model_service_v2_request_proto_msgTypes[13]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *ModelServiceV2CountRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*ModelServiceV2CountRequest) ProtoMessage() {}\n\nfunc (x *ModelServiceV2CountRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_model_service_v2_request_proto_msgTypes[13]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use ModelServiceV2CountRequest.ProtoReflect.Descriptor instead.\nfunc (*ModelServiceV2CountRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_model_service_v2_request_proto_rawDescGZIP(), []int{13}\n}\n\nfunc (x *ModelServiceV2CountRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2CountRequest) GetModelType() string {\n\tif x != nil {\n\t\treturn x.ModelType\n\t}\n\treturn \"\"\n}\n\nfunc (x *ModelServiceV2CountRequest) GetQuery() []byte {\n\tif x != nil {\n\t\treturn x.Query\n\t}\n\treturn nil\n}\n\nvar File_entity_model_service_v2_request_proto protoreflect.FileDescriptor\n\nvar file_entity_model_service_v2_request_proto_rawDesc = []byte{\n\t0x0a, 0x25, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,\n\t0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x32, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0x68, 0x0a,\n\t0x1c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x47,\n\t0x65, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a,\n\t0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65,\n\t0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f,\n\t0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x1b, 0x4d, 0x6f, 0x64, 0x65,\n\t0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x65,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f,\n\t0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b,\n\t0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65,\n\t0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70,\n\t0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,\n\t0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x64, 0x5f,\n\t0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66,\n\t0x69, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x1c, 0x4d,\n\t0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x47, 0x65, 0x74,\n\t0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e,\n\t0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e,\n\t0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,\n\t0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65,\n\t0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03,\n\t0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x66,\n\t0x69, 0x6e, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,\n\t0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6b,\n\t0x0a, 0x1f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32,\n\t0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a,\n\t0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,\n\t0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x70, 0x0a, 0x1e, 0x4d,\n\t0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x44, 0x65, 0x6c,\n\t0x65, 0x74, 0x65, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a,\n\t0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65,\n\t0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f,\n\t0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79,\n\t0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x71, 0x0a,\n\t0x1f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x44,\n\t0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d,\n\t0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75,\n\t0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79,\n\t0x22, 0x83, 0x01, 0x0a, 0x1f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,\n\t0x65, 0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71,\n\t0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79,\n\t0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12,\n\t0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e,\n\t0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16,\n\t0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06,\n\t0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,\n\t0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f,\n\t0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64,\n\t0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64,\n\t0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79,\n\t0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54,\n\t0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01,\n\t0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64,\n\t0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74,\n\t0x65, 0x22, 0x89, 0x01, 0x0a, 0x1f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69,\n\t0x63, 0x65, 0x56, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65,\n\t0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79,\n\t0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02,\n\t0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12,\n\t0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,\n\t0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18,\n\t0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x82, 0x01,\n\t0x0a, 0x20, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32,\n\t0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,\n\t0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01,\n\t0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a,\n\t0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02,\n\t0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,\n\t0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64,\n\t0x65, 0x6c, 0x22, 0x87, 0x01, 0x0a, 0x1f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76,\n\t0x69, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4f, 0x6e, 0x65, 0x52,\n\t0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b,\n\t0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65,\n\t0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,\n\t0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65,\n\t0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,\n\t0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18,\n\t0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x70, 0x0a, 0x1e,\n\t0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x49, 0x6e,\n\t0x73, 0x65, 0x72, 0x74, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19,\n\t0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64,\n\t0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d,\n\t0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65,\n\t0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x73,\n\t0x0a, 0x1f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32,\n\t0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a,\n\t0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d,\n\t0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x6f, 0x64,\n\t0x65, 0x6c, 0x73, 0x22, 0x6c, 0x0a, 0x1a, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76,\n\t0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,\n\t0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a,\n\t0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71,\n\t0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72,\n\t0x79, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_entity_model_service_v2_request_proto_rawDescOnce sync.Once\n\tfile_entity_model_service_v2_request_proto_rawDescData = file_entity_model_service_v2_request_proto_rawDesc\n)\n\nfunc file_entity_model_service_v2_request_proto_rawDescGZIP() []byte {\n\tfile_entity_model_service_v2_request_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_model_service_v2_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_model_service_v2_request_proto_rawDescData)\n\t})\n\treturn file_entity_model_service_v2_request_proto_rawDescData\n}\n\nvar file_entity_model_service_v2_request_proto_msgTypes = make([]protoimpl.MessageInfo, 14)\nvar file_entity_model_service_v2_request_proto_goTypes = []any{\n\t(*ModelServiceV2GetByIdRequest)(nil),     // 0: grpc.ModelServiceV2GetByIdRequest\n\t(*ModelServiceV2GetOneRequest)(nil),      // 1: grpc.ModelServiceV2GetOneRequest\n\t(*ModelServiceV2GetManyRequest)(nil),     // 2: grpc.ModelServiceV2GetManyRequest\n\t(*ModelServiceV2DeleteByIdRequest)(nil),  // 3: grpc.ModelServiceV2DeleteByIdRequest\n\t(*ModelServiceV2DeleteOneRequest)(nil),   // 4: grpc.ModelServiceV2DeleteOneRequest\n\t(*ModelServiceV2DeleteManyRequest)(nil),  // 5: grpc.ModelServiceV2DeleteManyRequest\n\t(*ModelServiceV2UpdateByIdRequest)(nil),  // 6: grpc.ModelServiceV2UpdateByIdRequest\n\t(*ModelServiceV2UpdateOneRequest)(nil),   // 7: grpc.ModelServiceV2UpdateOneRequest\n\t(*ModelServiceV2UpdateManyRequest)(nil),  // 8: grpc.ModelServiceV2UpdateManyRequest\n\t(*ModelServiceV2ReplaceByIdRequest)(nil), // 9: grpc.ModelServiceV2ReplaceByIdRequest\n\t(*ModelServiceV2ReplaceOneRequest)(nil),  // 10: grpc.ModelServiceV2ReplaceOneRequest\n\t(*ModelServiceV2InsertOneRequest)(nil),   // 11: grpc.ModelServiceV2InsertOneRequest\n\t(*ModelServiceV2InsertManyRequest)(nil),  // 12: grpc.ModelServiceV2InsertManyRequest\n\t(*ModelServiceV2CountRequest)(nil),       // 13: grpc.ModelServiceV2CountRequest\n}\nvar file_entity_model_service_v2_request_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_model_service_v2_request_proto_init() }\nfunc file_entity_model_service_v2_request_proto_init() {\n\tif File_entity_model_service_v2_request_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2GetByIdRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[1].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2GetOneRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[2].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2GetManyRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[3].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2DeleteByIdRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[4].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2DeleteOneRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[5].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2DeleteManyRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[6].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2UpdateByIdRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[7].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2UpdateOneRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[8].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2UpdateManyRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[9].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2ReplaceByIdRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[10].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2ReplaceOneRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[11].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2InsertOneRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[12].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2InsertManyRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_entity_model_service_v2_request_proto_msgTypes[13].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*ModelServiceV2CountRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_model_service_v2_request_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   14,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_model_service_v2_request_proto_goTypes,\n\t\tDependencyIndexes: file_entity_model_service_v2_request_proto_depIdxs,\n\t\tMessageInfos:      file_entity_model_service_v2_request_proto_msgTypes,\n\t}.Build()\n\tFile_entity_model_service_v2_request_proto = out.File\n\tfile_entity_model_service_v2_request_proto_rawDesc = nil\n\tfile_entity_model_service_v2_request_proto_goTypes = nil\n\tfile_entity_model_service_v2_request_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/node.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: models/node.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype Node struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tXId          string `protobuf:\"bytes,1,opt,name=_id,json=Id,proto3\" json:\"_id,omitempty\"`\n\tName         string `protobuf:\"bytes,2,opt,name=name,proto3\" json:\"name,omitempty\"`\n\tIp           string `protobuf:\"bytes,3,opt,name=ip,proto3\" json:\"ip,omitempty\"`\n\tPort         string `protobuf:\"bytes,5,opt,name=port,proto3\" json:\"port,omitempty\"`\n\tMac          string `protobuf:\"bytes,6,opt,name=mac,proto3\" json:\"mac,omitempty\"`\n\tHostname     string `protobuf:\"bytes,7,opt,name=hostname,proto3\" json:\"hostname,omitempty\"`\n\tDescription  string `protobuf:\"bytes,8,opt,name=description,proto3\" json:\"description,omitempty\"`\n\tKey          string `protobuf:\"bytes,9,opt,name=key,proto3\" json:\"key,omitempty\"`\n\tIsMaster     bool   `protobuf:\"varint,11,opt,name=is_master,json=isMaster,proto3\" json:\"is_master,omitempty\"`\n\tUpdateTs     string `protobuf:\"bytes,12,opt,name=update_ts,json=updateTs,proto3\" json:\"update_ts,omitempty\"`\n\tCreateTs     string `protobuf:\"bytes,13,opt,name=create_ts,json=createTs,proto3\" json:\"create_ts,omitempty\"`\n\tUpdateTsUnix int64  `protobuf:\"varint,14,opt,name=update_ts_unix,json=updateTsUnix,proto3\" json:\"update_ts_unix,omitempty\"`\n}\n\nfunc (x *Node) Reset() {\n\t*x = Node{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_models_node_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Node) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Node) ProtoMessage() {}\n\nfunc (x *Node) ProtoReflect() protoreflect.Message {\n\tmi := &file_models_node_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Node.ProtoReflect.Descriptor instead.\nfunc (*Node) Descriptor() ([]byte, []int) {\n\treturn file_models_node_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Node) GetXId() string {\n\tif x != nil {\n\t\treturn x.XId\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetIp() string {\n\tif x != nil {\n\t\treturn x.Ip\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetPort() string {\n\tif x != nil {\n\t\treturn x.Port\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetMac() string {\n\tif x != nil {\n\t\treturn x.Mac\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetHostname() string {\n\tif x != nil {\n\t\treturn x.Hostname\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetDescription() string {\n\tif x != nil {\n\t\treturn x.Description\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetKey() string {\n\tif x != nil {\n\t\treturn x.Key\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetIsMaster() bool {\n\tif x != nil {\n\t\treturn x.IsMaster\n\t}\n\treturn false\n}\n\nfunc (x *Node) GetUpdateTs() string {\n\tif x != nil {\n\t\treturn x.UpdateTs\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetCreateTs() string {\n\tif x != nil {\n\t\treturn x.CreateTs\n\t}\n\treturn \"\"\n}\n\nfunc (x *Node) GetUpdateTsUnix() int64 {\n\tif x != nil {\n\t\treturn x.UpdateTsUnix\n\t}\n\treturn 0\n}\n\nvar File_models_node_proto protoreflect.FileDescriptor\n\nvar file_models_node_proto_rawDesc = []byte{\n\t0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0xae, 0x02, 0x0a, 0x04, 0x4e, 0x6f,\n\t0x64, 0x65, 0x12, 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18,\n\t0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d,\n\t0x61, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x1a, 0x0a,\n\t0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,\n\t0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,\n\t0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b,\n\t0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a,\n\t0x09, 0x69, 0x73, 0x5f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,\n\t0x52, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70,\n\t0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75,\n\t0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,\n\t0x65, 0x5f, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61,\n\t0x74, 0x65, 0x54, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74,\n\t0x73, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x70,\n\t0x64, 0x61, 0x74, 0x65, 0x54, 0x73, 0x55, 0x6e, 0x69, 0x78, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b,\n\t0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_models_node_proto_rawDescOnce sync.Once\n\tfile_models_node_proto_rawDescData = file_models_node_proto_rawDesc\n)\n\nfunc file_models_node_proto_rawDescGZIP() []byte {\n\tfile_models_node_proto_rawDescOnce.Do(func() {\n\t\tfile_models_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_node_proto_rawDescData)\n\t})\n\treturn file_models_node_proto_rawDescData\n}\n\nvar file_models_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_models_node_proto_goTypes = []any{\n\t(*Node)(nil), // 0: grpc.Node\n}\nvar file_models_node_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_models_node_proto_init() }\nfunc file_models_node_proto_init() {\n\tif File_models_node_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_models_node_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*Node); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_models_node_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_models_node_proto_goTypes,\n\t\tDependencyIndexes: file_models_node_proto_depIdxs,\n\t\tMessageInfos:      file_models_node_proto_msgTypes,\n\t}.Build()\n\tFile_models_node_proto = out.File\n\tfile_models_node_proto_rawDesc = nil\n\tfile_models_node_proto_goTypes = nil\n\tfile_models_node_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/node_info.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/node_info.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype NodeInfo struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tKey      string `protobuf:\"bytes,1,opt,name=key,proto3\" json:\"key,omitempty\"`\n\tIsMaster bool   `protobuf:\"varint,2,opt,name=is_master,json=isMaster,proto3\" json:\"is_master,omitempty\"`\n}\n\nfunc (x *NodeInfo) Reset() {\n\t*x = NodeInfo{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_node_info_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *NodeInfo) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*NodeInfo) ProtoMessage() {}\n\nfunc (x *NodeInfo) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_node_info_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead.\nfunc (*NodeInfo) Descriptor() ([]byte, []int) {\n\treturn file_entity_node_info_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *NodeInfo) GetKey() string {\n\tif x != nil {\n\t\treturn x.Key\n\t}\n\treturn \"\"\n}\n\nfunc (x *NodeInfo) GetIsMaster() bool {\n\tif x != nil {\n\t\treturn x.IsMaster\n\t}\n\treturn false\n}\n\nvar File_entity_node_info_proto protoreflect.FileDescriptor\n\nvar file_entity_node_info_proto_rawDesc = []byte{\n\t0x0a, 0x16, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e,\n\t0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0x39,\n\t0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,\n\t0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09,\n\t0x69, 0x73, 0x5f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,\n\t0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67,\n\t0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_entity_node_info_proto_rawDescOnce sync.Once\n\tfile_entity_node_info_proto_rawDescData = file_entity_node_info_proto_rawDesc\n)\n\nfunc file_entity_node_info_proto_rawDescGZIP() []byte {\n\tfile_entity_node_info_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_node_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_node_info_proto_rawDescData)\n\t})\n\treturn file_entity_node_info_proto_rawDescData\n}\n\nvar file_entity_node_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_entity_node_info_proto_goTypes = []any{\n\t(*NodeInfo)(nil), // 0: grpc.NodeInfo\n}\nvar file_entity_node_info_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_node_info_proto_init() }\nfunc file_entity_node_info_proto_init() {\n\tif File_entity_node_info_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_entity_node_info_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*NodeInfo); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_node_info_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_node_info_proto_goTypes,\n\t\tDependencyIndexes: file_entity_node_info_proto_depIdxs,\n\t\tMessageInfos:      file_entity_node_info_proto_msgTypes,\n\t}.Build()\n\tFile_entity_node_info_proto = out.File\n\tfile_entity_node_info_proto_rawDesc = nil\n\tfile_entity_node_info_proto_goTypes = nil\n\tfile_entity_node_info_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/node_service.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/node_service.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype NodeServiceRegisterRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tKey        string `protobuf:\"bytes,1,opt,name=key,proto3\" json:\"key,omitempty\"`\n\tName       string `protobuf:\"bytes,2,opt,name=name,proto3\" json:\"name,omitempty\"`\n\tIsMaster   bool   `protobuf:\"varint,3,opt,name=isMaster,proto3\" json:\"isMaster,omitempty\"`\n\tAuthKey    string `protobuf:\"bytes,4,opt,name=authKey,proto3\" json:\"authKey,omitempty\"`\n\tMaxRunners int32  `protobuf:\"varint,5,opt,name=maxRunners,proto3\" json:\"maxRunners,omitempty\"`\n}\n\nfunc (x *NodeServiceRegisterRequest) Reset() {\n\t*x = NodeServiceRegisterRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_node_service_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *NodeServiceRegisterRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*NodeServiceRegisterRequest) ProtoMessage() {}\n\nfunc (x *NodeServiceRegisterRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_node_service_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use NodeServiceRegisterRequest.ProtoReflect.Descriptor instead.\nfunc (*NodeServiceRegisterRequest) Descriptor() ([]byte, []int) {\n\treturn file_services_node_service_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *NodeServiceRegisterRequest) GetKey() string {\n\tif x != nil {\n\t\treturn x.Key\n\t}\n\treturn \"\"\n}\n\nfunc (x *NodeServiceRegisterRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *NodeServiceRegisterRequest) GetIsMaster() bool {\n\tif x != nil {\n\t\treturn x.IsMaster\n\t}\n\treturn false\n}\n\nfunc (x *NodeServiceRegisterRequest) GetAuthKey() string {\n\tif x != nil {\n\t\treturn x.AuthKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *NodeServiceRegisterRequest) GetMaxRunners() int32 {\n\tif x != nil {\n\t\treturn x.MaxRunners\n\t}\n\treturn 0\n}\n\ntype NodeServiceSendHeartbeatRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tKey string `protobuf:\"bytes,1,opt,name=key,proto3\" json:\"key,omitempty\"`\n}\n\nfunc (x *NodeServiceSendHeartbeatRequest) Reset() {\n\t*x = NodeServiceSendHeartbeatRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_node_service_proto_msgTypes[1]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *NodeServiceSendHeartbeatRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*NodeServiceSendHeartbeatRequest) ProtoMessage() {}\n\nfunc (x *NodeServiceSendHeartbeatRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_node_service_proto_msgTypes[1]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use NodeServiceSendHeartbeatRequest.ProtoReflect.Descriptor instead.\nfunc (*NodeServiceSendHeartbeatRequest) Descriptor() ([]byte, []int) {\n\treturn file_services_node_service_proto_rawDescGZIP(), []int{1}\n}\n\nfunc (x *NodeServiceSendHeartbeatRequest) GetKey() string {\n\tif x != nil {\n\t\treturn x.Key\n\t}\n\treturn \"\"\n}\n\nvar File_services_node_service_proto protoreflect.FileDescriptor\n\nvar file_services_node_service_proto_rawDesc = []byte{\n\t0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f,\n\t0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67,\n\t0x72, 0x70, 0x63, 0x1a, 0x14, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74,\n\t0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,\n\t0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01,\n\t0x0a, 0x1a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67,\n\t0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,\n\t0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12,\n\t0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,\n\t0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03,\n\t0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18,\n\t0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x52,\n\t0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61,\n\t0x78, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x33, 0x0a, 0x1f, 0x4e, 0x6f, 0x64, 0x65,\n\t0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74,\n\t0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b,\n\t0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x32, 0xfc, 0x01,\n\t0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a,\n\t0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,\n\t0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,\n\t0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,\n\t0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a,\n\t0x0d, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x25,\n\t0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,\n\t0x65, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63,\n\t0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,\n\t0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2e, 0x0a, 0x0b,\n\t0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72,\n\t0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70,\n\t0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06,\n\t0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_services_node_service_proto_rawDescOnce sync.Once\n\tfile_services_node_service_proto_rawDescData = file_services_node_service_proto_rawDesc\n)\n\nfunc file_services_node_service_proto_rawDescGZIP() []byte {\n\tfile_services_node_service_proto_rawDescOnce.Do(func() {\n\t\tfile_services_node_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_node_service_proto_rawDescData)\n\t})\n\treturn file_services_node_service_proto_rawDescData\n}\n\nvar file_services_node_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)\nvar file_services_node_service_proto_goTypes = []any{\n\t(*NodeServiceRegisterRequest)(nil),      // 0: grpc.NodeServiceRegisterRequest\n\t(*NodeServiceSendHeartbeatRequest)(nil), // 1: grpc.NodeServiceSendHeartbeatRequest\n\t(*Request)(nil),                         // 2: grpc.Request\n\t(*Response)(nil),                        // 3: grpc.Response\n\t(*StreamMessage)(nil),                   // 4: grpc.StreamMessage\n}\nvar file_services_node_service_proto_depIdxs = []int32{\n\t0, // 0: grpc.NodeService.Register:input_type -> grpc.NodeServiceRegisterRequest\n\t1, // 1: grpc.NodeService.SendHeartbeat:input_type -> grpc.NodeServiceSendHeartbeatRequest\n\t2, // 2: grpc.NodeService.Subscribe:input_type -> grpc.Request\n\t2, // 3: grpc.NodeService.Unsubscribe:input_type -> grpc.Request\n\t3, // 4: grpc.NodeService.Register:output_type -> grpc.Response\n\t3, // 5: grpc.NodeService.SendHeartbeat:output_type -> grpc.Response\n\t4, // 6: grpc.NodeService.Subscribe:output_type -> grpc.StreamMessage\n\t3, // 7: grpc.NodeService.Unsubscribe:output_type -> grpc.Response\n\t4, // [4:8] is the sub-list for method output_type\n\t0, // [0:4] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_services_node_service_proto_init() }\nfunc file_services_node_service_proto_init() {\n\tif File_services_node_service_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_request_proto_init()\n\tfile_entity_response_proto_init()\n\tfile_entity_stream_message_proto_init()\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_services_node_service_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*NodeServiceRegisterRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\tfile_services_node_service_proto_msgTypes[1].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*NodeServiceSendHeartbeatRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_node_service_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   2,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_node_service_proto_goTypes,\n\t\tDependencyIndexes: file_services_node_service_proto_depIdxs,\n\t\tMessageInfos:      file_services_node_service_proto_msgTypes,\n\t}.Build()\n\tFile_services_node_service_proto = out.File\n\tfile_services_node_service_proto_rawDesc = nil\n\tfile_services_node_service_proto_goTypes = nil\n\tfile_services_node_service_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/node_service_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/node_service.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tNodeService_Register_FullMethodName      = \"/grpc.NodeService/Register\"\n\tNodeService_SendHeartbeat_FullMethodName = \"/grpc.NodeService/SendHeartbeat\"\n\tNodeService_Subscribe_FullMethodName     = \"/grpc.NodeService/Subscribe\"\n\tNodeService_Unsubscribe_FullMethodName   = \"/grpc.NodeService/Unsubscribe\"\n)\n\n// NodeServiceClient is the client API for NodeService service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype NodeServiceClient interface {\n\tRegister(ctx context.Context, in *NodeServiceRegisterRequest, opts ...grpc.CallOption) (*Response, error)\n\tSendHeartbeat(ctx context.Context, in *NodeServiceSendHeartbeatRequest, opts ...grpc.CallOption) (*Response, error)\n\tSubscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (NodeService_SubscribeClient, error)\n\tUnsubscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n}\n\ntype nodeServiceClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient {\n\treturn &nodeServiceClient{cc}\n}\n\nfunc (c *nodeServiceClient) Register(ctx context.Context, in *NodeServiceRegisterRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, NodeService_Register_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *nodeServiceClient) SendHeartbeat(ctx context.Context, in *NodeServiceSendHeartbeatRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, NodeService_SendHeartbeat_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *nodeServiceClient) Subscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (NodeService_SubscribeClient, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tstream, err := c.cc.NewStream(ctx, &NodeService_ServiceDesc.Streams[0], NodeService_Subscribe_FullMethodName, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &nodeServiceSubscribeClient{ClientStream: stream}\n\tif err := x.ClientStream.SendMsg(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn x, nil\n}\n\ntype NodeService_SubscribeClient interface {\n\tRecv() (*StreamMessage, error)\n\tgrpc.ClientStream\n}\n\ntype nodeServiceSubscribeClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *nodeServiceSubscribeClient) Recv() (*StreamMessage, error) {\n\tm := new(StreamMessage)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *nodeServiceClient) Unsubscribe(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, NodeService_Unsubscribe_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// NodeServiceServer is the server API for NodeService service.\n// All implementations must embed UnimplementedNodeServiceServer\n// for forward compatibility\ntype NodeServiceServer interface {\n\tRegister(context.Context, *NodeServiceRegisterRequest) (*Response, error)\n\tSendHeartbeat(context.Context, *NodeServiceSendHeartbeatRequest) (*Response, error)\n\tSubscribe(*Request, NodeService_SubscribeServer) error\n\tUnsubscribe(context.Context, *Request) (*Response, error)\n\tmustEmbedUnimplementedNodeServiceServer()\n}\n\n// UnimplementedNodeServiceServer must be embedded to have forward compatible implementations.\ntype UnimplementedNodeServiceServer struct {\n}\n\nfunc (UnimplementedNodeServiceServer) Register(context.Context, *NodeServiceRegisterRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Register not implemented\")\n}\nfunc (UnimplementedNodeServiceServer) SendHeartbeat(context.Context, *NodeServiceSendHeartbeatRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method SendHeartbeat not implemented\")\n}\nfunc (UnimplementedNodeServiceServer) Subscribe(*Request, NodeService_SubscribeServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method Subscribe not implemented\")\n}\nfunc (UnimplementedNodeServiceServer) Unsubscribe(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Unsubscribe not implemented\")\n}\nfunc (UnimplementedNodeServiceServer) mustEmbedUnimplementedNodeServiceServer() {}\n\n// UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to NodeServiceServer will\n// result in compilation errors.\ntype UnsafeNodeServiceServer interface {\n\tmustEmbedUnimplementedNodeServiceServer()\n}\n\nfunc RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer) {\n\ts.RegisterService(&NodeService_ServiceDesc, srv)\n}\n\nfunc _NodeService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(NodeServiceRegisterRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(NodeServiceServer).Register(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: NodeService_Register_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(NodeServiceServer).Register(ctx, req.(*NodeServiceRegisterRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _NodeService_SendHeartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(NodeServiceSendHeartbeatRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(NodeServiceServer).SendHeartbeat(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: NodeService_SendHeartbeat_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(NodeServiceServer).SendHeartbeat(ctx, req.(*NodeServiceSendHeartbeatRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _NodeService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {\n\tm := new(Request)\n\tif err := stream.RecvMsg(m); err != nil {\n\t\treturn err\n\t}\n\treturn srv.(NodeServiceServer).Subscribe(m, &nodeServiceSubscribeServer{ServerStream: stream})\n}\n\ntype NodeService_SubscribeServer interface {\n\tSend(*StreamMessage) error\n\tgrpc.ServerStream\n}\n\ntype nodeServiceSubscribeServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *nodeServiceSubscribeServer) Send(m *StreamMessage) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc _NodeService_Unsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(NodeServiceServer).Unsubscribe(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: NodeService_Unsubscribe_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(NodeServiceServer).Unsubscribe(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar NodeService_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.NodeService\",\n\tHandlerType: (*NodeServiceServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"Register\",\n\t\t\tHandler:    _NodeService_Register_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"SendHeartbeat\",\n\t\t\tHandler:    _NodeService_SendHeartbeat_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"Unsubscribe\",\n\t\t\tHandler:    _NodeService_Unsubscribe_Handler,\n\t\t},\n\t},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName:    \"Subscribe\",\n\t\t\tHandler:       _NodeService_Subscribe_Handler,\n\t\t\tServerStreams: true,\n\t\t},\n\t},\n\tMetadata: \"services/node_service.proto\",\n}\n"
  },
  {
    "path": "grpc/plugin_request.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/plugin_request.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype PluginRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tName    string `protobuf:\"bytes,1,opt,name=name,proto3\" json:\"name,omitempty\"`\n\tNodeKey string `protobuf:\"bytes,2,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tData    []byte `protobuf:\"bytes,3,opt,name=data,proto3\" json:\"data,omitempty\"`\n}\n\nfunc (x *PluginRequest) Reset() {\n\t*x = PluginRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_plugin_request_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *PluginRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*PluginRequest) ProtoMessage() {}\n\nfunc (x *PluginRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_plugin_request_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use PluginRequest.ProtoReflect.Descriptor instead.\nfunc (*PluginRequest) Descriptor() ([]byte, []int) {\n\treturn file_entity_plugin_request_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *PluginRequest) GetName() string {\n\tif x != nil {\n\t\treturn x.Name\n\t}\n\treturn \"\"\n}\n\nfunc (x *PluginRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *PluginRequest) GetData() []byte {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn nil\n}\n\nvar File_entity_plugin_request_proto protoreflect.FileDescriptor\n\nvar file_entity_plugin_request_proto_rawDesc = []byte{\n\t0x0a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f,\n\t0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67,\n\t0x72, 0x70, 0x63, 0x22, 0x52, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71,\n\t0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65,\n\t0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65,\n\t0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28,\n\t0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70,\n\t0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_entity_plugin_request_proto_rawDescOnce sync.Once\n\tfile_entity_plugin_request_proto_rawDescData = file_entity_plugin_request_proto_rawDesc\n)\n\nfunc file_entity_plugin_request_proto_rawDescGZIP() []byte {\n\tfile_entity_plugin_request_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_plugin_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_plugin_request_proto_rawDescData)\n\t})\n\treturn file_entity_plugin_request_proto_rawDescData\n}\n\nvar file_entity_plugin_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_entity_plugin_request_proto_goTypes = []any{\n\t(*PluginRequest)(nil), // 0: grpc.PluginRequest\n}\nvar file_entity_plugin_request_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_plugin_request_proto_init() }\nfunc file_entity_plugin_request_proto_init() {\n\tif File_entity_plugin_request_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_entity_plugin_request_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*PluginRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_plugin_request_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_plugin_request_proto_goTypes,\n\t\tDependencyIndexes: file_entity_plugin_request_proto_depIdxs,\n\t\tMessageInfos:      file_entity_plugin_request_proto_msgTypes,\n\t}.Build()\n\tFile_entity_plugin_request_proto = out.File\n\tfile_entity_plugin_request_proto_rawDesc = nil\n\tfile_entity_plugin_request_proto_goTypes = nil\n\tfile_entity_plugin_request_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/plugin_service.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/plugin_service.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\nvar File_services_plugin_service_proto protoreflect.FileDescriptor\n\nvar file_services_plugin_service_proto_rawDesc = []byte{\n\t0x0a, 0x1d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69,\n\t0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,\n\t0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x70, 0x6c,\n\t0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f,\n\t0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74,\n\t0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb5, 0x01, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69,\n\t0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69,\n\t0x73, 0x74, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6c, 0x75, 0x67,\n\t0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63,\n\t0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x09, 0x53,\n\t0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,\n\t0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e,\n\t0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61,\n\t0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x36, 0x0a, 0x04, 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x13,\n\t0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73,\n\t0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,\n\t0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x08,\n\t0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar file_services_plugin_service_proto_goTypes = []any{\n\t(*PluginRequest)(nil), // 0: grpc.PluginRequest\n\t(*StreamMessage)(nil), // 1: grpc.StreamMessage\n\t(*Response)(nil),      // 2: grpc.Response\n}\nvar file_services_plugin_service_proto_depIdxs = []int32{\n\t0, // 0: grpc.PluginService.Register:input_type -> grpc.PluginRequest\n\t0, // 1: grpc.PluginService.Subscribe:input_type -> grpc.PluginRequest\n\t1, // 2: grpc.PluginService.Poll:input_type -> grpc.StreamMessage\n\t2, // 3: grpc.PluginService.Register:output_type -> grpc.Response\n\t1, // 4: grpc.PluginService.Subscribe:output_type -> grpc.StreamMessage\n\t1, // 5: grpc.PluginService.Poll:output_type -> grpc.StreamMessage\n\t3, // [3:6] is the sub-list for method output_type\n\t0, // [0:3] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_services_plugin_service_proto_init() }\nfunc file_services_plugin_service_proto_init() {\n\tif File_services_plugin_service_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_plugin_request_proto_init()\n\tfile_entity_response_proto_init()\n\tfile_entity_stream_message_proto_init()\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_plugin_service_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_plugin_service_proto_goTypes,\n\t\tDependencyIndexes: file_services_plugin_service_proto_depIdxs,\n\t}.Build()\n\tFile_services_plugin_service_proto = out.File\n\tfile_services_plugin_service_proto_rawDesc = nil\n\tfile_services_plugin_service_proto_goTypes = nil\n\tfile_services_plugin_service_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/plugin_service_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/plugin_service.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tPluginService_Register_FullMethodName  = \"/grpc.PluginService/Register\"\n\tPluginService_Subscribe_FullMethodName = \"/grpc.PluginService/Subscribe\"\n\tPluginService_Poll_FullMethodName      = \"/grpc.PluginService/Poll\"\n)\n\n// PluginServiceClient is the client API for PluginService service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype PluginServiceClient interface {\n\tRegister(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*Response, error)\n\tSubscribe(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (PluginService_SubscribeClient, error)\n\tPoll(ctx context.Context, opts ...grpc.CallOption) (PluginService_PollClient, error)\n}\n\ntype pluginServiceClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewPluginServiceClient(cc grpc.ClientConnInterface) PluginServiceClient {\n\treturn &pluginServiceClient{cc}\n}\n\nfunc (c *pluginServiceClient) Register(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, PluginService_Register_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *pluginServiceClient) Subscribe(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (PluginService_SubscribeClient, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tstream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[0], PluginService_Subscribe_FullMethodName, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &pluginServiceSubscribeClient{ClientStream: stream}\n\tif err := x.ClientStream.SendMsg(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn x, nil\n}\n\ntype PluginService_SubscribeClient interface {\n\tRecv() (*StreamMessage, error)\n\tgrpc.ClientStream\n}\n\ntype pluginServiceSubscribeClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *pluginServiceSubscribeClient) Recv() (*StreamMessage, error) {\n\tm := new(StreamMessage)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *pluginServiceClient) Poll(ctx context.Context, opts ...grpc.CallOption) (PluginService_PollClient, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tstream, err := c.cc.NewStream(ctx, &PluginService_ServiceDesc.Streams[1], PluginService_Poll_FullMethodName, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &pluginServicePollClient{ClientStream: stream}\n\treturn x, nil\n}\n\ntype PluginService_PollClient interface {\n\tSend(*StreamMessage) error\n\tRecv() (*StreamMessage, error)\n\tgrpc.ClientStream\n}\n\ntype pluginServicePollClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *pluginServicePollClient) Send(m *StreamMessage) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\nfunc (x *pluginServicePollClient) Recv() (*StreamMessage, error) {\n\tm := new(StreamMessage)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// PluginServiceServer is the server API for PluginService service.\n// All implementations must embed UnimplementedPluginServiceServer\n// for forward compatibility\ntype PluginServiceServer interface {\n\tRegister(context.Context, *PluginRequest) (*Response, error)\n\tSubscribe(*PluginRequest, PluginService_SubscribeServer) error\n\tPoll(PluginService_PollServer) error\n\tmustEmbedUnimplementedPluginServiceServer()\n}\n\n// UnimplementedPluginServiceServer must be embedded to have forward compatible implementations.\ntype UnimplementedPluginServiceServer struct {\n}\n\nfunc (UnimplementedPluginServiceServer) Register(context.Context, *PluginRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Register not implemented\")\n}\nfunc (UnimplementedPluginServiceServer) Subscribe(*PluginRequest, PluginService_SubscribeServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method Subscribe not implemented\")\n}\nfunc (UnimplementedPluginServiceServer) Poll(PluginService_PollServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method Poll not implemented\")\n}\nfunc (UnimplementedPluginServiceServer) mustEmbedUnimplementedPluginServiceServer() {}\n\n// UnsafePluginServiceServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to PluginServiceServer will\n// result in compilation errors.\ntype UnsafePluginServiceServer interface {\n\tmustEmbedUnimplementedPluginServiceServer()\n}\n\nfunc RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer) {\n\ts.RegisterService(&PluginService_ServiceDesc, srv)\n}\n\nfunc _PluginService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(PluginRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(PluginServiceServer).Register(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: PluginService_Register_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(PluginServiceServer).Register(ctx, req.(*PluginRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _PluginService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {\n\tm := new(PluginRequest)\n\tif err := stream.RecvMsg(m); err != nil {\n\t\treturn err\n\t}\n\treturn srv.(PluginServiceServer).Subscribe(m, &pluginServiceSubscribeServer{ServerStream: stream})\n}\n\ntype PluginService_SubscribeServer interface {\n\tSend(*StreamMessage) error\n\tgrpc.ServerStream\n}\n\ntype pluginServiceSubscribeServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *pluginServiceSubscribeServer) Send(m *StreamMessage) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc _PluginService_Poll_Handler(srv interface{}, stream grpc.ServerStream) error {\n\treturn srv.(PluginServiceServer).Poll(&pluginServicePollServer{ServerStream: stream})\n}\n\ntype PluginService_PollServer interface {\n\tSend(*StreamMessage) error\n\tRecv() (*StreamMessage, error)\n\tgrpc.ServerStream\n}\n\ntype pluginServicePollServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *pluginServicePollServer) Send(m *StreamMessage) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc (x *pluginServicePollServer) Recv() (*StreamMessage, error) {\n\tm := new(StreamMessage)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\n// PluginService_ServiceDesc is the grpc.ServiceDesc for PluginService service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar PluginService_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.PluginService\",\n\tHandlerType: (*PluginServiceServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"Register\",\n\t\t\tHandler:    _PluginService_Register_Handler,\n\t\t},\n\t},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName:    \"Subscribe\",\n\t\t\tHandler:       _PluginService_Subscribe_Handler,\n\t\t\tServerStreams: true,\n\t\t},\n\t\t{\n\t\t\tStreamName:    \"Poll\",\n\t\t\tHandler:       _PluginService_Poll_Handler,\n\t\t\tServerStreams: true,\n\t\t\tClientStreams: true,\n\t\t},\n\t},\n\tMetadata: \"services/plugin_service.proto\",\n}\n"
  },
  {
    "path": "grpc/proto/entity/model_service_v2_request.proto",
    "content": "syntax = \"proto3\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage ModelServiceV2GetByIdRequest {\n  string node_key = 1;\n  string model_type = 2;\n  string id = 3;\n}\n\nmessage ModelServiceV2GetOneRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes query = 3;\n  bytes find_options = 4;\n}\n\nmessage ModelServiceV2GetManyRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes query = 3;\n  bytes find_options = 4;\n}\n\nmessage ModelServiceV2DeleteByIdRequest {\n  string node_key = 1;\n  string model_type = 2;\n  string id = 3;\n}\n\nmessage ModelServiceV2DeleteOneRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes query = 3;\n}\n\nmessage ModelServiceV2DeleteManyRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes query = 3;\n}\n\nmessage ModelServiceV2UpdateByIdRequest {\n  string node_key = 1;\n  string model_type = 2;\n  string id = 3;\n  bytes update = 4;\n}\n\nmessage ModelServiceV2UpdateOneRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes query = 3;\n  bytes update = 4;\n}\n\nmessage ModelServiceV2UpdateManyRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes query = 3;\n  bytes update = 4;\n}\n\nmessage ModelServiceV2ReplaceByIdRequest {\n  string node_key = 1;\n  string model_type = 2;\n  string id = 3;\n  bytes model = 4;\n}\n\nmessage ModelServiceV2ReplaceOneRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes query = 3;\n  bytes model = 4;\n}\n\nmessage ModelServiceV2InsertOneRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes model = 3;\n}\n\nmessage ModelServiceV2InsertManyRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes models = 3;\n}\n\nmessage ModelServiceV2CountRequest {\n  string node_key = 1;\n  string model_type = 2;\n  bytes query = 3;\n}\n"
  },
  {
    "path": "grpc/proto/entity/node_info.proto",
    "content": "syntax = \"proto3\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage NodeInfo {\n  string key = 1;\n  bool is_master = 2;\n}\n"
  },
  {
    "path": "grpc/proto/entity/plugin_request.proto",
    "content": "syntax = \"proto3\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage PluginRequest {\n  string name = 1;\n  string node_key = 2;\n  bytes data = 3;\n}\n"
  },
  {
    "path": "grpc/proto/entity/request.proto",
    "content": "syntax = \"proto3\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage Request {\n  string node_key = 1;\n  bytes data = 2;\n}\n"
  },
  {
    "path": "grpc/proto/entity/response.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/response_code.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage Response {\n  ResponseCode code = 1;\n  string message = 2;\n  bytes data = 3;\n  string error = 4;\n  int64 total = 5;\n}\n"
  },
  {
    "path": "grpc/proto/entity/response_code.proto",
    "content": "syntax = \"proto3\";\n\noption go_package = \".;grpc\";\n\nenum ResponseCode {\n  OK = 0;\n  ERROR = 1;\n}"
  },
  {
    "path": "grpc/proto/entity/stream_message.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/stream_message_code.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage StreamMessage {\n  StreamMessageCode code = 1;\n  string node_key = 2;\n  string key = 3;\n  string from = 4;\n  string to = 5;\n  bytes data = 6;\n  string error = 7;\n}\n"
  },
  {
    "path": "grpc/proto/entity/stream_message_code.proto",
    "content": "syntax = \"proto3\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nenum StreamMessageCode {\n  // ping worker nodes to check their health\n  PING = 0;\n  // ask worker node(s) to run task with given id\n  RUN_TASK = 1;\n  // ask worker node(s) to cancel task with given id\n  CANCEL_TASK = 2;\n  // insert data\n  INSERT_DATA = 3;\n  // insert logs\n  INSERT_LOGS = 4;\n  // send event\n  SEND_EVENT = 5;\n  // install plugin\n  INSTALL_PLUGIN = 6;\n  // uninstall plugin\n  UNINSTALL_PLUGIN = 7;\n  // start plugin\n  START_PLUGIN = 8;\n  // stop plugin\n  STOP_PLUGIN = 9;\n  // connect\n  CONNECT = 10;\n  // disconnect\n  DISCONNECT = 11;\n  // send\n  SEND = 12;\n}\n"
  },
  {
    "path": "grpc/proto/entity/stream_message_data_task.proto",
    "content": "syntax = \"proto3\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage StreamMessageDataTask {\n  string task_id = 1;\n  string data = 2;\n}\n"
  },
  {
    "path": "grpc/proto/models/node.proto",
    "content": "syntax = \"proto3\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage Node {\n  string _id = 1;\n  string name = 2;\n  string ip = 3;\n  string port = 5;\n  string mac = 6;\n  string hostname = 7;\n  string description = 8;\n  string key = 9;\n  bool is_master = 11;\n  string update_ts = 12;\n  string create_ts = 13;\n  int64 update_ts_unix = 14;\n}\n"
  },
  {
    "path": "grpc/proto/models/task.proto",
    "content": "syntax = \"proto3\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage Task {\n  string _id = 1;\n  string spider_id = 2;\n  string status = 5;\n  string node_id = 6;\n  string cmd = 8;\n  string param = 9;\n  string error = 10;\n  int32 pid = 16;\n  string run_type = 17;\n  string schedule_id = 18;\n  string type = 19;\n}"
  },
  {
    "path": "grpc/proto/services/dependencies_service_v2.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/response.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage Dependency {\n  string name = 1;\n  string version = 2;\n}\n\nmessage DependenciesServiceV2ConnectRequest {\n  string node_key = 1;\n}\n\nenum DependenciesServiceV2Code {\n  SYNC = 0;\n  INSTALL = 1;\n  UNINSTALL = 2;\n}\n\nmessage DependenciesServiceV2ConnectResponse {\n  DependenciesServiceV2Code code = 1;\n  string task_id = 2;\n  string lang = 3;\n  string proxy = 4;\n  repeated Dependency dependencies = 5;\n}\n\nmessage DependenciesServiceV2SyncRequest {\n  string node_key = 1;\n  string lang = 2;\n  repeated Dependency dependencies = 3;\n}\n\nmessage DependenciesServiceV2UpdateTaskLogRequest {\n  string task_id = 1;\n  repeated string log_lines = 2;\n}\n\nservice DependenciesServiceV2 {\n  rpc Connect(DependenciesServiceV2ConnectRequest) returns (stream DependenciesServiceV2ConnectResponse){};\n  rpc Sync(DependenciesServiceV2SyncRequest) returns (Response){};\n  rpc UpdateTaskLog(stream DependenciesServiceV2UpdateTaskLogRequest) returns (Response){};\n}\n"
  },
  {
    "path": "grpc/proto/services/message_service.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/stream_message.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nservice MessageService {\n  rpc Connect(stream StreamMessage) returns (stream StreamMessage){};\n}\n"
  },
  {
    "path": "grpc/proto/services/metrics_service_v2.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/response.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage MetricsServiceV2SendRequest {\n  string type = 1;\n  string node_key = 2;\n  int64 timestamp = 3;\n  float cpu_usage_percent = 4;\n  uint64 total_memory = 5;\n  uint64 available_memory = 6;\n  uint64 used_memory = 7;\n  float used_memory_percent = 8;\n  uint64 total_disk = 9;\n  uint64 available_disk = 10;\n  uint64 used_disk = 11;\n  float used_disk_percent = 12;\n  float disk_read_bytes_rate = 15;\n  float disk_write_bytes_rate = 16;\n  float network_bytes_sent_rate = 17;\n  float network_bytes_recv_rate = 18;\n}\n\nservice MetricsServiceV2 {\n  rpc Send(MetricsServiceV2SendRequest) returns (Response){};\n}\n"
  },
  {
    "path": "grpc/proto/services/model_base_service.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/request.proto\";\nimport \"entity/response.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nservice ModelBaseService {\n  rpc GetById(Request) returns (Response){};\n  rpc Get(Request) returns (Response){};\n  rpc GetList(Request) returns (Response){};\n  rpc DeleteById(Request) returns (Response){};\n  rpc Delete(Request) returns (Response){};\n  rpc DeleteList(Request) returns (Response){};\n  rpc ForceDeleteList(Request) returns (Response){};\n  rpc UpdateById(Request) returns (Response){};\n  rpc Update(Request) returns (Response){};\n  rpc UpdateDoc(Request) returns (Response){};\n  rpc Insert(Request) returns (Response){};\n  rpc Count(Request) returns (Response){};\n}\n"
  },
  {
    "path": "grpc/proto/services/model_base_service_v2.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/model_service_v2_request.proto\";\nimport \"entity/response.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nservice ModelBaseServiceV2 {\n  rpc GetById(ModelServiceV2GetByIdRequest) returns (Response){};\n  rpc GetOne(ModelServiceV2GetOneRequest) returns (Response){};\n  rpc GetMany(ModelServiceV2GetManyRequest) returns (Response){};\n  rpc DeleteById(ModelServiceV2DeleteByIdRequest) returns (Response){};\n  rpc DeleteOne(ModelServiceV2DeleteOneRequest) returns (Response){};\n  rpc DeleteMany(ModelServiceV2DeleteManyRequest) returns (Response){};\n  rpc UpdateById(ModelServiceV2UpdateByIdRequest) returns (Response){};\n  rpc UpdateOne(ModelServiceV2UpdateOneRequest) returns (Response){};\n  rpc UpdateMany(ModelServiceV2UpdateManyRequest) returns (Response){};\n  rpc ReplaceById(ModelServiceV2ReplaceByIdRequest) returns (Response){};\n  rpc ReplaceOne(ModelServiceV2ReplaceOneRequest) returns (Response){};\n  rpc InsertOne(ModelServiceV2InsertOneRequest) returns (Response){};\n  rpc InsertMany(ModelServiceV2InsertManyRequest) returns (Response){};\n  rpc Count(ModelServiceV2CountRequest) returns (Response){};\n}\n"
  },
  {
    "path": "grpc/proto/services/model_delegate.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/request.proto\";\nimport \"entity/response.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nservice ModelDelegate {\n  rpc Do(Request) returns (Response){};\n}\n"
  },
  {
    "path": "grpc/proto/services/node_service.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/request.proto\";\nimport \"entity/response.proto\";\nimport \"entity/stream_message.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage NodeServiceRegisterRequest {\n  string key = 1;\n  string name = 2;\n  bool isMaster = 3;\n  string authKey = 4;\n  int32 maxRunners = 5;\n}\nmessage NodeServiceSendHeartbeatRequest {\n  string key = 1;\n}\n\nservice NodeService {\n  rpc Register(NodeServiceRegisterRequest) returns (Response){};\n  rpc SendHeartbeat(NodeServiceSendHeartbeatRequest) returns (Response){};\n  rpc Subscribe(Request) returns (stream StreamMessage){};\n  rpc Unsubscribe(Request) returns (Response){};\n}\n"
  },
  {
    "path": "grpc/proto/services/plugin_service.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/plugin_request.proto\";\nimport \"entity/response.proto\";\nimport \"entity/stream_message.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nservice PluginService {\n  rpc Register(PluginRequest) returns (Response){};\n  rpc Subscribe(PluginRequest) returns (stream StreamMessage){};\n  rpc Poll(stream StreamMessage) returns (stream StreamMessage){};\n}\n"
  },
  {
    "path": "grpc/proto/services/task_service.proto",
    "content": "syntax = \"proto3\";\n\nimport \"entity/request.proto\";\nimport \"entity/response.proto\";\nimport \"entity/stream_message.proto\";\n\npackage grpc;\noption go_package = \".;grpc\";\n\nmessage TaskServiceSendNotificationRequest {\n  string node_key = 1;\n  string task_id = 2;\n}\n\nservice TaskService {\n  rpc Subscribe(stream StreamMessage) returns (Response){};\n  rpc Fetch(Request) returns (Response){};\n  rpc SendNotification(TaskServiceSendNotificationRequest) returns (Response){};\n}\n"
  },
  {
    "path": "grpc/request.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/request.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype Request struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tData    []byte `protobuf:\"bytes,2,opt,name=data,proto3\" json:\"data,omitempty\"`\n}\n\nfunc (x *Request) Reset() {\n\t*x = Request{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_request_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Request) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Request) ProtoMessage() {}\n\nfunc (x *Request) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_request_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Request.ProtoReflect.Descriptor instead.\nfunc (*Request) Descriptor() ([]byte, []int) {\n\treturn file_entity_request_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Request) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *Request) GetData() []byte {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn nil\n}\n\nvar File_entity_request_proto protoreflect.FileDescriptor\n\nvar file_entity_request_proto_rawDesc = []byte{\n\t0x0a, 0x14, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,\n\t0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0x38, 0x0a, 0x07,\n\t0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f,\n\t0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b,\n\t0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,\n\t0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63,\n\t0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_entity_request_proto_rawDescOnce sync.Once\n\tfile_entity_request_proto_rawDescData = file_entity_request_proto_rawDesc\n)\n\nfunc file_entity_request_proto_rawDescGZIP() []byte {\n\tfile_entity_request_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_request_proto_rawDescData)\n\t})\n\treturn file_entity_request_proto_rawDescData\n}\n\nvar file_entity_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_entity_request_proto_goTypes = []any{\n\t(*Request)(nil), // 0: grpc.Request\n}\nvar file_entity_request_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_request_proto_init() }\nfunc file_entity_request_proto_init() {\n\tif File_entity_request_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_entity_request_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*Request); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_request_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_request_proto_goTypes,\n\t\tDependencyIndexes: file_entity_request_proto_depIdxs,\n\t\tMessageInfos:      file_entity_request_proto_msgTypes,\n\t}.Build()\n\tFile_entity_request_proto = out.File\n\tfile_entity_request_proto_rawDesc = nil\n\tfile_entity_request_proto_goTypes = nil\n\tfile_entity_request_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/response.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/response.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype Response struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tCode    ResponseCode `protobuf:\"varint,1,opt,name=code,proto3,enum=ResponseCode\" json:\"code,omitempty\"`\n\tMessage string       `protobuf:\"bytes,2,opt,name=message,proto3\" json:\"message,omitempty\"`\n\tData    []byte       `protobuf:\"bytes,3,opt,name=data,proto3\" json:\"data,omitempty\"`\n\tError   string       `protobuf:\"bytes,4,opt,name=error,proto3\" json:\"error,omitempty\"`\n\tTotal   int64        `protobuf:\"varint,5,opt,name=total,proto3\" json:\"total,omitempty\"`\n}\n\nfunc (x *Response) Reset() {\n\t*x = Response{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_response_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Response) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Response) ProtoMessage() {}\n\nfunc (x *Response) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_response_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Response.ProtoReflect.Descriptor instead.\nfunc (*Response) Descriptor() ([]byte, []int) {\n\treturn file_entity_response_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Response) GetCode() ResponseCode {\n\tif x != nil {\n\t\treturn x.Code\n\t}\n\treturn ResponseCode_OK\n}\n\nfunc (x *Response) GetMessage() string {\n\tif x != nil {\n\t\treturn x.Message\n\t}\n\treturn \"\"\n}\n\nfunc (x *Response) GetData() []byte {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn nil\n}\n\nfunc (x *Response) GetError() string {\n\tif x != nil {\n\t\treturn x.Error\n\t}\n\treturn \"\"\n}\n\nfunc (x *Response) GetTotal() int64 {\n\tif x != nil {\n\t\treturn x.Total\n\t}\n\treturn 0\n}\n\nvar File_entity_response_proto protoreflect.FileDescriptor\n\nvar file_entity_response_proto_rawDesc = []byte{\n\t0x0a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,\n\t0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x1a, 0x65,\n\t0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63,\n\t0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x08, 0x52, 0x65,\n\t0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,\n\t0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43,\n\t0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73,\n\t0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,\n\t0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28,\n\t0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,\n\t0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a,\n\t0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f,\n\t0x74, 0x61, 0x6c, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_entity_response_proto_rawDescOnce sync.Once\n\tfile_entity_response_proto_rawDescData = file_entity_response_proto_rawDesc\n)\n\nfunc file_entity_response_proto_rawDescGZIP() []byte {\n\tfile_entity_response_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_response_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_response_proto_rawDescData)\n\t})\n\treturn file_entity_response_proto_rawDescData\n}\n\nvar file_entity_response_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_entity_response_proto_goTypes = []any{\n\t(*Response)(nil),  // 0: grpc.Response\n\t(ResponseCode)(0), // 1: ResponseCode\n}\nvar file_entity_response_proto_depIdxs = []int32{\n\t1, // 0: grpc.Response.code:type_name -> ResponseCode\n\t1, // [1:1] is the sub-list for method output_type\n\t1, // [1:1] is the sub-list for method input_type\n\t1, // [1:1] is the sub-list for extension type_name\n\t1, // [1:1] is the sub-list for extension extendee\n\t0, // [0:1] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_response_proto_init() }\nfunc file_entity_response_proto_init() {\n\tif File_entity_response_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_response_code_proto_init()\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_entity_response_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*Response); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_response_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_response_proto_goTypes,\n\t\tDependencyIndexes: file_entity_response_proto_depIdxs,\n\t\tMessageInfos:      file_entity_response_proto_msgTypes,\n\t}.Build()\n\tFile_entity_response_proto = out.File\n\tfile_entity_response_proto_rawDesc = nil\n\tfile_entity_response_proto_goTypes = nil\n\tfile_entity_response_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/response_code.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/response_code.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype ResponseCode int32\n\nconst (\n\tResponseCode_OK    ResponseCode = 0\n\tResponseCode_ERROR ResponseCode = 1\n)\n\n// Enum value maps for ResponseCode.\nvar (\n\tResponseCode_name = map[int32]string{\n\t\t0: \"OK\",\n\t\t1: \"ERROR\",\n\t}\n\tResponseCode_value = map[string]int32{\n\t\t\"OK\":    0,\n\t\t\"ERROR\": 1,\n\t}\n)\n\nfunc (x ResponseCode) Enum() *ResponseCode {\n\tp := new(ResponseCode)\n\t*p = x\n\treturn p\n}\n\nfunc (x ResponseCode) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (ResponseCode) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_entity_response_code_proto_enumTypes[0].Descriptor()\n}\n\nfunc (ResponseCode) Type() protoreflect.EnumType {\n\treturn &file_entity_response_code_proto_enumTypes[0]\n}\n\nfunc (x ResponseCode) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use ResponseCode.Descriptor instead.\nfunc (ResponseCode) EnumDescriptor() ([]byte, []int) {\n\treturn file_entity_response_code_proto_rawDescGZIP(), []int{0}\n}\n\nvar File_entity_response_code_proto protoreflect.FileDescriptor\n\nvar file_entity_response_code_proto_rawDesc = []byte{\n\t0x0a, 0x1a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,\n\t0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x21, 0x0a, 0x0c,\n\t0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02,\n\t0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x42,\n\t0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x33,\n}\n\nvar (\n\tfile_entity_response_code_proto_rawDescOnce sync.Once\n\tfile_entity_response_code_proto_rawDescData = file_entity_response_code_proto_rawDesc\n)\n\nfunc file_entity_response_code_proto_rawDescGZIP() []byte {\n\tfile_entity_response_code_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_response_code_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_response_code_proto_rawDescData)\n\t})\n\treturn file_entity_response_code_proto_rawDescData\n}\n\nvar file_entity_response_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_entity_response_code_proto_goTypes = []any{\n\t(ResponseCode)(0), // 0: ResponseCode\n}\nvar file_entity_response_code_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_response_code_proto_init() }\nfunc file_entity_response_code_proto_init() {\n\tif File_entity_response_code_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_response_code_proto_rawDesc,\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_response_code_proto_goTypes,\n\t\tDependencyIndexes: file_entity_response_code_proto_depIdxs,\n\t\tEnumInfos:         file_entity_response_code_proto_enumTypes,\n\t}.Build()\n\tFile_entity_response_code_proto = out.File\n\tfile_entity_response_code_proto_rawDesc = nil\n\tfile_entity_response_code_proto_goTypes = nil\n\tfile_entity_response_code_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/stream_message.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/stream_message.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype StreamMessage struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tCode    StreamMessageCode `protobuf:\"varint,1,opt,name=code,proto3,enum=grpc.StreamMessageCode\" json:\"code,omitempty\"`\n\tNodeKey string            `protobuf:\"bytes,2,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tKey     string            `protobuf:\"bytes,3,opt,name=key,proto3\" json:\"key,omitempty\"`\n\tFrom    string            `protobuf:\"bytes,4,opt,name=from,proto3\" json:\"from,omitempty\"`\n\tTo      string            `protobuf:\"bytes,5,opt,name=to,proto3\" json:\"to,omitempty\"`\n\tData    []byte            `protobuf:\"bytes,6,opt,name=data,proto3\" json:\"data,omitempty\"`\n\tError   string            `protobuf:\"bytes,7,opt,name=error,proto3\" json:\"error,omitempty\"`\n}\n\nfunc (x *StreamMessage) Reset() {\n\t*x = StreamMessage{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_stream_message_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *StreamMessage) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*StreamMessage) ProtoMessage() {}\n\nfunc (x *StreamMessage) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_stream_message_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use StreamMessage.ProtoReflect.Descriptor instead.\nfunc (*StreamMessage) Descriptor() ([]byte, []int) {\n\treturn file_entity_stream_message_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *StreamMessage) GetCode() StreamMessageCode {\n\tif x != nil {\n\t\treturn x.Code\n\t}\n\treturn StreamMessageCode_PING\n}\n\nfunc (x *StreamMessage) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamMessage) GetKey() string {\n\tif x != nil {\n\t\treturn x.Key\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamMessage) GetFrom() string {\n\tif x != nil {\n\t\treturn x.From\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamMessage) GetTo() string {\n\tif x != nil {\n\t\treturn x.To\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamMessage) GetData() []byte {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn nil\n}\n\nfunc (x *StreamMessage) GetError() string {\n\tif x != nil {\n\t\treturn x.Error\n\t}\n\treturn \"\"\n}\n\nvar File_entity_stream_message_proto protoreflect.FileDescriptor\n\nvar file_entity_stream_message_proto_rawDesc = []byte{\n\t0x0a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,\n\t0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67,\n\t0x72, 0x70, 0x63, 0x1a, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65,\n\t0x61, 0x6d, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x2e,\n\t0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,\n\t0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72,\n\t0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04,\n\t0x63, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79,\n\t0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12,\n\t0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,\n\t0x79, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20,\n\t0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72,\n\t0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42,\n\t0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x33,\n}\n\nvar (\n\tfile_entity_stream_message_proto_rawDescOnce sync.Once\n\tfile_entity_stream_message_proto_rawDescData = file_entity_stream_message_proto_rawDesc\n)\n\nfunc file_entity_stream_message_proto_rawDescGZIP() []byte {\n\tfile_entity_stream_message_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_stream_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_stream_message_proto_rawDescData)\n\t})\n\treturn file_entity_stream_message_proto_rawDescData\n}\n\nvar file_entity_stream_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_entity_stream_message_proto_goTypes = []any{\n\t(*StreamMessage)(nil),  // 0: grpc.StreamMessage\n\t(StreamMessageCode)(0), // 1: grpc.StreamMessageCode\n}\nvar file_entity_stream_message_proto_depIdxs = []int32{\n\t1, // 0: grpc.StreamMessage.code:type_name -> grpc.StreamMessageCode\n\t1, // [1:1] is the sub-list for method output_type\n\t1, // [1:1] is the sub-list for method input_type\n\t1, // [1:1] is the sub-list for extension type_name\n\t1, // [1:1] is the sub-list for extension extendee\n\t0, // [0:1] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_stream_message_proto_init() }\nfunc file_entity_stream_message_proto_init() {\n\tif File_entity_stream_message_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_stream_message_code_proto_init()\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_entity_stream_message_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*StreamMessage); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_stream_message_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_stream_message_proto_goTypes,\n\t\tDependencyIndexes: file_entity_stream_message_proto_depIdxs,\n\t\tMessageInfos:      file_entity_stream_message_proto_msgTypes,\n\t}.Build()\n\tFile_entity_stream_message_proto = out.File\n\tfile_entity_stream_message_proto_rawDesc = nil\n\tfile_entity_stream_message_proto_goTypes = nil\n\tfile_entity_stream_message_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/stream_message_code.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/stream_message_code.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype StreamMessageCode int32\n\nconst (\n\t// ping worker nodes to check their health\n\tStreamMessageCode_PING StreamMessageCode = 0\n\t// ask worker node(s) to run task with given id\n\tStreamMessageCode_RUN_TASK StreamMessageCode = 1\n\t// ask worker node(s) to cancel task with given id\n\tStreamMessageCode_CANCEL_TASK StreamMessageCode = 2\n\t// insert data\n\tStreamMessageCode_INSERT_DATA StreamMessageCode = 3\n\t// insert logs\n\tStreamMessageCode_INSERT_LOGS StreamMessageCode = 4\n\t// send event\n\tStreamMessageCode_SEND_EVENT StreamMessageCode = 5\n\t// install plugin\n\tStreamMessageCode_INSTALL_PLUGIN StreamMessageCode = 6\n\t// uninstall plugin\n\tStreamMessageCode_UNINSTALL_PLUGIN StreamMessageCode = 7\n\t// start plugin\n\tStreamMessageCode_START_PLUGIN StreamMessageCode = 8\n\t// stop plugin\n\tStreamMessageCode_STOP_PLUGIN StreamMessageCode = 9\n\t// connect\n\tStreamMessageCode_CONNECT StreamMessageCode = 10\n\t// disconnect\n\tStreamMessageCode_DISCONNECT StreamMessageCode = 11\n\t// send\n\tStreamMessageCode_SEND StreamMessageCode = 12\n)\n\n// Enum value maps for StreamMessageCode.\nvar (\n\tStreamMessageCode_name = map[int32]string{\n\t\t0:  \"PING\",\n\t\t1:  \"RUN_TASK\",\n\t\t2:  \"CANCEL_TASK\",\n\t\t3:  \"INSERT_DATA\",\n\t\t4:  \"INSERT_LOGS\",\n\t\t5:  \"SEND_EVENT\",\n\t\t6:  \"INSTALL_PLUGIN\",\n\t\t7:  \"UNINSTALL_PLUGIN\",\n\t\t8:  \"START_PLUGIN\",\n\t\t9:  \"STOP_PLUGIN\",\n\t\t10: \"CONNECT\",\n\t\t11: \"DISCONNECT\",\n\t\t12: \"SEND\",\n\t}\n\tStreamMessageCode_value = map[string]int32{\n\t\t\"PING\":             0,\n\t\t\"RUN_TASK\":         1,\n\t\t\"CANCEL_TASK\":      2,\n\t\t\"INSERT_DATA\":      3,\n\t\t\"INSERT_LOGS\":      4,\n\t\t\"SEND_EVENT\":       5,\n\t\t\"INSTALL_PLUGIN\":   6,\n\t\t\"UNINSTALL_PLUGIN\": 7,\n\t\t\"START_PLUGIN\":     8,\n\t\t\"STOP_PLUGIN\":      9,\n\t\t\"CONNECT\":          10,\n\t\t\"DISCONNECT\":       11,\n\t\t\"SEND\":             12,\n\t}\n)\n\nfunc (x StreamMessageCode) Enum() *StreamMessageCode {\n\tp := new(StreamMessageCode)\n\t*p = x\n\treturn p\n}\n\nfunc (x StreamMessageCode) String() string {\n\treturn protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))\n}\n\nfunc (StreamMessageCode) Descriptor() protoreflect.EnumDescriptor {\n\treturn file_entity_stream_message_code_proto_enumTypes[0].Descriptor()\n}\n\nfunc (StreamMessageCode) Type() protoreflect.EnumType {\n\treturn &file_entity_stream_message_code_proto_enumTypes[0]\n}\n\nfunc (x StreamMessageCode) Number() protoreflect.EnumNumber {\n\treturn protoreflect.EnumNumber(x)\n}\n\n// Deprecated: Use StreamMessageCode.Descriptor instead.\nfunc (StreamMessageCode) EnumDescriptor() ([]byte, []int) {\n\treturn file_entity_stream_message_code_proto_rawDescGZIP(), []int{0}\n}\n\nvar File_entity_stream_message_code_proto protoreflect.FileDescriptor\n\nvar file_entity_stream_message_code_proto_rawDesc = []byte{\n\t0x0a, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,\n\t0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x2a, 0xe2, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72,\n\t0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x08,\n\t0x0a, 0x04, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x55, 0x4e, 0x5f,\n\t0x54, 0x41, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c,\n\t0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x53, 0x45, 0x52,\n\t0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x53, 0x45,\n\t0x52, 0x54, 0x5f, 0x4c, 0x4f, 0x47, 0x53, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x4e,\n\t0x44, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x53,\n\t0x54, 0x41, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x06, 0x12, 0x14, 0x0a,\n\t0x10, 0x55, 0x4e, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49,\n\t0x4e, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x50, 0x4c, 0x55,\n\t0x47, 0x49, 0x4e, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x50, 0x4c,\n\t0x55, 0x47, 0x49, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43,\n\t0x54, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43,\n\t0x54, 0x10, 0x0b, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4e, 0x44, 0x10, 0x0c, 0x42, 0x08, 0x5a,\n\t0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_entity_stream_message_code_proto_rawDescOnce sync.Once\n\tfile_entity_stream_message_code_proto_rawDescData = file_entity_stream_message_code_proto_rawDesc\n)\n\nfunc file_entity_stream_message_code_proto_rawDescGZIP() []byte {\n\tfile_entity_stream_message_code_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_stream_message_code_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_stream_message_code_proto_rawDescData)\n\t})\n\treturn file_entity_stream_message_code_proto_rawDescData\n}\n\nvar file_entity_stream_message_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1)\nvar file_entity_stream_message_code_proto_goTypes = []any{\n\t(StreamMessageCode)(0), // 0: grpc.StreamMessageCode\n}\nvar file_entity_stream_message_code_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_stream_message_code_proto_init() }\nfunc file_entity_stream_message_code_proto_init() {\n\tif File_entity_stream_message_code_proto != nil {\n\t\treturn\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_stream_message_code_proto_rawDesc,\n\t\t\tNumEnums:      1,\n\t\t\tNumMessages:   0,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_stream_message_code_proto_goTypes,\n\t\tDependencyIndexes: file_entity_stream_message_code_proto_depIdxs,\n\t\tEnumInfos:         file_entity_stream_message_code_proto_enumTypes,\n\t}.Build()\n\tFile_entity_stream_message_code_proto = out.File\n\tfile_entity_stream_message_code_proto_rawDesc = nil\n\tfile_entity_stream_message_code_proto_goTypes = nil\n\tfile_entity_stream_message_code_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/stream_message_data_task.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: entity/stream_message_data_task.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype StreamMessageDataTask struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tTaskId string `protobuf:\"bytes,1,opt,name=task_id,json=taskId,proto3\" json:\"task_id,omitempty\"`\n\tData   string `protobuf:\"bytes,2,opt,name=data,proto3\" json:\"data,omitempty\"`\n}\n\nfunc (x *StreamMessageDataTask) Reset() {\n\t*x = StreamMessageDataTask{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_entity_stream_message_data_task_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *StreamMessageDataTask) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*StreamMessageDataTask) ProtoMessage() {}\n\nfunc (x *StreamMessageDataTask) ProtoReflect() protoreflect.Message {\n\tmi := &file_entity_stream_message_data_task_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use StreamMessageDataTask.ProtoReflect.Descriptor instead.\nfunc (*StreamMessageDataTask) Descriptor() ([]byte, []int) {\n\treturn file_entity_stream_message_data_task_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *StreamMessageDataTask) GetTaskId() string {\n\tif x != nil {\n\t\treturn x.TaskId\n\t}\n\treturn \"\"\n}\n\nfunc (x *StreamMessageDataTask) GetData() string {\n\tif x != nil {\n\t\treturn x.Data\n\t}\n\treturn \"\"\n}\n\nvar File_entity_stream_message_data_task_proto protoreflect.FileDescriptor\n\nvar file_entity_stream_message_data_task_proto_rawDesc = []byte{\n\t0x0a, 0x25, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,\n\t0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x61, 0x73,\n\t0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0x44, 0x0a,\n\t0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, 0x61,\n\t0x74, 0x61, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69,\n\t0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12,\n\t0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,\n\t0x61, 0x74, 0x61, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70,\n\t0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_entity_stream_message_data_task_proto_rawDescOnce sync.Once\n\tfile_entity_stream_message_data_task_proto_rawDescData = file_entity_stream_message_data_task_proto_rawDesc\n)\n\nfunc file_entity_stream_message_data_task_proto_rawDescGZIP() []byte {\n\tfile_entity_stream_message_data_task_proto_rawDescOnce.Do(func() {\n\t\tfile_entity_stream_message_data_task_proto_rawDescData = protoimpl.X.CompressGZIP(file_entity_stream_message_data_task_proto_rawDescData)\n\t})\n\treturn file_entity_stream_message_data_task_proto_rawDescData\n}\n\nvar file_entity_stream_message_data_task_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_entity_stream_message_data_task_proto_goTypes = []any{\n\t(*StreamMessageDataTask)(nil), // 0: grpc.StreamMessageDataTask\n}\nvar file_entity_stream_message_data_task_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_entity_stream_message_data_task_proto_init() }\nfunc file_entity_stream_message_data_task_proto_init() {\n\tif File_entity_stream_message_data_task_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_entity_stream_message_data_task_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*StreamMessageDataTask); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_entity_stream_message_data_task_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_entity_stream_message_data_task_proto_goTypes,\n\t\tDependencyIndexes: file_entity_stream_message_data_task_proto_depIdxs,\n\t\tMessageInfos:      file_entity_stream_message_data_task_proto_msgTypes,\n\t}.Build()\n\tFile_entity_stream_message_data_task_proto = out.File\n\tfile_entity_stream_message_data_task_proto_rawDesc = nil\n\tfile_entity_stream_message_data_task_proto_goTypes = nil\n\tfile_entity_stream_message_data_task_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/task.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: models/task.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype Task struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tXId        string `protobuf:\"bytes,1,opt,name=_id,json=Id,proto3\" json:\"_id,omitempty\"`\n\tSpiderId   string `protobuf:\"bytes,2,opt,name=spider_id,json=spiderId,proto3\" json:\"spider_id,omitempty\"`\n\tStatus     string `protobuf:\"bytes,5,opt,name=status,proto3\" json:\"status,omitempty\"`\n\tNodeId     string `protobuf:\"bytes,6,opt,name=node_id,json=nodeId,proto3\" json:\"node_id,omitempty\"`\n\tCmd        string `protobuf:\"bytes,8,opt,name=cmd,proto3\" json:\"cmd,omitempty\"`\n\tParam      string `protobuf:\"bytes,9,opt,name=param,proto3\" json:\"param,omitempty\"`\n\tError      string `protobuf:\"bytes,10,opt,name=error,proto3\" json:\"error,omitempty\"`\n\tPid        int32  `protobuf:\"varint,16,opt,name=pid,proto3\" json:\"pid,omitempty\"`\n\tRunType    string `protobuf:\"bytes,17,opt,name=run_type,json=runType,proto3\" json:\"run_type,omitempty\"`\n\tScheduleId string `protobuf:\"bytes,18,opt,name=schedule_id,json=scheduleId,proto3\" json:\"schedule_id,omitempty\"`\n\tType       string `protobuf:\"bytes,19,opt,name=type,proto3\" json:\"type,omitempty\"`\n}\n\nfunc (x *Task) Reset() {\n\t*x = Task{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_models_task_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *Task) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*Task) ProtoMessage() {}\n\nfunc (x *Task) ProtoReflect() protoreflect.Message {\n\tmi := &file_models_task_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use Task.ProtoReflect.Descriptor instead.\nfunc (*Task) Descriptor() ([]byte, []int) {\n\treturn file_models_task_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *Task) GetXId() string {\n\tif x != nil {\n\t\treturn x.XId\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetSpiderId() string {\n\tif x != nil {\n\t\treturn x.SpiderId\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetStatus() string {\n\tif x != nil {\n\t\treturn x.Status\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetNodeId() string {\n\tif x != nil {\n\t\treturn x.NodeId\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetCmd() string {\n\tif x != nil {\n\t\treturn x.Cmd\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetParam() string {\n\tif x != nil {\n\t\treturn x.Param\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetError() string {\n\tif x != nil {\n\t\treturn x.Error\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetPid() int32 {\n\tif x != nil {\n\t\treturn x.Pid\n\t}\n\treturn 0\n}\n\nfunc (x *Task) GetRunType() string {\n\tif x != nil {\n\t\treturn x.RunType\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetScheduleId() string {\n\tif x != nil {\n\t\treturn x.ScheduleId\n\t}\n\treturn \"\"\n}\n\nfunc (x *Task) GetType() string {\n\tif x != nil {\n\t\treturn x.Type\n\t}\n\treturn \"\"\n}\n\nvar File_models_task_proto protoreflect.FileDescriptor\n\nvar file_models_task_proto_rawDesc = []byte{\n\t0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72,\n\t0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0x85, 0x02, 0x0a, 0x04, 0x54, 0x61,\n\t0x73, 0x6b, 0x12, 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x02, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64,\n\t0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64,\n\t0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,\n\t0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65,\n\t0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49,\n\t0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,\n\t0x63, 0x6d, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x09, 0x20, 0x01,\n\t0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72,\n\t0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12,\n\t0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69,\n\t0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x75, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20,\n\t0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b,\n\t0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28,\n\t0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a,\n\t0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,\n\t0x65, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,\n\t0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_models_task_proto_rawDescOnce sync.Once\n\tfile_models_task_proto_rawDescData = file_models_task_proto_rawDesc\n)\n\nfunc file_models_task_proto_rawDescGZIP() []byte {\n\tfile_models_task_proto_rawDescOnce.Do(func() {\n\t\tfile_models_task_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_task_proto_rawDescData)\n\t})\n\treturn file_models_task_proto_rawDescData\n}\n\nvar file_models_task_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_models_task_proto_goTypes = []any{\n\t(*Task)(nil), // 0: grpc.Task\n}\nvar file_models_task_proto_depIdxs = []int32{\n\t0, // [0:0] is the sub-list for method output_type\n\t0, // [0:0] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_models_task_proto_init() }\nfunc file_models_task_proto_init() {\n\tif File_models_task_proto != nil {\n\t\treturn\n\t}\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_models_task_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*Task); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_models_task_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   0,\n\t\t},\n\t\tGoTypes:           file_models_task_proto_goTypes,\n\t\tDependencyIndexes: file_models_task_proto_depIdxs,\n\t\tMessageInfos:      file_models_task_proto_msgTypes,\n\t}.Build()\n\tFile_models_task_proto = out.File\n\tfile_models_task_proto_rawDesc = nil\n\tfile_models_task_proto_goTypes = nil\n\tfile_models_task_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/task_service.pb.go",
    "content": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.34.2\n// \tprotoc        v5.27.2\n// source: services/task_service.proto\n\npackage grpc\n\nimport (\n\tprotoreflect \"google.golang.org/protobuf/reflect/protoreflect\"\n\tprotoimpl \"google.golang.org/protobuf/runtime/protoimpl\"\n\treflect \"reflect\"\n\tsync \"sync\"\n)\n\nconst (\n\t// Verify that this generated code is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)\n\t// Verify that runtime/protoimpl is sufficiently up-to-date.\n\t_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)\n)\n\ntype TaskServiceSendNotificationRequest struct {\n\tstate         protoimpl.MessageState\n\tsizeCache     protoimpl.SizeCache\n\tunknownFields protoimpl.UnknownFields\n\n\tNodeKey string `protobuf:\"bytes,1,opt,name=node_key,json=nodeKey,proto3\" json:\"node_key,omitempty\"`\n\tTaskId  string `protobuf:\"bytes,2,opt,name=task_id,json=taskId,proto3\" json:\"task_id,omitempty\"`\n}\n\nfunc (x *TaskServiceSendNotificationRequest) Reset() {\n\t*x = TaskServiceSendNotificationRequest{}\n\tif protoimpl.UnsafeEnabled {\n\t\tmi := &file_services_task_service_proto_msgTypes[0]\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tms.StoreMessageInfo(mi)\n\t}\n}\n\nfunc (x *TaskServiceSendNotificationRequest) String() string {\n\treturn protoimpl.X.MessageStringOf(x)\n}\n\nfunc (*TaskServiceSendNotificationRequest) ProtoMessage() {}\n\nfunc (x *TaskServiceSendNotificationRequest) ProtoReflect() protoreflect.Message {\n\tmi := &file_services_task_service_proto_msgTypes[0]\n\tif protoimpl.UnsafeEnabled && x != nil {\n\t\tms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))\n\t\tif ms.LoadMessageInfo() == nil {\n\t\t\tms.StoreMessageInfo(mi)\n\t\t}\n\t\treturn ms\n\t}\n\treturn mi.MessageOf(x)\n}\n\n// Deprecated: Use TaskServiceSendNotificationRequest.ProtoReflect.Descriptor instead.\nfunc (*TaskServiceSendNotificationRequest) Descriptor() ([]byte, []int) {\n\treturn file_services_task_service_proto_rawDescGZIP(), []int{0}\n}\n\nfunc (x *TaskServiceSendNotificationRequest) GetNodeKey() string {\n\tif x != nil {\n\t\treturn x.NodeKey\n\t}\n\treturn \"\"\n}\n\nfunc (x *TaskServiceSendNotificationRequest) GetTaskId() string {\n\tif x != nil {\n\t\treturn x.TaskId\n\t}\n\treturn \"\"\n}\n\nvar File_services_task_service_proto protoreflect.FileDescriptor\n\nvar file_services_task_service_proto_rawDesc = []byte{\n\t0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f,\n\t0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67,\n\t0x72, 0x70, 0x63, 0x1a, 0x14, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74,\n\t0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,\n\t0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,\n\t0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a,\n\t0x22, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64,\n\t0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,\n\t0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18,\n\t0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x17,\n\t0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,\n\t0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32, 0xbd, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b,\n\t0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63,\n\t0x72, 0x69, 0x62, 0x65, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65,\n\t0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63,\n\t0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x28, 0x0a,\n\t0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x4e,\n\t0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x67, 0x72,\n\t0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65,\n\t0x6e, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,\n\t0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,\n\t0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70,\n\t0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,\n}\n\nvar (\n\tfile_services_task_service_proto_rawDescOnce sync.Once\n\tfile_services_task_service_proto_rawDescData = file_services_task_service_proto_rawDesc\n)\n\nfunc file_services_task_service_proto_rawDescGZIP() []byte {\n\tfile_services_task_service_proto_rawDescOnce.Do(func() {\n\t\tfile_services_task_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_task_service_proto_rawDescData)\n\t})\n\treturn file_services_task_service_proto_rawDescData\n}\n\nvar file_services_task_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1)\nvar file_services_task_service_proto_goTypes = []any{\n\t(*TaskServiceSendNotificationRequest)(nil), // 0: grpc.TaskServiceSendNotificationRequest\n\t(*StreamMessage)(nil),                      // 1: grpc.StreamMessage\n\t(*Request)(nil),                            // 2: grpc.Request\n\t(*Response)(nil),                           // 3: grpc.Response\n}\nvar file_services_task_service_proto_depIdxs = []int32{\n\t1, // 0: grpc.TaskService.Subscribe:input_type -> grpc.StreamMessage\n\t2, // 1: grpc.TaskService.Fetch:input_type -> grpc.Request\n\t0, // 2: grpc.TaskService.SendNotification:input_type -> grpc.TaskServiceSendNotificationRequest\n\t3, // 3: grpc.TaskService.Subscribe:output_type -> grpc.Response\n\t3, // 4: grpc.TaskService.Fetch:output_type -> grpc.Response\n\t3, // 5: grpc.TaskService.SendNotification:output_type -> grpc.Response\n\t3, // [3:6] is the sub-list for method output_type\n\t0, // [0:3] is the sub-list for method input_type\n\t0, // [0:0] is the sub-list for extension type_name\n\t0, // [0:0] is the sub-list for extension extendee\n\t0, // [0:0] is the sub-list for field type_name\n}\n\nfunc init() { file_services_task_service_proto_init() }\nfunc file_services_task_service_proto_init() {\n\tif File_services_task_service_proto != nil {\n\t\treturn\n\t}\n\tfile_entity_request_proto_init()\n\tfile_entity_response_proto_init()\n\tfile_entity_stream_message_proto_init()\n\tif !protoimpl.UnsafeEnabled {\n\t\tfile_services_task_service_proto_msgTypes[0].Exporter = func(v any, i int) any {\n\t\t\tswitch v := v.(*TaskServiceSendNotificationRequest); i {\n\t\t\tcase 0:\n\t\t\t\treturn &v.state\n\t\t\tcase 1:\n\t\t\t\treturn &v.sizeCache\n\t\t\tcase 2:\n\t\t\t\treturn &v.unknownFields\n\t\t\tdefault:\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t}\n\ttype x struct{}\n\tout := protoimpl.TypeBuilder{\n\t\tFile: protoimpl.DescBuilder{\n\t\t\tGoPackagePath: reflect.TypeOf(x{}).PkgPath(),\n\t\t\tRawDescriptor: file_services_task_service_proto_rawDesc,\n\t\t\tNumEnums:      0,\n\t\t\tNumMessages:   1,\n\t\t\tNumExtensions: 0,\n\t\t\tNumServices:   1,\n\t\t},\n\t\tGoTypes:           file_services_task_service_proto_goTypes,\n\t\tDependencyIndexes: file_services_task_service_proto_depIdxs,\n\t\tMessageInfos:      file_services_task_service_proto_msgTypes,\n\t}.Build()\n\tFile_services_task_service_proto = out.File\n\tfile_services_task_service_proto_rawDesc = nil\n\tfile_services_task_service_proto_goTypes = nil\n\tfile_services_task_service_proto_depIdxs = nil\n}\n"
  },
  {
    "path": "grpc/task_service_grpc.pb.go",
    "content": "// Code generated by protoc-gen-go-grpc. DO NOT EDIT.\n// versions:\n// - protoc-gen-go-grpc v1.4.0\n// - protoc             v5.27.2\n// source: services/task_service.proto\n\npackage grpc\n\nimport (\n\tcontext \"context\"\n\tgrpc \"google.golang.org/grpc\"\n\tcodes \"google.golang.org/grpc/codes\"\n\tstatus \"google.golang.org/grpc/status\"\n)\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the grpc package it is being compiled against.\n// Requires gRPC-Go v1.62.0 or later.\nconst _ = grpc.SupportPackageIsVersion8\n\nconst (\n\tTaskService_Subscribe_FullMethodName        = \"/grpc.TaskService/Subscribe\"\n\tTaskService_Fetch_FullMethodName            = \"/grpc.TaskService/Fetch\"\n\tTaskService_SendNotification_FullMethodName = \"/grpc.TaskService/SendNotification\"\n)\n\n// TaskServiceClient is the client API for TaskService service.\n//\n// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.\ntype TaskServiceClient interface {\n\tSubscribe(ctx context.Context, opts ...grpc.CallOption) (TaskService_SubscribeClient, error)\n\tFetch(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)\n\tSendNotification(ctx context.Context, in *TaskServiceSendNotificationRequest, opts ...grpc.CallOption) (*Response, error)\n}\n\ntype taskServiceClient struct {\n\tcc grpc.ClientConnInterface\n}\n\nfunc NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient {\n\treturn &taskServiceClient{cc}\n}\n\nfunc (c *taskServiceClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (TaskService_SubscribeClient, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tstream, err := c.cc.NewStream(ctx, &TaskService_ServiceDesc.Streams[0], TaskService_Subscribe_FullMethodName, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tx := &taskServiceSubscribeClient{ClientStream: stream}\n\treturn x, nil\n}\n\ntype TaskService_SubscribeClient interface {\n\tSend(*StreamMessage) error\n\tCloseAndRecv() (*Response, error)\n\tgrpc.ClientStream\n}\n\ntype taskServiceSubscribeClient struct {\n\tgrpc.ClientStream\n}\n\nfunc (x *taskServiceSubscribeClient) Send(m *StreamMessage) error {\n\treturn x.ClientStream.SendMsg(m)\n}\n\nfunc (x *taskServiceSubscribeClient) CloseAndRecv() (*Response, error) {\n\tif err := x.ClientStream.CloseSend(); err != nil {\n\t\treturn nil, err\n\t}\n\tm := new(Response)\n\tif err := x.ClientStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc (c *taskServiceClient) Fetch(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, TaskService_Fetch_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\nfunc (c *taskServiceClient) SendNotification(ctx context.Context, in *TaskServiceSendNotificationRequest, opts ...grpc.CallOption) (*Response, error) {\n\tcOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)\n\tout := new(Response)\n\terr := c.cc.Invoke(ctx, TaskService_SendNotification_FullMethodName, in, out, cOpts...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn out, nil\n}\n\n// TaskServiceServer is the server API for TaskService service.\n// All implementations must embed UnimplementedTaskServiceServer\n// for forward compatibility\ntype TaskServiceServer interface {\n\tSubscribe(TaskService_SubscribeServer) error\n\tFetch(context.Context, *Request) (*Response, error)\n\tSendNotification(context.Context, *TaskServiceSendNotificationRequest) (*Response, error)\n\tmustEmbedUnimplementedTaskServiceServer()\n}\n\n// UnimplementedTaskServiceServer must be embedded to have forward compatible implementations.\ntype UnimplementedTaskServiceServer struct {\n}\n\nfunc (UnimplementedTaskServiceServer) Subscribe(TaskService_SubscribeServer) error {\n\treturn status.Errorf(codes.Unimplemented, \"method Subscribe not implemented\")\n}\nfunc (UnimplementedTaskServiceServer) Fetch(context.Context, *Request) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method Fetch not implemented\")\n}\nfunc (UnimplementedTaskServiceServer) SendNotification(context.Context, *TaskServiceSendNotificationRequest) (*Response, error) {\n\treturn nil, status.Errorf(codes.Unimplemented, \"method SendNotification not implemented\")\n}\nfunc (UnimplementedTaskServiceServer) mustEmbedUnimplementedTaskServiceServer() {}\n\n// UnsafeTaskServiceServer may be embedded to opt out of forward compatibility for this service.\n// Use of this interface is not recommended, as added methods to TaskServiceServer will\n// result in compilation errors.\ntype UnsafeTaskServiceServer interface {\n\tmustEmbedUnimplementedTaskServiceServer()\n}\n\nfunc RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) {\n\ts.RegisterService(&TaskService_ServiceDesc, srv)\n}\n\nfunc _TaskService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {\n\treturn srv.(TaskServiceServer).Subscribe(&taskServiceSubscribeServer{ServerStream: stream})\n}\n\ntype TaskService_SubscribeServer interface {\n\tSendAndClose(*Response) error\n\tRecv() (*StreamMessage, error)\n\tgrpc.ServerStream\n}\n\ntype taskServiceSubscribeServer struct {\n\tgrpc.ServerStream\n}\n\nfunc (x *taskServiceSubscribeServer) SendAndClose(m *Response) error {\n\treturn x.ServerStream.SendMsg(m)\n}\n\nfunc (x *taskServiceSubscribeServer) Recv() (*StreamMessage, error) {\n\tm := new(StreamMessage)\n\tif err := x.ServerStream.RecvMsg(m); err != nil {\n\t\treturn nil, err\n\t}\n\treturn m, nil\n}\n\nfunc _TaskService_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(Request)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TaskServiceServer).Fetch(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: TaskService_Fetch_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TaskServiceServer).Fetch(ctx, req.(*Request))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\nfunc _TaskService_SendNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {\n\tin := new(TaskServiceSendNotificationRequest)\n\tif err := dec(in); err != nil {\n\t\treturn nil, err\n\t}\n\tif interceptor == nil {\n\t\treturn srv.(TaskServiceServer).SendNotification(ctx, in)\n\t}\n\tinfo := &grpc.UnaryServerInfo{\n\t\tServer:     srv,\n\t\tFullMethod: TaskService_SendNotification_FullMethodName,\n\t}\n\thandler := func(ctx context.Context, req interface{}) (interface{}, error) {\n\t\treturn srv.(TaskServiceServer).SendNotification(ctx, req.(*TaskServiceSendNotificationRequest))\n\t}\n\treturn interceptor(ctx, in, info, handler)\n}\n\n// TaskService_ServiceDesc is the grpc.ServiceDesc for TaskService service.\n// It's only intended for direct use with grpc.RegisterService,\n// and not to be introspected or modified (even as a copy)\nvar TaskService_ServiceDesc = grpc.ServiceDesc{\n\tServiceName: \"grpc.TaskService\",\n\tHandlerType: (*TaskServiceServer)(nil),\n\tMethods: []grpc.MethodDesc{\n\t\t{\n\t\t\tMethodName: \"Fetch\",\n\t\t\tHandler:    _TaskService_Fetch_Handler,\n\t\t},\n\t\t{\n\t\t\tMethodName: \"SendNotification\",\n\t\t\tHandler:    _TaskService_SendNotification_Handler,\n\t\t},\n\t},\n\tStreams: []grpc.StreamDesc{\n\t\t{\n\t\t\tStreamName:    \"Subscribe\",\n\t\t\tHandler:       _TaskService_Subscribe_Handler,\n\t\t\tClientStreams: true,\n\t\t},\n\t},\n\tMetadata: \"services/task_service.proto\",\n}\n"
  },
  {
    "path": "k8s/crawlab-master.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: crawlab\n  namespace: crawlab\nspec:\n  ports:\n  - port: 80\n    targetPort: 8080\n    name: http\n  - name: grpc\n    port: 9666\n    targetPort: 9666\n  selector:\n    app: crawlab-master\n  type: ClusterIP\n\n---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: crawlab-master\n  namespace: crawlab\nspec:\n  selector:\n    matchLabels:\n      app: crawlab-master\n  template:\n    metadata:\n      labels:\n        app: crawlab-master\n    spec:\n      containers:\n      - image: crawlabteam/crawlab:latest\n        imagePullPolicy: Always\n        name: crawlab\n        env:\n        - name: CRAWLAB_NODE_MASTER\n          value: \"Y\"\n        - name: CRAWLAB_MONGO_HOST\n          value: \"mongo\"\n        - name: CRAWLAB_REDIS_ADDRESS\n          value: \"redis\"\n        - name: CRAWLAB_SETTING_ALLOWREGISTER\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_LANG_NODE\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_JAVA\n          value: \"N\"\n        - name: CRAWLAB_SERVER_LANG_DOTNET\n          value: \"N\"\n        - name: CRAWLAB_SERVER_REGISTER_TYPE\n          value: \"hostname\"\n        ports:\n        - containerPort: 8080\n          name: crawlab\n        - containerPort: 9666\n          name: grpc"
  },
  {
    "path": "k8s/crawlab-worker.yaml",
    "content": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: crawlab-worker\n  namespace: crawlab\nspec:\n  replicas: 2\n  selector:\n    matchLabels:\n      app: crawlab-worker\n  template:\n    metadata:\n      labels:\n        app: crawlab-worker\n    spec:\n      containers:\n      - image: crawlabteam/crawlab:latest\n        imagePullPolicy: Always\n        name: crawlab\n        env:\n        - name: CRAWLAB_NODE_MASTER\n          value: \"N\"\n        - name: CRAWLAB_MONGO_HOST\n          value: \"mongo\"\n        - name: CRAWLAB_REDIS_ADDRESS\n          value: \"redis\"\n        - name: CRAWLAB_SERVER_LANG_NODE\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_LANG_JAVA\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_LANG_DOTNET\n          value: \"Y\"\n        - name: CRAWLAB_SERVER_REGISTER_TYPE\n          value: \"hostname\"\n        - name: CRAWLAB_GRPC_ADDRESS\n          value: \"crawlab\"\n        - name: CRAWLAB_FS_FILER_URL\n          value: \"http://crawlab/api/filer\"\n"
  },
  {
    "path": "k8s/mongo-pv.yaml",
    "content": "apiVersion: v1\nkind: PersistentVolume\nmetadata:\n  name: mongo-pv-volume\n  namespace: crawlab\n  labels:\n    type: local\nspec:\n  storageClassName: manual\n  capacity:\n    storage: 10Gi\n  accessModes:\n    - ReadWriteOnce\n  hostPath:\n    path: \"/data/k8s/mongodb/data\"\n---\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: mongo-pv-claim\n  namespace: crawlab\nspec:\n  storageClassName: manual\n  accessModes:\n    - ReadWriteOnce\n  resources:\n    requests:\n      storage: 10Gi"
  },
  {
    "path": "k8s/mongo.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: mongo\n  namespace: crawlab\nspec:\n  ports:\n  - port: 27017\n  selector:\n    app: mongo\n  clusterIP: None\n---\napiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2\nkind: Deployment\nmetadata:\n  name: mongo\n  namespace: crawlab\nspec:\n  selector:\n    matchLabels:\n      app: mongo\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app: mongo\n    spec:\n      containers:\n      - image: mongo:4\n        name: mongo\n        ports:\n        - containerPort: 27017\n          name: mongo\n        volumeMounts:\n        - name: mongo-persistent-storage\n          mountPath: /data/db\n      volumes:\n      - name: mongo-persistent-storage\n        persistentVolumeClaim:\n          claimName: mongo-pv-claim"
  },
  {
    "path": "k8s/ns.yaml",
    "content": "apiVersion: v1\nkind: Namespace\nmetadata:\n  name: crawlab"
  },
  {
    "path": "k8s/redis.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: redis\n  namespace: crawlab\nspec:\n  ports:\n  - port: 6379\n  selector:\n    app: redis\n  clusterIP: None\n---\napiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2\nkind: Deployment\nmetadata:\n  name: redis\n  namespace: crawlab\nspec:\n  selector:\n    matchLabels:\n      app: redis\n  strategy:\n    type: Recreate\n  template:\n    metadata:\n      labels:\n        app: redis\n    spec:\n      containers:\n      - image: redis\n        name: redis\n        ports:\n        - containerPort: 6379\n          name: redis"
  },
  {
    "path": "nginx/crawlab.conf",
    "content": "server {\n\tgzip on;\n\tgzip_min_length 1k;\n\tgzip_buffers 4 16k;\n\tgzip_comp_level 2;\n\tgzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png image/x-icon;\n\tgzip_vary off;\n\tgzip_disable \"MSIE [1-6]\\.\";\n\tclient_max_body_size 200m;\n\tlisten  8080;\n\troot    /app/dist;\n\tindex   index.html;\n\n\tlocation /api/ {\n\t\trewrite\t\t/api/(.*) /$1 break;\n\t\tproxy_pass\thttp://localhost:8000/;\n\t}\n}\n"
  },
  {
    "path": "scripts/validate-backend.sh",
    "content": "#!/bin/sh\n\nIFS=$'\\n'\npattern=^replace\ncontent=$(cat ./backend/go.mod)\nfor line in $content\ndo\n\tif [[ $line =~ $pattern ]]; then\n\t\techo \"Invalid ./backend/go.mod, which should not contain \\\"^replace\\\"\"\n\t\texit 1\n\tfi\ndone\n"
  },
  {
    "path": "template-parser/.gitignore",
    "content": "# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built with `go test -c`\n*.test\n\n# Output of the go coverage tool, specifically when used with LiteIDE\n*.out\n\n# Dependency directories (remove the comment below to include it)\n# vendor/\n\n.idea\n.DS_Store"
  },
  {
    "path": "template-parser/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2021 Crawlab Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "template-parser/README.md",
    "content": "# template-parser"
  },
  {
    "path": "template-parser/entity.go",
    "content": "package parser\n\n// type: model / attribute\n\n// {{task.spider.name}}\n// =>\n"
  },
  {
    "path": "template-parser/func.go",
    "content": "package parser\n\nfunc Parse(template string, args ...interface{}) (content string, err error) {\n\treturn ParseGeneral(template, args...)\n}\n\nfunc ParseGeneral(template string, args ...interface{}) (content string, err error) {\n\tp, _ := NewGeneralParser()\n\tif err := p.Parse(template); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn p.Render(args...)\n}\n"
  },
  {
    "path": "template-parser/general_parser.go",
    "content": "package parser\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/robertkrimen/otto\"\n\t\"regexp\"\n\t\"strings\"\n)\n\ntype GeneralParser struct {\n\ttagPattern   string\n\ttagRegexp    *regexp.Regexp\n\tmathPattern  string\n\tmathRegexp   *regexp.Regexp\n\ttemplate     string\n\tindexes      [][]int\n\tmatches      [][]string\n\tplaceholders []string\n\tvariables    []Variable\n\tvm           *otto.Otto\n}\n\nconst VariableNameResult = \"result\"\nconst ValueNameNA = \"N/A\"\n\nfunc (p *GeneralParser) Parse(template string) (err error) {\n\tp.template = template\n\tp.indexes = p.tagRegexp.FindAllStringIndex(template, -1)\n\tp.matches = p.tagRegexp.FindAllStringSubmatch(template, -1)\n\tfor _, arr := range p.matches {\n\t\tp.placeholders = append(p.placeholders, arr[1])\n\t}\n\n\treturn nil\n}\n\nfunc (p *GeneralParser) Render(args ...interface{}) (content string, err error) {\n\t// render tag content\n\tcontent, err = p.renderTagContent(args...)\n\tif err != nil {\n\t\treturn content, err\n\t}\n\n\t// render math content\n\tcontent, err = p.renderMathContent(content)\n\tif err != nil {\n\t\treturn content, err\n\t}\n\n\treturn content, nil\n}\n\nfunc (p *GeneralParser) renderTagContent(args ...interface{}) (content string, err error) {\n\t// validate\n\tif len(args) == 0 {\n\t\treturn \"\", errors.New(\"no arguments\")\n\t}\n\n\t// first argument\n\targ := args[0]\n\n\t// content\n\tcontent = p.template\n\n\t// old strings\n\tvar oldStrList []string\n\tfor _, index := range p.indexes {\n\t\t// old string\n\t\toldStr := content[index[0]:index[1]]\n\t\toldStrList = append(oldStrList, oldStr)\n\t}\n\n\t// iterate placeholders\n\tfor i, placeholder := range p.placeholders {\n\t\t// variable\n\t\tv, err := NewVariable(arg, placeholder)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\t// value\n\t\tvalue, err := v.GetValue()\n\t\tif err != nil || value == nil {\n\t\t\tvalue = ValueNameNA\n\t\t}\n\n\t\t// old string\n\t\toldStr := oldStrList[i]\n\n\t\t// new string\n\t\tvar newStr string\n\t\tswitch value.(type) {\n\t\tcase string:\n\t\t\tnewStr = value.(string)\n\t\tdefault:\n\t\t\tnewStrBytes, err := json.Marshal(value)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tnewStr = string(newStrBytes)\n\t\t}\n\n\t\t// replace old string with new string\n\t\tcontent = strings.Replace(content, oldStr, newStr, 1)\n\t}\n\n\treturn content, nil\n}\n\nfunc (p *GeneralParser) renderMathContent(inputContent string) (content string, err error) {\n\tcontent = inputContent\n\tindexes := p.mathRegexp.FindAllStringIndex(inputContent, -1)\n\tmatches := p.mathRegexp.FindAllStringSubmatch(inputContent, -1)\n\n\t// old strings\n\tvar oldStrList []string\n\tfor _, index := range indexes {\n\t\t// old string\n\t\toldStr := content[index[0]:index[1]]\n\t\toldStrList = append(oldStrList, oldStr)\n\t}\n\n\t// iterate matches\n\tfor i, m := range matches {\n\t\t// js script to run to get evaluate result\n\t\tscript := fmt.Sprintf(\"%s = %s; %s\", VariableNameResult, m[1], VariableNameResult)\n\n\t\t// replace NA\n\t\tscript = strings.ReplaceAll(script, ValueNameNA, \"NaN\")\n\n\t\t// value\n\t\tvalue, err := p.vm.Run(script)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\t// old string\n\t\toldStr := oldStrList[i]\n\n\t\t// new string\n\t\tnewStr := value.String()\n\n\t\t// replace old string with new string\n\t\tcontent = strings.Replace(content, oldStr, newStr, 1)\n\t}\n\n\treturn content, nil\n}\n\nfunc (p *GeneralParser) GetPlaceholders() (placeholders []string) {\n\treturn p.placeholders\n}\n\nfunc NewGeneralParser() (p Parser, err error) {\n\t// tag regexp\n\ttagPrefix := \"\\\\{\\\\{\"\n\ttagSuffix := \"\\\\}\\\\}\"\n\ttagBasicChars := \"\\\\$\\\\.\\\\w_\"\n\ttagAssociateChars := \"\\\\[\\\\]:\"\n\ttagPattern := fmt.Sprintf(\n\t\t\"%s *([%s%s]+) *%s\",\n\t\ttagPrefix,\n\t\ttagBasicChars,\n\t\ttagAssociateChars,\n\t\ttagSuffix,\n\t)\n\ttagRegexp, err := regexp.Compile(tagPattern)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// math regexp\n\tmathPrefix := \"\\\\{#\"\n\tmathSuffix := \"#\\\\}\"\n\tmathBasicChars := \" \\\\(\\\\)\"\n\tmathOpChars := \"\\\\+\\\\-\\\\*/%\"\n\tmathNumChars := \"\\\\d\\\\.\"\n\tmathSpecialChars := \"(?:NaN|null)\"\n\tmathPattern := fmt.Sprintf(\n\t\t\"%s *([%s%s%s%s]+) *%s\",\n\t\tmathPrefix,\n\t\tmathBasicChars,\n\t\tmathOpChars,\n\t\tmathNumChars,\n\t\tmathSpecialChars,\n\t\tmathSuffix,\n\t)\n\tmathRegexp, err := regexp.Compile(mathPattern)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// math vm\n\tvm := otto.New()\n\n\t// parser\n\tp = &GeneralParser{\n\t\ttagPattern:  tagPattern,\n\t\ttagRegexp:   tagRegexp,\n\t\tmathPattern: mathPattern,\n\t\tmathRegexp:  mathRegexp,\n\t\tvm:          vm,\n\t}\n\n\treturn p, nil\n}\n"
  },
  {
    "path": "template-parser/go.mod",
    "content": "module github.com/crawlab-team/crawlab/template-parser\n\ngo 1.22\n\nreplace github.com/crawlab-team/crawlab/db => ../db\n\nrequire (\n\tgithub.com/crawlab-team/crawlab/db v0.0.0-20240614095218-7b4ee8399ab0\n\tgithub.com/robertkrimen/otto v0.0.0-20210614181706-373ff5438452\n\tgithub.com/stretchr/testify v1.9.0\n\tgo.mongodb.org/mongo-driver v1.15.1\n)\n\nrequire (\n\tgithub.com/apex/log v1.9.0 // indirect\n\tgithub.com/cenkalti/backoff/v4 v4.3.0 // indirect\n\tgithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect\n\tgithub.com/fsnotify/fsnotify v1.7.0 // indirect\n\tgithub.com/golang/snappy v0.0.4 // indirect\n\tgithub.com/hashicorp/hcl v1.0.0 // indirect\n\tgithub.com/klauspost/compress v1.17.7 // indirect\n\tgithub.com/magiconair/properties v1.8.7 // indirect\n\tgithub.com/mitchellh/mapstructure v1.5.0 // indirect\n\tgithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect\n\tgithub.com/pelletier/go-toml/v2 v2.2.2 // indirect\n\tgithub.com/pkg/errors v0.9.1 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect\n\tgithub.com/sagikazarmark/locafero v0.4.0 // indirect\n\tgithub.com/sagikazarmark/slog-shim v0.1.0 // indirect\n\tgithub.com/sourcegraph/conc v0.3.0 // indirect\n\tgithub.com/spf13/afero v1.11.0 // indirect\n\tgithub.com/spf13/cast v1.6.0 // indirect\n\tgithub.com/spf13/pflag v1.0.5 // indirect\n\tgithub.com/spf13/viper v1.19.0 // indirect\n\tgithub.com/subosito/gotenv v1.6.0 // indirect\n\tgithub.com/xdg-go/pbkdf2 v1.0.0 // indirect\n\tgithub.com/xdg-go/scram v1.1.2 // indirect\n\tgithub.com/xdg-go/stringprep v1.0.4 // indirect\n\tgithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect\n\tgo.uber.org/atomic v1.9.0 // indirect\n\tgo.uber.org/multierr v1.9.0 // indirect\n\tgolang.org/x/crypto v0.23.0 // indirect\n\tgolang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect\n\tgolang.org/x/sync v0.7.0 // indirect\n\tgolang.org/x/sys v0.20.0 // indirect\n\tgolang.org/x/text v0.15.0 // indirect\n\tgopkg.in/ini.v1 v1.67.0 // indirect\n\tgopkg.in/sourcemap.v1 v1.0.5 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "template-parser/go.sum",
    "content": "github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0=\ngithub.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=\ngithub.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=\ngithub.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE=\ngithub.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=\ngithub.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=\ngithub.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=\ngithub.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=\ngithub.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=\ngithub.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=\ngithub.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=\ngithub.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=\ngithub.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0=\ngithub.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=\ngithub.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=\ngithub.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=\ngithub.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=\ngithub.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=\ngithub.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=\ngithub.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0=\ngithub.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=\ngithub.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/robertkrimen/otto v0.0.0-20210614181706-373ff5438452 h1:ewTtJ72GFy2e0e8uyiDwMG3pKCS5mBh+hdSTYsPKEP8=\ngithub.com/robertkrimen/otto v0.0.0-20210614181706-373ff5438452/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY=\ngithub.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=\ngithub.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=\ngithub.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=\ngithub.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=\ngithub.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=\ngithub.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=\ngithub.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=\ngithub.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=\ngithub.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=\ngithub.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=\ngithub.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=\ngithub.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=\ngithub.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=\ngithub.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=\ngithub.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=\ngithub.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=\ngithub.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=\ngithub.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=\ngithub.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=\ngithub.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngithub.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=\ngithub.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=\ngithub.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=\ngithub.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=\ngithub.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=\ngithub.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk=\ngithub.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk=\ngithub.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc=\ngithub.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=\ngithub.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=\ngithub.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=\ngithub.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=\ngithub.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=\ngithub.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=\ngithub.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4=\ngithub.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=\ngithub.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=\ngithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=\ngithub.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngo.mongodb.org/mongo-driver v1.15.1 h1:l+RvoUOoMXFmADTLfYDm7On9dRm7p4T80/lEQM+r7HU=\ngo.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=\ngo.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=\ngo.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=\ngolang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=\ngolang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=\ngolang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=\ngolang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=\ngolang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=\ngolang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=\ngopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI=\ngopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\n"
  },
  {
    "path": "template-parser/interfaces.go",
    "content": "package parser\n\ntype Entity interface {\n\tGetType() string\n\tSetType(string)\n\tGetName() string\n\tSetName(string)\n}\n"
  },
  {
    "path": "template-parser/parser.go",
    "content": "package parser\n\ntype Parser interface {\n\tParse(template string) (err error)\n\tRender(args ...interface{}) (content string, err error)\n}\n"
  },
  {
    "path": "template-parser/test/general_parser_test.go",
    "content": "package test\n\nimport (\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"github.com/stretchr/testify/require\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"testing\"\n)\n\nfunc TestGeneralParser(t *testing.T) {\n\tp, _ := parser.NewGeneralParser()\n\tcontent := `The task {{  $.node }} (enabled: {{$.node.enabled}}) has completed.\nYours, {{$.user[create]}}`\n\terr := p.Parse(content)\n\tfmt.Println(p.(*parser.GeneralParser).GetPlaceholders())\n\trequire.Nil(t, err)\n}\n\nfunc TestGeneralParser_Parse(t *testing.T) {\n\tvar err error\n\tt.Cleanup(cleanup)\n\n\tnodeId := primitive.NewObjectID()\n\t_, err = mongo.GetMongoCol(\"nodes\").Insert(bson.M{\n\t\t\"_id\":     nodeId,\n\t\t\"name\":    \"Test Node\",\n\t\t\"enabled\": true,\n\t\t\"settings\": bson.M{\n\t\t\t\"max_runners\": 8,\n\t\t},\n\t})\n\trequire.Nil(t, err)\n\tspiderId := primitive.NewObjectID()\n\t_, err = mongo.GetMongoCol(\"spiders\").Insert(bson.M{\n\t\t\"_id\": spiderId,\n\t})\n\trequire.Nil(t, err)\n\t_, err = mongo.GetMongoCol(\"spider_stats\").Insert(bson.M{\n\t\t\"_id\":          spiderId,\n\t\t\"result_count\": 5000,\n\t})\n\trequire.Nil(t, err)\n\tuserId := primitive.NewObjectID()\n\t_, err = mongo.GetMongoCol(\"users\").Insert(bson.M{\n\t\t\"_id\":      userId,\n\t\t\"no\":       1001,\n\t\t\"username\": \"Test Username\",\n\t})\n\trequire.Nil(t, err)\n\tuserIdUpdate := primitive.NewObjectID()\n\t_, err = mongo.GetMongoCol(\"users\").Insert(bson.M{\n\t\t\"_id\":      userIdUpdate,\n\t\t\"no\":       1002,\n\t\t\"username\": \"Test2 Username\",\n\t})\n\trequire.Nil(t, err)\n\n\ttaskId := primitive.NewObjectID()\n\ttask := bson.M{\n\t\t\"_id\":       taskId,\n\t\t\"node_id\":   nodeId,\n\t\t\"spider_id\": spiderId,\n\t}\n\t_, err = mongo.GetMongoCol(\"task_stats\").Insert(bson.M{\n\t\t\"_id\":          taskId,\n\t\t\"result_count\": 100,\n\t})\n\trequire.Nil(t, err)\n\t_, err = mongo.GetMongoCol(\"artifacts\").Insert(bson.M{\n\t\t\"_id\": taskId,\n\t\t\"_sys\": bson.M{\n\t\t\t\"create_uid\": userId,\n\t\t\t\"update_uid\": userIdUpdate,\n\t\t},\n\t})\n\n\tp, _ := parser.NewGeneralParser()\n\ttemplate := `The task on node {{  $.node.name }} (enabled: {{$.node.enabled}}, max_runners: {{$.node.settings.max_runners}}) has completed.\nTask Result Count: {{ $.:task_stat.result_count }}\nSpider Result Count: {{ $.spider:stat.result_count }}\nYours, {{$.user.username}} ({{$.user.no}}) and {{$.user[update].username}} ({{$.user[update].no}})`\n\terr = p.Parse(template)\n\trequire.Nil(t, err)\n\n\tcontent, err := p.Render(task)\n\trequire.Nil(t, err)\n\trequire.Equal(t, `The task on node Test Node (enabled: true, max_runners: 8) has completed.\nTask Result Count: 100\nSpider Result Count: 5000\nYours, Test Username (1001) and Test2 Username (1002)`, content)\n}\n\nfunc TestGeneralParser_ParseMath(t *testing.T) {\n\tvar err error\n\tt.Cleanup(cleanup)\n\n\ttaskId := primitive.NewObjectID()\n\ttask := bson.M{\n\t\t\"_id\": taskId,\n\t}\n\t_, err = mongo.GetMongoCol(\"task_stats\").Insert(bson.M{\n\t\t\"_id\":              taskId,\n\t\t\"wait_duration\":    20000,\n\t\t\"runtime_duration\": 80000,\n\t\t\"total_duration\":   100000,\n\t\t\"result_count\":     500,\n\t})\n\trequire.Nil(t, err)\n\n\tp, _ := parser.NewGeneralParser()\n\ttemplate := `The task has completed.\nWait Duration: {# {{ $.:task_stat.wait_duration }} / 1000 #}\nRuntime Duration: {# {{$.:task_stat.runtime_duration}} / 1000 #}\nTotal Duration: {# ({{$.:task_stat.wait_duration}} + {{$.:task_stat.runtime_duration}}) / 1000 #}\nResult Count: {{$.:task_stat.result_count}}\nAvg Results per Sec: {# {{$.:task_stat.result_count}} / ({{$.:task_stat.total_duration}} / 1000) #}\n`\n\terr = p.Parse(template)\n\trequire.Nil(t, err)\n\n\tcontent, err := p.Render(task)\n\trequire.Nil(t, err)\n\trequire.Equal(t, `The task has completed.\nWait Duration: 20\nRuntime Duration: 80\nTotal Duration: 100\nResult Count: 500\nAvg Results per Sec: 5\n`, content)\n}\n\nfunc cleanup() {\n\t_ = mongo.GetMongoCol(\"nodes\").Delete(nil)\n\t_ = mongo.GetMongoCol(\"spiders\").Delete(nil)\n\t_ = mongo.GetMongoCol(\"spider_stats\").Delete(nil)\n\t_ = mongo.GetMongoCol(\"tasks\").Delete(nil)\n\t_ = mongo.GetMongoCol(\"task_stats\").Delete(nil)\n\t_ = mongo.GetMongoCol(\"users\").Delete(nil)\n}\n"
  },
  {
    "path": "template-parser/variable.go",
    "content": "package parser\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/db/mongo\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"regexp\"\n\t\"strings\"\n)\n\nvar userRegexp, _ = regexp.Compile(\"^user(?:\\\\[(\\\\w+)\\\\])?$\")\nvar extRegexp, _ = regexp.Compile(\"^(\\\\w+)?:(\\\\w+)\")\n\ntype Variable struct {\n\troot   interface{}\n\ttokens []string\n\tdoc    bson.M\n}\n\nfunc (v *Variable) GetValue() (value interface{}, err error) {\n\treturn v.getNodeByIndex(len(v.tokens) - 1)\n}\n\nfunc (v *Variable) getNodeByIndex(index int) (result interface{}, err error) {\n\tnode := v.doc\n\tfor i := 0; i < index && i < len(v.tokens); i++ {\n\t\tnextIndex := i + 1\n\t\tif nextIndex < len(v.tokens)-1 {\n\t\t\t// root or intermediate node\n\t\t} else {\n\t\t\t// value\n\t\t\treturn v.getNextValue(node, i), nil\n\t\t}\n\n\t\t// next node\n\t\tnode, err = v.getNextNode(node, i)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif node == nil {\n\t\t\treturn nil, nil\n\t\t}\n\t}\n\treturn node, nil\n}\n\nfunc (v *Variable) getNextNode(currentNode bson.M, currentIndex int) (nextNode bson.M, err error) {\n\t// next index and token\n\tnextIndex := currentIndex + 1\n\tnextToken := v.tokens[nextIndex]\n\n\t// attempt to get attribute in current node\n\tnextNodeRes, ok := currentNode[nextToken]\n\tif ok {\n\t\tnextNode, ok = nextNodeRes.(bson.M)\n\t\tif ok {\n\t\t\treturn nextNode, nil\n\t\t}\n\t}\n\n\t// if next token is user or user[<action>]\n\tif userRegexp.MatchString(nextToken) {\n\t\treturn v.getNextNodeUserAction(currentNode, nextIndex, nextToken)\n\t}\n\n\t// if next token is <model>:<ext>\n\tif extRegexp.MatchString(nextToken) {\n\t\treturn v.getNextNodeExt(currentNode, nextIndex, nextToken)\n\t}\n\n\t// model\n\tmodel := nextToken\n\n\t// next id\n\tnextId, err := v._getNodeModelId(currentNode, model, nextIndex)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// mongo collection name\n\tcolName := fmt.Sprintf(\"%ss\", model)\n\n\t// get next node from mongo collection\n\tif err := mongo.GetMongoCol(colName).FindId(nextId).One(&nextNode); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn nextNode, nil\n}\n\nfunc (v *Variable) getNextNodeUserAction(currentNode bson.M, nextIndex int, nextToken string) (nextNode bson.M, err error) {\n\t// action\n\tmatches := userRegexp.FindStringSubmatch(nextToken)\n\taction := \"create\"\n\tif len(matches) > 1 && matches[1] != \"\" {\n\t\taction = matches[1]\n\t}\n\n\t// id\n\tid, err := v._getCurrentNodeId(currentNode, nextIndex)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// artifact\n\tvar artifact bson.M\n\tif err := mongo.GetMongoCol(\"artifacts\").FindId(id).One(&artifact); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// artifact._sys\n\tsysRes, ok := artifact[\"_sys\"]\n\tif !ok {\n\t\treturn nil, errors.New(fmt.Sprintf(\"_sys not exists in artifact of %s\", strings.Join(v.tokens[:nextIndex], \".\")))\n\t}\n\tsys, ok := sysRes.(bson.M)\n\tif !ok {\n\t\treturn nil, errors.New(fmt.Sprintf(\"_sys is invalid in artifact of %s\", strings.Join(v.tokens[:nextIndex], \".\")))\n\t}\n\n\t// <action>_uid\n\tuidRes, _ := sys[action+\"_uid\"]\n\tuid, _ := uidRes.(primitive.ObjectID)\n\tif err := mongo.GetMongoCol(\"users\").FindId(uid).One(&nextNode); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn nextNode, nil\n}\n\nfunc (v *Variable) getNextNodeExt(currentNode bson.M, nextIndex int, nextToken string) (nextNode bson.M, err error) {\n\tmatches := extRegexp.FindStringSubmatch(nextToken)\n\tvar model, ext string\n\tvar mode int\n\tif matches[1] == \"\" {\n\t\t// :<model>_<ext>\n\t\tmode = 0\n\t\tarr := strings.Split(matches[2], \"_\")\n\t\tmodel = arr[0]\n\t\text = arr[1]\n\t} else {\n\t\t// <model>:<ext>\n\t\tmode = 1\n\t\tmodel = matches[1]\n\t\text = matches[2]\n\t}\n\n\t// id\n\tvar id primitive.ObjectID\n\tswitch mode {\n\tcase 0:\n\t\t// id = currentNode._id\n\t\tid, err = v._getCurrentNodeId(currentNode, nextIndex)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\tcase 1:\n\t\t// id = currentNode.<model>_id\n\t\tid, err = v._getNodeModelId(currentNode, model, nextIndex)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\tdefault:\n\t\treturn nil, errors.New(fmt.Sprintf(\"invalid mode: %d\", mode))\n\t}\n\n\t// ext\n\tcolName := fmt.Sprintf(\"%s_%ss\", model, ext)\n\tif err := mongo.GetMongoCol(colName).FindId(id).One(&nextNode); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn nextNode, nil\n}\n\nfunc (v *Variable) getNextValue(currentNode bson.M, currentIndex int) (nextValue interface{}) {\n\t// next index and token\n\tnextIndex := currentIndex + 1\n\tnextToken := v.tokens[nextIndex]\n\n\t// next value\n\tnextValue, _ = currentNode[nextToken]\n\n\treturn nextValue\n}\n\nfunc (v *Variable) _getCurrentNodeId(currentNode bson.M, nextIndex int) (id primitive.ObjectID, err error) {\n\tidRes, ok := currentNode[\"_id\"]\n\tif !ok {\n\t\treturn id, errors.New(fmt.Sprintf(\"%s is not available in %s\", \"_id\", strings.Join(v.tokens[:nextIndex], \".\")))\n\t}\n\tswitch idRes.(type) {\n\tcase string:\n\t\tidStr, ok := idRes.(string)\n\t\tif !ok {\n\t\t\treturn id, errors.New(fmt.Sprintf(\"%s is not ObjectId in %s\", \"_id\", strings.Join(v.tokens[:nextIndex], \".\")))\n\t\t}\n\t\tid, err = primitive.ObjectIDFromHex(idStr)\n\t\tif err != nil {\n\t\t\treturn id, errors.New(fmt.Sprintf(\"%s is not ObjectId in %s\", \"_id\", strings.Join(v.tokens[:nextIndex], \".\")))\n\t\t}\n\t\treturn id, nil\n\tcase primitive.ObjectID:\n\t\treturn idRes.(primitive.ObjectID), nil\n\tdefault:\n\t\treturn id, errors.New(fmt.Sprintf(\"%s is not ObjectId in %s\", \"_id\", strings.Join(v.tokens[:nextIndex], \".\")))\n\t}\n}\n\nfunc (v *Variable) _getNodeModelId(currentNode bson.M, model string, nextIndex int) (id primitive.ObjectID, err error) {\n\tnextIdKey := fmt.Sprintf(\"%s_id\", model)\n\tnextIdRes, ok := currentNode[nextIdKey]\n\tif !ok {\n\t\treturn id, errors.New(fmt.Sprintf(\"%s is not available in %s\", nextIdKey, strings.Join(v.tokens[:nextIndex], \".\")))\n\t}\n\tnextId, ok := nextIdRes.(primitive.ObjectID)\n\tif !ok {\n\t\tnextIdStr, ok := nextIdRes.(string)\n\t\tif !ok {\n\t\t\treturn id, errors.New(fmt.Sprintf(\"%s is not ObjectId in %s\", nextIdKey, strings.Join(v.tokens[:nextIndex], \".\")))\n\t\t}\n\t\tnextId, err = primitive.ObjectIDFromHex(nextIdStr)\n\t\tif err != nil {\n\t\t\treturn id, err\n\t\t}\n\t}\n\tif nextId.IsZero() {\n\t\treturn id, nil\n\t}\n\n\treturn nextId, nil\n}\n\nfunc NewVariable(root interface{}, placeholder string) (v *Variable, err error) {\n\t// validate\n\tif placeholder == \"\" {\n\t\treturn nil, errors.New(\"empty placeholder\")\n\t}\n\tif !strings.HasPrefix(placeholder, \"$\") {\n\t\treturn nil, errors.New(\"not start with $\")\n\t}\n\n\t// tokens\n\ttokens := strings.Split(placeholder, \".\")\n\n\t// document\n\tdata, err := json.Marshal(root)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar doc bson.M\n\tif err := json.Unmarshal(data, &doc); err != nil {\n\t\treturn nil, err\n\t}\n\n\tv = &Variable{\n\t\troot:   root,\n\t\ttokens: tokens,\n\t\tdoc:    doc,\n\t}\n\n\treturn v, nil\n}\n"
  },
  {
    "path": "trace/.gitignore",
    "content": "# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built with `go test -c`\n*.test\n\n# Output of the go coverage tool, specifically when used with LiteIDE\n*.out\n\n# Dependency directories (remove the comment below to include it)\n# vendor/\n\n.idea\n.DS_Store"
  },
  {
    "path": "trace/LICENSE",
    "content": "BSD 3-Clause License\n\nCopyright (c) 2021, Crawlab Team\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "trace/README.md",
    "content": "# go-trace\nTrace stack tools\n"
  },
  {
    "path": "trace/go.mod",
    "content": "module github.com/crawlab-team/crawlab/trace\n\ngo 1.22\n\nrequire github.com/ztrue/tracerr v0.4.0\n"
  },
  {
    "path": "trace/go.sum",
    "content": "github.com/ztrue/tracerr v0.4.0 h1:vT5PFxwIGs7rCg9ZgJ/y0NmOpJkPCPFK8x0vVIYzd04=\ngithub.com/ztrue/tracerr v0.4.0/go.mod h1:PaFfYlas0DfmXNpo7Eay4MFhZUONqvXM+T2HyGPpngk=\n"
  },
  {
    "path": "trace/trace.go",
    "content": "package trace\n\nimport \"github.com/ztrue/tracerr\"\n\nfunc PrintError(err error) {\n\terr = tracerr.Wrap(err)\n\tif err != nil {\n\t\ttracerr.Print(err)\n\t}\n}\n\nfunc TraceError(err error) error {\n\terr = tracerr.Wrap(err)\n\tif err != nil {\n\t\ttracerr.Print(err)\n\t}\n\treturn err\n}\n\nfunc Error(err error) error {\n\treturn tracerr.Wrap(err)\n}\n"
  },
  {
    "path": "vcs/.github/workflows/test.yml",
    "content": "name: Test\n\non: [ push, pull_request ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n      - name: Setup Go environment\n        uses: actions/setup-go@v2.1.3\n        with:\n          go-version: 1.18\n\n      - name: Configure Git\n        run: |\n          git config --global user.name \"Marvin Zhang\"\n          git config --global user.email \"tikazyq@163.com\"\n\n      - name: Write Credentials\n        run: |\n          echo '${{ secrets.CREDENTIAL_JSON }}' > $GITHUB_WORKSPACE/credentials.json\n          echo '${{ secrets.CREDENTIAL_JSON }}' > $GITHUB_WORKSPACE/test/credentials.json\n          ls -l $GITHUB_WORKSPACE/test\n          mkdir -p $GITHUB_WORKSPACE/.ssh\n          echo \"${{ secrets.SSH_KEY }}\" > $GITHUB_WORKSPACE/id_rsa\n          ls -la $GITHUB_WORKSPACE\n          echo \"GITHUB_WORKSPACE: $GITHUB_WORKSPACE\"\n\n      - name: Install\n        run: go mod tidy\n\n      - name: Run Tests\n        run: go test ./... -race\n"
  },
  {
    "path": "vcs/.gitignore",
    "content": "# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built with `go test -c`\n*.test\n\n# Output of the go coverage tool, specifically when used with LiteIDE\n*.out\n\n# Dependency directories (remove the comment below to include it)\n# vendor/\n.DS_Store\n.idea/\ntmp/\ntest/credentials.json\nid_rsa*\ncredentials.json\ncoverage.txt"
  },
  {
    "path": "vcs/LICENSE",
    "content": "BSD 3-Clause License\n\nCopyright (c) 2020, Crawlab Team\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vcs/README.md",
    "content": "# crawlab-vcs\nVersion Control System (VCS) for Crawlab\n"
  },
  {
    "path": "vcs/constants.go",
    "content": "package vcs\n\nconst (\n\tGitRemoteNameOrigin   = \"origin\"\n\tGitRemoteNameUpstream = \"upstream\"\n\tGitRemoteNameCrawlab  = \"crawlab\"\n)\nconst GitDefaultRemoteName = GitRemoteNameOrigin\n\nconst (\n\tGitBranchNameMaster  = \"master\"\n\tGitBranchNameMain    = \"main\"\n\tGitBranchNameRelease = \"release\"\n\tGitBranchNameTest    = \"test\"\n\tGitBranchNameDevelop = \"develop\"\n)\nconst GitDefaultBranchName = GitBranchNameMaster\n\ntype GitAuthType int\n\nconst (\n\tGitAuthTypeNone GitAuthType = iota\n\tGitAuthTypeHTTP\n\tGitAuthTypeSSH\n)\n\ntype GitInitType int\n\nconst (\n\tGitInitTypeFs GitInitType = iota\n\tGitInitTypeMem\n)\n\nconst (\n\tGitRefTypeBranch = \"branch\"\n\tGitRefTypeTag    = \"tag\"\n)\n"
  },
  {
    "path": "vcs/entity.go",
    "content": "package vcs\n\nimport (\n\t\"time\"\n)\n\ntype GitOptions struct {\n\tcheckout []GitCheckoutOption\n}\n\ntype GitRef struct {\n\tType        string    `json:\"type\"`\n\tName        string    `json:\"name\"`\n\tFullName    string    `json:\"full_name\"`\n\tHash        string    `json:\"hash\"`\n\tTimestamp   time.Time `json:\"timestamp\"`\n\tRemoteTrack string    `json:\"remote_track\"`\n}\n\ntype GitLog struct {\n\tHash        string    `json:\"hash\"`\n\tMsg         string    `json:\"msg\"`\n\tAuthorName  string    `json:\"author_name\"`\n\tAuthorEmail string    `json:\"author_email\"`\n\tTimestamp   time.Time `json:\"timestamp\"`\n\tRefs        []GitRef  `json:\"refs\"`\n}\n\ntype GitFileStatus struct {\n\tPath     string          `json:\"path\"`\n\tName     string          `json:\"name\"`\n\tIsDir    bool            `json:\"is_dir\"`\n\tStaging  string          `json:\"staging\"`\n\tWorktree string          `json:\"worktree\"`\n\tExtra    string          `json:\"extra\"`\n\tChildren []GitFileStatus `json:\"children\"`\n}\n"
  },
  {
    "path": "vcs/errors.go",
    "content": "package vcs\n\nimport \"errors\"\n\nvar (\n\tErrInvalidArgsLength               = errors.New(\"invalid arguments length\")\n\tErrUnsupportedType                 = errors.New(\"unsupported type\")\n\tErrInvalidAuthType                 = errors.New(\"invalid auth type\")\n\tErrInvalidOptions                  = errors.New(\"invalid options\")\n\tErrRepoAlreadyExists               = errors.New(\"repo already exists\")\n\tErrInvalidRepoPath                 = errors.New(\"invalid repo path\")\n\tErrUnableToGetCurrentBranch        = errors.New(\"unable to get current branch\")\n\tErrUnableToCloneWithEmptyRemoteUrl = errors.New(\"unable to clone with empty remote url\")\n\tErrInvalidHeadRef                  = errors.New(\"invalid head ref\")\n\tErrNoMatchedRemoteBranch           = errors.New(\"no matched remote branch\")\n)\n"
  },
  {
    "path": "vcs/git.go",
    "content": "package vcs\n\nimport (\n\t\"errors\"\n\t\"github.com/apex/log\"\n\t\"github.com/crawlab-team/crawlab/trace\"\n\t\"github.com/go-git/go-billy/v5\"\n\t\"github.com/go-git/go-billy/v5/memfs\"\n\t\"github.com/go-git/go-git/v5\"\n\t\"github.com/go-git/go-git/v5/config\"\n\t\"github.com/go-git/go-git/v5/plumbing\"\n\t\"github.com/go-git/go-git/v5/plumbing/object\"\n\t\"github.com/go-git/go-git/v5/plumbing/transport\"\n\t\"github.com/go-git/go-git/v5/plumbing/transport/http\"\n\tgitssh \"github.com/go-git/go-git/v5/plumbing/transport/ssh\"\n\t\"github.com/go-git/go-git/v5/storage/memory\"\n\t\"golang.org/x/crypto/ssh\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n)\n\nvar headRefRegexp, _ = regexp.Compile(\"^ref: (.*)\")\n\ntype GitClient struct {\n\t// settings\n\tpath           string\n\tremoteUrl      string\n\tisMem          bool\n\tauthType       GitAuthType\n\tusername       string\n\tpassword       string\n\tprivateKey     string\n\tprivateKeyPath string\n\tdefaultBranch  string\n\tdefaultInit    bool\n\n\t// internals\n\tr *git.Repository\n}\n\nfunc (c *GitClient) Init() (err error) {\n\tinitType := c.getInitType()\n\tswitch initType {\n\tcase GitInitTypeFs:\n\t\terr = c.initFs()\n\tcase GitInitTypeMem:\n\t\terr = c.initMem()\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc (c *GitClient) Dispose() (err error) {\n\tswitch c.getInitType() {\n\tcase GitInitTypeFs:\n\t\tif err := os.RemoveAll(c.path); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\tcase GitInitTypeMem:\n\t\tGitMemStorages.Delete(c.path)\n\t\tGitMemFileSystem.Delete(c.path)\n\t}\n\treturn nil\n}\n\nfunc (c *GitClient) Clone() (err error) {\n\t// validate\n\tif c.remoteUrl == \"\" {\n\t\treturn ErrUnableToCloneWithEmptyRemoteUrl\n\t}\n\n\t// auth\n\tauth, err := c.getGitAuth()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// options\n\to := &git.CloneOptions{\n\t\tURL:  c.remoteUrl,\n\t\tAuth: auth,\n\t}\n\n\t// clone\n\t_, err = git.PlainClone(c.path, false, o)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) Checkout(opts ...GitCheckoutOption) (err error) {\n\t// worktree\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// apply options\n\to := &git.CheckoutOptions{}\n\tfor _, opt := range opts {\n\t\topt(o)\n\t}\n\n\t// checkout to the branch\n\tif err := wt.Checkout(o); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) Commit(msg string, opts ...GitCommitOption) (err error) {\n\t// worktree\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// apply options\n\to := &git.CommitOptions{}\n\tfor _, opt := range opts {\n\t\topt(o)\n\t}\n\n\t// commit\n\tif _, err := wt.Commit(msg, o); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) Pull(opts ...GitPullOption) (err error) {\n\t// worktree\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// auth\n\tauth, err := c.getGitAuth()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif auth != nil {\n\t\topts = append(opts, WithAuthPull(auth))\n\t}\n\n\t// apply options\n\to := &git.PullOptions{}\n\tfor _, opt := range opts {\n\t\topt(o)\n\t}\n\n\t// pull\n\tif err := wt.Pull(o); err != nil {\n\t\tif errors.Is(err, transport.ErrEmptyRemoteRepository) {\n\t\t\treturn nil\n\t\t}\n\t\tif errors.Is(err, transport.ErrEmptyUploadPackRequest) {\n\t\t\treturn nil\n\t\t}\n\t\tif errors.Is(err, git.NoErrAlreadyUpToDate) {\n\t\t\treturn nil\n\t\t}\n\t\tif errors.Is(err, git.ErrNonFastForwardUpdate) {\n\t\t\treturn nil\n\t\t}\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) Push(opts ...GitPushOption) (err error) {\n\t// auth\n\tauth, err := c.getGitAuth()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif auth != nil {\n\t\topts = append(opts, WithAuthPush(auth))\n\t}\n\n\t// apply options\n\to := &git.PushOptions{}\n\tfor _, opt := range opts {\n\t\topt(o)\n\t}\n\n\t// push\n\tif err := c.r.Push(o); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) Reset(opts ...GitResetOption) (err error) {\n\t// apply options\n\to := &git.ResetOptions{\n\t\tMode: git.HardReset,\n\t}\n\tfor _, opt := range opts {\n\t\topt(o)\n\t}\n\n\t// worktree\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// reset\n\tif err := wt.Reset(o); err != nil {\n\t\treturn err\n\t}\n\n\t// clean\n\tif err := wt.Clean(&git.CleanOptions{Dir: true}); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) CreateBranch(branch, remote string, ref *plumbing.Reference) (err error) {\n\treturn c.createBranch(branch, remote, ref)\n}\n\nfunc (c *GitClient) CheckoutBranchFromRef(branch string, ref *plumbing.Reference, opts ...GitCheckoutOption) (err error) {\n\treturn c.CheckoutBranchWithRemote(branch, \"\", ref, opts...)\n}\n\nfunc (c *GitClient) CheckoutBranchWithRemoteFromRef(branch, remote string, ref *plumbing.Reference, opts ...GitCheckoutOption) (err error) {\n\treturn c.CheckoutBranchWithRemote(branch, remote, ref, opts...)\n}\n\nfunc (c *GitClient) CheckoutBranch(branch string, opts ...GitCheckoutOption) (err error) {\n\treturn c.CheckoutBranchWithRemote(branch, \"\", nil, opts...)\n}\n\nfunc (c *GitClient) CheckoutBranchWithRemote(branch, remote string, ref *plumbing.Reference, opts ...GitCheckoutOption) (err error) {\n\tif remote == \"\" {\n\t\tremote = GitRemoteNameOrigin\n\t}\n\n\t// remote\n\tif _, err := c.r.Remote(remote); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// check if the branch exists\n\t_, err = c.r.Branch(branch)\n\tif err != nil {\n\t\tif errors.Is(err, git.ErrBranchNotFound) {\n\t\t\t// create a new branch if it does not exist\n\t\t\tif err := c.createBranch(branch, remote, ref); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t_, err = c.r.Branch(branch)\n\t\t\tif err != nil {\n\t\t\t\treturn trace.TraceError(err)\n\t\t\t}\n\t\t} else {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\t// add to options\n\topts = append(opts, WithBranch(branch))\n\n\treturn c.Checkout(opts...)\n}\n\nfunc (c *GitClient) CheckoutHash(hash string, opts ...GitCheckoutOption) (err error) {\n\t// add to options\n\topts = append(opts, WithHash(hash))\n\n\treturn c.Checkout(opts...)\n}\n\nfunc (c *GitClient) MoveBranch(from, to string) (err error) {\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := wt.Checkout(&git.CheckoutOptions{\n\t\tCreate: true,\n\t\tBranch: plumbing.NewBranchReferenceName(to),\n\t}); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tfromRef, err := c.r.Reference(plumbing.NewBranchReferenceName(from), false)\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\tif err := c.r.Storer.RemoveReference(fromRef.Name()); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn nil\n}\n\nfunc (c *GitClient) CommitAll(msg string, opts ...GitCommitOption) (err error) {\n\t// worktree\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\t// add all files\n\tif _, err := wt.Add(\".\"); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn c.Commit(msg, opts...)\n}\n\nfunc (c *GitClient) GetLogs() (logs []GitLog, err error) {\n\titer, err := c.r.Log(&git.LogOptions{\n\t\tAll: true,\n\t})\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\tif err := iter.ForEach(func(commit *object.Commit) error {\n\t\tgitLog := GitLog{\n\t\t\tHash:        commit.Hash.String(),\n\t\t\tMsg:         commit.Message,\n\t\t\tAuthorName:  commit.Author.Name,\n\t\t\tAuthorEmail: commit.Author.Email,\n\t\t\tTimestamp:   commit.Author.When,\n\t\t}\n\t\tlogs = append(logs, gitLog)\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\treturn\n}\n\nfunc (c *GitClient) GetLogsWithRefs() (logs []GitLog, err error) {\n\t// logs without tags\n\tlogs, err = c.GetLogs()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// branches\n\tbranches, err := c.GetBranches()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// tags\n\ttags, err := c.GetTags()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// refs\n\trefs := append(branches, tags...)\n\n\t// refs map\n\trefsMap := map[string][]GitRef{}\n\tfor _, ref := range refs {\n\t\t_, ok := refsMap[ref.Hash]\n\t\tif !ok {\n\t\t\trefsMap[ref.Hash] = []GitRef{}\n\t\t}\n\t\trefsMap[ref.Hash] = append(refsMap[ref.Hash], ref)\n\t}\n\n\t// iterate logs\n\tfor i, l := range logs {\n\t\trefs, ok := refsMap[l.Hash]\n\t\tif ok {\n\t\t\tlogs[i].Refs = refs\n\t\t}\n\t}\n\n\treturn logs, nil\n}\n\nfunc (c *GitClient) GetRepository() (r *git.Repository) {\n\treturn c.r\n}\n\nfunc (c *GitClient) GetPath() (path string) {\n\treturn c.path\n}\n\nfunc (c *GitClient) SetPath(path string) {\n\tc.path = path\n}\n\nfunc (c *GitClient) GetRemoteUrl() (path string) {\n\treturn c.remoteUrl\n}\n\nfunc (c *GitClient) SetRemoteUrl(url string) {\n\tc.remoteUrl = url\n}\n\nfunc (c *GitClient) GetIsMem() (isMem bool) {\n\treturn c.isMem\n}\n\nfunc (c *GitClient) SetIsMem(isMem bool) {\n\tc.isMem = isMem\n}\n\nfunc (c *GitClient) GetAuthType() (authType GitAuthType) {\n\treturn c.authType\n}\n\nfunc (c *GitClient) SetAuthType(authType GitAuthType) {\n\tc.authType = authType\n}\n\nfunc (c *GitClient) GetUsername() (username string) {\n\treturn c.username\n}\n\nfunc (c *GitClient) SetUsername(username string) {\n\tc.username = username\n}\n\nfunc (c *GitClient) GetPassword() (password string) {\n\treturn c.password\n}\n\nfunc (c *GitClient) SetPassword(password string) {\n\tc.password = password\n}\n\nfunc (c *GitClient) GetPrivateKey() (key string) {\n\treturn c.privateKey\n}\n\nfunc (c *GitClient) SetPrivateKey(key string) {\n\tc.privateKey = key\n}\n\nfunc (c *GitClient) GetPrivateKeyPath() (path string) {\n\treturn c.privateKeyPath\n}\n\nfunc (c *GitClient) SetPrivateKeyPath(path string) {\n\tc.privateKeyPath = path\n}\n\nfunc (c *GitClient) GetCurrentBranch() (branch string, err error) {\n\t// attempt to get branch from .git/HEAD\n\theadRefStr, err := c.getHeadRef()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// if .git/HEAD points to refs/heads/master, return branch as master\n\tif headRefStr == plumbing.Master.String() {\n\t\treturn GitBranchNameMaster, nil\n\t}\n\n\t// attempt to get head ref\n\theadRef, err := c.r.Head()\n\tif err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\tif !headRef.Name().IsBranch() {\n\t\treturn \"\", trace.TraceError(ErrUnableToGetCurrentBranch)\n\t}\n\n\treturn headRef.Name().Short(), nil\n}\n\nfunc (c *GitClient) GetCurrentBranchRef() (ref *GitRef, err error) {\n\tcurrentBranch, err := c.GetCurrentBranch()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbranches, err := c.GetBranches()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, branch := range branches {\n\t\tif branch.Name == currentBranch {\n\t\t\treturn &branch, nil\n\t\t}\n\t}\n\treturn nil, trace.TraceError(ErrUnableToGetCurrentBranch)\n}\n\nfunc (c *GitClient) GetBranches() (branches []GitRef, err error) {\n\titer, err := c.r.Branches()\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t_ = iter.ForEach(func(r *plumbing.Reference) error {\n\t\tbranches = append(branches, GitRef{\n\t\t\tType: GitRefTypeBranch,\n\t\t\tName: r.Name().Short(),\n\t\t\tHash: r.Hash().String(),\n\t\t})\n\t\treturn nil\n\t})\n\n\treturn branches, nil\n}\n\nfunc (c *GitClient) GetRemoteRefs(remoteName string) (gitRefs []GitRef, err error) {\n\tif remoteName == \"\" {\n\t\tremoteName = GitRemoteNameOrigin\n\t}\n\n\t// remote\n\tr, err := c.r.Remote(remoteName)\n\tif err != nil {\n\t\tif errors.Is(err, git.ErrRemoteNotFound) {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// auth\n\tauth, err := c.getGitAuth()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// refs\n\trefs, err := r.List(&git.ListOptions{Auth: auth})\n\tif err != nil {\n\t\tif !errors.Is(err, transport.ErrEmptyRemoteRepository) {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t\treturn nil, nil\n\t}\n\n\t// iterate refs\n\tfor _, ref := range refs {\n\t\t// ref type\n\t\tvar refType string\n\t\tvar gitRef *GitRef\n\t\tif strings.HasPrefix(ref.Name().String(), \"refs/heads\") {\n\t\t\trefType = GitRefTypeBranch\n\t\t\tgitRef = &GitRef{\n\t\t\t\tType:     refType,\n\t\t\t\tName:     remoteName + \"/\" + ref.Name().Short(),\n\t\t\t\tFullName: ref.Name().String(),\n\t\t\t\tHash:     ref.Hash().String(),\n\t\t\t}\n\t\t} else if strings.HasPrefix(ref.Name().String(), \"refs/tags\") {\n\t\t\trefType = GitRefTypeTag\n\t\t\tgitRef = &GitRef{\n\t\t\t\tType:     refType,\n\t\t\t\tName:     ref.Name().Short(),\n\t\t\t\tFullName: ref.Name().String(),\n\t\t\t\tHash:     ref.Hash().String(),\n\t\t\t}\n\t\t} else {\n\t\t\tcontinue\n\t\t}\n\t\tgitRefs = append(gitRefs, *gitRef)\n\t}\n\n\t// logs without tags\n\tlogs, err := c.GetLogs()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// logs map\n\tlogsMap := map[string]GitLog{}\n\tfor _, l := range logs {\n\t\tlogsMap[l.Hash] = l\n\t}\n\n\t// iterate git refs\n\tfor i, gitRef := range gitRefs {\n\t\tl, ok := logsMap[gitRef.Hash]\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\tgitRefs[i].Timestamp = l.Timestamp\n\t}\n\n\t// sort git refs\n\tsort.Slice(gitRefs, func(i, j int) bool {\n\t\treturn gitRefs[i].Timestamp.Unix() > gitRefs[j].Timestamp.Unix()\n\t})\n\n\treturn gitRefs, nil\n}\n\nfunc (c *GitClient) GetTags() (tags []GitRef, err error) {\n\titer, err := c.r.Tags()\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t_ = iter.ForEach(func(r *plumbing.Reference) error {\n\t\ttags = append(tags, GitRef{\n\t\t\tType: GitRefTypeTag,\n\t\t\tName: r.Name().Short(),\n\t\t\tHash: r.Hash().String(),\n\t\t})\n\t\treturn nil\n\t})\n\n\treturn tags, nil\n}\n\nfunc (c *GitClient) GetStatus() (statusList []GitFileStatus, err error) {\n\t// worktree\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn nil, trace.TraceError(err)\n\t}\n\n\t// status\n\tstatus, err := wt.Status()\n\tif err != nil {\n\t\tlog.Warnf(\"failed to get worktree status: %v\", err)\n\t}\n\n\t// file status list\n\tvar list []GitFileStatus\n\tfor filePath, fileStatus := range status {\n\t\t// file name\n\t\tfileName := path.Base(filePath)\n\n\t\t// file status\n\t\ts := GitFileStatus{\n\t\t\tPath:     filePath,\n\t\t\tName:     fileName,\n\t\t\tIsDir:    false,\n\t\t\tStaging:  c.getStatusString(fileStatus.Staging),\n\t\t\tWorktree: c.getStatusString(fileStatus.Worktree),\n\t\t\tExtra:    fileStatus.Extra,\n\t\t}\n\n\t\t// add to list\n\t\tlist = append(list, s)\n\t}\n\n\t// sort list ascending\n\tsort.Slice(list, func(i, j int) bool {\n\t\treturn list[i].Path < list[j].Path\n\t})\n\n\treturn list, nil\n}\n\nfunc (c *GitClient) Add(filePath string) (err error) {\n\t// worktree\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\tif _, err := wt.Add(filePath); err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) GetRemote(name string) (r *git.Remote, err error) {\n\treturn c.r.Remote(name)\n}\n\nfunc (c *GitClient) CreateRemote(cfg *config.RemoteConfig) (r *git.Remote, err error) {\n\treturn c.r.CreateRemote(cfg)\n}\n\nfunc (c *GitClient) DeleteRemote(name string) (err error) {\n\treturn c.r.DeleteRemote(name)\n}\n\nfunc (c *GitClient) IsRemoteChanged() (ok bool, err error) {\n\treturn c.isRemoteChanged()\n}\n\nfunc (c *GitClient) initMem() (err error) {\n\t// validate options\n\tif !c.isMem || c.path == \"\" {\n\t\treturn trace.TraceError(ErrInvalidOptions)\n\t}\n\n\t// get storage and worktree\n\tstorage, wt := c.getMemStorageAndMemFs(c.path)\n\n\t// attempt to init\n\tc.r, err = git.Init(storage, wt)\n\tif err != nil {\n\t\tif errors.Is(err, git.ErrRepositoryAlreadyExists) {\n\t\t\t// if already exists, attempt to open\n\t\t\tc.r, err = git.Open(storage, wt)\n\t\t\tif err != nil {\n\t\t\t\treturn trace.TraceError(err)\n\t\t\t}\n\t\t} else {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) initFs() (err error) {\n\t// validate options\n\tif c.path == \"\" {\n\t\treturn trace.TraceError(ErrInvalidOptions)\n\t}\n\n\t// create directory if not exists\n\t_, err = os.Stat(c.path)\n\tif err != nil {\n\t\tif err := os.MkdirAll(c.path, os.ModePerm); err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t\terr = nil\n\t}\n\n\t// try to open repo\n\tc.r, err = git.PlainOpen(c.path)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) getInitType() (res GitInitType) {\n\tif c.isMem {\n\t\treturn GitInitTypeMem\n\t} else {\n\t\treturn GitInitTypeFs\n\t}\n}\n\nfunc (c *GitClient) createRemote(remoteName string, url string) (err error) {\n\t_, err = c.r.CreateRemote(&config.RemoteConfig{\n\t\tName: remoteName,\n\t\tURLs: []string{url},\n\t})\n\tif err != nil {\n\t\treturn trace.TraceError(err)\n\t}\n\treturn\n}\n\nfunc (c *GitClient) getMemStorageAndMemFs(key string) (storage *memory.Storage, fs billy.Filesystem) {\n\t// storage\n\tstorageItem, ok := GitMemStorages.Load(key)\n\tif !ok {\n\t\tstorage = memory.NewStorage()\n\t\tGitMemStorages.Store(key, storage)\n\t} else {\n\t\tswitch storageItem.(type) {\n\t\tcase *memory.Storage:\n\t\t\tstorage = storageItem.(*memory.Storage)\n\t\tdefault:\n\t\t\tstorage = memory.NewStorage()\n\t\t\tGitMemStorages.Store(key, storage)\n\t\t}\n\t}\n\n\t// file system\n\tfsItem, ok := GitMemFileSystem.Load(key)\n\tif !ok {\n\t\tfs = memfs.New()\n\t\tGitMemFileSystem.Store(key, fs)\n\t} else {\n\t\tswitch fsItem.(type) {\n\t\tcase billy.Filesystem:\n\t\t\tfs = fsItem.(billy.Filesystem)\n\t\tdefault:\n\t\t\tfs = memfs.New()\n\t\t\tGitMemFileSystem.Store(key, fs)\n\t\t}\n\t}\n\n\treturn storage, fs\n}\n\nfunc (c *GitClient) getGitAuth() (auth transport.AuthMethod, err error) {\n\tswitch c.authType {\n\tcase GitAuthTypeNone:\n\t\treturn nil, nil\n\tcase GitAuthTypeHTTP:\n\t\tif c.username == \"\" && c.password == \"\" {\n\t\t\treturn nil, nil\n\t\t}\n\t\tauth = &http.BasicAuth{\n\t\t\tUsername: c.username,\n\t\t\tPassword: c.password,\n\t\t}\n\t\treturn auth, nil\n\tcase GitAuthTypeSSH:\n\t\tvar privateKeyData []byte\n\t\tif c.privateKey != \"\" {\n\t\t\t// private key content\n\t\t\tprivateKeyData = []byte(c.privateKey)\n\t\t} else if c.privateKeyPath != \"\" {\n\t\t\t// read from private key file\n\t\t\tprivateKeyData, err = os.ReadFile(c.privateKeyPath)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, trace.TraceError(err)\n\t\t\t}\n\t\t} else {\n\t\t\t// no private key\n\t\t\treturn nil, nil\n\t\t}\n\t\tsigner, err := ssh.ParsePrivateKey(privateKeyData)\n\t\tif err != nil {\n\t\t\treturn nil, trace.TraceError(err)\n\t\t}\n\t\tauth = &gitssh.PublicKeys{\n\t\t\tUser:   c.username,\n\t\t\tSigner: signer,\n\t\t\tHostKeyCallbackHelper: gitssh.HostKeyCallbackHelper{\n\t\t\t\tHostKeyCallback: ssh.InsecureIgnoreHostKey(),\n\t\t\t},\n\t\t}\n\t\treturn auth, nil\n\tdefault:\n\t\treturn nil, trace.TraceError(ErrInvalidAuthType)\n\t}\n}\n\nfunc (c *GitClient) getHeadRef() (ref string, err error) {\n\twt, err := c.r.Worktree()\n\tif err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\tfh, err := wt.Filesystem.Open(path.Join(\".git\", \"HEAD\"))\n\tif err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\tdata, err := io.ReadAll(fh)\n\tif err != nil {\n\t\treturn \"\", trace.TraceError(err)\n\t}\n\tm := headRefRegexp.FindStringSubmatch(string(data))\n\tif len(m) < 2 {\n\t\treturn \"\", trace.TraceError(ErrInvalidHeadRef)\n\t}\n\treturn m[1], nil\n}\n\nfunc (c *GitClient) getStatusString(statusCode git.StatusCode) (code string) {\n\treturn string(statusCode)\n\t//switch statusCode {\n\t//}\n\t//Unmodified         StatusCode = ' '\n\t//Untracked          StatusCode = '?'\n\t//Modified           StatusCode = 'M'\n\t//Added              StatusCode = 'A'\n\t//Deleted            StatusCode = 'D'\n\t//Renamed            StatusCode = 'R'\n\t//Copied             StatusCode = 'C'\n\t//UpdatedButUnmerged StatusCode = 'U'\n}\n\nfunc (c *GitClient) getDirPaths(filePath string) (paths []string) {\n\tpathItems := strings.Split(filePath, \"/\")\n\n\tvar items []string\n\tfor i, pathItem := range pathItems {\n\t\tif i == len(pathItems)-1 {\n\t\t\tcontinue\n\t\t}\n\t\titems = append(items, pathItem)\n\t\tdirPath := strings.Join(items, \"/\")\n\t\tpaths = append(paths, dirPath)\n\t}\n\n\treturn paths\n}\n\nfunc (c *GitClient) createBranch(branch, remote string, ref *plumbing.Reference) (err error) {\n\t// create a new branch if it does not exist\n\tcfg := config.Branch{\n\t\tName:   branch,\n\t\tRemote: remote,\n\t}\n\tif err := c.r.CreateBranch(&cfg); err != nil {\n\t\treturn err\n\t}\n\t// if ref is nil\n\tif ref == nil {\n\t\t// try to set to remote ref of branch first\n\t\tref, err = c.getBranchHashRef(branch, remote)\n\n\t\t// if no matched remote branch, set to HEAD\n\t\tif errors.Is(err, ErrNoMatchedRemoteBranch) {\n\t\t\tref, err = c.r.Head()\n\t\t\tif err != nil {\n\t\t\t\treturn trace.TraceError(err)\n\t\t\t}\n\t\t}\n\n\t\t// error\n\t\tif err != nil {\n\t\t\treturn trace.TraceError(err)\n\t\t}\n\t}\n\n\t// branch reference name\n\tbranchRefName := plumbing.NewBranchReferenceName(branch)\n\n\t// branch reference\n\tbranchRef := plumbing.NewHashReference(branchRefName, ref.Hash())\n\n\t// set HEAD to branch reference\n\tif err := c.r.Storer.SetReference(branchRef); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (c *GitClient) getBranchHashRef(branch, remote string) (hashRef *plumbing.Reference, err error) {\n\trefs, err := c.GetRemoteRefs(remote)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar branchRef *GitRef\n\tfor _, r := range refs {\n\t\tif r.Name == branch {\n\t\t\tbranchRef = &r\n\t\t\tbreak\n\t\t}\n\t}\n\tif branchRef == nil {\n\t\treturn nil, ErrNoMatchedRemoteBranch\n\t}\n\tbranchHashRef := plumbing.NewHashReference(plumbing.NewBranchReferenceName(branch), plumbing.NewHash(branchRef.Hash))\n\treturn branchHashRef, nil\n}\n\nfunc (c *GitClient) isRemoteChanged() (ok bool, err error) {\n\tb, err := c.GetCurrentBranchRef()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\trefs, err := c.GetRemoteRefs(GitRemoteNameOrigin)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\tfor _, r := range refs {\n\t\tif r.Name == b.Name {\n\t\t\treturn r.Hash != b.Hash, nil\n\t\t}\n\t}\n\treturn false, nil\n}\n\nfunc NewGitClient(opts ...GitOption) (c *GitClient, err error) {\n\t// client\n\tc = &GitClient{\n\t\tisMem:          false,\n\t\tauthType:       GitAuthTypeNone,\n\t\tusername:       \"git\",\n\t\tprivateKeyPath: getDefaultPublicKeyPath(),\n\t\tdefaultInit:    true,\n\t}\n\n\t// apply options\n\tfor _, opt := range opts {\n\t\topt(c)\n\t}\n\n\t// initialize\n\tif c.defaultInit {\n\t\tif err = c.Init(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn\n}\n"
  },
  {
    "path": "vcs/git_options.go",
    "content": "package vcs\n\nimport (\n\t\"github.com/go-git/go-git/v5\"\n\t\"github.com/go-git/go-git/v5/plumbing\"\n\t\"github.com/go-git/go-git/v5/plumbing/transport\"\n\t\"strings\"\n)\n\ntype GitOption func(c *GitClient)\n\nfunc WithPath(path string) GitOption {\n\treturn func(c *GitClient) {\n\t\tc.path = path\n\t}\n}\n\nfunc WithRemoteUrl(url string) GitOption {\n\treturn func(c *GitClient) {\n\t\tc.remoteUrl = url\n\t}\n}\n\nfunc WithIsMem() GitOption {\n\treturn func(c *GitClient) {\n\t\tc.isMem = true\n\t}\n}\n\nfunc WithAuthType(authType GitAuthType) GitOption {\n\treturn func(c *GitClient) {\n\t\tc.authType = authType\n\t}\n}\n\nfunc WithUsername(username string) GitOption {\n\treturn func(c *GitClient) {\n\t\tc.username = username\n\t}\n}\n\nfunc WithPassword(password string) GitOption {\n\treturn func(c *GitClient) {\n\t\tc.password = password\n\t}\n}\n\nfunc WithPrivateKey(key string) GitOption {\n\treturn func(c *GitClient) {\n\t\tc.privateKey = key\n\t}\n}\n\nfunc WithDefaultInit(init bool) GitOption {\n\treturn func(c *GitClient) {\n\t\tc.defaultInit = init\n\t}\n}\n\nfunc WithPrivateKeyPath(path string) GitOption {\n\treturn func(c *GitClient) {\n\t\tc.privateKeyPath = path\n\t}\n}\n\ntype GitCloneOption func(o *git.CloneOptions)\n\nfunc WithURL(url string) GitCloneOption {\n\treturn func(o *git.CloneOptions) {\n\t\to.URL = url\n\t}\n}\n\ntype GitCheckoutOption func(o *git.CheckoutOptions)\n\nfunc WithBranch(branch string) GitCheckoutOption {\n\treturn func(o *git.CheckoutOptions) {\n\t\tif strings.HasPrefix(branch, \"refs/heads\") {\n\t\t\to.Branch = plumbing.ReferenceName(branch)\n\t\t} else {\n\t\t\to.Branch = plumbing.NewBranchReferenceName(branch)\n\t\t}\n\t}\n}\n\nfunc WithHash(hash string) GitCheckoutOption {\n\treturn func(o *git.CheckoutOptions) {\n\t\th := plumbing.NewHash(hash)\n\t\tif h.IsZero() {\n\t\t\treturn\n\t\t}\n\t\to.Hash = h\n\t}\n}\n\ntype GitCommitOption func(o *git.CommitOptions)\n\ntype GitPullOption func(o *git.PullOptions)\n\nfunc WithRemoteNamePull(name string) GitPullOption {\n\treturn func(o *git.PullOptions) {\n\t\to.RemoteName = name\n\t}\n}\n\nfunc WithBranchNamePull(branch string) GitPullOption {\n\treturn func(o *git.PullOptions) {\n\t\to.ReferenceName = plumbing.NewBranchReferenceName(branch)\n\t}\n}\n\nfunc WithAuthPull(auth transport.AuthMethod) GitPullOption {\n\treturn func(o *git.PullOptions) {\n\t\tif auth != nil {\n\t\t\to.Auth = auth\n\t\t}\n\t}\n}\n\ntype GitPushOption func(o *git.PushOptions)\n\nfunc WithAuthPush(auth transport.AuthMethod) GitPushOption {\n\treturn func(o *git.PushOptions) {\n\t\to.Auth = auth\n\t}\n}\n\ntype GitResetOption func(o *git.ResetOptions)\n\nfunc WithMode(mode git.ResetMode) GitResetOption {\n\treturn func(o *git.ResetOptions) {\n\t\to.Mode = mode\n\t}\n}\n"
  },
  {
    "path": "vcs/git_store.go",
    "content": "package vcs\n\nimport \"sync\"\n\nvar GitMemStorages = sync.Map{}\nvar GitMemFileSystem = sync.Map{}\n"
  },
  {
    "path": "vcs/git_utils.go",
    "content": "package vcs\n\nimport (\n\t\"github.com/go-git/go-git/v5\"\n\t\"os\"\n\t\"path\"\n)\n\nfunc CreateBareGitRepo(path string) (err error) {\n\t// validate options\n\tif path == \"\" {\n\t\treturn ErrInvalidRepoPath\n\t}\n\n\t// validate if exists\n\tif IsGitRepoExists(path) {\n\t\treturn ErrRepoAlreadyExists\n\t}\n\n\t// create directory if not exists\n\t_, err = os.Stat(path)\n\tif err != nil {\n\t\tif err := os.MkdirAll(path, os.FileMode(0766)); err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = nil\n\t}\n\n\t// init\n\tif _, err := git.PlainInit(path, true); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc CloneGitRepo(path, url string, opts ...GitCloneOption) (c *GitClient, err error) {\n\t// url\n\topts = append(opts, WithURL(url))\n\n\t// apply options\n\to := &git.CloneOptions{}\n\tfor _, opt := range opts {\n\t\topt(o)\n\t}\n\n\t// clone\n\tif _, err := git.PlainClone(path, false, o); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn NewGitClient(WithPath(path))\n}\n\nfunc IsGitRepoExists(repoPath string) (ok bool) {\n\tdotGitPath := path.Join(repoPath, git.GitDirName)\n\tif _, err := os.Stat(dotGitPath); err == nil {\n\t\treturn true\n\t}\n\n\theadPath := path.Join(repoPath, \"HEAD\")\n\tif _, err := os.Stat(headPath); err == nil {\n\t\treturn true\n\t}\n\n\treturn false\n}\n"
  },
  {
    "path": "vcs/go.mod",
    "content": "module github.com/crawlab-team/crawlab/vcs\n\ngo 1.22\n\nrequire (\n\tgithub.com/apex/log v1.9.0\n\tgithub.com/go-git/go-billy/v5 v5.5.0\n\tgithub.com/go-git/go-git/v5 v5.12.0\n\tgithub.com/stretchr/testify v1.9.0\n\tgolang.org/x/crypto v0.23.0\n)\n\nrequire (\n\tdario.cat/mergo v1.0.0 // indirect\n\tgithub.com/Microsoft/go-winio v0.6.1 // indirect\n\tgithub.com/ProtonMail/go-crypto v1.0.0 // indirect\n\tgithub.com/cloudflare/circl v1.3.7 // indirect\n\tgithub.com/cyphar/filepath-securejoin v0.2.4 // indirect\n\tgithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect\n\tgithub.com/emirpasic/gods v1.18.1 // indirect\n\tgithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect\n\tgithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect\n\tgithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect\n\tgithub.com/kevinburke/ssh_config v1.2.0 // indirect\n\tgithub.com/onsi/gomega v1.30.0 // indirect\n\tgithub.com/pjbgf/sha1cd v0.3.0 // indirect\n\tgithub.com/pkg/errors v0.9.1 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect\n\tgithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect\n\tgithub.com/skeema/knownhosts v1.2.2 // indirect\n\tgithub.com/xanzy/ssh-agent v0.3.3 // indirect\n\tgolang.org/x/mod v0.17.0 // indirect\n\tgolang.org/x/net v0.25.0 // indirect\n\tgolang.org/x/sync v0.7.0 // indirect\n\tgolang.org/x/sys v0.20.0 // indirect\n\tgolang.org/x/tools v0.20.0 // indirect\n\tgopkg.in/warnings.v0 v0.1.2 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "vcs/go.sum",
    "content": "dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=\ngithub.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=\ngithub.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=\ngithub.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78=\ngithub.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=\ngithub.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0=\ngithub.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=\ngithub.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=\ngithub.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE=\ngithub.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=\ngithub.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=\ngithub.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=\ngithub.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=\ngithub.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=\ngithub.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=\ngithub.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=\ngithub.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=\ngithub.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=\ngithub.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=\ngithub.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=\ngithub.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=\ngithub.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=\ngithub.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys=\ngithub.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=\ngithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=\ngithub.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=\ngithub.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=\ngithub.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=\ngithub.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0=\ngithub.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=\ngithub.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=\ngithub.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=\ngithub.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=\ngithub.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=\ngithub.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=\ngithub.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=\ngithub.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=\ngithub.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A=\ngithub.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=\ngithub.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=\ngithub.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=\ngithub.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=\ngithub.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk=\ngithub.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk=\ngithub.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc=\ngithub.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=\ngithub.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=\ngithub.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=\ngithub.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=\ngithub.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=\ngithub.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=\ngolang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=\ngolang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=\ngolang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=\ngolang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=\ngolang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=\ngolang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=\ngolang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=\ngolang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=\ngolang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=\ngolang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=\ngolang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=\ngolang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=\ngolang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=\ngopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\n"
  },
  {
    "path": "vcs/interface.go",
    "content": "package vcs\n\ntype Client interface {\n\tInit() (err error)\n\tDispose() (err error)\n\tClone(opts ...GitCloneOption) (err error)\n\tCheckout(opts ...GitCheckoutOption) (err error)\n\tCommit(msg string, opts ...GitCommitOption) (err error)\n\tPull(opts ...GitPullOption) (err error)\n\tPush(opts ...GitPushOption) (err error)\n\tReset(opts ...GitResetOption) (err error)\n}\n"
  },
  {
    "path": "vcs/test/base.go",
    "content": "package test\n\nimport (\n\tvcs \"github.com/crawlab-team/crawlab/vcs\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc init() {\n\tvar err error\n\tT, err = NewTest()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nvar T *Test\n\ntype Test struct {\n\tRemoteRepoPath           string\n\tLocalRepoPath            string\n\tLocalRepo                *vcs.GitClient\n\tFsRepoPath               string\n\tMemRepoPath              string\n\tAuthRepoPath             string\n\tAuthRepoPath1            string\n\tAuthRepoPath2            string\n\tAuthRepoPath3            string\n\tTestFileName             string\n\tTestFileContent          string\n\tTestBranchName           string\n\tTestCommitMessage        string\n\tInitialCommitMessage     string\n\tInitialReadmeFileName    string\n\tInitialReadmeFileContent string\n}\n\nfunc (t *Test) Setup(t2 *testing.T) {\n\tvar err error\n\tt2.Cleanup(t.Cleanup)\n\n\t// remote repo\n\tif err := vcs.CreateBareGitRepo(t.RemoteRepoPath); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// local repo (fs)\n\tt.LocalRepo, err = vcs.NewGitClient(\n\t\tvcs.WithPath(t.LocalRepoPath),\n\t\tvcs.WithRemoteUrl(t.RemoteRepoPath),\n\t)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// initial commit\n\tfilePath := path.Join(t.LocalRepoPath, t.InitialReadmeFileContent)\n\tif err := ioutil.WriteFile(filePath, []byte(t.InitialReadmeFileContent), os.FileMode(0766)); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := t.LocalRepo.CommitAll(t.InitialCommitMessage); err != nil {\n\t\tpanic(err)\n\t}\n}\n\nfunc (t *Test) Cleanup() {\n\tif err := T.LocalRepo.Dispose(); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := os.RemoveAll(T.RemoteRepoPath); err != nil {\n\t\tpanic(err)\n\t}\n\n\tvcs.GitMemStorages = sync.Map{}\n\tvcs.GitMemFileSystem = sync.Map{}\n\n\t// wait to avoid caching\n\ttime.Sleep(500 * time.Millisecond)\n}\n\nfunc NewTest() (t *Test, err error) {\n\tt = &Test{}\n\n\t// clear tmp directory\n\t_ = os.RemoveAll(\"./tmp\")\n\t_ = os.MkdirAll(\"./tmp\", os.FileMode(0766))\n\n\t// remote repo path\n\tt.RemoteRepoPath = \"./tmp/test_remote_repo\"\n\n\t// local repo path\n\tt.LocalRepoPath = \"./tmp/test_local_repo\"\n\n\t// fs repo path\n\tt.FsRepoPath = \"./tmp/test_fs_repo\"\n\n\t// mem repo path\n\tt.MemRepoPath = \"./tmp/test_mem_repo\"\n\n\t// auth repo path\n\tt.AuthRepoPath = \"./tmp/test_auth_repo\"\n\n\t// auth repo path 1\n\tt.AuthRepoPath1 = \"./tmp/test_auth_repo1\"\n\n\t// auth repo path 2\n\tt.AuthRepoPath2 = \"./tmp/test_auth_repo2\"\n\n\t// auth repo path 3\n\tt.AuthRepoPath3 = \"./tmp/test_auth_repo3\"\n\n\t// test file name\n\tt.TestFileName = \"test_file.txt\"\n\n\t// test file content\n\tt.TestFileContent = \"it works\"\n\n\t// test branch name\n\tt.TestBranchName = \"develop\"\n\n\t// test commit message\n\tt.InitialCommitMessage = \"test commit\"\n\n\t// initial commit message\n\tt.InitialCommitMessage = \"initial commit\"\n\n\t// initial readme file name\n\tt.InitialReadmeFileName = \"README.md\"\n\n\t// initial readme file content\n\tt.InitialReadmeFileContent = \"README\"\n\n\treturn t, nil\n}\n"
  },
  {
    "path": "vcs/test/credential.go",
    "content": "package test\n\ntype Credential struct {\n\tUsername               string `json:\"username\"`\n\tPassword               string `json:\"password\"`\n\tTestRepoHttpUrl        string `json:\"test_repo_http_url\"`\n\tTestRepoMultiBranchUrl string `json:\"test_repo_multi_branch_url\"`\n\tSshUsername            string `json:\"ssh_username\"`\n\tSshPassword            string `json:\"ssh_password\"`\n\tTestRepoSshUrl         string `json:\"test_repo_ssh_url\"`\n\tPrivateKey             string `json:\"private_key\"`\n\tPrivateKeyPath         string `json:\"private_key_path\"`\n}\n"
  },
  {
    "path": "vcs/test/credentials.example.json",
    "content": "{\n  \"username\": \"changeit\",\n  \"password\": \"changeit\",\n  \"test_repo_http_url\": \"https://gitee.com/tikazyq/test-repo\",\n  \"ssh_username\": \"git\",\n  \"ssh_password\": \"\",\n  \"test_repo_ssh_url\": \"git@gitee.com:tikazyq/test-repo.git\",\n  \"private_key\": \"changeit\",\n  \"private_key_path\": \"/root/.ssh/id_rsa\"\n}"
  },
  {
    "path": "vcs/test/git_test.go",
    "content": "package test\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/crawlab-team/crawlab/vcs\"\n\t\"github.com/go-git/go-billy/v5/memfs\"\n\t\"github.com/go-git/go-git/v5\"\n\t\"github.com/go-git/go-git/v5/config\"\n\t\"github.com/go-git/go-git/v5/storage/memory\"\n\t\"github.com/stretchr/testify/require\"\n\t\"os\"\n\t\"path\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestNewGitClient_Existing(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.LocalRepo.GetPath()),\n\t)\n\trequire.Nil(t, err)\n\trequire.NotEmpty(t, c.GetRepository())\n}\n\nfunc TestNewGitClient_Fs(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.FsRepoPath),\n\t\tvcs.WithRemoteUrl(T.RemoteRepoPath),\n\t)\n\trequire.Nil(t, err)\n\trequire.NotEmpty(t, c.GetRepository())\n\trequire.Equal(t, T.RemoteRepoPath, c.GetRemoteUrl())\n}\n\nfunc TestNewGitClient_Mem(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.MemRepoPath),\n\t\tvcs.WithRemoteUrl(T.RemoteRepoPath),\n\t\tvcs.WithIsMem(),\n\t)\n\trequire.Nil(t, err)\n\trequire.NotEmpty(t, c.GetRepository())\n}\n\nfunc TestGitClient_CommitAllAndCheckoutBranch(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// commit\n\tfilePath := path.Join(T.LocalRepoPath, T.TestFileName)\n\terr = os.WriteFile(filePath, []byte(T.TestFileContent), os.FileMode(0766))\n\trequire.Nil(t, err)\n\terr = T.LocalRepo.CommitAll(T.TestCommitMessage)\n\trequire.Nil(t, err)\n\n\t// checkout branch\n\terr = T.LocalRepo.CheckoutBranch(T.TestBranchName)\n\trequire.Nil(t, err)\n\n\t// validate\n\tbranch, err := T.LocalRepo.GetCurrentBranch()\n\trequire.Nil(t, err)\n\trequire.Equal(t, T.TestBranchName, branch)\n\n\t// dispose\n\terr = T.LocalRepo.Dispose()\n\trequire.Nil(t, err)\n}\n\nfunc TestGitClient_Push(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// commit\n\tfilePath := path.Join(T.LocalRepoPath, T.TestFileName)\n\terr = os.WriteFile(filePath, []byte(T.TestFileContent), os.FileMode(0766))\n\trequire.Nil(t, err)\n\terr = T.LocalRepo.CommitAll(T.TestCommitMessage)\n\trequire.Nil(t, err)\n\n\t// push\n\terr = T.LocalRepo.Push()\n\trequire.Nil(t, err)\n}\n\nfunc TestGitClient_Reset(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// file\n\tfilePath := path.Join(T.LocalRepoPath, T.TestFileName)\n\terr = os.WriteFile(filePath, []byte(T.TestFileContent), os.FileMode(0766))\n\trequire.Nil(t, err)\n\n\t// reset\n\terr = T.LocalRepo.Reset(vcs.WithMode(git.HardReset)) // git reset --hard\n\trequire.Nil(t, err)\n\t_, err = os.Stat(filePath)\n\trequire.IsType(t, &os.PathError{}, err)\n}\n\nfunc TestGitClient_GetLogs(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// file\n\tfilePath := path.Join(T.LocalRepoPath, T.TestFileName)\n\terr = os.WriteFile(filePath, []byte(T.TestFileContent), os.FileMode(0766))\n\trequire.Nil(t, err)\n\terr = T.LocalRepo.CommitAll(T.TestCommitMessage)\n\trequire.Nil(t, err)\n\n\t// get logs\n\tlogs, err := T.LocalRepo.GetLogs()\n\trequire.Nil(t, err)\n\trequire.Greater(t, len(logs), 0)\n\trequire.Equal(t, T.TestCommitMessage, logs[0].Msg)\n}\n\nfunc TestGitClient_InitWithHttpAuth(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// get credentials\n\tvar cred Credential\n\tdata, err := os.ReadFile(\"credentials.json\")\n\trequire.Nil(t, err)\n\terr = json.Unmarshal(data, &cred)\n\trequire.Nil(t, err)\n\n\t// create new git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.AuthRepoPath),\n\t\tvcs.WithRemoteUrl(cred.TestRepoHttpUrl),\n\t\tvcs.WithAuthType(vcs.GitAuthTypeHTTP),\n\t\tvcs.WithUsername(cred.Username),\n\t\tvcs.WithPassword(cred.Password),\n\t)\n\trequire.Nil(t, err)\n\trequire.Equal(t, cred.TestRepoHttpUrl, c.GetRemoteUrl())\n\trequire.Equal(t, vcs.GitAuthTypeHTTP, c.GetAuthType())\n\trequire.Equal(t, cred.Username, c.GetUsername())\n\n\t// pull\n\terr = c.Pull()\n\trequire.Nil(t, err)\n\n\t// validate\n\tfiles, err := os.ReadDir(T.AuthRepoPath)\n\trequire.Greater(t, len(files), 0)\n\tdata, err = os.ReadFile(path.Join(T.AuthRepoPath, \"README.md\"))\n\trequire.Nil(t, err)\n\n\t// dispose\n\terr = c.Dispose()\n\trequire.Nil(t, err)\n}\n\nfunc TestGitClient_MoveBranch(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// get credentials\n\tvar cred Credential\n\tdata, err := os.ReadFile(\"credentials.json\")\n\trequire.Nil(t, err)\n\terr = json.Unmarshal(data, &cred)\n\trequire.Nil(t, err)\n\n\t// create new git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.AuthRepoPath),\n\t\tvcs.WithRemoteUrl(cred.TestRepoHttpUrl),\n\t\tvcs.WithAuthType(vcs.GitAuthTypeHTTP),\n\t\tvcs.WithUsername(cred.Username),\n\t\tvcs.WithPassword(cred.Password),\n\t)\n\trequire.Nil(t, err)\n\n\t// pull\n\terr = c.Pull(vcs.WithBranchNamePull(vcs.GitBranchNameMain))\n\trequire.Nil(t, err)\n\n\t// move branch\n\terr = c.MoveBranch(vcs.GitBranchNameMaster, vcs.GitBranchNameMain)\n\trequire.Nil(t, err)\n\n\t// validate\n\tvar branchNames []string\n\tbranches, err := c.GetBranches()\n\trequire.Nil(t, err)\n\tfor _, b := range branches {\n\t\tbranchNames = append(branchNames, b.Name)\n\t}\n\trequire.Contains(t, branchNames, vcs.GitBranchNameMain)\n\trequire.NotContains(t, branchNames, vcs.GitBranchNameMaster)\n}\n\nfunc TestGitClient_PullWithHttpAuth(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// get credentials\n\tvar cred Credential\n\tdata, err := os.ReadFile(\"credentials.json\")\n\trequire.Nil(t, err)\n\terr = json.Unmarshal(data, &cred)\n\trequire.Nil(t, err)\n\n\t// create new git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.AuthRepoPath),\n\t\tvcs.WithRemoteUrl(cred.TestRepoHttpUrl),\n\t\tvcs.WithAuthType(vcs.GitAuthTypeHTTP),\n\t\tvcs.WithUsername(cred.Username),\n\t\tvcs.WithPassword(cred.Password),\n\t)\n\trequire.Nil(t, err)\n\n\t// create remote\n\tr, err := c.CreateRemote(&config.RemoteConfig{\n\t\tName: vcs.GitRemoteNameUpstream,\n\t\tURLs: []string{cred.TestRepoHttpUrl},\n\t})\n\trequire.Nil(t, err)\n\trequire.NotNil(t, r)\n\n\t// pull\n\terr = c.Pull(\n\t\tvcs.WithRemoteNamePull(vcs.GitRemoteNameUpstream),\n\t\tvcs.WithBranchNamePull(vcs.GitBranchNameMain),\n\t)\n\trequire.Nil(t, err)\n\n\t// validate\n\tfiles, err := os.ReadDir(T.AuthRepoPath)\n\trequire.Greater(t, len(files), 0)\n\tdata, err = os.ReadFile(path.Join(T.AuthRepoPath, \"README.md\"))\n\trequire.Nil(t, err)\n\n\t// dispose\n\terr = c.Dispose()\n\trequire.Nil(t, err)\n}\n\nfunc TestGitClient_CheckoutRemoteBranchWithHttpAuth(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// get credentials\n\tvar cred Credential\n\tdata, err := os.ReadFile(\"credentials.json\")\n\trequire.Nil(t, err)\n\terr = json.Unmarshal(data, &cred)\n\trequire.Nil(t, err)\n\n\t// create new git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.AuthRepoPath),\n\t\tvcs.WithRemoteUrl(cred.TestRepoMultiBranchUrl),\n\t\tvcs.WithAuthType(vcs.GitAuthTypeHTTP),\n\t\tvcs.WithUsername(cred.Username),\n\t\tvcs.WithPassword(cred.Password),\n\t)\n\trequire.Nil(t, err)\n\n\t// pull\n\terr = c.Pull(\n\t\tvcs.WithRemoteNamePull(vcs.GitRemoteNameOrigin),\n\t\tvcs.WithBranchNamePull(vcs.GitBranchNameMain),\n\t)\n\trequire.Nil(t, err)\n\n\t// validate\n\t_, err = os.ReadFile(path.Join(T.AuthRepoPath, \"MAIN\"))\n\trequire.Nil(t, err)\n\n\t// checkout remote branch\n\terr = c.CheckoutBranchWithRemote(vcs.GitBranchNameRelease, vcs.GitRemoteNameOrigin, nil)\n\trequire.Nil(t, err)\n\n\t// validate\n\t_, err = os.ReadFile(path.Join(T.AuthRepoPath, \"RELEASE\"))\n\trequire.Nil(t, err)\n\n\t// checkout remote branch\n\terr = c.CheckoutBranchWithRemote(vcs.GitBranchNameDevelop, vcs.GitRemoteNameOrigin, nil)\n\trequire.Nil(t, err)\n\n\t// validate\n\t_, err = os.ReadFile(path.Join(T.AuthRepoPath, \"DEVELOP\"))\n\trequire.Nil(t, err)\n\n\t// dispose\n\terr = c.Dispose()\n\trequire.Nil(t, err)\n}\n\nfunc TestGitClient_InitWithSshAuth_PrivateKey(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// get credentials\n\tvar cred Credential\n\tdata, err := os.ReadFile(\"credentials.json\")\n\trequire.Nil(t, err)\n\terr = json.Unmarshal(data, &cred)\n\trequire.Nil(t, err)\n\tfmt.Println(cred.SshUsername)\n\tfmt.Println(cred.SshPassword)\n\tfmt.Println(cred.TestRepoSshUrl)\n\n\t// git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.AuthRepoPath),\n\t\tvcs.WithRemoteUrl(cred.TestRepoSshUrl),\n\t\tvcs.WithAuthType(vcs.GitAuthTypeSSH),\n\t\tvcs.WithUsername(cred.SshUsername),\n\t\tvcs.WithPassword(cred.SshPassword),\n\t\tvcs.WithPrivateKey(cred.PrivateKey),\n\t)\n\trequire.Nil(t, err)\n\trequire.Equal(t, cred.TestRepoSshUrl, c.GetRemoteUrl())\n\trequire.Equal(t, vcs.GitAuthTypeSSH, c.GetAuthType())\n\trequire.Equal(t, cred.SshUsername, c.GetUsername())\n\tfmt.Println(c.GetAuthType())\n\n\t// pull\n\terr = c.Pull()\n\trequire.Nil(t, err)\n\n\t// validate\n\tfiles, err := os.ReadDir(T.AuthRepoPath)\n\trequire.Greater(t, len(files), 0)\n\tdata, err = os.ReadFile(path.Join(T.AuthRepoPath, \"README.md\"))\n\trequire.Nil(t, err)\n\n\t// dispose\n\terr = c.Dispose()\n\trequire.Nil(t, err)\n}\n\nfunc TestGitClient_InitWithSshAuth_PrivateKeyPath(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// get credentials\n\tvar cred Credential\n\tdata, err := os.ReadFile(\"credentials.json\")\n\trequire.Nil(t, err)\n\terr = json.Unmarshal(data, &cred)\n\trequire.Nil(t, err)\n\n\t// git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.AuthRepoPath),\n\t\tvcs.WithRemoteUrl(cred.TestRepoSshUrl),\n\t\tvcs.WithAuthType(vcs.GitAuthTypeSSH),\n\t\tvcs.WithUsername(cred.SshUsername),\n\t\tvcs.WithPassword(cred.SshPassword),\n\t\tvcs.WithPrivateKeyPath(cred.PrivateKeyPath),\n\t)\n\trequire.Nil(t, err)\n\trequire.Equal(t, cred.TestRepoSshUrl, c.GetRemoteUrl())\n\trequire.Equal(t, vcs.GitAuthTypeSSH, c.GetAuthType())\n\trequire.Equal(t, cred.SshUsername, c.GetUsername())\n\trequire.Equal(t, cred.PrivateKeyPath, c.GetPrivateKeyPath())\n\n\t// pull\n\terr = c.Pull()\n\trequire.Nil(t, err)\n\n\t// validate\n\tfiles, err := os.ReadDir(T.AuthRepoPath)\n\trequire.Greater(t, len(files), 0)\n\tdata, err = os.ReadFile(path.Join(T.AuthRepoPath, \"README.md\"))\n\trequire.Nil(t, err)\n}\n\nfunc TestGitClient_Dispose_Fs(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.FsRepoPath),\n\t\tvcs.WithRemoteUrl(T.RemoteRepoPath),\n\t)\n\trequire.Nil(t, err)\n\n\t// path exists\n\trequire.DirExists(t, T.FsRepoPath)\n\n\t// dispose\n\terr = c.Dispose()\n\trequire.Nil(t, err)\n\n\t// validate\n\t_, err = os.Stat(T.FsRepoPath)\n\trequire.IsType(t, &os.PathError{}, err)\n}\n\nfunc TestGitClient_Dispose_Mem(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// git client\n\tc, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.MemRepoPath),\n\t\tvcs.WithRemoteUrl(T.RemoteRepoPath),\n\t\tvcs.WithIsMem(),\n\t)\n\trequire.Nil(t, err)\n\n\t// mem map exists\n\tstItem, ok := vcs.GitMemStorages.Load(T.MemRepoPath)\n\trequire.True(t, ok)\n\trequire.IsType(t, &memory.Storage{}, stItem)\n\tfsItem, ok := vcs.GitMemFileSystem.Load(T.MemRepoPath)\n\trequire.True(t, ok)\n\trequire.IsType(t, memfs.New(), fsItem)\n\n\t// dispose\n\terr = c.Dispose()\n\trequire.Nil(t, err)\n\n\t// validate\n\t_, ok = vcs.GitMemStorages.Load(\"./tmp/test_repo\")\n\trequire.False(t, ok)\n\t_, ok = vcs.GitMemFileSystem.Load(\"./tmp/test_repo\")\n\trequire.False(t, ok)\n}\n\nfunc TestGitClient_IsRemoteChanged(t *testing.T) {\n\tvar err error\n\tT.Setup(t)\n\n\t// get credentials\n\tvar cred Credential\n\tdata, err := os.ReadFile(\"credentials.json\")\n\trequire.Nil(t, err)\n\terr = json.Unmarshal(data, &cred)\n\trequire.Nil(t, err)\n\n\t// git client\n\tc1, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.AuthRepoPath1),\n\t\tvcs.WithRemoteUrl(cred.TestRepoSshUrl),\n\t\tvcs.WithAuthType(vcs.GitAuthTypeSSH),\n\t\tvcs.WithUsername(cred.SshUsername),\n\t\tvcs.WithPassword(cred.SshPassword),\n\t\tvcs.WithPrivateKeyPath(cred.PrivateKeyPath),\n\t)\n\trequire.Nil(t, err)\n\terr = c1.Pull()\n\trequire.Nil(t, err)\n\terr = c1.CheckoutBranch(\"main\")\n\trequire.Nil(t, err)\n\n\t// git client (for validation)\n\tc2, err := vcs.NewGitClient(\n\t\tvcs.WithPath(T.AuthRepoPath2),\n\t\tvcs.WithRemoteUrl(cred.TestRepoSshUrl),\n\t\tvcs.WithAuthType(vcs.GitAuthTypeSSH),\n\t\tvcs.WithUsername(cred.SshUsername),\n\t\tvcs.WithPassword(cred.SshPassword),\n\t\tvcs.WithPrivateKeyPath(cred.PrivateKeyPath),\n\t)\n\trequire.Nil(t, err)\n\terr = c2.Pull()\n\trequire.Nil(t, err)\n\terr = c2.CheckoutBranch(\"main\")\n\trequire.Nil(t, err)\n\n\t// commit and push\n\ttestFileName := fmt.Sprintf(\"test-%d.txt\", time.Now().Unix())\n\tfilePath := path.Join(c1.GetPath(), testFileName)\n\terr = os.WriteFile(filePath, []byte(T.TestFileContent), os.FileMode(0766))\n\trequire.Nil(t, err)\n\terr = c1.Add(testFileName)\n\trequire.Nil(t, err)\n\terr = c1.CommitAll(fmt.Sprintf(\"added %s\", testFileName))\n\trequire.Nil(t, err)\n\terr = c1.Push()\n\trequire.Nil(t, err)\n\n\t// validate\n\tok, err := c2.IsRemoteChanged()\n\trequire.Nil(t, err)\n\trequire.True(t, ok)\n\n\t// pull and validate\n\terr = c2.Pull()\n\trequire.Nil(t, err)\n\tok, err = c2.IsRemoteChanged()\n\trequire.Nil(t, err)\n\trequire.False(t, ok)\n}\n"
  },
  {
    "path": "vcs/utils.go",
    "content": "package vcs\n\nimport (\n\t\"os/user\"\n\t\"path/filepath\"\n)\n\nfunc getDefaultPublicKeyPath() (path string) {\n\tu, err := user.Current()\n\tif err != nil {\n\t\treturn path\n\t}\n\tpath = filepath.Join(u.HomeDir, \".ssh\", \"id_rsa\")\n\treturn\n}\n"
  },
  {
    "path": "workspace/.gitignore",
    "content": "data/\n"
  },
  {
    "path": "workspace/docker-compose.yml",
    "content": "version: '3.3'\nservices:\n  build:\n    build:\n      context: ./dockerfiles/golang\n    command: /bin/bash -c \"rm -f /backend/dist/crawlab && go build -o ./dist/crawlab ./\"\n    volumes:\n      - ./dist:/backend/dist\n      - ./.crawlab/go/pkg/mod:/go/pkg/mod\n      - ../backend:/backend\n      - ../backend/go.mod.local:/backend/go.mod\n      - ../..:/libs/crawlab-team\n    environment:\n      GOPROXY: https://goproxy.cn,direct\n\n  master:\n    build:\n      context: ./dockerfiles/golang\n    command: /bin/bash -c \"/app/bin/docker-start-master.sh && /dist/crawlab master\"\n    volumes:\n      - ./dist:/dist\n      - ./.crawlab/master:/root/.crawlab\n      - ./.crawlab/go/pkg/mod:/go/pkg/mod\n      - ../backend:/backend\n      - ../backend/go.mod.local:/backend/go.mod\n      - ../..:/libs/crawlab-team\n      - ../bin:/app/bin\n      - ../nginx:/etc/nginx/conf.d\n      - ../frontend/dist:/app/dist\n    environment:\n      CRAWLAB_NODE_MASTER: \"Y\"\n      CRAWLAB_NODE_NAME: \"Master Node\"\n      CRAWLAB_MONGO_HOST: \"mongo\"\n      CRAWLAB_LOG_LEVEL: debug\n      GOPROXY: https://goproxy.cn,direct\n    ports:\n      - \"9080:8080\"\n      - \"9000:8000\"\n      - \"9866:9666\"\n      - \"9888:8888\"\n    depends_on:\n      - mongo\n\n  worker01:\n    build:\n      context: ./dockerfiles/golang\n    command: /bin/bash -c \"/dist/crawlab worker\"\n    environment:\n      CRAWLAB_NODE_MASTER: \"N\"\n      CRAWLAB_NODE_NAME: \"Worker Node 01\"\n      CRAWLAB_GRPC_ADDRESS: \"master\"\n      CRAWLAB_FS_FILER_URL: \"http://master:8080/api/filer\"\n      CRAWLAB_LOG_LEVEL: debug\n      GOPROXY: https://goproxy.cn,direct\n    volumes:\n      - ./dist:/dist\n      - ./.crawlab/worker01:/root/.crawlab\n      - ./.crawlab/go/pkg/mod:/go/pkg/mod\n      - ../backend:/backend\n      - ../backend/go.mod.local:/backend/go.mod\n      - ../..:/libs/crawlab-team\n    depends_on:\n      - master\n\n  worker02:\n    build:\n      context: ./dockerfiles/golang\n    command: /bin/bash -c \"/dist/crawlab worker\"\n    environment:\n      CRAWLAB_NODE_MASTER: \"N\"\n      CRAWLAB_NODE_NAME: \"Worker Node 02\"\n      CRAWLAB_GRPC_ADDRESS: \"master\"\n      CRAWLAB_FS_FILER_URL: \"http://master:8080/api/filer\"\n      CRAWLAB_LOG_LEVEL: debug\n      GOPROXY: https://goproxy.cn,direct\n    volumes:\n      - ./dist:/dist\n      - ./.crawlab/worker02:/root/.crawlab\n      - ./.crawlab/go/pkg/mod:/go/pkg/mod\n      - ../backend:/backend\n      - ../backend/go.mod.local:/backend/go.mod\n      - ../..:/libs/crawlab-team\n    depends_on:\n      - master\n      - worker01\n\n  mongo:\n    image: mongo:4\n    restart: always\n    ports:\n      - \"28017:27017\"\n"
  },
  {
    "path": "workspace/dockerfiles/golang/Dockerfile",
    "content": "FROM golang:1.16\n\nRUN go env -w GOPROXY=https://goproxy.io,https://goproxy.cn && \\\n    go env -w GO111MODULE=\"on\"\n\nWORKDIR /tools\nRUN go get github.com/cosmtrek/air\n\nWORKDIR /backend\nRUN rm -rf /tools\n\n# set as non-interactive\nENV DEBIAN_FRONTEND noninteractive\n\n# install packages\nRUN chmod 777 /tmp \\\n\t&& apt-get update \\\n\t&& apt-get install -y curl git net-tools iputils-ping ntp ntpdate nginx wget dumb-init cloc\n\n# install python\nRUN apt-get install -y python3 python3-pip \\\n\t&& ln -s /usr/bin/pip3 /usr/local/bin/pip \\\n\t&& ln -s /usr/bin/python3 /usr/local/bin/python\n\n# install golang\nRUN curl -OL https://storage.googleapis.com/golang/go1.16.7.linux-amd64.tar.gz \\\n\t&& tar -C /usr/local -xvf go1.16.7.linux-amd64.tar.gz \\\n\t&& ln -s /usr/local/go/bin/go /usr/local/bin/go \\\n\t&& rm go1.16.7.linux-amd64.tar.gz\n\n# install seaweedfs\nRUN wget https://github.com/chrislusf/seaweedfs/releases/download/2.76/linux_amd64.tar.gz \\\n  && tar -zxf linux_amd64.tar.gz \\\n  && cp weed /usr/local/bin \\\n  && rm linux_amd64.tar.gz\n\n# install backend\nRUN pip install scrapy pymongo bs4 requests -i https://mirrors.aliyun.com/pypi/simple\nRUN pip install crawlab-sdk==0.6.b20211024-1207\n\nVOLUME /backend\nEXPOSE 8080\n"
  },
  {
    "path": "workspace/dockerfiles/node/.dockerignore",
    "content": "**/node_modules/\n"
  },
  {
    "path": "workspace/dockerfiles/node/Dockerfile",
    "content": "FROM node:12\nWORKDIR frontend\nENV SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/\nRUN npm config set registry \"http://registry.npm.taobao.org\"\n"
  },
  {
    "path": "workspace/localdev/README.md",
    "content": "# Local Dev\n\nFor those who want to develop or contribute to crawlab project can use `docker-compose.yml` to start necessary containers (fs, mongo) to support local development.\n\nPlease make sure you have installed [Docker](https://docker.io) and [Docker-Compose](https://docs.docker.com/compose/).\n\n## Start Containers\n\n```bash\ndocker-compose up -d\n```\n\n## Stop Containers\n\n```bash\ndocker-compose down\n```\n"
  },
  {
    "path": "workspace/localdev/docker-compose.yml",
    "content": "version: '2'\n\nservices:\n\n  fs:\n    image: chrislusf/seaweedfs:2.79 # use a remote image\n    container_name: crawlab_localdev_fs\n    restart: always\n#    command: \"server -dir /data -master.dir /data -volume.dir.idx /data -ip localhost -ip.bind 0.0.0.0 -filer -encryptVolumeData\" # auth\n    command: \"server -dir /data -master.dir /data -volume.dir.idx /data -ip localhost -ip.bind 0.0.0.0 -filer\" # no auth\n    ports:\n      - 8080:8080\n      - 8888:8888\n      - 9333:9333\n      - 7333:7333\n    volumes:\n      - ./data/fs:/data\n  \n  mongo:\n    image: mongo:5\n    container_name: crawlab_localdev_mongo\n    restart: always\n    ports:\n      - 27017:27017\n    volumes:\n      - ./data/mongo:/data\n\n  mysql:\n    platform: linux/x86_64\n    image: mysql:8\n    container_name: crawlab_local_dev_mysql\n    restart: always\n    command: --default-authentication-plugin=mysql_native_password\n    ports:\n      - 3306:3306\n    volumes:\n      - ./data/mysql:/var/lib/mysql\n    environment:\n      MYSQL_ROOT_PASSWORD: crawlab\n      MYSQL_DATABASE: crawlab\n      MYSQL_USER: crawlab\n      MYSQL_PASSWORD: crawlab\n"
  }
]